diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/AccessPointControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/AccessPointControllerImpl.java
index 6fec97e..f9a68d0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/AccessPointControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/AccessPointControllerImpl.java
@@ -42,6 +42,9 @@
 import java.util.Comparator;
 import java.util.List;
 
+
+// TODO: Unify this logic with platform settings (see WifiSettings and AccessPoint). There is a
+// fair amount of complexity here in statuses and logic beyond just connected/disconnected.
 public class AccessPointControllerImpl implements NetworkController.AccessPointController {
     private static final String TAG = "AccessPointController";
     private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
@@ -142,8 +145,7 @@
                 && v.charAt(v.length() - 1) == '\"' ? v.substring(1, v.length() - 1) : v;
     }
 
-    private int getConnectedNetworkId() {
-        final WifiInfo wifiInfo = mWifiManager.getConnectionInfo();
+    private int getConnectedNetworkId(WifiInfo wifiInfo) {
         return wifiInfo != null ? wifiInfo.getNetworkId() : AccessPoint.NO_NETWORK;
     }
 
@@ -158,7 +160,8 @@
     }
 
     private void updateAccessPoints() {
-        final int connectedNetworkId = getConnectedNetworkId();
+        final WifiInfo wifiInfo = mWifiManager.getConnectionInfo();
+        final int connectedNetworkId = getConnectedNetworkId(wifiInfo);
         if (DEBUG) Log.d(TAG, "connectedNetworkId: " + connectedNetworkId);
         final List<ScanResult> scanResults = mWifiManager.getScanResults();
         final ArrayMap<String, WifiConfiguration> configured = getConfiguredNetworksBySsid();
@@ -179,8 +182,13 @@
             ap.networkId = config != null ? config.networkId : AccessPoint.NO_NETWORK;
             ap.ssid = ssid;
             ap.iconId = ICONS[level];
-            ap.isConnected = ap.networkId != AccessPoint.NO_NETWORK
-                    && ap.networkId == connectedNetworkId;
+            // Connected if either:
+            // -The network ID in the active WifiInfo matches this network's ID.
+            // -The network is ephemeral (no configuration) but the SSID matches.
+            ap.isConnected = (ap.networkId != AccessPoint.NO_NETWORK
+                    && ap.networkId == connectedNetworkId) ||
+                    (ap.networkId == WifiConfiguration.INVALID_NETWORK_ID && wifiInfo != null &&
+                    ap.ssid.equals(trimDoubleQuotes(wifiInfo.getSSID())));
             ap.level = level;
             // Based on Settings AccessPoint#getSecurity, keep up to date
             // with better methods of determining no security or not.
