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

Commit a107eae7 authored by Hansong Zhang's avatar Hansong Zhang
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
parent 390e3df5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -119,8 +119,10 @@ class BluetoothAirplaneModeListener {
            }
            return;
        }
        if (mAirplaneHelper != null) {
            mAirplaneHelper.onAirplaneModeChanged(mBluetoothManager);
        }
    }

    @VisibleForTesting
    boolean shouldSkipAirplaneModeChange() {