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

Commit 5fc90712 authored by William Escande's avatar William Escande
Browse files

Remove code called twice

Unbind is already called in `BluetoothStateChangeHandler(_, STATE_OFF);`

Bug: 285046954
Bug: 262605980
Test: None | no-op
Change-Id: Ied6afa1188b84fd89de69d87613034373b1bfa11
parent ee41dca2
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -2468,19 +2468,6 @@ class BluetoothManagerService {
            boolean didDisableTimeout = !waitForState(STATE_OFF);

            bluetoothStateChangeHandler(STATE_TURNING_OFF, STATE_OFF);
            sendBluetoothServiceDownCallback();

            mAdapterLock.writeLock().lock();
            try {
                if (mAdapter != null) {
                    mAdapter = null;
                    // Unbind
                    mContext.unbindService(mConnection);
                }
                mBluetoothGatt = null;
            } finally {
                mAdapterLock.writeLock().unlock();
            }

            //
            // If disabling Bluetooth times out, wait for an