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

Commit ba64b965 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "DO NOT MERGE Use SubscriptionController api to set display name"

parents 4ce49768 a46bbe62
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -427,17 +427,12 @@ public class SubscriptionInfoUpdater extends Handler {
                ContentResolver contentResolver = mContext.getContentResolver();

                if (msisdn != null) {
                    ContentValues number = new ContentValues(1);
                    number.put(SubscriptionManager.NUMBER, msisdn);
                    contentResolver.update(SubscriptionManager.CONTENT_URI, number,
                            SubscriptionManager.UNIQUE_KEY_SUBSCRIPTION_ID + "="
                                    + Long.toString(subId), null);
                    SubscriptionController.getInstance().setDisplayNumber(msisdn, subId);
                }

                SubscriptionInfo subInfo = mSubscriptionManager.getActiveSubscriptionInfo(subId);
                String nameToSet;
                String simCarrierName = tm.getSimOperatorName(subId);
                ContentValues name = new ContentValues(1);

                if (subInfo != null && subInfo.getNameSource() !=
                        SubscriptionManager.NAME_SOURCE_USER_INPUT) {
@@ -446,11 +441,8 @@ public class SubscriptionInfoUpdater extends Handler {
                    } else {
                        nameToSet = "CARD " + Integer.toString(slotId + 1);
                    }
                    name.put(SubscriptionManager.DISPLAY_NAME, nameToSet);
                    logd("sim name = " + nameToSet);
                    contentResolver.update(SubscriptionManager.CONTENT_URI, name,
                            SubscriptionManager.UNIQUE_KEY_SUBSCRIPTION_ID
                                    + "=" + Long.toString(subId), null);
                    SubscriptionController.getInstance().setDisplayName(nameToSet, subId);
                }

                /* Update preferred network type and network selection mode on SIM change.