am a0ffa2ed: am 55adb390: am 6db564f6: Merge "Have CaptivePortalTracker use gservices updateable provisioning urls." into jb-mr2-dev am: 0d406dffc0

Original change: undetermined

Change-Id: Id8262b90c7a05301e78334ae42badbcabe16edb0
This commit is contained in:
Wink Saville
2021-05-31 06:29:14 +00:00
committed by Automerger Merge Worker
3 changed files with 21 additions and 4 deletions

View File

@@ -1401,7 +1401,7 @@ public class ConnectivityManager {
}
/**
* Get the carrier provisioning url.
* Get the mobile provisioning url.
* {@hide}
*/
public String getMobileProvisioningUrl() {
@@ -1411,4 +1411,16 @@ public class ConnectivityManager {
}
return null;
}
/**
* Get the mobile redirected provisioning url.
* {@hide}
*/
public String getMobileRedirectedProvisioningUrl() {
try {
return mService.getMobileRedirectedProvisioningUrl();
} catch (RemoteException e) {
}
return null;
}
}

View File

@@ -141,4 +141,6 @@ interface IConnectivityManager
int checkMobileProvisioning(boolean sendNotification, int suggestedTimeOutMs, in ResultReceiver resultReceiver);
String getMobileProvisioningUrl();
String getMobileRedirectedProvisioningUrl();
}

View File

@@ -4287,7 +4287,9 @@ public class ConnectivityService extends IConnectivityManager.Stub {
return null;
}
private String getMobileRedirectedProvisioningUrl() {
@Override
public String getMobileRedirectedProvisioningUrl() {
enforceConnectivityInternalPermission();
String url = getProvisioningUrlBaseFromFile(REDIRECTED_PROVISIONING);
if (TextUtils.isEmpty(url)) {
url = mContext.getResources().getString(R.string.mobile_redirected_provisioning_url);
@@ -4295,14 +4297,15 @@ public class ConnectivityService extends IConnectivityManager.Stub {
return url;
}
@Override
public String getMobileProvisioningUrl() {
enforceConnectivityInternalPermission();
String url = getProvisioningUrlBaseFromFile(PROVISIONING);
if (TextUtils.isEmpty(url)) {
url = mContext.getResources().getString(R.string.mobile_provisioning_url);
log("getProvisioningUrl: mobile_provisioining_url from resource =" + url);
log("getMobileProvisioningUrl: mobile_provisioining_url from resource =" + url);
} else {
log("getProvisioningUrl: mobile_provisioning_url from File =" + url);
log("getMobileProvisioningUrl: mobile_provisioning_url from File =" + url);
}
// populate the iccid, imei and phone number in the provisioning url.
if (!TextUtils.isEmpty(url)) {