Merge "IMS-VT: Update pause video capabilities for conference call Update pause video capabilities for conference call if pausing outgoing video is supported on host connection"
diff --git a/src/com/android/services/telephony/ImsConference.java b/src/com/android/services/telephony/ImsConference.java
index 4acb6f8..6c4fadc 100644
--- a/src/com/android/services/telephony/ImsConference.java
+++ b/src/com/android/services/telephony/ImsConference.java
@@ -330,6 +330,10 @@
Connection.CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO,
can(capabilities, Connection.CAPABILITY_CANNOT_DOWNGRADE_VIDEO_TO_AUDIO));
+ conferenceCapabilities = changeBitmask(conferenceCapabilities,
+ Connection.CAPABILITY_CAN_PAUSE_VIDEO,
+ mConferenceHost.getVideoPauseSupported() && isVideoCapable());
+
return conferenceCapabilities;
}
@@ -940,6 +944,16 @@
}
}
+ /**
+ * Determines if the host of this conference is capable of video calling.
+ * @return {@code true} if video capable, {@code false} otherwise.
+ */
+ private boolean isVideoCapable() {
+ int capabilities = mConferenceHost.getConnectionCapabilities();
+ return can(capabilities, Connection.CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL)
+ && can(capabilities, Connection.CAPABILITY_SUPPORTS_VT_REMOTE_BIDIRECTIONAL);
+ }
+
private void updateStatusHints() {
if (mConferenceHost == null) {
setStatusHints(null);
diff --git a/src/com/android/services/telephony/ImsConferenceController.java b/src/com/android/services/telephony/ImsConferenceController.java
index f7d587d..4df6444 100644
--- a/src/com/android/services/telephony/ImsConferenceController.java
+++ b/src/com/android/services/telephony/ImsConferenceController.java
@@ -343,6 +343,7 @@
// This is necessary since the Connection Service does not support removing a connection
// from Telecom. Instead we create a new instance and remove the old one from telecom.
TelephonyConnection conferenceHostConnection = connection.cloneConnection();
+ conferenceHostConnection.setVideoPauseSupported(connection.getVideoPauseSupported());
PhoneAccountHandle phoneAccountHandle = null;
diff --git a/src/com/android/services/telephony/TelephonyConnection.java b/src/com/android/services/telephony/TelephonyConnection.java
index 078b025..5ae1a26 100644
--- a/src/com/android/services/telephony/TelephonyConnection.java
+++ b/src/com/android/services/telephony/TelephonyConnection.java
@@ -1549,6 +1549,14 @@
}
/**
+ * @return {@code true} if this connection supports pausing the outgoing video using the
+ * {@link android.telecom.VideoProfile#STATE_PAUSED} VideoState.
+ */
+ public boolean getVideoPauseSupported() {
+ return mIsVideoPauseSupported;
+ }
+
+ /**
* Sets whether this connection supports conference calling.
* @param isConferenceSupported {@code true} if conference calling is supported by this
* connection, {@code false} otherwise.