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

Commit 0c87e907 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of [16223627] into security-aosp-qt-release.

Change-Id: I39aff0d340abf2a1100f293e68c54b1b28fcf62a
parents c038f169 3d48641f
Loading
Loading
Loading
Loading
+18 −3
Original line number Diff line number Diff line
@@ -675,6 +675,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
@@ -693,9 +706,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());
@@ -3281,7 +3294,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<>();
            }