Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 70fc386e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Allow renaming inactive subscriptions." into qt-dev

parents 90519f47 5018baa1
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -1560,10 +1560,14 @@ public class SubscriptionController extends ISub.Stub {
        final long identity = Binder.clearCallingIdentity();
        try {
            validateSubId(subId);
            for (SubscriptionInfo subInfo : mCacheActiveSubInfoList) {
            List<SubscriptionInfo> allSubInfo = getSubInfo(null, null);
            // if there is no sub in the db, return 0 since subId does not exist in db
            if (allSubInfo == null || allSubInfo.isEmpty()) return 0;
            for (SubscriptionInfo subInfo : allSubInfo) {
                if (subInfo.getSubscriptionId() == subId
                        && getNameSourcePriority(subInfo.getNameSource())
                                > getNameSourcePriority(nameSource)) {
                        && (getNameSourcePriority(subInfo.getNameSource())
                                > getNameSourcePriority(nameSource)
                        || (displayName != null && displayName.equals(subInfo.getDisplayName())))) {
                    return 0;
                }
            }