Expose setUiccApplicationsEnabled as @SystemApi for eSIM to call upon slot
mapping change. Because currently we rely on eSIM module to do handle some slot mapping change and single to dual SIM config change, eSIM needs to also make sure uicc applications are enabled for certain scenarios. So we expose the SubscriptionManager#setUiccApplicationsEnabled as @SystemApi Bug: 141018421 Test: unittest Change-Id: I9844e71260ea009afd0928a0f4be4426e7d12358 Merged-In: I9844e71260ea009afd0928a0f4be4426e7d12358
This commit is contained in:
@@ -8927,6 +8927,7 @@ package android.telephony {
|
||||
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDefaultVoiceSubscriptionId(int);
|
||||
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setPreferredDataSubscriptionId(int, boolean, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<java.lang.Integer>);
|
||||
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setSubscriptionEnabled(int, boolean);
|
||||
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setUiccApplicationsEnabled(boolean, int);
|
||||
field @RequiresPermission(android.Manifest.permission.MANAGE_SUBSCRIPTION_PLANS) public static final String ACTION_SUBSCRIPTION_PLANS_CHANGED = "android.telephony.action.SUBSCRIPTION_PLANS_CHANGED";
|
||||
field @NonNull public static final android.net.Uri ADVANCED_CALLING_ENABLED_CONTENT_URI;
|
||||
field public static final int PROFILE_CLASS_DEFAULT = -1; // 0xffffffff
|
||||
|
||||
@@ -3166,6 +3166,34 @@ public class SubscriptionManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set uicc applications being enabled or disabled.
|
||||
* The value will be remembered on the subscription and will be applied whenever it's present.
|
||||
* If the subscription in currently present, it will also apply the setting to modem
|
||||
* immediately.
|
||||
*
|
||||
* Permissions android.Manifest.permission.MODIFY_PHONE_STATE is required
|
||||
*
|
||||
* @param enabled whether uicc applications are enabled or disabled.
|
||||
* @param subscriptionId which subscription to operate on.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
@RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE)
|
||||
public void setUiccApplicationsEnabled(boolean enabled, int subscriptionId) {
|
||||
if (VDBG) {
|
||||
logd("setUiccApplicationsEnabled subId= " + subscriptionId + " enable " + enabled);
|
||||
}
|
||||
try {
|
||||
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
|
||||
if (iSub != null) {
|
||||
iSub.setUiccApplicationsEnabled(enabled, subscriptionId);
|
||||
}
|
||||
} catch (RemoteException ex) {
|
||||
// ignore it
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether it's supported to disable / re-enable a subscription on a physical (non-euicc) SIM.
|
||||
*
|
||||
|
||||
@@ -285,4 +285,6 @@ interface ISub {
|
||||
int getActiveDataSubscriptionId();
|
||||
|
||||
boolean canDisablePhysicalSubscription();
|
||||
|
||||
int setUiccApplicationsEnabled(boolean enabled, int subscriptionId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user