diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java index c78a973cee..0f8dc7aa07 100644 --- a/core/java/android/net/ConnectivityManager.java +++ b/core/java/android/net/ConnectivityManager.java @@ -1328,24 +1328,6 @@ public class ConnectivityManager { } } - /** - * Signal that the captive portal check on the indicated network - * is complete and we can turn the network on for general use. - * - * @param info the {@link NetworkInfo} object for the networkType - * in question. - * - *
This method requires the call to hold the permission - * {@link android.Manifest.permission#CONNECTIVITY_INTERNAL}. - * {@hide} - */ - public void captivePortalCheckComplete(NetworkInfo info) { - try { - mService.captivePortalCheckComplete(info); - } catch (RemoteException e) { - } - } - /** * Signal that the captive portal check on the indicated network * is complete and whether its a captive portal or not. diff --git a/core/java/android/net/IConnectivityManager.aidl b/core/java/android/net/IConnectivityManager.aidl index c1da2e32aa..b3217eb907 100644 --- a/core/java/android/net/IConnectivityManager.aidl +++ b/core/java/android/net/IConnectivityManager.aidl @@ -129,8 +129,6 @@ interface IConnectivityManager boolean updateLockdownVpn(); - void captivePortalCheckComplete(in NetworkInfo info); - void captivePortalCheckCompleted(in NetworkInfo info, boolean isCaptivePortal); void supplyMessenger(int networkType, in Messenger messenger); diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java index b5f0697472..5418b3b03d 100644 --- a/services/java/com/android/server/ConnectivityService.java +++ b/services/java/com/android/server/ConnectivityService.java @@ -2316,36 +2316,6 @@ public class ConnectivityService extends IConnectivityManager.Stub { } } - private void handleCaptivePortalTrackerCheck(NetworkInfo info) { - if (DBG) log("Captive portal check " + info); - int type = info.getType(); - final NetworkStateTracker thisNet = mNetTrackers[type]; - if (mNetConfigs[type].isDefault()) { - if (mActiveDefaultNetwork != -1 && mActiveDefaultNetwork != type) { - if (isNewNetTypePreferredOverCurrentNetType(type)) { - if (DBG) log("Captive check on " + info.getTypeName()); - mCaptivePortalTracker.detectCaptivePortal(new NetworkInfo(info)); - return; - } else { - if (DBG) log("Tear down low priority net " + info.getTypeName()); - teardown(thisNet); - return; - } - } - } - - if (DBG) log("handleCaptivePortalTrackerCheck: call captivePortalCheckComplete ni=" + info); - thisNet.captivePortalCheckComplete(); - } - - /** @hide */ - @Override - public void captivePortalCheckComplete(NetworkInfo info) { - enforceConnectivityInternalPermission(); - if (DBG) log("captivePortalCheckComplete: ni=" + info); - mNetTrackers[info.getType()].captivePortalCheckComplete(); - } - /** @hide */ @Override public void captivePortalCheckCompleted(NetworkInfo info, boolean isCaptivePortal) { @@ -2972,9 +2942,6 @@ public class ConnectivityService extends IConnectivityManager.Stub { if (info.getDetailedState() == NetworkInfo.DetailedState.FAILED) { handleConnectionFailure(info); - } else if (info.getDetailedState() == - DetailedState.CAPTIVE_PORTAL_CHECK) { - handleCaptivePortalTrackerCheck(info); } else if (info.isConnectedToProvisioningNetwork()) { /** * TODO: Create ConnectivityManager.TYPE_MOBILE_PROVISIONING