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

Commit 98cf86b3 authored by Weng Su's avatar Weng Su
Browse files

Add a loading progress timeout mechanism to Internet Settings

- The WiFi scan results may not be called back, need to add loading
progress timeout to avoid loading forever

Bug: 191336310
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=NetworkProviderSettingsTest

Change-Id: I71071e7e68007cf7e16be46230eec3b01f4d2b45
parent 5a8476a7
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -267,9 +267,8 @@ public class NetworkProviderSettings extends RestrictedSettingsFragment
        if (mWifiManager != null) {
            setLoading(true, false);
            mIsViewLoading = true;
            if (!mWifiManager.isWifiEnabled()) {
                getView().postDelayed(mRemoveLoadingRunnable, 100);
            }
            getView().postDelayed(mRemoveLoadingRunnable,
                    mWifiManager.isWifiEnabled() ? 1000 : 100);
        }
    }