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

Commit cc14871e authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Use TelephonyManager api to get SPN of sim to display in UI."

parents dea86d74 a1aa529d
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -655,8 +655,14 @@ public class SimSettings extends RestrictedSettingsFragment implements Indexable
                numberView.setText(PhoneNumberUtils.formatNumber(rawNumber));
            }

            final TelephonyManager tm =
                        (TelephonyManager) getActivity().getSystemService(
                        Context.TELEPHONY_SERVICE);
            String simCarrierName = tm.getSimOperatorNameForSubscription(mSubscriptionInfo
                        .getSubscriptionId());
            TextView carrierView = (TextView)dialogLayout.findViewById(R.id.carrier);
            carrierView.setText(mSubscriptionInfo.getDisplayName());
            carrierView.setText(!TextUtils.isEmpty(simCarrierName) ? simCarrierName :
                    getContext().getString(com.android.internal.R.string.unknownName));

            SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
            final Editor editor = prefs.edit();