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

Commit 0c73e5b4 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Bluetooth: Check state correctly when client wants to bind" into rvc-qpr-dev

parents 6403bb4c 37349665
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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");
                }