IMS-VT: PiP Menu For VT-TX Call Mode
When the VT call is in non-bidirectional mode, do not allow
user to disable camera preview. This change provents
the UE from going into a state where the PiP menu can
no longer be brought up by the long press gesture.
CRs-Fixed: 1108216
Change-Id: I9fafd11a5759187b109c704bef54daa1229069bf
diff --git a/InCallUI/src/com/android/incallui/PictureModeHelper.java b/InCallUI/src/com/android/incallui/PictureModeHelper.java
index d73ef3b..81f7990 100644
--- a/InCallUI/src/com/android/incallui/PictureModeHelper.java
+++ b/InCallUI/src/com/android/incallui/PictureModeHelper.java
@@ -57,6 +57,7 @@
InCallStateListener, CallList.Listener {
private AlertDialog mAlertDialog;
+ private boolean mIsVideoCallBidirectional;
/**
* Indicates whether we should display camera preview video view
@@ -216,12 +217,13 @@
/**
* This method enables or disables the checkbox passed in based on whether the flag enable
- * is set to true or false. Also toggle the checkbox being clickable.
+ * is set to true or false. Enable the checkbox only if the call is in the Bidirectional
+ * mode.
* @param CheckBox checkBox - the check Box to enable/disable
* @param boolean enable - Flag to enable/disable checkbox (true/false)
*/
private void enable(CheckBox checkBox, boolean enable) {
- checkBox.setEnabled(enable);
+ checkBox.setEnabled(enable && mIsVideoCallBidirectional);
checkBox.setClickable(enable);
}
@@ -271,6 +273,9 @@
if (!VideoUtils.isVideoCall(call) && mAlertDialog != null) {
mAlertDialog.dismiss();
}
+ mIsVideoCallBidirectional = VideoUtils.isBidirectionalVideoCall(call);
+ Log.d(this, "onDetailsChanged :: Setting mIsVideoCallBidirectional to "
+ + mIsVideoCallBidirectional);
}
/**