diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-11-11 13:06:45 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-11-11 13:06:45 +0000 |
commit | 1f06e661a329eb9691599e5b19d3c7189009560b (patch) | |
tree | b7f8b73b10a414d0bc6b8036d00e8c74b3594bb8 | |
parent | 1c0937f8b6dfaf53e320287e9c7dceeeea2b405d (diff) | |
parent | 8045eba07f71575f67f546599080b7482bf62a32 (diff) | |
download | telephony-android12-mainline-resolv-release.tar.gz |
Snap for 7905862 from 8045eba07f71575f67f546599080b7482bf62a32 to mainline-resolv-releaseandroid-mainline-12.0.0_r94android-mainline-12.0.0_r80android-mainline-12.0.0_r65android-mainline-12.0.0_r52android-mainline-12.0.0_r124android-mainline-12.0.0_r108android12-mainline-resolv-release
Change-Id: I434ca87ddde2ae7b6e7e28cf200fc3fe88bbf59d
-rw-r--r-- | src/java/com/android/internal/telephony/SubscriptionController.java | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/java/com/android/internal/telephony/SubscriptionController.java b/src/java/com/android/internal/telephony/SubscriptionController.java index f03070fa19..49db160450 100644 --- a/src/java/com/android/internal/telephony/SubscriptionController.java +++ b/src/java/com/android/internal/telephony/SubscriptionController.java @@ -905,6 +905,19 @@ public class SubscriptionController extends ISub.Stub { @Override public List<SubscriptionInfo> getAllSubInfoList(String callingPackage, String callingFeatureId) { + return getAllSubInfoList(callingPackage, callingFeatureId, 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, + String callingFeatureId, boolean skipConditionallyRemoveIdentifier) { if (VDBG) logd("[getAllSubInfoList]+"); // This API isn't public, so no need to provide a valid subscription ID - we're not worried @@ -923,9 +936,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, callingFeatureId, "getAllSubInfoList")) .collect(Collectors.toList()); @@ -3890,8 +3903,10 @@ public class SubscriptionController extends ISub.Stub { List<SubscriptionInfo> subInfoList; try { + // need to bypass removing identifier check because that will remove the subList without + // group id. subInfoList = getAllSubInfoList(mContext.getOpPackageName(), - mContext.getAttributionTag()); + mContext.getAttributionTag(), true); if (groupUuid == null || subInfoList == null || subInfoList.isEmpty()) { return new ArrayList<>(); } |