Merge "Make SubscriptionManager.getSlotIndex public" am: 719310cd2c
am: a781751b32
Change-Id: Ib7d3dd0f7ce06edf736c493cde6778365c366ae2
This commit is contained in:
@@ -42636,6 +42636,7 @@ package android.telephony {
|
||||
method public static int getDefaultSmsSubscriptionId();
|
||||
method public static int getDefaultSubscriptionId();
|
||||
method public static int getDefaultVoiceSubscriptionId();
|
||||
method public static int getSlotIndex(int);
|
||||
method public static int[] getSubscriptionIds(int);
|
||||
method public java.util.List<android.telephony.SubscriptionInfo> getOpportunisticSubscriptions(int);
|
||||
method public java.util.List<android.telephony.SubscriptionPlan> getSubscriptionPlans(int);
|
||||
@@ -42657,6 +42658,7 @@ package android.telephony {
|
||||
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_SIM_SLOT_INDEX = -1; // 0xffffffff
|
||||
field public static final int INVALID_SUBSCRIPTION_ID = -1; // 0xffffffff
|
||||
}
|
||||
|
||||
|
||||
@@ -88,8 +88,7 @@ public class SubscriptionManager {
|
||||
/** @hide */
|
||||
public static final int INVALID_PHONE_INDEX = -1;
|
||||
|
||||
/** An invalid slot identifier */
|
||||
/** @hide */
|
||||
/** Indicates invalid sim slot. This can be returned by {@link #getSlotIndex(int)}. */
|
||||
public static final int INVALID_SIM_SLOT_INDEX = -1;
|
||||
|
||||
/** Indicates the default subscription ID in Telephony. */
|
||||
@@ -1310,15 +1309,15 @@ public class SubscriptionManager {
|
||||
|
||||
/**
|
||||
* Get slotIndex associated with the subscription.
|
||||
* @return slotIndex as a positive integer or a negative value if an error either
|
||||
* SIM_NOT_INSERTED or < 0 if an invalid slot index
|
||||
* @hide
|
||||
*
|
||||
* @param subscriptionId the unique SubscriptionInfo index in database
|
||||
* @return slotIndex as a positive integer or {@link #INVALID_SIM_SLOT_INDEX} if the supplied
|
||||
* subscriptionId doesn't have an associated slot index.
|
||||
*/
|
||||
@UnsupportedAppUsage
|
||||
public static int getSlotIndex(int subId) {
|
||||
if (!isValidSubscriptionId(subId)) {
|
||||
public static int getSlotIndex(int subscriptionId) {
|
||||
if (!isValidSubscriptionId(subscriptionId)) {
|
||||
if (DBG) {
|
||||
logd("[getSlotIndex]- fail");
|
||||
logd("[getSlotIndex]- supplied subscriptionId is invalid.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1327,7 +1326,7 @@ public class SubscriptionManager {
|
||||
try {
|
||||
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
|
||||
if (iSub != null) {
|
||||
result = iSub.getSlotIndex(subId);
|
||||
result = iSub.getSlotIndex(subscriptionId);
|
||||
}
|
||||
} catch (RemoteException ex) {
|
||||
// ignore it
|
||||
|
||||
Reference in New Issue
Block a user