diff options
author | Aishwarya Mallampati <amallampati@google.com> | 2023-05-08 19:38:45 +0000 |
---|---|---|
committer | Aishwarya Mallampati <amallampati@google.com> | 2023-05-08 20:56:03 +0000 |
commit | e5cdf7b0bfd38c5135f7e221d0ce5375a71e3e60 (patch) | |
tree | b7cc5a74e67d45ab3ed6b7775f7559e69aecc320 | |
parent | 3dd7975a3607b567e19b3265362c82b2b62d5f51 (diff) | |
download | telephony-e5cdf7b0bfd38c5135f7e221d0ce5375a71e3e60.tar.gz |
Return true from checkSubscriptionAssociatedWithUser if subId is not
present on the device.
Bug: 277184941
Test: atest CtsTelephonyTestCases
atest MmsTest#testSendMmsMessageWithInactiveSubscriptionId
Flashed build on raven-userdebug: call/SMS/MMS are working fine.
Change-Id: Ic1a5abdb42ea184925c41210b3f4b628df5f94ec
-rw-r--r-- | src/java/com/android/internal/telephony/subscription/SubscriptionManagerService.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/java/com/android/internal/telephony/subscription/SubscriptionManagerService.java b/src/java/com/android/internal/telephony/subscription/SubscriptionManagerService.java index ff2f7bda48..8ea94c6e6b 100644 --- a/src/java/com/android/internal/telephony/subscription/SubscriptionManagerService.java +++ b/src/java/com/android/internal/telephony/subscription/SubscriptionManagerService.java @@ -3602,6 +3602,13 @@ public class SubscriptionManagerService extends ISub.Stub { return true; } + List<Integer> subIdList = subInfoList.stream().map(SubscriptionInfo::getSubscriptionId) + .collect(Collectors.toList()); + if (!subIdList.contains(subscriptionId)) { + // Return true as this subscription is not available on the device. + return true; + } + // Get list of subscriptions associated with this user. List<SubscriptionInfo> associatedSubscriptionsList = getSubscriptionInfoListAssociatedWithUser(userHandle); |