Remove captive portal code that has no effect. am: 605bb642f0

Original change: undetermined

Change-Id: Ie6ec595f99feb31a92b83a75bf108286a83cd879
This commit is contained in:
Narayan Kamath
2021-05-31 06:51:18 +00:00
committed by Automerger Merge Worker
3 changed files with 0 additions and 53 deletions

View File

@@ -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.
*
* <p>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.

View File

@@ -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);

View File

@@ -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