Loading service/java/com/android/server/bluetooth/BluetoothManagerService.java +7 −1 Original line number Diff line number Diff line Loading @@ -302,6 +302,8 @@ public class BluetoothManagerService extends IBluetoothManager.Stub { // Save a ProfileServiceConnections object for each of the bound // bluetooth profile services private final Map<Integer, ProfileServiceConnections> mProfileServices = new HashMap<>(); @GuardedBy("mProfileServices") private boolean mUnbindingAll = false; private final IBluetoothCallback mBluetoothCallback = new IBluetoothCallback.Stub() { @Override Loading Loading @@ -1600,13 +1602,16 @@ public class BluetoothManagerService extends IBluetoothManager.Stub { } catch (IllegalArgumentException e) { Log.e(TAG, "Unable to unbind service with intent: " + psc.mIntent, e); } if (!mUnbindingAll) { mProfileServices.remove(profile); } } } } private void unbindAllBluetoothProfileServices() { synchronized (mProfileServices) { mUnbindingAll = true; for (Integer i : mProfileServices.keySet()) { ProfileServiceConnections psc = mProfileServices.get(i); try { Loading @@ -1616,6 +1621,7 @@ public class BluetoothManagerService extends IBluetoothManager.Stub { } psc.removeAllProxies(); } mUnbindingAll = false; mProfileServices.clear(); } } Loading Loading
service/java/com/android/server/bluetooth/BluetoothManagerService.java +7 −1 Original line number Diff line number Diff line Loading @@ -302,6 +302,8 @@ public class BluetoothManagerService extends IBluetoothManager.Stub { // Save a ProfileServiceConnections object for each of the bound // bluetooth profile services private final Map<Integer, ProfileServiceConnections> mProfileServices = new HashMap<>(); @GuardedBy("mProfileServices") private boolean mUnbindingAll = false; private final IBluetoothCallback mBluetoothCallback = new IBluetoothCallback.Stub() { @Override Loading Loading @@ -1600,13 +1602,16 @@ public class BluetoothManagerService extends IBluetoothManager.Stub { } catch (IllegalArgumentException e) { Log.e(TAG, "Unable to unbind service with intent: " + psc.mIntent, e); } if (!mUnbindingAll) { mProfileServices.remove(profile); } } } } private void unbindAllBluetoothProfileServices() { synchronized (mProfileServices) { mUnbindingAll = true; for (Integer i : mProfileServices.keySet()) { ProfileServiceConnections psc = mProfileServices.get(i); try { Loading @@ -1616,6 +1621,7 @@ public class BluetoothManagerService extends IBluetoothManager.Stub { } psc.removeAllProxies(); } mUnbindingAll = false; mProfileServices.clear(); } } Loading