diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index ee23b13..a022fb1 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -890,8 +890,7 @@
         // Find the first Provisioning Network
         NetworkInfo provNi = null;
         for (NetworkInfo ni : getAllNetworkInfo()) {
-            if (ni.getDetailedState()
-                    == NetworkInfo.DetailedState.CONNECTED_TO_PROVISIONING_NETWORK) {
+            if (ni.isConnectedToProvisioningNetwork()) {
                 provNi = ni;
                 break;
             }
@@ -2805,7 +2804,8 @@
                     NetworkInfo.State state = info.getState();
 
                     if (VDBG || (state == NetworkInfo.State.CONNECTED) ||
-                            (state == NetworkInfo.State.DISCONNECTED)) {
+                            (state == NetworkInfo.State.DISCONNECTED) ||
+                            (state == NetworkInfo.State.SUSPENDED)) {
                         log("ConnectivityChange for " +
                             info.getTypeName() + ": " +
                             state + "/" + info.getDetailedState());
@@ -2820,7 +2820,8 @@
                     if (ConnectivityManager.isNetworkTypeMobile(info.getType())
                             && (0 != Settings.Global.getInt(mContext.getContentResolver(),
                                         Settings.Global.DEVICE_PROVISIONED, 0))
-                            && (state == NetworkInfo.State.CONNECTED)) {
+                            && ((state == NetworkInfo.State.CONNECTED)
+                                    || info.isConnectedToProvisioningNetwork())) {
                         checkMobileProvisioning(CheckMp.MAX_TIMEOUT_MS);
                     }
 
@@ -2833,8 +2834,7 @@
                     } else if (info.getDetailedState() ==
                             DetailedState.CAPTIVE_PORTAL_CHECK) {
                         handleCaptivePortalTrackerCheck(info);
-                    } else if (info.getDetailedState() ==
-                            DetailedState.CONNECTED_TO_PROVISIONING_NETWORK) {
+                    } else if (info.isConnectedToProvisioningNetwork()) {
                         /**
                          * TODO: Create ConnectivityManager.TYPE_MOBILE_PROVISIONING
                          * for now its an in between network, its a network that
@@ -4197,8 +4197,7 @@
         // If provisioning network handle as a special case,
         // otherwise launch browser with the intent directly.
         NetworkInfo ni = getProvisioningNetworkInfo();
-        if ((ni != null) && ni.getDetailedState() ==
-                    NetworkInfo.DetailedState.CONNECTED_TO_PROVISIONING_NETWORK) {
+        if ((ni != null) && ni.isConnectedToProvisioningNetwork()) {
             if (DBG) log("handleMobileProvisioningAction: on provisioning network");
             MobileDataStateTracker mdst = (MobileDataStateTracker)
                     mNetTrackers[ConnectivityManager.TYPE_MOBILE];
