Merge "Make isUsableSubIdValue public"
This commit is contained in:
@@ -42640,6 +42640,7 @@ package android.telephony {
|
||||
method public java.util.List<android.telephony.SubscriptionPlan> getSubscriptionPlans(int);
|
||||
method public boolean isActiveSubscriptionId(int);
|
||||
method public boolean isNetworkRoaming(int);
|
||||
method public static boolean isUsableSubscriptionId(int);
|
||||
method public static boolean isValidSubscriptionId(int);
|
||||
method public void removeOnOpportunisticSubscriptionsChangedListener(android.telephony.SubscriptionManager.OnOpportunisticSubscriptionsChangedListener);
|
||||
method public void removeOnSubscriptionsChangedListener(android.telephony.SubscriptionManager.OnSubscriptionsChangedListener);
|
||||
@@ -42653,6 +42654,7 @@ package android.telephony {
|
||||
field public static final java.lang.String ACTION_REFRESH_SUBSCRIPTION_PLANS = "android.telephony.action.REFRESH_SUBSCRIPTION_PLANS";
|
||||
field public static final int DATA_ROAMING_DISABLE = 0; // 0x0
|
||||
field public static final int DATA_ROAMING_ENABLE = 1; // 0x1
|
||||
field public static final int DEFAULT_SUBSCRIPTION_ID = 2147483647; // 0x7fffffff
|
||||
field public static final java.lang.String EXTRA_SUBSCRIPTION_INDEX = "android.telephony.extra.SUBSCRIPTION_INDEX";
|
||||
field public static final int INVALID_SUBSCRIPTION_ID = -1; // 0xffffffff
|
||||
}
|
||||
|
||||
@@ -89,9 +89,7 @@ public class SubscriptionManager {
|
||||
/** @hide */
|
||||
public static final int INVALID_SIM_SLOT_INDEX = -1;
|
||||
|
||||
/** Indicates the caller wants the default sub id. */
|
||||
/** @hide */
|
||||
@UnsupportedAppUsage
|
||||
/** Indicates the default subscription ID in Telephony. */
|
||||
public static final int DEFAULT_SUBSCRIPTION_ID = Integer.MAX_VALUE;
|
||||
|
||||
/**
|
||||
@@ -1600,6 +1598,19 @@ public class SubscriptionManager {
|
||||
return subscriptionId > INVALID_SUBSCRIPTION_ID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the subscription ID is usable.
|
||||
*
|
||||
* A usable subscription ID has a valid value except some special values such as
|
||||
* {@link DEFAULT_SUBSCRIPTION_ID}. It can be used for subscription functions.
|
||||
*
|
||||
* @param subscriptionId the subscription ID
|
||||
* @return {@code true} if the subscription ID is usable; {@code false} otherwise.
|
||||
*/
|
||||
public static boolean isUsableSubscriptionId(int subscriptionId) {
|
||||
return isUsableSubIdValue(subscriptionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if subId is an usable subId value else false. A
|
||||
* usable subId means its neither a INVALID_SUBSCRIPTION_ID nor a DEFAULT_SUB_ID.
|
||||
|
||||
Reference in New Issue
Block a user