summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/ConnectivityService.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index 9bf2d3b..7f9dc26 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -965,8 +965,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
// 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;
}
@@ -2919,7 +2918,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
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());
@@ -2934,7 +2934,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
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);
}
@@ -2947,8 +2948,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
} 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
@@ -4418,8 +4418,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
// 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];