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

Commit b156dbcb authored by Les Lee's avatar Les Lee Committed by Automerger Merge Worker
Browse files

Merge "Fix Wi-Fi SSID null handling" am: cadd7604 am: 114e0a0d am: 8874e81c

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1624059

Change-Id: Iefb2bd39b51072cda3d4239e031ab00bd2e6f5c4
parents 9ceb81a0 8874e81c
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);