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

Commit e60c9521 authored by SongFerng Wang's avatar SongFerng Wang Committed by Android (Google) Code Review
Browse files

Merge "To avoid crash IllegalStateException" into main

parents e4aabf04 5eae90d7
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -845,8 +845,10 @@ public class NetworkProviderSettings extends RestrictedSettingsFragment
            return;
        }

        if (isAdded()) {
            // update the menu item
            requireActivity().invalidateMenu();
        }

        switch (wifiState) {
            case WifiManager.WIFI_STATE_ENABLED:
@@ -1480,9 +1482,11 @@ public class NetworkProviderSettings extends RestrictedSettingsFragment
    @Override
    public void onAirplaneModeChanged(boolean isAirplaneModeOn) {
        updateAirplaneModeMsgPreference(isAirplaneModeOn /* visible */);
        if (isAdded()) {
            // update the menu item
            requireActivity().invalidateMenu();
        }
    }

    /**
     * A Wi-Fi preference for the connected Wi-Fi network without internet access.