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

Commit ca0647aa authored by SongFerng Wang's avatar SongFerng Wang Committed by Android (Google) Code Review
Browse files

Merge "Using the phone number without formate for the unique DisplayName" into main

parents 3d593f35 1229c544
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -335,8 +335,16 @@ public class SubscriptionUtil {

            if (duplicateOriginalNames.contains(info.originalName)) {
                // This may return null, if the user cannot view the phone number itself.
                final String phoneNumber = getBidiFormattedPhoneNumber(context,
                        info.subscriptionInfo);
                String phoneNumber = "";
                try {
                    final SubscriptionManager subscriptionManager = context.getSystemService(
                        SubscriptionManager.class);
                    phoneNumber = subscriptionManager.getPhoneNumber(infoSubId);
                } catch (IllegalStateException
                        | SecurityException
                        | UnsupportedOperationException e) {
                    Log.w(TAG, "get number error." + e);
                }
                String lastFourDigits = "";
                if (phoneNumber != null) {
                    lastFourDigits = (phoneNumber.length() > 4)