diff options
| author | 2022-09-16 08:58:14 +0000 | |
|---|---|---|
| committer | 2022-09-16 08:58:14 +0000 | |
| commit | 87b5575356bd3ec171a84cd62fae40a09411aa9d (patch) | |
| tree | ef71b7b6d7dab68e4200c1b9f07099bd733ed777 | |
| parent | 35048ac0d45321356df04c47987299cc59e963fe (diff) | |
Deprecating SubscriptionManager#switchToSubscription API
This API is a duplicate of EuiccManager#switchToSubscription and
does not support Multiple Enabled Profile(MEP). Apps should use EuiccManager#switchToSubscription instead.
Test: make
Bug: 226388098
Change-Id: I6533370e0ef069bb5c4363ebbcb72ca200029193
| -rw-r--r-- | core/api/current.txt | 2 | ||||
| -rw-r--r-- | telephony/java/android/telephony/SubscriptionManager.java | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/core/api/current.txt b/core/api/current.txt index 4d25ad7d8b37..255bf93ee91c 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -43368,7 +43368,7 @@ package android.telephony { method public void setSubscriptionOverrideUnmetered(int, boolean, @NonNull int[], long); method @Deprecated public void setSubscriptionPlans(int, @NonNull java.util.List<android.telephony.SubscriptionPlan>); method public void setSubscriptionPlans(int, @NonNull java.util.List<android.telephony.SubscriptionPlan>, long); - method @RequiresPermission("android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS") public void switchToSubscription(int, @NonNull android.app.PendingIntent); + method @Deprecated @RequiresPermission("android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS") public void switchToSubscription(int, @NonNull android.app.PendingIntent); field public static final String ACTION_DEFAULT_SMS_SUBSCRIPTION_CHANGED = "android.telephony.action.DEFAULT_SMS_SUBSCRIPTION_CHANGED"; field public static final String ACTION_DEFAULT_SUBSCRIPTION_CHANGED = "android.telephony.action.DEFAULT_SUBSCRIPTION_CHANGED"; field public static final String ACTION_MANAGE_SUBSCRIPTION_PLANS = "android.telephony.action.MANAGE_SUBSCRIPTION_PLANS"; diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java index 4fb65874044f..a5fbbb30a92d 100644 --- a/telephony/java/android/telephony/SubscriptionManager.java +++ b/telephony/java/android/telephony/SubscriptionManager.java @@ -3249,12 +3249,13 @@ public class SubscriptionManager { * @param subId sub id * @param callbackIntent pending intent that will be sent after operation is done. * - * to-be-deprecated this API is a duplicate of {@link EuiccManager#switchToSubscription(int, + * @deprecated this API is a duplicate of {@link EuiccManager#switchToSubscription(int, * PendingIntent)} and does not support Multiple Enabled Profile(MEP). Apps should use * {@link EuiccManager#switchToSubscription(int, PendingIntent)} or * {@link EuiccManager#switchToSubscription(int, int, PendingIntent)} instead. */ @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) + @Deprecated public void switchToSubscription(int subId, @NonNull PendingIntent callbackIntent) { Preconditions.checkNotNull(callbackIntent, "callbackIntent cannot be null"); EuiccManager euiccManager = new EuiccManager(mContext); |