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

Commit c09b7f78 authored by Sundeep Ghuman's avatar Sundeep Ghuman
Browse files

Force update wifi QS when opening.

This changes expands on ag/2608526 by forcing a refresh of AccessPoints
when the QuickSettings picker is opened. This consolidates logic between
QS and Settings, where in WifiSettings we forceUpdate on cold start.

Bug: b/62680006
Test: 1. Open the quick settings picker
2. Minimize the picker
3. Walk out of range of the networks you say listed in the picker
4. Re-open picker
5. Stale networks should not be shown, latest scan results should be.

Change-Id: Ia944dd3dbeff7d9c3774f04129c07f1ffd4466b2
parent 4451b6ae
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -311,12 +311,10 @@ public class WifiTile extends QSTileImpl<SignalState> {
        public View createDetailView(Context context, View convertView, ViewGroup parent) {
            if (DEBUG) Log.d(TAG, "createDetailView convertView=" + (convertView != null));
            mAccessPoints = null;
            mWifiController.scanForAccessPoints();
            fireScanStateChanged(true);
            mItems = QSDetailItems.convertOrInflate(context, convertView, parent);
            mItems.setTagSuffix("Wifi");
            mItems.setCallback(this);
            updateItems();
            mWifiController.scanForAccessPoints(); // updates APs and items
            setItemsVisible(mState.value);
            return mItems;
        }
+3 −2
Original line number Diff line number Diff line
@@ -97,8 +97,9 @@ public class AccessPointControllerImpl

    @Override
    public void scanForAccessPoints() {
        if (DEBUG) Log.d(TAG, "scan!");
        mWifiTracker.forceScan();
        if (DEBUG) Log.d(TAG, "force update APs!");
        mWifiTracker.forceUpdate();
        fireAcccessPointsCallback(mWifiTracker.getAccessPoints());
    }

    @Override