Loading src/com/android/server/telecom/bluetooth/BluetoothDeviceManager.java +20 −14 Original line number Diff line number Diff line Loading @@ -157,6 +157,7 @@ public class BluetoothDeviceManager { Set<Long> seenHiSyncIds = new LinkedHashSet<>(); // Add the left-most active device to the seen list so that we match up with the list // generated in BluetoothRouteManager. if (mBluetoothAdapter != null) { for (BluetoothDevice device : mBluetoothAdapter.getActiveDevices( BluetoothProfile.HEARING_AID)) { if (device != null) { Loading @@ -165,6 +166,7 @@ public class BluetoothDeviceManager { break; } } } synchronized (mLock) { for (BluetoothDevice d : mHearingAidDevicesByAddress.values()) { long hiSyncId = mHearingAidDeviceSyncIds.getOrDefault(d, -1L); Loading Loading @@ -244,12 +246,14 @@ public class BluetoothDeviceManager { } public void disconnectAudio() { if (mBluetoothAdapter != null) { for (BluetoothDevice device: mBluetoothAdapter.getActiveDevices( BluetoothProfile.HEARING_AID)) { if (device != null) { mBluetoothAdapter.setActiveDevice(null, BluetoothAdapter.ACTIVE_DEVICE_ALL); } } } disconnectSco(); } Loading Loading @@ -295,6 +299,7 @@ public class BluetoothDeviceManager { } public void cacheHearingAidDevice() { if (mBluetoothAdapter != null) { for (BluetoothDevice device : mBluetoothAdapter.getActiveDevices( BluetoothProfile.HEARING_AID)) { if (device != null) { Loading @@ -302,6 +307,7 @@ public class BluetoothDeviceManager { } } } } public void restoreHearingAidDevice() { if (mBluetoothHearingAidActiveDeviceCache != null) { Loading Loading
src/com/android/server/telecom/bluetooth/BluetoothDeviceManager.java +20 −14 Original line number Diff line number Diff line Loading @@ -157,6 +157,7 @@ public class BluetoothDeviceManager { Set<Long> seenHiSyncIds = new LinkedHashSet<>(); // Add the left-most active device to the seen list so that we match up with the list // generated in BluetoothRouteManager. if (mBluetoothAdapter != null) { for (BluetoothDevice device : mBluetoothAdapter.getActiveDevices( BluetoothProfile.HEARING_AID)) { if (device != null) { Loading @@ -165,6 +166,7 @@ public class BluetoothDeviceManager { break; } } } synchronized (mLock) { for (BluetoothDevice d : mHearingAidDevicesByAddress.values()) { long hiSyncId = mHearingAidDeviceSyncIds.getOrDefault(d, -1L); Loading Loading @@ -244,12 +246,14 @@ public class BluetoothDeviceManager { } public void disconnectAudio() { if (mBluetoothAdapter != null) { for (BluetoothDevice device: mBluetoothAdapter.getActiveDevices( BluetoothProfile.HEARING_AID)) { if (device != null) { mBluetoothAdapter.setActiveDevice(null, BluetoothAdapter.ACTIVE_DEVICE_ALL); } } } disconnectSco(); } Loading Loading @@ -295,6 +299,7 @@ public class BluetoothDeviceManager { } public void cacheHearingAidDevice() { if (mBluetoothAdapter != null) { for (BluetoothDevice device : mBluetoothAdapter.getActiveDevices( BluetoothProfile.HEARING_AID)) { if (device != null) { Loading @@ -302,6 +307,7 @@ public class BluetoothDeviceManager { } } } } public void restoreHearingAidDevice() { if (mBluetoothHearingAidActiveDeviceCache != null) { Loading