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

Commit e142eb0c authored by Irfan Sheriff's avatar Irfan Sheriff
Browse files

DO NOT MERGE Fix status fetch from supplicant

Bug: 3192891
Change-Id: I2471f144494d398fe1d4572ac4d6421c100693e2
parent 30c81844
Loading
Loading
Loading
Loading
+24 −24
Original line number Diff line number Diff line
@@ -1461,19 +1461,18 @@ public class WifiStateTracker extends NetworkStateTracker {
    }

    private void requestConnectionStatus(WifiInfo info) {
        String SSID = null;
        String BSSID = null;
        String suppState = null;
        int netId = -1;
        String reply = status();
        if (reply == null) {
            return;
        }
        if (reply != null) {
            /*
             * Parse the reply from the supplicant to the status command, and update
             * local state accordingly. The reply is a series of lines of the form
             * "name=value".
             */
        String SSID = null;
        String BSSID = null;
        String suppState = null;
        int netId = -1;

            String[] lines = reply.split("\n");
            for (String line : lines) {
                String[] prop = line.split(" *= *");
@@ -1490,6 +1489,7 @@ public class WifiStateTracker extends NetworkStateTracker {
                else if (name.equalsIgnoreCase("wpa_state"))
                    suppState = value;
            }
        }
        info.setNetworkId(netId);
        info.setSSID(SSID);
        info.setBSSID(BSSID);