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

Commit 1079411c authored by Ram Periathiruvadi's avatar Ram Periathiruvadi Committed by android-build-merger
Browse files

Merge "Fix for Bluetooth not restarting on User Switch" am: 196b72aa am: 54326175

am: 5100f55b

Change-Id: I7e897d209b648c583d271904cf6fdcf6c3d227c3
parents 694d4926 5100f55b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1697,7 +1697,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
                    mHandler.removeMessages(MESSAGE_USER_SWITCHED);

                    /* disable and enable BT when detect a user switch */
                    if (mEnable && mBluetooth != null) {
                    if (mBluetooth != null && isEnabled()) {
                        try {
                            mBluetoothLock.readLock().lock();
                            if (mBluetooth != null) {
@@ -1766,6 +1766,8 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
                        mState = BluetoothAdapter.STATE_OFF;
                        // enable
                        addActiveLog(REASON_USER_SWITCH, true);
                        // mEnable flag could have been reset on disableBLE. Reenable it.
                        mEnable = true;
                        handleEnable(mQuietEnable);
                    } else if (mBinding || mBluetooth != null) {
                        Message userMsg = mHandler.obtainMessage(MESSAGE_USER_SWITCHED);