Loading flags/telecom_bluetoothdevicemanager_flags.aconfig +1 −1 Original line number Original line Diff line number Diff line Loading @@ -10,7 +10,7 @@ flag { } } # OWNER=huiwang TARGET=25Q1 # OWNER=huiwang TARGET=25Q1 flag { flag { name: "keep_bt_devices_cache_updated" name: "keep_bluetooth_devices_cache_updated" namespace: "telecom" namespace: "telecom" description: "Fix the devices cache issue of BluetoothDeviceManager" description: "Fix the devices cache issue of BluetoothDeviceManager" bug: "380320985" bug: "380320985" Loading src/com/android/server/telecom/bluetooth/BluetoothDeviceManager.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -519,7 +519,7 @@ public class BluetoothDeviceManager { Log.i(this, "onDeviceConnected: Adding device with address: %s and devicetype=%s", Log.i(this, "onDeviceConnected: Adding device with address: %s and devicetype=%s", device, getDeviceTypeString(deviceType)); device, getDeviceTypeString(deviceType)); targetDeviceMap.put(device.getAddress(), device); targetDeviceMap.put(device.getAddress(), device); if (!mFeatureFlags.keepBtDevicesCacheUpdated() if (!mFeatureFlags.keepBluetoothDevicesCacheUpdated() || !mFeatureFlags.useRefactoredAudioRouteSwitching()) { || !mFeatureFlags.useRefactoredAudioRouteSwitching()) { mBluetoothRouteManager.onDeviceAdded(device.getAddress()); mBluetoothRouteManager.onDeviceAdded(device.getAddress()); } } Loading Loading @@ -554,7 +554,7 @@ public class BluetoothDeviceManager { Log.i(this, "onDeviceDisconnected: Removing device with address: %s, devicetype=%s", Log.i(this, "onDeviceDisconnected: Removing device with address: %s, devicetype=%s", device, getDeviceTypeString(deviceType)); device, getDeviceTypeString(deviceType)); targetDeviceMap.remove(device.getAddress()); targetDeviceMap.remove(device.getAddress()); if (!mFeatureFlags.keepBtDevicesCacheUpdated() if (!mFeatureFlags.keepBluetoothDevicesCacheUpdated() || !mFeatureFlags.useRefactoredAudioRouteSwitching()) { || !mFeatureFlags.useRefactoredAudioRouteSwitching()) { mBluetoothRouteManager.onDeviceLost(device.getAddress()); mBluetoothRouteManager.onDeviceLost(device.getAddress()); } } Loading src/com/android/server/telecom/bluetooth/BluetoothStateReceiver.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -211,7 +211,7 @@ public class BluetoothStateReceiver extends BroadcastReceiver { if (mFeatureFlags.useRefactoredAudioRouteSwitching()) { if (mFeatureFlags.useRefactoredAudioRouteSwitching()) { mCallAudioRouteAdapter.sendMessageWithSessionInfo(BT_DEVICE_ADDED, mCallAudioRouteAdapter.sendMessageWithSessionInfo(BT_DEVICE_ADDED, audioRouteType, device); audioRouteType, device); if (mFeatureFlags.keepBtDevicesCacheUpdated()) { if (mFeatureFlags.keepBluetoothDevicesCacheUpdated()) { mBluetoothDeviceManager.onDeviceConnected(device, deviceType); mBluetoothDeviceManager.onDeviceConnected(device, deviceType); } } } else { } else { Loading @@ -222,7 +222,7 @@ public class BluetoothStateReceiver extends BroadcastReceiver { if (mFeatureFlags.useRefactoredAudioRouteSwitching()) { if (mFeatureFlags.useRefactoredAudioRouteSwitching()) { mCallAudioRouteAdapter.sendMessageWithSessionInfo(BT_DEVICE_REMOVED, mCallAudioRouteAdapter.sendMessageWithSessionInfo(BT_DEVICE_REMOVED, audioRouteType, device); audioRouteType, device); if (mFeatureFlags.keepBtDevicesCacheUpdated()) { if (mFeatureFlags.keepBluetoothDevicesCacheUpdated()) { mBluetoothDeviceManager.onDeviceDisconnected(device, deviceType); mBluetoothDeviceManager.onDeviceDisconnected(device, deviceType); } } } else { } else { Loading Loading
flags/telecom_bluetoothdevicemanager_flags.aconfig +1 −1 Original line number Original line Diff line number Diff line Loading @@ -10,7 +10,7 @@ flag { } } # OWNER=huiwang TARGET=25Q1 # OWNER=huiwang TARGET=25Q1 flag { flag { name: "keep_bt_devices_cache_updated" name: "keep_bluetooth_devices_cache_updated" namespace: "telecom" namespace: "telecom" description: "Fix the devices cache issue of BluetoothDeviceManager" description: "Fix the devices cache issue of BluetoothDeviceManager" bug: "380320985" bug: "380320985" Loading
src/com/android/server/telecom/bluetooth/BluetoothDeviceManager.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -519,7 +519,7 @@ public class BluetoothDeviceManager { Log.i(this, "onDeviceConnected: Adding device with address: %s and devicetype=%s", Log.i(this, "onDeviceConnected: Adding device with address: %s and devicetype=%s", device, getDeviceTypeString(deviceType)); device, getDeviceTypeString(deviceType)); targetDeviceMap.put(device.getAddress(), device); targetDeviceMap.put(device.getAddress(), device); if (!mFeatureFlags.keepBtDevicesCacheUpdated() if (!mFeatureFlags.keepBluetoothDevicesCacheUpdated() || !mFeatureFlags.useRefactoredAudioRouteSwitching()) { || !mFeatureFlags.useRefactoredAudioRouteSwitching()) { mBluetoothRouteManager.onDeviceAdded(device.getAddress()); mBluetoothRouteManager.onDeviceAdded(device.getAddress()); } } Loading Loading @@ -554,7 +554,7 @@ public class BluetoothDeviceManager { Log.i(this, "onDeviceDisconnected: Removing device with address: %s, devicetype=%s", Log.i(this, "onDeviceDisconnected: Removing device with address: %s, devicetype=%s", device, getDeviceTypeString(deviceType)); device, getDeviceTypeString(deviceType)); targetDeviceMap.remove(device.getAddress()); targetDeviceMap.remove(device.getAddress()); if (!mFeatureFlags.keepBtDevicesCacheUpdated() if (!mFeatureFlags.keepBluetoothDevicesCacheUpdated() || !mFeatureFlags.useRefactoredAudioRouteSwitching()) { || !mFeatureFlags.useRefactoredAudioRouteSwitching()) { mBluetoothRouteManager.onDeviceLost(device.getAddress()); mBluetoothRouteManager.onDeviceLost(device.getAddress()); } } Loading
src/com/android/server/telecom/bluetooth/BluetoothStateReceiver.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -211,7 +211,7 @@ public class BluetoothStateReceiver extends BroadcastReceiver { if (mFeatureFlags.useRefactoredAudioRouteSwitching()) { if (mFeatureFlags.useRefactoredAudioRouteSwitching()) { mCallAudioRouteAdapter.sendMessageWithSessionInfo(BT_DEVICE_ADDED, mCallAudioRouteAdapter.sendMessageWithSessionInfo(BT_DEVICE_ADDED, audioRouteType, device); audioRouteType, device); if (mFeatureFlags.keepBtDevicesCacheUpdated()) { if (mFeatureFlags.keepBluetoothDevicesCacheUpdated()) { mBluetoothDeviceManager.onDeviceConnected(device, deviceType); mBluetoothDeviceManager.onDeviceConnected(device, deviceType); } } } else { } else { Loading @@ -222,7 +222,7 @@ public class BluetoothStateReceiver extends BroadcastReceiver { if (mFeatureFlags.useRefactoredAudioRouteSwitching()) { if (mFeatureFlags.useRefactoredAudioRouteSwitching()) { mCallAudioRouteAdapter.sendMessageWithSessionInfo(BT_DEVICE_REMOVED, mCallAudioRouteAdapter.sendMessageWithSessionInfo(BT_DEVICE_REMOVED, audioRouteType, device); audioRouteType, device); if (mFeatureFlags.keepBtDevicesCacheUpdated()) { if (mFeatureFlags.keepBluetoothDevicesCacheUpdated()) { mBluetoothDeviceManager.onDeviceDisconnected(device, deviceType); mBluetoothDeviceManager.onDeviceDisconnected(device, deviceType); } } } else { } else { Loading