diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-01-29 23:44:47 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-01-29 23:44:47 +0000 |
commit | f27f1bd028abfcac714cf5aed6bbbab8d21077a6 (patch) | |
tree | 35a7e6ae0b6dbdae5ba84388a55853af78ac875f /java/com/android/dialer/phonelookup/cp2/Cp2RemotePhoneLookup.java | |
parent | add7d143419d8ada612eb3e0bb2807b0e97dff35 (diff) | |
parent | 75a8d5170399b37d33bced7825a9f6d88a5ec233 (diff) |
Merge "Added is_valid and post_dial_portion fields to DialerPhoneNumber."
Diffstat (limited to 'java/com/android/dialer/phonelookup/cp2/Cp2RemotePhoneLookup.java')
-rw-r--r-- | java/com/android/dialer/phonelookup/cp2/Cp2RemotePhoneLookup.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/java/com/android/dialer/phonelookup/cp2/Cp2RemotePhoneLookup.java b/java/com/android/dialer/phonelookup/cp2/Cp2RemotePhoneLookup.java index 9596f15f7..cc4fbf19f 100644 --- a/java/com/android/dialer/phonelookup/cp2/Cp2RemotePhoneLookup.java +++ b/java/com/android/dialer/phonelookup/cp2/Cp2RemotePhoneLookup.java @@ -32,14 +32,12 @@ import com.android.dialer.inject.ApplicationContext; import com.android.dialer.phonelookup.PhoneLookup; import com.android.dialer.phonelookup.PhoneLookupInfo; import com.android.dialer.phonelookup.PhoneLookupInfo.Cp2Info; -import com.android.dialer.phonenumberproto.DialerPhoneNumberUtil; import com.android.dialer.phonenumberutil.PhoneNumberHelper; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListeningExecutorService; -import com.google.i18n.phonenumbers.PhoneNumberUtil; import java.util.ArrayList; import java.util.List; import javax.inject.Inject; @@ -114,9 +112,8 @@ public final class Cp2RemotePhoneLookup implements PhoneLookup<Cp2Info> { return Futures.immediateFuture(Cp2Info.getDefaultInstance()); } - DialerPhoneNumberUtil dialerPhoneNumberUtil = - new DialerPhoneNumberUtil(PhoneNumberUtil.getInstance()); - String number = dialerPhoneNumberUtil.normalizeNumber(dialerPhoneNumber); + // Note: This loses country info when number is not valid. + String number = dialerPhoneNumber.getNormalizedNumber(); List<ListenableFuture<Cp2Info>> cp2InfoFutures = new ArrayList<>(); for (long remoteDirectoryId : remoteDirectoryIds) { |