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

Commit 725a7d2e authored by Weng Su's avatar Weng Su
Browse files

Fix NullPointerException in NetworkProviderSettings

- Avoid calling subfunctions when getView returns null

Bug: 301878710
Test: unit test
Change-Id: I8511ded693475468f6dda1d16d040c623097e997
parent 5872a8f5
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -190,7 +190,10 @@ public class NetworkProviderSettings extends RestrictedSettingsFragment
    @VisibleForTesting
    @VisibleForTesting
    final Runnable mUpdateWifiEntryPreferencesRunnable = () -> {
    final Runnable mUpdateWifiEntryPreferencesRunnable = () -> {
        updateWifiEntryPreferences();
        updateWifiEntryPreferences();
        getView().postDelayed(mRemoveLoadingRunnable, 10);
        View view = getView();
        if (view != null) {
            view.postDelayed(mRemoveLoadingRunnable, 10);
        }
    };
    };
    @VisibleForTesting
    @VisibleForTesting
    final Runnable mHideProgressBarRunnable = () -> {
    final Runnable mHideProgressBarRunnable = () -> {