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

Commit a9f7e4bd authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 25646 into eclair

* changes:
  Make RecentCallsListActivity#formatPhoneNumber() ignore null or empty phone number.
parents 71994847 ed72870e
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -656,8 +656,14 @@ public class RecentCallsListActivity extends ListActivity
     * <p>
     * <p>
     * Because of the shared {@link #sEditable} builder, <b>this method is not
     * Because of the shared {@link #sEditable} builder, <b>this method is not
     * thread safe</b>, and should only be called from the GUI thread.
     * 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) {
    private String formatPhoneNumber(String number) {
        if (!TextUtils.isEmpty(number)) {
            return "";
        }

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