Loading src/com/android/server/telecom/Call.java +0 −8 Original line number Diff line number Diff line Loading @@ -1614,14 +1614,6 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable, 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) { Loading tests/src/com/android/server/telecom/tests/CallsManagerTest.java +1 −20 Original line number Diff line number Diff line Loading @@ -1193,28 +1193,9 @@ public class CallsManagerTest extends TelecomTestCase { 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); } Loading Loading
src/com/android/server/telecom/Call.java +0 −8 Original line number Diff line number Diff line Loading @@ -1614,14 +1614,6 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable, 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) { Loading
tests/src/com/android/server/telecom/tests/CallsManagerTest.java +1 −20 Original line number Diff line number Diff line Loading @@ -1193,28 +1193,9 @@ public class CallsManagerTest extends TelecomTestCase { 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); } Loading