diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2019-12-17 07:06:36 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-12-17 07:06:36 +0000 |
commit | b430d57705100ae2751044b9993c3db5363dc0de (patch) | |
tree | 10c60549a89bfcc771e6c23070b4ad0f2baf76af /packages/CarrierDefaultApp | |
parent | 36af0dc32e8d6d66eae27f74a9a127e97c18ae86 (diff) | |
parent | a088dfd565680e622766e655d867bf83d01e9a8d (diff) |
Merge "Change APIs related to carrier actions."
Diffstat (limited to 'packages/CarrierDefaultApp')
-rw-r--r-- | packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CarrierActionUtils.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CarrierActionUtils.java b/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CarrierActionUtils.java index 3258d57ba8e0..2697a1066ed2 100644 --- a/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CarrierActionUtils.java +++ b/packages/CarrierDefaultApp/src/com/android/carrierdefaultapp/CarrierActionUtils.java @@ -29,6 +29,7 @@ import android.telephony.SubscriptionManager; import android.telephony.TelephonyManager; import android.text.TextUtils; import android.util.Log; + import com.android.internal.telephony.PhoneConstants; /** @@ -138,7 +139,7 @@ public class CarrierActionUtils { SubscriptionManager.getDefaultVoiceSubscriptionId()); logd("onRegisterDefaultNetworkAvail subId: " + subId); final TelephonyManager telephonyMgr = context.getSystemService(TelephonyManager.class); - telephonyMgr.carrierActionReportDefaultNetworkStatus(subId, true); + telephonyMgr.createForSubscriptionId(subId).reportDefaultNetworkStatus(true); } private static void onDeregisterDefaultNetworkAvail(Intent intent, Context context) { @@ -146,7 +147,7 @@ public class CarrierActionUtils { SubscriptionManager.getDefaultVoiceSubscriptionId()); logd("onDeregisterDefaultNetworkAvail subId: " + subId); final TelephonyManager telephonyMgr = context.getSystemService(TelephonyManager.class); - telephonyMgr.carrierActionReportDefaultNetworkStatus(subId, false); + telephonyMgr.createForSubscriptionId(subId).reportDefaultNetworkStatus(false); } private static void onDisableRadio(Intent intent, Context context) { @@ -154,7 +155,7 @@ public class CarrierActionUtils { SubscriptionManager.getDefaultVoiceSubscriptionId()); logd("onDisableRadio subId: " + subId); final TelephonyManager telephonyMgr = context.getSystemService(TelephonyManager.class); - telephonyMgr.carrierActionSetRadioEnabled(subId, !ENABLE); + telephonyMgr.createForSubscriptionId(subId).setRadioEnabled(!ENABLE); } private static void onEnableRadio(Intent intent, Context context) { @@ -162,7 +163,7 @@ public class CarrierActionUtils { SubscriptionManager.getDefaultVoiceSubscriptionId()); logd("onEnableRadio subId: " + subId); final TelephonyManager telephonyMgr = context.getSystemService(TelephonyManager.class); - telephonyMgr.carrierActionSetRadioEnabled(subId, ENABLE); + telephonyMgr.createForSubscriptionId(subId).setRadioEnabled(ENABLE); } private static void onShowCaptivePortalNotification(Intent intent, Context context) { @@ -205,7 +206,7 @@ public class CarrierActionUtils { SubscriptionManager.getDefaultVoiceSubscriptionId()); logd("onResetAllCarrierActions subId: " + subId); final TelephonyManager telephonyMgr = context.getSystemService(TelephonyManager.class); - telephonyMgr.carrierActionResetAll(subId); + telephonyMgr.createForSubscriptionId(subId).resetAllCarrierActions(); } private static Notification getNotification(Context context, int titleId, int textId, |