Loading src/java/com/android/internal/telephony/SubscriptionController.java +1 −24 Original line number Diff line number Diff line Loading @@ -3445,7 +3445,7 @@ public class SubscriptionController extends ISub.Stub { callingPackage, callingFeatureId, "getSubscriptionsInGroup") || info.canManageSubscription(mContext, callingPackage); }).map(subscriptionInfo -> conditionallyRemoveIdentifiers(subscriptionInfo, callingPackage, callingFeatureId, "getSubscriptionInfoList")) callingPackage, callingFeatureId, "getSubscriptionsInGroup")) .collect(Collectors.toList()); } Loading Loading @@ -3714,30 +3714,7 @@ public class SubscriptionController extends ISub.Stub { // They are doing similar things except operating on different cache. private List<SubscriptionInfo> getSubscriptionInfoListFromCacheHelper( String callingPackage, String callingFeatureId, List<SubscriptionInfo> cacheSubList) { boolean canReadAllPhoneState; try { canReadAllPhoneState = TelephonyPermissions.checkReadPhoneState(mContext, SubscriptionManager.INVALID_SUBSCRIPTION_ID, Binder.getCallingPid(), Binder.getCallingUid(), callingPackage, callingFeatureId, "getSubscriptionInfoList"); // If the calling package has the READ_PHONE_STATE permission then check if the caller // also has access to subscriber identifiers to ensure that the ICC ID and any other // unique identifiers are removed if the caller should not have access. if (canReadAllPhoneState) { canReadAllPhoneState = hasSubscriberIdentifierAccess( SubscriptionManager.INVALID_SUBSCRIPTION_ID, callingPackage, callingFeatureId, "getSubscriptionInfoList"); } } catch (SecurityException e) { canReadAllPhoneState = false; } synchronized (mSubInfoListLock) { // If the caller can read all phone state, just return the full list. if (canReadAllPhoneState) { return new ArrayList<>(cacheSubList); } // Filter the list to only include subscriptions which the caller can manage. return cacheSubList.stream() .filter(subscriptionInfo -> { Loading Loading
src/java/com/android/internal/telephony/SubscriptionController.java +1 −24 Original line number Diff line number Diff line Loading @@ -3445,7 +3445,7 @@ public class SubscriptionController extends ISub.Stub { callingPackage, callingFeatureId, "getSubscriptionsInGroup") || info.canManageSubscription(mContext, callingPackage); }).map(subscriptionInfo -> conditionallyRemoveIdentifiers(subscriptionInfo, callingPackage, callingFeatureId, "getSubscriptionInfoList")) callingPackage, callingFeatureId, "getSubscriptionsInGroup")) .collect(Collectors.toList()); } Loading Loading @@ -3714,30 +3714,7 @@ public class SubscriptionController extends ISub.Stub { // They are doing similar things except operating on different cache. private List<SubscriptionInfo> getSubscriptionInfoListFromCacheHelper( String callingPackage, String callingFeatureId, List<SubscriptionInfo> cacheSubList) { boolean canReadAllPhoneState; try { canReadAllPhoneState = TelephonyPermissions.checkReadPhoneState(mContext, SubscriptionManager.INVALID_SUBSCRIPTION_ID, Binder.getCallingPid(), Binder.getCallingUid(), callingPackage, callingFeatureId, "getSubscriptionInfoList"); // If the calling package has the READ_PHONE_STATE permission then check if the caller // also has access to subscriber identifiers to ensure that the ICC ID and any other // unique identifiers are removed if the caller should not have access. if (canReadAllPhoneState) { canReadAllPhoneState = hasSubscriberIdentifierAccess( SubscriptionManager.INVALID_SUBSCRIPTION_ID, callingPackage, callingFeatureId, "getSubscriptionInfoList"); } } catch (SecurityException e) { canReadAllPhoneState = false; } synchronized (mSubInfoListLock) { // If the caller can read all phone state, just return the full list. if (canReadAllPhoneState) { return new ArrayList<>(cacheSubList); } // Filter the list to only include subscriptions which the caller can manage. return cacheSubList.stream() .filter(subscriptionInfo -> { Loading