Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e69a8cc authored by Jack Yu's avatar Jack Yu
Browse files

Exposed getAllSubscriptionInfoList and getSubscriptionId

1. Added getAllSubscriptionInfoList for getting all the subscriptions
   from the subscription database.
2. Added getSubscriptionId for getting the active subscription id
   from the specified slot.
3. Deprecated getSubscriptionIds, which is imposible to return more
   than one subscription in today's implementation.

Fix: 261041952
Test: Manual + CTS
Merged-In: I542be7f798b16227614f0467259015f856720d14
Change-Id: I542be7f798b16227614f0467259015f856720d14
parent 60892c9e
Loading
Loading
Loading
Loading
+7 −9
Original line number Diff line number Diff line
@@ -986,7 +986,7 @@ public class SubscriptionManagerService extends ISub.Stub {
    }

    /**
     * Get all subscription info records from SIMs that are inserted now or were inserted before.
     * Get all subscription info records from SIMs that are inserted now or previously inserted.
     *
     * <p>
     * If the caller does not have {@link Manifest.permission#READ_PHONE_NUMBERS} permission,
@@ -996,19 +996,17 @@ public class SubscriptionManagerService extends ISub.Stub {
     * empty string, and {@link SubscriptionInfo#getGroupUuid()} will return {@code null}.
     *
     * <p>
     * The carrier app will always have full {@link SubscriptionInfo} for the subscriptions
     * that it has carrier privilege. Subscriptions that the carrier app has no privilege will be
     * excluded from the list.
     *
     * @return List of all {@link SubscriptionInfo} records from SIMs that are inserted or
     * inserted before. Sorted by {@link SubscriptionInfo#getSimSlotIndex()}, then
     * {@link SubscriptionInfo#getSubscriptionId()}.
     * The carrier app will only get the list of subscriptions that it has carrier privilege on,
     * but will have non-stripped {@link SubscriptionInfo} in the list.
     *
     * @param callingPackage The package making the call.
     * @param callingFeatureId The feature in the package.
     *
     * @throws SecurityException if the caller does not have required permissions.
     * @return List of all {@link SubscriptionInfo} records from SIMs that are inserted or
     * previously inserted. Sorted by {@link SubscriptionInfo#getSimSlotIndex()}, then
     * {@link SubscriptionInfo#getSubscriptionId()}.
     *
     * @throws SecurityException if callers do not hold the required permission.
     */
    @Override
    @NonNull