Merge "Fix NPE in CtsSimPhoneBookTestCases"
diff --git a/tests/tests/simphonebookprovider/src/android/provider/cts/simphonebook/RemovableSims.java b/tests/tests/simphonebookprovider/src/android/provider/cts/simphonebook/RemovableSims.java
index d012eb6..b6bedf0 100644
--- a/tests/tests/simphonebookprovider/src/android/provider/cts/simphonebook/RemovableSims.java
+++ b/tests/tests/simphonebookprovider/src/android/provider/cts/simphonebook/RemovableSims.java
@@ -71,6 +71,9 @@
List<SubscriptionInfo> allSubscriptions = SystemUtil.runWithShellPermissionIdentity(() ->
subscriptionManager.getActiveSubscriptionInfoList(),
Manifest.permission.READ_PHONE_STATE);
+ if (allSubscriptions == null) {
+ allSubscriptions = Collections.emptyList();
+ }
Map<Integer, List<SubscriptionInfo>> subscriptionsByCardId = allSubscriptions.stream()
.collect(Collectors.groupingBy(SubscriptionInfo::getCardId));
for (UiccCardInfo cardInfo : uiccCards) {