IMS: Propagate local video capabilities as it is
Propagate local video capabilities as it is
Test: Manual
Bug: 129990379
Change-Id: Iec7e4c6fc792aadb43f85a391a90e17b33b942ec
diff --git a/src/com/android/server/telecom/Call.java b/src/com/android/server/telecom/Call.java
index 454321b..86a0c3a 100644
--- a/src/com/android/server/telecom/Call.java
+++ b/src/com/android/server/telecom/Call.java
@@ -1613,14 +1613,6 @@
Log.v(this, "setConnectionCapabilities: %s", Connection.capabilitiesToString(
connectionCapabilities));
if (forceUpdate || mConnectionCapabilities != connectionCapabilities) {
- // If the phone account does not support video calling, and the connection capabilities
- // passed in indicate that the call supports video, remove those video capabilities.
- if (!isVideoCallingSupportedByPhoneAccount()
- && doesCallSupportVideo(connectionCapabilities)) {
- Log.w(this, "setConnectionCapabilities: attempt to set connection as video " +
- "capable when not supported by the phone account.");
- connectionCapabilities = removeVideoCapabilities(connectionCapabilities);
- }
int previousCapabilities = mConnectionCapabilities;
mConnectionCapabilities = connectionCapabilities;
for (Listener l : mListeners) {
diff --git a/tests/src/com/android/server/telecom/tests/CallsManagerTest.java b/tests/src/com/android/server/telecom/tests/CallsManagerTest.java
index 1b63a42..ef294bd 100644
--- a/tests/src/com/android/server/telecom/tests/CallsManagerTest.java
+++ b/tests/src/com/android/server/telecom/tests/CallsManagerTest.java
@@ -1193,28 +1193,9 @@
assertTrue((newCapabilities & Connection.CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL)
== Connection.CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL);
assertTrue(ongoingCall.isVideoCallingSupportedByPhoneAccount());
-
- // Fire a changed event for the phone account making it not capable.
- mCallsManager.getPhoneAccountListener().onPhoneAccountChanged(mPhoneAccountRegistrar,
- SIM_2_ACCOUNT);
- newCapabilities = capabilitiesQueue.poll(TEST_TIMEOUT, TimeUnit.MILLISECONDS);
- assertFalse((newCapabilities & Connection.CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL)
- == Connection.CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL);
- assertFalse(ongoingCall.isVideoCallingSupportedByPhoneAccount());
-
- // Fire a change for an unrelated phone account.
- PhoneAccount anotherVideoCapableAcct = new PhoneAccount.Builder(SIM_1_ACCOUNT)
- .setCapabilities(SIM_2_ACCOUNT.getCapabilities()
- | PhoneAccount.CAPABILITY_VIDEO_CALLING)
- .build();
- mCallsManager.getPhoneAccountListener().onPhoneAccountChanged(mPhoneAccountRegistrar,
- anotherVideoCapableAcct);
- // Call still should not be video capable
- assertFalse((ongoingCall.getConnectionCapabilities()
- & Connection.CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL)
- == Connection.CAPABILITY_SUPPORTS_VT_LOCAL_BIDIRECTIONAL);
}
+
private Call addSpyCall() {
return addSpyCall(SIM_2_HANDLE, CallState.ACTIVE);
}