Loading flags/telecom_callaudioroutestatemachine_flags.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -57,17 +57,6 @@ flag { bug: "301695370" } # OWNER=tgunn TARGET=25Q2 flag { name: "only_clear_communication_device_on_inactive" namespace: "telecom" description: "Only clear the communication device when transitioning to an inactive route." bug: "376781369" metadata { purpose: PURPOSE_BUGFIX } } # OWNER=tgunn TARGET=25Q2 flag { name: "check_device_type_on_route_change" Loading src/com/android/server/telecom/AudioRoute.java +1 −4 Original line number Diff line number Diff line Loading @@ -451,10 +451,7 @@ public class AudioRoute { } // Only clear communication device if the destination route will be inactive; route to // route transitions do not require clearing the communication device. boolean onlyClearCommunicationDeviceOnInactive = pendingAudioRoute.getFeatureFlags().onlyClearCommunicationDeviceOnInactive(); if ((!onlyClearCommunicationDeviceOnInactive && !shouldDisconnectSco) || !pendingAudioRoute.isActive()) { if (!pendingAudioRoute.isActive()) { Log.i(this, "clearCommunicationDevice: AudioManager#clearCommunicationDevice, type=%s", DEVICE_TYPE_STRINGS.get(pendingAudioRoute.getCommunicationDeviceType())); Loading tests/src/com/android/server/telecom/tests/CallAudioRouteControllerTest.java +7 −34 Original line number Diff line number Diff line Loading @@ -864,13 +864,6 @@ public class CallAudioRouteControllerTest extends TelecomTestCase { verifyDisconnectBluetoothDevice(AudioRoute.TYPE_BLUETOOTH_SCO); } @SmallTest @Test public void testConnectDisconnectScoDuringCallNoClear() { when(mFeatureFlags.onlyClearCommunicationDeviceOnInactive()).thenReturn(true); verifyConnectBluetoothDevice(AudioRoute.TYPE_BLUETOOTH_SCO); verifyDisconnectBluetoothDevice(AudioRoute.TYPE_BLUETOOTH_SCO); } @SmallTest @Test Loading @@ -881,15 +874,6 @@ public class CallAudioRouteControllerTest extends TelecomTestCase { verifyDisconnectBluetoothDevice(AudioRoute.TYPE_BLUETOOTH_LE); } @SmallTest @Test public void testConnectAndDisconnectLeDeviceDuringCallNoClear() { when(mFeatureFlags.onlyClearCommunicationDeviceOnInactive()).thenReturn(true); when(mBluetoothLeAudio.getConnectedGroupLeadDevice(anyInt())) .thenReturn(BLUETOOTH_DEVICE_1); verifyConnectBluetoothDevice(AudioRoute.TYPE_BLUETOOTH_LE); verifyDisconnectBluetoothDevice(AudioRoute.TYPE_BLUETOOTH_LE); } @SmallTest @Test Loading @@ -898,13 +882,6 @@ public class CallAudioRouteControllerTest extends TelecomTestCase { verifyDisconnectBluetoothDevice(AudioRoute.TYPE_BLUETOOTH_HA); } @SmallTest @Test public void testConnectAndDisconnectHearingAidDuringCallNoClear() { when(mFeatureFlags.onlyClearCommunicationDeviceOnInactive()).thenReturn(true); verifyConnectBluetoothDevice(AudioRoute.TYPE_BLUETOOTH_HA); verifyDisconnectBluetoothDevice(AudioRoute.TYPE_BLUETOOTH_HA); } @SmallTest @Test Loading Loading @@ -1531,7 +1508,6 @@ public class CallAudioRouteControllerTest extends TelecomTestCase { if (audioType == AudioRoute.TYPE_BLUETOOTH_SCO) { verify(mBluetoothDeviceManager, timeout(TEST_TIMEOUT)).disconnectSco(); } else { if (mFeatureFlags.onlyClearCommunicationDeviceOnInactive()) { verify(mAudioManager, timeout(TEST_TIMEOUT).times(2)) .setCommunicationDevice(any(AudioDeviceInfo.class)); // Don't use a timeout here because that will cause the test to pause for a long Loading @@ -1539,9 +1515,6 @@ public class CallAudioRouteControllerTest extends TelecomTestCase { // have already waited for any AudioManager invocations to take place. Any // potential clear would have happened by now. verify(mAudioManager, never()).clearCommunicationDevice(); } else { verify(mAudioManager, timeout(TEST_TIMEOUT)).clearCommunicationDevice(); } } verify(mCallsManager, timeout(TEST_TIMEOUT)).onCallAudioStateChanged( any(CallAudioState.class), eq(expectedState)); Loading Loading
flags/telecom_callaudioroutestatemachine_flags.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -57,17 +57,6 @@ flag { bug: "301695370" } # OWNER=tgunn TARGET=25Q2 flag { name: "only_clear_communication_device_on_inactive" namespace: "telecom" description: "Only clear the communication device when transitioning to an inactive route." bug: "376781369" metadata { purpose: PURPOSE_BUGFIX } } # OWNER=tgunn TARGET=25Q2 flag { name: "check_device_type_on_route_change" Loading
src/com/android/server/telecom/AudioRoute.java +1 −4 Original line number Diff line number Diff line Loading @@ -451,10 +451,7 @@ public class AudioRoute { } // Only clear communication device if the destination route will be inactive; route to // route transitions do not require clearing the communication device. boolean onlyClearCommunicationDeviceOnInactive = pendingAudioRoute.getFeatureFlags().onlyClearCommunicationDeviceOnInactive(); if ((!onlyClearCommunicationDeviceOnInactive && !shouldDisconnectSco) || !pendingAudioRoute.isActive()) { if (!pendingAudioRoute.isActive()) { Log.i(this, "clearCommunicationDevice: AudioManager#clearCommunicationDevice, type=%s", DEVICE_TYPE_STRINGS.get(pendingAudioRoute.getCommunicationDeviceType())); Loading
tests/src/com/android/server/telecom/tests/CallAudioRouteControllerTest.java +7 −34 Original line number Diff line number Diff line Loading @@ -864,13 +864,6 @@ public class CallAudioRouteControllerTest extends TelecomTestCase { verifyDisconnectBluetoothDevice(AudioRoute.TYPE_BLUETOOTH_SCO); } @SmallTest @Test public void testConnectDisconnectScoDuringCallNoClear() { when(mFeatureFlags.onlyClearCommunicationDeviceOnInactive()).thenReturn(true); verifyConnectBluetoothDevice(AudioRoute.TYPE_BLUETOOTH_SCO); verifyDisconnectBluetoothDevice(AudioRoute.TYPE_BLUETOOTH_SCO); } @SmallTest @Test Loading @@ -881,15 +874,6 @@ public class CallAudioRouteControllerTest extends TelecomTestCase { verifyDisconnectBluetoothDevice(AudioRoute.TYPE_BLUETOOTH_LE); } @SmallTest @Test public void testConnectAndDisconnectLeDeviceDuringCallNoClear() { when(mFeatureFlags.onlyClearCommunicationDeviceOnInactive()).thenReturn(true); when(mBluetoothLeAudio.getConnectedGroupLeadDevice(anyInt())) .thenReturn(BLUETOOTH_DEVICE_1); verifyConnectBluetoothDevice(AudioRoute.TYPE_BLUETOOTH_LE); verifyDisconnectBluetoothDevice(AudioRoute.TYPE_BLUETOOTH_LE); } @SmallTest @Test Loading @@ -898,13 +882,6 @@ public class CallAudioRouteControllerTest extends TelecomTestCase { verifyDisconnectBluetoothDevice(AudioRoute.TYPE_BLUETOOTH_HA); } @SmallTest @Test public void testConnectAndDisconnectHearingAidDuringCallNoClear() { when(mFeatureFlags.onlyClearCommunicationDeviceOnInactive()).thenReturn(true); verifyConnectBluetoothDevice(AudioRoute.TYPE_BLUETOOTH_HA); verifyDisconnectBluetoothDevice(AudioRoute.TYPE_BLUETOOTH_HA); } @SmallTest @Test Loading Loading @@ -1531,7 +1508,6 @@ public class CallAudioRouteControllerTest extends TelecomTestCase { if (audioType == AudioRoute.TYPE_BLUETOOTH_SCO) { verify(mBluetoothDeviceManager, timeout(TEST_TIMEOUT)).disconnectSco(); } else { if (mFeatureFlags.onlyClearCommunicationDeviceOnInactive()) { verify(mAudioManager, timeout(TEST_TIMEOUT).times(2)) .setCommunicationDevice(any(AudioDeviceInfo.class)); // Don't use a timeout here because that will cause the test to pause for a long Loading @@ -1539,9 +1515,6 @@ public class CallAudioRouteControllerTest extends TelecomTestCase { // have already waited for any AudioManager invocations to take place. Any // potential clear would have happened by now. verify(mAudioManager, never()).clearCommunicationDevice(); } else { verify(mAudioManager, timeout(TEST_TIMEOUT)).clearCommunicationDevice(); } } verify(mCallsManager, timeout(TEST_TIMEOUT)).onCallAudioStateChanged( any(CallAudioState.class), eq(expectedState)); Loading