summaryrefslogtreecommitdiff
path: root/packages/CarrierDefaultApp/src
diff options
context:
space:
mode:
authorMeng Wang <mewan@google.com>2018-12-14 10:45:56 -0800
committerandroid-build-merger <android-build-merger@google.com>2018-12-14 10:45:56 -0800
commit4f7956f58ca861f598c44299786d8389f37d97bf (patch)
tree78d3bc91979114f4c1fa359182e6ed4e7bcc2460 /packages/CarrierDefaultApp/src
parentb9a1dcd7e43c9d2bcbeb2970b2e53634dca5a1ee (diff)
parent369d65b2e932cf240aa511a83ebb25b9d48e5b2a (diff)
Merge "support vzw roaming default on" into pi-dev
am: 369d65b2e9 Change-Id: I056adbebe1efecb1a7d6f4fc09fbd94f1e4b52da
Diffstat (limited to 'packages/CarrierDefaultApp/src')
-rw-r--r--packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CaptivePortalLoginActivity.java14
-rw-r--r--packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CarrierActionUtils.java12
2 files changed, 13 insertions, 13 deletions
diff --git a/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CaptivePortalLoginActivity.java b/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CaptivePortalLoginActivity.java
index 4f67350b5adc..f36b4aa87636 100644
--- a/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CaptivePortalLoginActivity.java
+++ b/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CaptivePortalLoginActivity.java
@@ -195,19 +195,7 @@ public class CaptivePortalLoginActivity extends Activity {
if (success) {
// Trigger re-evaluation upon success http response code
CarrierActionUtils.applyCarrierAction(
- CarrierActionUtils.CARRIER_ACTION_ENABLE_RADIO, getIntent(),
- getApplicationContext());
- CarrierActionUtils.applyCarrierAction(
- CarrierActionUtils.CARRIER_ACTION_ENABLE_METERED_APNS, getIntent(),
- getApplicationContext());
- CarrierActionUtils.applyCarrierAction(
- CarrierActionUtils.CARRIER_ACTION_CANCEL_ALL_NOTIFICATIONS, getIntent(),
- getApplicationContext());
- CarrierActionUtils.applyCarrierAction(
- CarrierActionUtils.CARRIER_ACTION_DISABLE_DEFAULT_URL_HANDLER, getIntent(),
- getApplicationContext());
- CarrierActionUtils.applyCarrierAction(
- CarrierActionUtils.CARRIER_ACTION_DEREGISTER_DEFAULT_NETWORK_AVAIL, getIntent(),
+ CarrierActionUtils.CARRIER_ACTION_RESET_ALL, getIntent(),
getApplicationContext());
}
finishAndRemoveTask();
diff --git a/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CarrierActionUtils.java b/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CarrierActionUtils.java
index 4518d79ff611..3258d57ba8e0 100644
--- a/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CarrierActionUtils.java
+++ b/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CarrierActionUtils.java
@@ -56,6 +56,7 @@ public class CarrierActionUtils {
public static final int CARRIER_ACTION_DISABLE_DEFAULT_URL_HANDLER = 8;
public static final int CARRIER_ACTION_REGISTER_DEFAULT_NETWORK_AVAIL = 9;
public static final int CARRIER_ACTION_DEREGISTER_DEFAULT_NETWORK_AVAIL = 10;
+ public static final int CARRIER_ACTION_RESET_ALL = 11;
public static void applyCarrierAction(int actionIdx, Intent intent, Context context) {
switch (actionIdx) {
@@ -92,6 +93,9 @@ public class CarrierActionUtils {
case CARRIER_ACTION_DEREGISTER_DEFAULT_NETWORK_AVAIL:
onDeregisterDefaultNetworkAvail(intent, context);
break;
+ case CARRIER_ACTION_RESET_ALL:
+ onResetAllCarrierActions(intent, context);
+ break;
default:
loge("unsupported carrier action index: " + actionIdx);
}
@@ -196,6 +200,14 @@ public class CarrierActionUtils {
context.getSystemService(NotificationManager.class).cancelAll();
}
+ private static void onResetAllCarrierActions(Intent intent, Context context) {
+ int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY,
+ SubscriptionManager.getDefaultVoiceSubscriptionId());
+ logd("onResetAllCarrierActions subId: " + subId);
+ final TelephonyManager telephonyMgr = context.getSystemService(TelephonyManager.class);
+ telephonyMgr.carrierActionResetAll(subId);
+ }
+
private static Notification getNotification(Context context, int titleId, int textId,
PendingIntent pendingIntent) {
final TelephonyManager telephonyMgr = context.getSystemService(TelephonyManager.class);