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

Commit ed72870e authored by Daisuke Miyakawa's avatar Daisuke Miyakawa
Browse files

Make RecentCallsListActivity#formatPhoneNumber() ignore null or empty phone number.

Internal issue number: 1903662
parent e2040782
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -656,8 +656,14 @@ public class RecentCallsListActivity extends ListActivity
     * <p>
     * Because of the shared {@link #sEditable} builder, <b>this method is not
     * thread safe</b>, and should only be called from the GUI thread.
     * <p>
     * If the given String object is null or empty, return an empty String.
     */
    private String formatPhoneNumber(String number) {
        if (!TextUtils.isEmpty(number)) {
            return "";
        }

        // Cache formatting type if not already present
        if (sFormattingType == FORMATTING_TYPE_INVALID) {
            sFormattingType = PhoneNumberUtils.getFormatTypeForLocale(Locale.getDefault());