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

Commit d9cb3849 authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Wifi Tile updates its label on Locale change

Change-Id: Ibcbf090fedda418f97820f7f9a2df67f77b25680
Fixes: 111426133
Test: manual
parent e0ef793d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -163,6 +163,12 @@ public class WifiStatusTracker extends ConnectivityManager.NetworkCallback {
                ? null : AccessPoint.getSpeedLabel(mContext, scoredNetwork, rssi);
    }

    /** Refresh the status label on Locale changed. */
    public void refreshLocale() {
        updateStatusLabel();
        mCallback.run();
    }

    private String getValidSsid(WifiInfo info) {
        String ssid = info.getSSID();
        if (ssid != null && !WifiSsid.NONE.equals(ssid)) {
+1 −0
Original line number Diff line number Diff line
@@ -668,6 +668,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
        Locale current = mContext.getResources().getConfiguration().locale;
        if (!current.equals(mLocale)) {
            mLocale = current;
            mWifiSignalController.refreshLocale();
            notifyAllListeners();
        }
    }
+4 −0
Original line number Diff line number Diff line
@@ -73,6 +73,10 @@ public class WifiSignalController extends
        return new WifiState();
    }

    void refreshLocale() {
        mWifiTracker.refreshLocale();
    }

    @Override
    public void notifyListeners(SignalCallback callback) {
        // only show wifi in the cluster if connected or if wifi-only