Loading telephony/java/android/telephony/SubscriptionManager.java +22 −22 Original line number Original line Diff line number Diff line Loading @@ -2241,46 +2241,46 @@ public class SubscriptionManager { } } /** /** * Get an array of subscription ids for specified logical SIM slot Index. * Get an array of subscription ids for the specified logical SIM slot Index. The maximum size * of the array is 1. This API was mistakenly designed to return multiple subscription ids, * which is not possible in the current Android telephony architecture. * * * @param slotIndex The logical SIM slot index. * @param slotIndex The logical SIM slot index. * * * @return subscription Ids or {@code null} if the given slot index is not valid or there are * @return Subscription id of the active subscription on the specified logical SIM slot index. * no active subscription in the slot. In the implementation today, there will be no more * If SIM is absent on the slot, a single element array of {@link #INVALID_SUBSCRIPTION_ID} will * than one subscriptions per logical SIM slot. * be returned. {@code null} if the provided {@code slotIndex} is not valid. * * * @deprecated Use {@link #getSubscriptionId(int)} instead. * @deprecated Use {@link #getSubscriptionId(int)} instead. */ */ @Deprecated @Deprecated @Nullable @Nullable public int[] getSubscriptionIds(int slotIndex) { public int[] getSubscriptionIds(int slotIndex) { int subId = getSubscriptionId(slotIndex); if (!isValidSlotIndex(slotIndex)) { if (!isValidSubscriptionId(subId)) { return null; return null; } } return new int[]{getSubscriptionId(slotIndex)}; return new int[]{getSubscriptionId(slotIndex)}; } } /** @hide */ /** @UnsupportedAppUsage * Get an array of subscription ids for the specified logical SIM slot Index. The maximum size * of the array is 1. This API was mistakenly designed to return multiple subscription ids, * which is not possible in the current Android telephony architecture. * * @param slotIndex The logical SIM slot index. * * @return Subscription id of the active subscription on the specified logical SIM slot index. * If SIM is absent on the slot, a single element array of {@link #INVALID_SUBSCRIPTION_ID} will * be returned. {@code null} if the provided {@code slotIndex} is not valid. * * @deprecated Use {@link #getSubscriptionId(int)} instead. * @hide */ public static int[] getSubId(int slotIndex) { public static int[] getSubId(int slotIndex) { if (!isValidSlotIndex(slotIndex)) { if (!isValidSlotIndex(slotIndex)) { logd("[getSubId]- fail"); return null; return null; } } return new int[]{getSubscriptionId(slotIndex)}; int[] subId = null; try { ISub iSub = TelephonyManager.getSubscriptionService(); if (iSub != null) { subId = iSub.getSubIds(slotIndex); } } catch (RemoteException ex) { // ignore it } return subId; } } /** /** Loading telephony/java/com/android/internal/telephony/ISub.aidl +0 −2 Original line number Original line Diff line number Diff line Loading @@ -236,8 +236,6 @@ interface ISub { int getSlotIndex(int subId); int getSlotIndex(int subId); int[] getSubIds(int slotIndex); int getSubId(int slotIndex); int getSubId(int slotIndex); int getDefaultSubId(); int getDefaultSubId(); Loading Loading
telephony/java/android/telephony/SubscriptionManager.java +22 −22 Original line number Original line Diff line number Diff line Loading @@ -2241,46 +2241,46 @@ public class SubscriptionManager { } } /** /** * Get an array of subscription ids for specified logical SIM slot Index. * Get an array of subscription ids for the specified logical SIM slot Index. The maximum size * of the array is 1. This API was mistakenly designed to return multiple subscription ids, * which is not possible in the current Android telephony architecture. * * * @param slotIndex The logical SIM slot index. * @param slotIndex The logical SIM slot index. * * * @return subscription Ids or {@code null} if the given slot index is not valid or there are * @return Subscription id of the active subscription on the specified logical SIM slot index. * no active subscription in the slot. In the implementation today, there will be no more * If SIM is absent on the slot, a single element array of {@link #INVALID_SUBSCRIPTION_ID} will * than one subscriptions per logical SIM slot. * be returned. {@code null} if the provided {@code slotIndex} is not valid. * * * @deprecated Use {@link #getSubscriptionId(int)} instead. * @deprecated Use {@link #getSubscriptionId(int)} instead. */ */ @Deprecated @Deprecated @Nullable @Nullable public int[] getSubscriptionIds(int slotIndex) { public int[] getSubscriptionIds(int slotIndex) { int subId = getSubscriptionId(slotIndex); if (!isValidSlotIndex(slotIndex)) { if (!isValidSubscriptionId(subId)) { return null; return null; } } return new int[]{getSubscriptionId(slotIndex)}; return new int[]{getSubscriptionId(slotIndex)}; } } /** @hide */ /** @UnsupportedAppUsage * Get an array of subscription ids for the specified logical SIM slot Index. The maximum size * of the array is 1. This API was mistakenly designed to return multiple subscription ids, * which is not possible in the current Android telephony architecture. * * @param slotIndex The logical SIM slot index. * * @return Subscription id of the active subscription on the specified logical SIM slot index. * If SIM is absent on the slot, a single element array of {@link #INVALID_SUBSCRIPTION_ID} will * be returned. {@code null} if the provided {@code slotIndex} is not valid. * * @deprecated Use {@link #getSubscriptionId(int)} instead. * @hide */ public static int[] getSubId(int slotIndex) { public static int[] getSubId(int slotIndex) { if (!isValidSlotIndex(slotIndex)) { if (!isValidSlotIndex(slotIndex)) { logd("[getSubId]- fail"); return null; return null; } } return new int[]{getSubscriptionId(slotIndex)}; int[] subId = null; try { ISub iSub = TelephonyManager.getSubscriptionService(); if (iSub != null) { subId = iSub.getSubIds(slotIndex); } } catch (RemoteException ex) { // ignore it } return subId; } } /** /** Loading
telephony/java/com/android/internal/telephony/ISub.aidl +0 −2 Original line number Original line Diff line number Diff line Loading @@ -236,8 +236,6 @@ interface ISub { int getSlotIndex(int subId); int getSlotIndex(int subId); int[] getSubIds(int slotIndex); int getSubId(int slotIndex); int getSubId(int slotIndex); int getDefaultSubId(); int getDefaultSubId(); Loading