Loading flags/telecom_bluetoothdevicemanager_flags.aconfig +0 −10 Original line number Diff line number Diff line Loading @@ -18,13 +18,3 @@ flag { purpose: PURPOSE_BUGFIX } } # OWNER=grantmenke TARGET=25Q2 flag { name: "skip_baseline_switch_when_route_not_bluetooth" namespace: "telecom" description: "Only switch back to baseline if the call audio is currently routed to bluetooth" bug: "333417369" metadata { purpose: PURPOSE_BUGFIX } } No newline at end of file src/com/android/server/telecom/bluetooth/BluetoothDeviceManager.java +8 −13 Original line number Diff line number Diff line Loading @@ -269,7 +269,6 @@ public class BluetoothDeviceManager { BT_DEVICE_REMOVED, route.getType(), device); } if (mFeatureFlags.skipBaselineSwitchWhenRouteNotBluetooth()) { CallAudioState currentAudioState = controller.getCurrentCallAudioState(); int currentRoute = currentAudioState.getRoute(); if (currentRoute == CallAudioState.ROUTE_BLUETOOTH) { Loading @@ -281,10 +280,6 @@ public class BluetoothDeviceManager { Log.d(this, "handleAudioRefactoringServiceDisconnected: call audio " + "is not currently routed to BT so skipping switch to baseline"); } } else { mCallAudioRouteAdapter.sendMessageWithSessionInfo( SWITCH_BASELINE_ROUTE, INCLUDE_BLUETOOTH_IN_BASELINE, (String) null); } } private final LinkedHashMap<String, BluetoothDevice> mHfpDevicesByAddress = Loading tests/src/com/android/server/telecom/tests/BluetoothDeviceManagerTest.java +0 −2 Original line number Diff line number Diff line Loading @@ -310,7 +310,6 @@ public class BluetoothDeviceManagerTest extends TelecomTestCase { @SmallTest @Test public void testHandleAudioRefactoringServiceDisconnectedWhileBluetooth() { when(mFeatureFlags.skipBaselineSwitchWhenRouteNotBluetooth()).thenReturn(true); Map<AudioRoute, BluetoothDevice> btRoutes = new HashMap<>(); when(mCallAudioRouteController.getBluetoothRoutes()).thenReturn(btRoutes); when(mCallAudioRouteController.getCurrentCallAudioState()).thenReturn(mCallAudioState); Loading @@ -326,7 +325,6 @@ public class BluetoothDeviceManagerTest extends TelecomTestCase { @SmallTest @Test public void testHandleAudioRefactoringServiceDisconnectedWhileSpeaker() { when(mFeatureFlags.skipBaselineSwitchWhenRouteNotBluetooth()).thenReturn(true); Map<AudioRoute, BluetoothDevice> btRoutes = new HashMap<>(); when(mCallAudioRouteController.getBluetoothRoutes()).thenReturn(btRoutes); when(mCallAudioRouteController.getCurrentCallAudioState()).thenReturn(mCallAudioState); Loading Loading
flags/telecom_bluetoothdevicemanager_flags.aconfig +0 −10 Original line number Diff line number Diff line Loading @@ -18,13 +18,3 @@ flag { purpose: PURPOSE_BUGFIX } } # OWNER=grantmenke TARGET=25Q2 flag { name: "skip_baseline_switch_when_route_not_bluetooth" namespace: "telecom" description: "Only switch back to baseline if the call audio is currently routed to bluetooth" bug: "333417369" metadata { purpose: PURPOSE_BUGFIX } } No newline at end of file
src/com/android/server/telecom/bluetooth/BluetoothDeviceManager.java +8 −13 Original line number Diff line number Diff line Loading @@ -269,7 +269,6 @@ public class BluetoothDeviceManager { BT_DEVICE_REMOVED, route.getType(), device); } if (mFeatureFlags.skipBaselineSwitchWhenRouteNotBluetooth()) { CallAudioState currentAudioState = controller.getCurrentCallAudioState(); int currentRoute = currentAudioState.getRoute(); if (currentRoute == CallAudioState.ROUTE_BLUETOOTH) { Loading @@ -281,10 +280,6 @@ public class BluetoothDeviceManager { Log.d(this, "handleAudioRefactoringServiceDisconnected: call audio " + "is not currently routed to BT so skipping switch to baseline"); } } else { mCallAudioRouteAdapter.sendMessageWithSessionInfo( SWITCH_BASELINE_ROUTE, INCLUDE_BLUETOOTH_IN_BASELINE, (String) null); } } private final LinkedHashMap<String, BluetoothDevice> mHfpDevicesByAddress = Loading
tests/src/com/android/server/telecom/tests/BluetoothDeviceManagerTest.java +0 −2 Original line number Diff line number Diff line Loading @@ -310,7 +310,6 @@ public class BluetoothDeviceManagerTest extends TelecomTestCase { @SmallTest @Test public void testHandleAudioRefactoringServiceDisconnectedWhileBluetooth() { when(mFeatureFlags.skipBaselineSwitchWhenRouteNotBluetooth()).thenReturn(true); Map<AudioRoute, BluetoothDevice> btRoutes = new HashMap<>(); when(mCallAudioRouteController.getBluetoothRoutes()).thenReturn(btRoutes); when(mCallAudioRouteController.getCurrentCallAudioState()).thenReturn(mCallAudioState); Loading @@ -326,7 +325,6 @@ public class BluetoothDeviceManagerTest extends TelecomTestCase { @SmallTest @Test public void testHandleAudioRefactoringServiceDisconnectedWhileSpeaker() { when(mFeatureFlags.skipBaselineSwitchWhenRouteNotBluetooth()).thenReturn(true); Map<AudioRoute, BluetoothDevice> btRoutes = new HashMap<>(); when(mCallAudioRouteController.getBluetoothRoutes()).thenReturn(btRoutes); when(mCallAudioRouteController.getCurrentCallAudioState()).thenReturn(mCallAudioState); Loading