Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 654d1ef5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Bluetooth: Check state correctly when client wants to bind" am:...

Merge "Bluetooth: Check state correctly when client wants to bind" am: d77aaf6a am: 4e1fe29c am: c8f2295f

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1524638

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia6463c8f6a801cd9db54afa30df0aa3f16b09891
parents 018a3adb c8f2295f
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1275,7 +1275,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
    @Override
    @Override
    public boolean bindBluetoothProfileService(int bluetoothProfile,
    public boolean bindBluetoothProfileService(int bluetoothProfile,
            IBluetoothProfileServiceConnection proxy) {
            IBluetoothProfileServiceConnection proxy) {
        if (!mEnable) {
        if (mState != BluetoothAdapter.STATE_ON) {
            if (DBG) {
            if (DBG) {
                Slog.d(TAG, "Trying to bind to profile: " + bluetoothProfile
                Slog.d(TAG, "Trying to bind to profile: " + bluetoothProfile
                        + ", while Bluetooth was disabled");
                        + ", while Bluetooth was disabled");
@@ -1441,7 +1441,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
                mBluetoothLock.readLock().unlock();
                mBluetoothLock.readLock().unlock();
            }
            }


            if (!mEnable || state != BluetoothAdapter.STATE_ON) {
            if (state != BluetoothAdapter.STATE_ON) {
                if (DBG) {
                if (DBG) {
                    Slog.d(TAG, "Unable to bindService while Bluetooth is disabled");
                    Slog.d(TAG, "Unable to bindService while Bluetooth is disabled");
                }
                }