aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-02-05 01:18:11 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-02-05 01:18:11 +0000
commit05c46b2049136447ba8b5c7e583ad998d0272e19 (patch)
tree4a581cde57f765e22aeb303fd9b3eaeb0f213dfa
parent23e47d30b15787c88a56a511e53e17a3f8c43140 (diff)
parentee2a3365eb28cf122d1e0fbe67efd214acb16b68 (diff)
downloadtelephony-android12-qpr1-d-release.tar.gz
Merge cherrypicks of [16206382] into sc-qpr1-d-release.android-12.0.0_r32android12-qpr1-d-release
Change-Id: I51a846a54794dd694ac2f5c6e4edacf1ea5e355c
-rw-r--r--src/java/com/android/internal/telephony/SubscriptionController.java21
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 deb52404d2..451c09af2e 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());
@@ -3896,8 +3909,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<>();
}