Loading flags/telecom_call_flags.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -56,17 +56,6 @@ flag { } } # OWNER=tjstuart TARGET=25Q1 flag { name: "remap_transactional_capabilities" namespace: "telecom" description: "Transactional call capabilities need to be remapped to Connection capabilities" bug: "366063695" metadata { purpose: PURPOSE_BUGFIX } } # OWNER=breadley TARGET=25Q2 flag { name: "enable_respond_via_sms_manager_async" Loading src/com/android/server/telecom/Call.java +0 −6 Original line number Diff line number Diff line Loading @@ -2360,12 +2360,6 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable, } public void setTransactionalCapabilities(Bundle extras) { if (!mFlags.remapTransactionalCapabilities()) { setConnectionCapabilities( extras.getInt(CallAttributes.CALL_CAPABILITIES_KEY, CallAttributes.SUPPORTS_SET_INACTIVE), true); return; } int connectionCapabilitesBitmap = 0; int transactionalCapabilitiesBitmap = extras.getInt( CallAttributes.CALL_CAPABILITIES_KEY, Loading tests/src/com/android/server/telecom/tests/CallTest.java +3 −13 Original line number Diff line number Diff line Loading @@ -158,21 +158,11 @@ public class CallTest extends TelecomTestCase { @Test @SmallTest public void testTransactionalCallCapabilityRemapping() { // ensure when the flag is disabled, the old behavior is unchanged Bundle disabledFlagExtras = new Bundle(); Call call = createCall("1", Call.CALL_DIRECTION_INCOMING); disabledFlagExtras.putInt(CallAttributes.CALL_CAPABILITIES_KEY, Connection.CAPABILITY_MERGE_CONFERENCE); when(mFeatureFlags.remapTransactionalCapabilities()).thenReturn(false); call.setTransactionalCapabilities(disabledFlagExtras); assertTrue(call.can(Connection.CAPABILITY_MERGE_CONFERENCE)); // enable the bug fix flag and ensure the transactional capabilities are remapped Bundle enabledFlagExtras = new Bundle(); Bundle extras = new Bundle(); Call call2 = createCall("2", Call.CALL_DIRECTION_INCOMING); enabledFlagExtras.putInt(CallAttributes.CALL_CAPABILITIES_KEY, extras.putInt(CallAttributes.CALL_CAPABILITIES_KEY, CallAttributes.SUPPORTS_SET_INACTIVE); when(mFeatureFlags.remapTransactionalCapabilities()).thenReturn(true); call2.setTransactionalCapabilities(enabledFlagExtras); call2.setTransactionalCapabilities(extras); assertTrue(call2.can(Connection.CAPABILITY_HOLD)); assertTrue(call2.can(Connection.CAPABILITY_SUPPORT_HOLD)); } Loading Loading
flags/telecom_call_flags.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -56,17 +56,6 @@ flag { } } # OWNER=tjstuart TARGET=25Q1 flag { name: "remap_transactional_capabilities" namespace: "telecom" description: "Transactional call capabilities need to be remapped to Connection capabilities" bug: "366063695" metadata { purpose: PURPOSE_BUGFIX } } # OWNER=breadley TARGET=25Q2 flag { name: "enable_respond_via_sms_manager_async" Loading
src/com/android/server/telecom/Call.java +0 −6 Original line number Diff line number Diff line Loading @@ -2360,12 +2360,6 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable, } public void setTransactionalCapabilities(Bundle extras) { if (!mFlags.remapTransactionalCapabilities()) { setConnectionCapabilities( extras.getInt(CallAttributes.CALL_CAPABILITIES_KEY, CallAttributes.SUPPORTS_SET_INACTIVE), true); return; } int connectionCapabilitesBitmap = 0; int transactionalCapabilitiesBitmap = extras.getInt( CallAttributes.CALL_CAPABILITIES_KEY, Loading
tests/src/com/android/server/telecom/tests/CallTest.java +3 −13 Original line number Diff line number Diff line Loading @@ -158,21 +158,11 @@ public class CallTest extends TelecomTestCase { @Test @SmallTest public void testTransactionalCallCapabilityRemapping() { // ensure when the flag is disabled, the old behavior is unchanged Bundle disabledFlagExtras = new Bundle(); Call call = createCall("1", Call.CALL_DIRECTION_INCOMING); disabledFlagExtras.putInt(CallAttributes.CALL_CAPABILITIES_KEY, Connection.CAPABILITY_MERGE_CONFERENCE); when(mFeatureFlags.remapTransactionalCapabilities()).thenReturn(false); call.setTransactionalCapabilities(disabledFlagExtras); assertTrue(call.can(Connection.CAPABILITY_MERGE_CONFERENCE)); // enable the bug fix flag and ensure the transactional capabilities are remapped Bundle enabledFlagExtras = new Bundle(); Bundle extras = new Bundle(); Call call2 = createCall("2", Call.CALL_DIRECTION_INCOMING); enabledFlagExtras.putInt(CallAttributes.CALL_CAPABILITIES_KEY, extras.putInt(CallAttributes.CALL_CAPABILITIES_KEY, CallAttributes.SUPPORTS_SET_INACTIVE); when(mFeatureFlags.remapTransactionalCapabilities()).thenReturn(true); call2.setTransactionalCapabilities(enabledFlagExtras); call2.setTransactionalCapabilities(extras); assertTrue(call2.can(Connection.CAPABILITY_HOLD)); assertTrue(call2.can(Connection.CAPABILITY_SUPPORT_HOLD)); } Loading