summaryrefslogtreecommitdiff
path: root/packages/CarrierDefaultApp/src
diff options
context:
space:
mode:
authorfionaxu <fionaxu@google.com>2017-07-19 11:11:54 -0700
committerchen xu <fionaxu@google.com>2018-12-07 16:10:32 -0800
commit79d77bb580ea775b5ac2fd9b616a4345e2412836 (patch)
tree74c97548b5821355fec02094c86985f77636d4e3 /packages/CarrierDefaultApp/src
parentc769caafffa632937a3a66fb91c5bf821d5d3d05 (diff)
support vzw roaming default on
1. sms link handling by defaultcarrierapp under restricted NW 2. support launching defaultcarrierapp from carrier notification to load captive portal page. 3. new carrier action to reset all actions 4. add a new app icon Bug: 113114222 Test: manual test with cold SIM to trigger redirection signal Change-Id: Ieb03244f222334068652e2fac8ee590082973670
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 b1933373a8e6..ec9daa39654d 100644
--- a/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CaptivePortalLoginActivity.java
+++ b/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CaptivePortalLoginActivity.java
@@ -196,19 +196,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 33cb596415d5..e6e3569a9eac 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);