Merge "Have CaptivePortalTracker use gservices updateable provisioning urls." into jb-mr2-dev

This commit is contained in:
Wink Saville
2013-08-08 22:06:21 +00:00
committed by Android (Google) Code Review
3 changed files with 21 additions and 4 deletions

View File

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

View File

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

View File

@@ -4103,7 +4103,9 @@ public class ConnectivityService extends IConnectivityManager.Stub {
return null; return null;
} }
private String getMobileRedirectedProvisioningUrl() { @Override
public String getMobileRedirectedProvisioningUrl() {
enforceConnectivityInternalPermission();
String url = getProvisioningUrlBaseFromFile(REDIRECTED_PROVISIONING); String url = getProvisioningUrlBaseFromFile(REDIRECTED_PROVISIONING);
if (TextUtils.isEmpty(url)) { if (TextUtils.isEmpty(url)) {
url = mContext.getResources().getString(R.string.mobile_redirected_provisioning_url); url = mContext.getResources().getString(R.string.mobile_redirected_provisioning_url);
@@ -4111,14 +4113,15 @@ public class ConnectivityService extends IConnectivityManager.Stub {
return url; return url;
} }
@Override
public String getMobileProvisioningUrl() { public String getMobileProvisioningUrl() {
enforceConnectivityInternalPermission(); enforceConnectivityInternalPermission();
String url = getProvisioningUrlBaseFromFile(PROVISIONING); String url = getProvisioningUrlBaseFromFile(PROVISIONING);
if (TextUtils.isEmpty(url)) { if (TextUtils.isEmpty(url)) {
url = mContext.getResources().getString(R.string.mobile_provisioning_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 { } 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. // populate the iccid, imei and phone number in the provisioning url.
if (!TextUtils.isEmpty(url)) { if (!TextUtils.isEmpty(url)) {