diff options
author | Wink Saville <wink@google.com> | 2013-08-28 14:26:27 -0700 |
---|---|---|
committer | Wink Saville <wink@google.com> | 2013-08-29 14:15:01 -0700 |
commit | e24e596b080128238cb9e6f4cf8c120bb986628e (patch) | |
tree | f40629de68fe37b17722b4f9fc907213c60c41a3 /src/com/android/settings/WirelessSettings.java | |
parent | da1f8abda6fa4b1cd1018c7415ebcfbea8fa1f6f (diff) | |
download | packages_apps_Settings-e24e596b080128238cb9e6f4cf8c120bb986628e.tar.gz packages_apps_Settings-e24e596b080128238cb9e6f4cf8c120bb986628e.tar.bz2 packages_apps_Settings-e24e596b080128238cb9e6f4cf8c120bb986628e.zip |
Use MOBILE_PROVISIONING_ACTION for manage mobile plan.
Bug: 10328264
Change-Id: I3925004011bb1243793c4c1b963d923dc2b00cb5
Diffstat (limited to 'src/com/android/settings/WirelessSettings.java')
-rw-r--r-- | src/com/android/settings/WirelessSettings.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/com/android/settings/WirelessSettings.java b/src/com/android/settings/WirelessSettings.java index 81c17941c..ee4f018bf 100644 --- a/src/com/android/settings/WirelessSettings.java +++ b/src/com/android/settings/WirelessSettings.java @@ -28,7 +28,6 @@ import android.content.pm.PackageManager; import android.content.res.Resources; import android.net.ConnectivityManager; import android.net.NetworkInfo; -import android.net.Uri; import android.nfc.NfcAdapter; import android.os.Bundle; import android.os.SystemProperties; @@ -104,21 +103,22 @@ public class WirelessSettings extends RestrictedSettingsFragment { } private String mManageMobilePlanMessage; - + private static final String MOBILE_PROVISIONING_ACTION + = "com.android.server.connectivityservice.MOBILE_PROVISIONING_ACTION"; public void onManageMobilePlanClick() { log("onManageMobilePlanClick:"); mManageMobilePlanMessage = null; Resources resources = getActivity().getResources(); - NetworkInfo ni = mCm.getActiveNetworkInfo(); + NetworkInfo ni = mCm.getProvisioningOrActiveNetworkInfo(); if (mTm.hasIccCard() && (ni != null)) { // Get provisioning URL String url = mCm.getMobileProvisioningUrl(); if (!TextUtils.isEmpty(url)) { - // Send user to provisioning webpage - Intent intent = new Intent(Intent.ACTION_VIEW); - intent.setData(Uri.parse(url)); - startActivity(intent); + Intent intent = new Intent(MOBILE_PROVISIONING_ACTION); + intent.putExtra("EXTRA_URL", url); + Context context = getActivity().getBaseContext(); + context.sendBroadcast(intent); mManageMobilePlanMessage = null; } else { // No provisioning URL |