diff options
author | zachh <zachh@google.com> | 2018-04-17 18:05:25 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-04-17 18:25:49 -0700 |
commit | 9e73256fa20b95dd05bf9b46fe43ad96c3823178 (patch) | |
tree | b3c906e6253b82c88de50ad57825019649ed3e7c /java/com/android/dialer/commandline | |
parent | 882c5bc1909eea75ac407120a1c3d36348372afd (diff) |
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
Diffstat (limited to 'java/com/android/dialer/commandline')
-rw-r--r-- | java/com/android/dialer/commandline/impl/BlockingCommand.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/java/com/android/dialer/commandline/impl/BlockingCommand.java b/java/com/android/dialer/commandline/impl/BlockingCommand.java index c8f893422..f06e240ae 100644 --- a/java/com/android/dialer/commandline/impl/BlockingCommand.java +++ b/java/com/android/dialer/commandline/impl/BlockingCommand.java @@ -32,7 +32,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; import javax.inject.Inject; /** Block or unblock a number. */ @@ -88,8 +87,7 @@ public class BlockingCommand implements Command { if ("isblocked".equals(command)) { String number = args.getPositionals().get(1); ListenableFuture<DialerPhoneNumber> dialerPhoneNumberFuture = - executorService.submit( - () -> new DialerPhoneNumberUtil(PhoneNumberUtil.getInstance()).parse(number, null)); + executorService.submit(() -> new DialerPhoneNumberUtil().parse(number, null)); ListenableFuture<PhoneLookupInfo> lookupFuture = Futures.transformAsync( |