diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java index eade18652db41..682bd9cb868ec 100644 --- a/telephony/java/android/telephony/SubscriptionManager.java +++ b/telephony/java/android/telephony/SubscriptionManager.java @@ -1640,17 +1640,33 @@ public class SubscriptionManager { } /** - * @return List of all SubscriptionInfo records in database, - * include those that were inserted before, maybe empty but not null. + * Get all subscription info records from SIMs that are inserted now or were inserted before. + * + *
+ * If the caller does not have {@link Manifest.permission#READ_PHONE_NUMBERS} permission, + * {@link SubscriptionInfo#getNumber()} will return empty string. + * If the caller does not have {@link Manifest.permission#USE_ICC_AUTH_WITH_DEVICE_IDENTIFIER}, + * {@link SubscriptionInfo#getIccId()} and {@link SubscriptionInfo#getCardString()} will return + * empty string, and {@link SubscriptionInfo#getGroupUuid()} will return {@code null}. + * + *
+ * The carrier app will always have full {@link SubscriptionInfo} for the subscriptions
+ * that it has carrier privilege.
+ *
+ * @return List of all {@link SubscriptionInfo} records from SIMs that are inserted or
+ * inserted before. Sorted by {@link SubscriptionInfo#getSimSlotIndex()}, then
+ * {@link SubscriptionInfo#getSubscriptionId()}.
+ *
* @hide
*/
+ @RequiresPermission(anyOf = {
+ Manifest.permission.READ_PHONE_STATE,
+ Manifest.permission.READ_PRIVILEGED_PHONE_STATE,
+ "carrier privileges",
+ })
@NonNull
- @UnsupportedAppUsage
public List