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

Commit cadd7604 authored by Les Lee's avatar Les Lee Committed by Gerrit Code Review
Browse files

Merge "Fix Wi-Fi SSID null handling"

parents 7cd588e2 15d809b9
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -198,17 +198,13 @@ public class NetworkIdentity implements Comparable<NetworkIdentity> {
        final int oemManaged = getOemBitfield(snapshot.networkCapabilities);

        if (legacyType == TYPE_WIFI) {
            if (snapshot.networkCapabilities.getSsid() != null) {
            networkId = snapshot.networkCapabilities.getSsid();
            if (networkId == null) {
                    // TODO: Figure out if this code path never runs. If so, remove them.
                    final WifiManager wifi = (WifiManager) context.getSystemService(
                            Context.WIFI_SERVICE);
                final WifiManager wifi = context.getSystemService(WifiManager.class);
                final WifiInfo info = wifi.getConnectionInfo();
                networkId = info != null ? info.getSSID() : null;
            }
        }
        }

        return new NetworkIdentity(legacyType, subType, subscriberId, networkId, roaming, metered,
                defaultNetwork, oemManaged);