Added builder for SubscriptionInfo
Added the builder for SubscriptionInfo, and make all members final. This can prevent other clients accidentally modifying the same copy of SubscriptionInfo. Also moved getAllAccessRules into getAccessRules. Bug: 239607619 Bug: 247140269 Test: Manual + atest SubscriptionInfoTest Merged-In: If2973d78579cc0d0d3c6720d22a4b49a04a2b813 Change-Id: If2973d78579cc0d0d3c6720d22a4b49a04a2b813
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -3083,7 +3083,7 @@ public class SubscriptionManager {
|
||||
@SystemApi
|
||||
public boolean canManageSubscription(@NonNull SubscriptionInfo info,
|
||||
@NonNull String packageName) {
|
||||
if (info == null || info.getAllAccessRules() == null || packageName == null) {
|
||||
if (info == null || info.getAccessRules() == null || packageName == null) {
|
||||
return false;
|
||||
}
|
||||
PackageManager packageManager = mContext.getPackageManager();
|
||||
@@ -3095,7 +3095,7 @@ public class SubscriptionManager {
|
||||
logd("Unknown package: " + packageName);
|
||||
return false;
|
||||
}
|
||||
for (UiccAccessRule rule : info.getAllAccessRules()) {
|
||||
for (UiccAccessRule rule : info.getAccessRules()) {
|
||||
if (rule.getCarrierPrivilegeStatus(packageInfo)
|
||||
== TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user