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

Commit 5f9928e6 authored by Amit Mahajan's avatar Amit Mahajan Committed by Gerrit Code Review
Browse files

Merge "When SIM Name save as empty string by user, save the default display name show SIM1/SIM2."

parents 2df8c250 e5cc89f7
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -1584,8 +1584,16 @@ public class SubscriptionController extends ISub.Stub {
                }
            }
            String nameToSet;
            if (displayName == null) {
            if (TextUtils.isEmpty(displayName) || displayName.trim().length() == 0) {
                nameToSet = mTelephonyManager.getSimOperatorName(subId);
                if (TextUtils.isEmpty(nameToSet)) {
                    if (nameSource == SubscriptionManager.NAME_SOURCE_USER_INPUT
                            && SubscriptionManager.isValidSlotIndex(getSlotIndex(subId))) {
                        nameToSet = "CARD " + (getSlotIndex(subId) + 1);
                    } else {
                        nameToSet = mContext.getString(SubscriptionManager.DEFAULT_NAME_RES);
                    }
                }
            } else {
                nameToSet = displayName;
            }