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

Commit 58427f03 authored by Bruno Martins's avatar Bruno Martins
Browse files

AirplaneModePreferenceController: Fix NPE when toggle is hidden

When airplane mode toggle is not available, i.e. the overlay
config_show_toggle_airplane is set to false, the Settings app
will crash when leaving "Network and Internet" menu.

Change-Id: Iaf5bd05d59091ba615a55eedc5243806a627da7b
parent 9ace1904
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -141,8 +141,10 @@ public class AirplaneModePreferenceController extends TogglePreferenceController

    @Override
    public void onDestroy() {
        if (isAvailable()) {
            mAirplaneModeEnabler.close();
        }
    }


    public void onActivityResult(int requestCode, int resultCode, Intent data) {