Loading service/java/com/android/server/bluetooth/BluetoothManagerService.java +12 −8 Original line number Original line Diff line number Diff line Loading @@ -638,6 +638,9 @@ class BluetoothManagerService extends IBluetoothManager.Stub { if (appCount == 0 && mEnable) { if (appCount == 0 && mEnable) { disableBleScanMode(); disableBleScanMode(); } } if (appCount == 0 && !mEnableExternal) { sendBrEdrDownCallback(); } return appCount; return appCount; } } Loading Loading @@ -693,7 +696,14 @@ class BluetoothManagerService extends IBluetoothManager.Stub { return; return; } } if (isBleAppPresent() == false) { if (isBleAppPresent()) { // Need to stay at BLE ON. Disconnect all Gatt connections try { mBluetoothGatt.unregAll(); } catch (RemoteException e) { Slog.e(TAG, "Unable to disconnect all apps.", e); } } else { try { try { mBluetoothLock.readLock().lock(); mBluetoothLock.readLock().lock(); if (mBluetooth != null) mBluetooth.onBrEdrDown(); if (mBluetooth != null) mBluetooth.onBrEdrDown(); Loading @@ -702,14 +712,8 @@ class BluetoothManagerService extends IBluetoothManager.Stub { } finally { } finally { mBluetoothLock.readLock().unlock(); mBluetoothLock.readLock().unlock(); } } } else { // Need to stay at BLE ON. Disconnect all Gatt connections try { mBluetoothGatt.unregAll(); } catch (RemoteException e) { Slog.e(TAG, "Unable to disconnect all apps.", e); } } } } } public boolean enableNoAutoConnect(String packageName) public boolean enableNoAutoConnect(String packageName) Loading Loading
service/java/com/android/server/bluetooth/BluetoothManagerService.java +12 −8 Original line number Original line Diff line number Diff line Loading @@ -638,6 +638,9 @@ class BluetoothManagerService extends IBluetoothManager.Stub { if (appCount == 0 && mEnable) { if (appCount == 0 && mEnable) { disableBleScanMode(); disableBleScanMode(); } } if (appCount == 0 && !mEnableExternal) { sendBrEdrDownCallback(); } return appCount; return appCount; } } Loading Loading @@ -693,7 +696,14 @@ class BluetoothManagerService extends IBluetoothManager.Stub { return; return; } } if (isBleAppPresent() == false) { if (isBleAppPresent()) { // Need to stay at BLE ON. Disconnect all Gatt connections try { mBluetoothGatt.unregAll(); } catch (RemoteException e) { Slog.e(TAG, "Unable to disconnect all apps.", e); } } else { try { try { mBluetoothLock.readLock().lock(); mBluetoothLock.readLock().lock(); if (mBluetooth != null) mBluetooth.onBrEdrDown(); if (mBluetooth != null) mBluetooth.onBrEdrDown(); Loading @@ -702,14 +712,8 @@ class BluetoothManagerService extends IBluetoothManager.Stub { } finally { } finally { mBluetoothLock.readLock().unlock(); mBluetoothLock.readLock().unlock(); } } } else { // Need to stay at BLE ON. Disconnect all Gatt connections try { mBluetoothGatt.unregAll(); } catch (RemoteException e) { Slog.e(TAG, "Unable to disconnect all apps.", e); } } } } } public boolean enableNoAutoConnect(String packageName) public boolean enableNoAutoConnect(String packageName) Loading