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

Commit 8136de08 authored by Isaac Levy's avatar Isaac Levy
Browse files

Fixed WifiWatchdog notification bugs

- Space was truncated on 'disabled' notification
- Disable reason was getting wiped out on subsequent disabled
- disable reason was not propogating to WifiSettings

Change-Id: I2e57ee33d285aad39aabe1b048e7436d364b02f3
parent 97c46181
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2665,8 +2665,8 @@

     <!-- A notification is shown when a user's selected SSID is later disabled due to connectivity problems.  This is the notification's title / ticker. -->
     <string name="wifi_watchdog_network_disabled">Couldn\'t connect to Wi-Fi</string>
     <!-- A notification is shown when a user's selected SSID is later disabled due to connectivity problems.  This is a partial string of the message, which will also include the (possibly truncated) hotspot name. -->
    <string name="wifi_watchdog_network_disabled_detailed"> has a poor internet connection.</string>
     <!-- A notification is shown when a user's selected SSID is later disabled due to connectivity problems.  The complete alert msg is: <hotspot name> + this string, i.e. "Linksys has a poor internet connection" -->
    <string name="wifi_watchdog_network_disabled_detailed">\u0020has a poor internet connection.</string>

    <!-- Do not translate. Default access point SSID used for tethering -->
    <string name="wifi_tether_configure_ssid_default" translatable="false">AndroidAP</string>
+6 −2
Original line number Diff line number Diff line
@@ -376,7 +376,8 @@ class WifiConfigStore {
        boolean ret = WifiNative.disableNetworkCommand(netId);
        synchronized (sConfiguredNetworks) {
            WifiConfiguration config = sConfiguredNetworks.get(netId);
            if (config != null) {
            /* Only change the reason if the network was not previously disabled */
            if (config != null && config.status != Status.DISABLED) {
                config.status = Status.DISABLED;
                config.disableReason = reason;
            }
@@ -610,7 +611,10 @@ class WifiConfigStore {
        synchronized (sConfiguredNetworks) {
            for(WifiConfiguration config : sConfiguredNetworks.values()) {
                if(config != null && config.networkId != netId) {
                    if (config.status != Status.DISABLED) {
                        config.status = Status.DISABLED;
                        config.disableReason = WifiConfiguration.DISABLED_UNKNOWN_REASON;
                    }
                }
            }
        }
+1 −0
Original line number Diff line number Diff line
@@ -530,6 +530,7 @@ public class WifiConfiguration implements Parcelable {
        if (source != null) {
            networkId = source.networkId;
            status = source.status;
            disableReason = source.disableReason;
            SSID = source.SSID;
            BSSID = source.BSSID;
            preSharedKey = source.preSharedKey;