diff options
| author | 2020-12-17 01:47:52 +0000 | |
|---|---|---|
| committer | 2020-12-17 01:47:52 +0000 | |
| commit | 0c73e5b4e9524ae921fd0184d0fdf2d8d39a693e (patch) | |
| tree | f814413f06684f2f177f69c4ce052d24e7ace3a8 | |
| parent | 6403bb4cc2f9dd141a08e34f74d81ab34da85210 (diff) | |
| parent | 373496657d71c481308604d50bce409741699608 (diff) | |
Merge "Bluetooth: Check state correctly when client wants to bind" into rvc-qpr-dev
| -rw-r--r-- | services/core/java/com/android/server/BluetoothManagerService.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/BluetoothManagerService.java b/services/core/java/com/android/server/BluetoothManagerService.java index 8c38b66dd44e..9ce7cf27f9ff 100644 --- a/services/core/java/com/android/server/BluetoothManagerService.java +++ b/services/core/java/com/android/server/BluetoothManagerService.java @@ -1236,7 +1236,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { @Override public boolean bindBluetoothProfileService(int bluetoothProfile, IBluetoothProfileServiceConnection proxy) { - if (!mEnable) { + if (mState != BluetoothAdapter.STATE_ON) { if (DBG) { Slog.d(TAG, "Trying to bind to profile: " + bluetoothProfile + ", while Bluetooth was disabled"); @@ -1400,7 +1400,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { mBluetoothLock.readLock().unlock(); } - if (!mEnable || state != BluetoothAdapter.STATE_ON) { + if (state != BluetoothAdapter.STATE_ON) { if (DBG) { Slog.d(TAG, "Unable to bindService while Bluetooth is disabled"); } |