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

Unverified Commit 32ac4d37 authored by Kevin F. Haggerty's avatar Kevin F. Haggerty
Browse files

Merge tag 'android-security-10.0.0_r62' into staging/lineage-17.1_merge-android-security-10.0.0_r62

Android security 10.0.0 release 62

* tag 'android-security-10.0.0_r62':
  filter deviceIdentifiers for subscriptionInfo if callers without perm

Change-Id: I32b17df60619a2ee1b0c376c13c3716c653ec0af
parents b551dfaf 0c87e907
Loading
Loading
Loading
Loading
+18 −3
Original line number Diff line number Diff line
@@ -692,6 +692,19 @@ public class SubscriptionController extends ISub.Stub {
     */
    @Override
    public List<SubscriptionInfo> getAllSubInfoList(String callingPackage) {
        return getAllSubInfoList(callingPackage, false);
    }

    /**
     * @param callingPackage The package making the IPC.
     * @param callingFeatureId The feature in the package
     * @param skipConditionallyRemoveIdentifier if set, skip removing identifier conditionally
     * @return List of all SubscriptionInfo records in database,
     * include those that were inserted before, maybe empty but not null.
     * @hide
     */
    public List<SubscriptionInfo> getAllSubInfoList(String callingPackage,
            boolean skipConditionallyRemoveIdentifier) {
        if (VDBG) logd("[getAllSubInfoList]+");

        // This API isn't public, so no need to provide a valid subscription ID - we're not worried
@@ -710,9 +723,9 @@ public class SubscriptionController extends ISub.Stub {
        } finally {
            Binder.restoreCallingIdentity(identity);
        }
        if (subList != null) {
        if (subList != null && !skipConditionallyRemoveIdentifier) {
            if (VDBG) logd("[getAllSubInfoList]- " + subList.size() + " infos return");
            subList.stream().map(
            subList = subList.stream().map(
                    subscriptionInfo -> conditionallyRemoveIdentifiers(subscriptionInfo,
                            callingPackage, "getAllSubInfoList"))
                    .collect(Collectors.toList());
@@ -3357,7 +3370,9 @@ public class SubscriptionController extends ISub.Stub {
        List<SubscriptionInfo> subInfoList;

        try {
            subInfoList = getAllSubInfoList(mContext.getOpPackageName());
            // need to bypass removing identifier check because that will remove the subList without
            // group id.
            subInfoList = getAllSubInfoList(mContext.getOpPackageName(), true);
            if (groupUuid == null || subInfoList == null || subInfoList.isEmpty()) {
                return new ArrayList<>();
            }