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

Commit 8871c2b3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

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

parents 3f1384cf 7113f77d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1265,7 +1265,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");
@@ -1431,7 +1431,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");
                }