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

Commit a868fca6 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Merge "Disable Bluetooth if BLE was disabled while enabling" into...

Merge "Merge "Disable Bluetooth if BLE was disabled while enabling" into rvc-dev am: 6e97539e am: 3e5586b2" into rvc-d1-dev-plus-aosp am: 8626f485 am: 54847c45

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

Change-Id: I6f8b777460ab3a3bfd96f999d45f1b3d2f74239c
parents 5a9f6cf0 54847c45
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -954,7 +954,8 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
    }

    /**
     * Call IBluetooth.onLeServiceUp() to continue if Bluetooth should be on.
     * Call IBluetooth.onLeServiceUp() to continue if Bluetooth should be on,
     * call IBluetooth.onBrEdrDown() to disable if Bluetooth should be off.
     */
    private void continueFromBleOnState() {
        if (DBG) {
@@ -966,11 +967,10 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
                Slog.e(TAG, "onBluetoothServiceUp: mBluetooth is null!");
                return;
            }
            if (!mEnableExternal && !isBleAppPresent() && isAirplaneModeOn()) {
                // Airplane mode is turned on while enabling BLE only mode, disable
                // BLE now.
                disableBleScanMode();
                sendBrEdrDownCallback();
            if (!mEnableExternal && !isBleAppPresent()) {
                Slog.i(TAG, "Bluetooth was disabled while enabling BLE, disable BLE now");
                mEnable = false;
                mBluetooth.onBrEdrDown();
                return;
            }
            if (isBluetoothPersistedStateOnBluetooth() || !isBleAppPresent()) {