mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
Fix crashing bugs
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
a2de1bfd9d
commit
75fb4cbea1
@ -52,6 +52,7 @@ import com.nextcloud.talk.models.json.participants.ParticipantsOverall;
|
|||||||
import com.nextcloud.talk.models.json.rooms.Room;
|
import com.nextcloud.talk.models.json.rooms.Room;
|
||||||
import com.nextcloud.talk.models.json.rooms.RoomsOverall;
|
import com.nextcloud.talk.models.json.rooms.RoomsOverall;
|
||||||
import com.nextcloud.talk.utils.ApiUtils;
|
import com.nextcloud.talk.utils.ApiUtils;
|
||||||
|
import com.nextcloud.talk.utils.MagicFlipView;
|
||||||
import com.nextcloud.talk.utils.bundle.BundleKeys;
|
import com.nextcloud.talk.utils.bundle.BundleKeys;
|
||||||
import com.nextcloud.talk.utils.glide.GlideApp;
|
import com.nextcloud.talk.utils.glide.GlideApp;
|
||||||
import com.nextcloud.talk.utils.preferences.AppPreferences;
|
import com.nextcloud.talk.utils.preferences.AppPreferences;
|
||||||
@ -88,6 +89,13 @@ public class CallNotificationController extends BaseController {
|
|||||||
|
|
||||||
@BindView(R.id.avatarImageView)
|
@BindView(R.id.avatarImageView)
|
||||||
ImageView avatarImageView;
|
ImageView avatarImageView;
|
||||||
|
|
||||||
|
@BindView(R.id.callAnswerVoiceOnlyView)
|
||||||
|
MagicFlipView callAnswerVoiceOnlyView;
|
||||||
|
|
||||||
|
@BindView(R.id.callAnswerCameraView)
|
||||||
|
MagicFlipView callAnswerCameraView;
|
||||||
|
|
||||||
private List<Disposable> disposablesList = new ArrayList<>();
|
private List<Disposable> disposablesList = new ArrayList<>();
|
||||||
private Bundle originalBundle;
|
private Bundle originalBundle;
|
||||||
private String roomId;
|
private String roomId;
|
||||||
@ -114,6 +122,11 @@ public class CallNotificationController extends BaseController {
|
|||||||
return inflater.inflate(R.layout.controller_call_notification, container, false);
|
return inflater.inflate(R.layout.controller_call_notification, container, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void showAnswerControls() {
|
||||||
|
callAnswerCameraView.setVisibility(View.VISIBLE);
|
||||||
|
callAnswerVoiceOnlyView.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
@OnClick(R.id.callControlHangupView)
|
@OnClick(R.id.callControlHangupView)
|
||||||
void hangup() {
|
void hangup() {
|
||||||
leavingScreen = true;
|
leavingScreen = true;
|
||||||
@ -212,6 +225,7 @@ public class CallNotificationController extends BaseController {
|
|||||||
conversationNameTextView.setText(room.getDisplayName());
|
conversationNameTextView.setText(room.getDisplayName());
|
||||||
loadAvatar();
|
loadAvatar();
|
||||||
checkIfAnyParticipantsRemainInRoom();
|
checkIfAnyParticipantsRemainInRoom();
|
||||||
|
showAnswerControls();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/grey950">
|
android:background="@color/grey950">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/incomingCallTextView"
|
android:id="@+id/incomingCallTextView"
|
||||||
@ -36,7 +36,7 @@
|
|||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/conversationNameTextView"
|
android:id="@+id/conversationNameTextView"
|
||||||
@ -47,7 +47,7 @@
|
|||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="28sp"
|
android:textSize="28sp"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/incomingCallTextView"
|
app:layout_constraintTop_toBottomOf="@+id/incomingCallTextView"
|
||||||
tools:text="Victor Gregorius Magnus" />
|
tools:text="Victor Gregorius Magnus"/>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/avatarImageView"
|
android:id="@+id/avatarImageView"
|
||||||
@ -58,34 +58,37 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintVertical_bias="0.45"
|
app:layout_constraintVertical_bias="0.45"
|
||||||
tools:src="@color/white" />
|
tools:src="@color/white"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:animateLayoutChanges="true"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent">
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
<com.nextcloud.talk.utils.MagicFlipView
|
<com.nextcloud.talk.utils.MagicFlipView
|
||||||
android:id="@+id/callAnswerVoiceOnlyView"
|
android:id="@+id/callAnswerVoiceOnlyView"
|
||||||
android:layout_width="60dp"
|
android:layout_width="60dp"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:layout_margin="24dp"
|
android:layout_margin="24dp"
|
||||||
|
android:visibility="gone"
|
||||||
app:checked="false"
|
app:checked="false"
|
||||||
app:enableInitialAnimation="false"
|
app:enableInitialAnimation="false"
|
||||||
app:frontBackgroundColor="@color/colorPrimary"
|
app:frontBackgroundColor="@color/colorPrimary"
|
||||||
app:frontImage="@drawable/ic_mic_white_24px" />
|
app:frontImage="@drawable/ic_mic_white_24px"/>
|
||||||
|
|
||||||
<com.nextcloud.talk.utils.MagicFlipView
|
<com.nextcloud.talk.utils.MagicFlipView
|
||||||
android:id="@+id/callAnswerCameraView"
|
android:id="@+id/callAnswerCameraView"
|
||||||
android:layout_width="60dp"
|
android:layout_width="60dp"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:layout_margin="24dp"
|
android:layout_margin="24dp"
|
||||||
|
android:visibility="gone"
|
||||||
app:checked="false"
|
app:checked="false"
|
||||||
app:enableInitialAnimation="false"
|
app:enableInitialAnimation="false"
|
||||||
app:frontBackgroundColor="@color/colorPrimary"
|
app:frontBackgroundColor="@color/colorPrimary"
|
||||||
app:frontImage="@drawable/ic_videocam_white_24px" />
|
app:frontImage="@drawable/ic_videocam_white_24px"/>
|
||||||
|
|
||||||
|
|
||||||
<com.nextcloud.talk.utils.MagicFlipView
|
<com.nextcloud.talk.utils.MagicFlipView
|
||||||
android:id="@+id/callControlHangupView"
|
android:id="@+id/callControlHangupView"
|
||||||
@ -95,7 +98,7 @@
|
|||||||
app:checked="false"
|
app:checked="false"
|
||||||
app:enableInitialAnimation="false"
|
app:enableInitialAnimation="false"
|
||||||
app:frontBackgroundColor="@color/nc_darkRed"
|
app:frontBackgroundColor="@color/nc_darkRed"
|
||||||
app:frontImage="@drawable/ic_call_end_white_24px" />
|
app:frontImage="@drawable/ic_call_end_white_24px"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</android.support.constraint.ConstraintLayout>
|
</android.support.constraint.ConstraintLayout>
|
||||||
|
Loading…
Reference in New Issue
Block a user