Merge "Have isValidPhoneId and isValidSlotIndex based on activeModemCount."

am: 300a0262b9

Change-Id: Ic2686d75c094272a2703df0c2e0516ee9b5acbec
This commit is contained in:
Jack Yu
2019-11-05 08:54:24 -08:00
committed by android-build-merger

View File

@@ -2101,13 +2101,13 @@ public class SubscriptionManager {
/** @hide */ /** @hide */
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
public static boolean isValidSlotIndex(int slotIndex) { public static boolean isValidSlotIndex(int slotIndex) {
return slotIndex >= 0 && slotIndex < TelephonyManager.getDefault().getSupportedModemCount(); return slotIndex >= 0 && slotIndex < TelephonyManager.getDefault().getActiveModemCount();
} }
/** @hide */ /** @hide */
@UnsupportedAppUsage @UnsupportedAppUsage
public static boolean isValidPhoneId(int phoneId) { public static boolean isValidPhoneId(int phoneId) {
return phoneId >= 0 && phoneId < TelephonyManager.getDefault().getSupportedModemCount(); return phoneId >= 0 && phoneId < TelephonyManager.getDefault().getActiveModemCount();
} }
/** @hide */ /** @hide */