From 9e73256fa20b95dd05bf9b46fe43ad96c3823178 Mon Sep 17 00:00:00 2001 From: zachh Date: Tue, 17 Apr 2018 18:05:25 -0700 Subject: Improved support for short codes in Coalescer. Use ShortNumberInfo to identify shortcodes and apply more basic matching for them; without this short codes like '5555' and '55555' would match due to being a SHORT_NSN_MATCH even though they should not match. Also removed the PhoneNumberUtil argument from DialerPhoneNumberUtil's constructor as it was always PhoneNumberUtil.getInstance(). (This allowed me to do a similar thing for ShortNumberInfo.getInstance()). TEST=unit Bug: 71586485 Test: unit PiperOrigin-RevId: 193288929 Change-Id: Ia16c78e7eee5e0912d3913660952b9ee32713731 --- java/com/android/incallui/PhoneLookupHistoryRecorder.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'java/com/android/incallui') diff --git a/java/com/android/incallui/PhoneLookupHistoryRecorder.java b/java/com/android/incallui/PhoneLookupHistoryRecorder.java index 2b8075878..4f4137049 100644 --- a/java/com/android/incallui/PhoneLookupHistoryRecorder.java +++ b/java/com/android/incallui/PhoneLookupHistoryRecorder.java @@ -36,7 +36,6 @@ import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.MoreExecutors; -import com.google.i18n.phonenumbers.PhoneNumberUtil; /** * Fetches the current {@link PhoneLookupInfo} for the provided call and writes it to the @@ -59,8 +58,7 @@ final class PhoneLookupHistoryRecorder { ListenableFuture numberFuture = backgroundExecutor.submit( () -> { - DialerPhoneNumberUtil dialerPhoneNumberUtil = - new DialerPhoneNumberUtil(PhoneNumberUtil.getInstance()); + DialerPhoneNumberUtil dialerPhoneNumberUtil = new DialerPhoneNumberUtil(); return dialerPhoneNumberUtil.parse( TelecomCallUtil.getNumber(call), GeoUtil.getCurrentCountryIso(appContext)); }); -- cgit v1.2.3