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

Commit d7da98e7 authored by Hansong Zhang's avatar Hansong Zhang Committed by Myles Watson
Browse files

Bluetooth airplane listener: Check for null

Check mAirplaneHelper != null before accessing it.  Note that this can
be null if Settings.Global.RADIO_BLUETOOTH is enabled in
AIRPLANE_MODE_RADIOS.  We don't need to disable Bluetooth if it's
allowed in airplane mode.

Test: atest FrameworksServicesTests
Bug: 174254527
Change-Id: I93ae4ec6b75b7ffb8e75848d7779ab64593221bd
(cherry picked from commit a107eae7)
parent ff82368c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -127,8 +127,10 @@ class BluetoothAirplaneModeListener {
            }
            return;
        }
        if (mAirplaneHelper != null) {
            mAirplaneHelper.onAirplaneModeChanged(mBluetoothManager);
        }
    }

    @VisibleForTesting
    boolean shouldSkipAirplaneModeChange() {