diff options
author | zachh <zachh@google.com> | 2018-01-19 10:54:19 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-01-19 11:56:21 -0800 |
commit | 17b8bd14b9cf67b7353f9287045fdc10fd1e93fb (patch) | |
tree | ef69d6a2d725479082bed3b606b56b28bf8b0fec /java/com/android/dialer/calllog/database | |
parent | e7194f7204e0b694106fcaa3cb9d3d3171c92858 (diff) |
Improved support for post dial digits in new call log.
-Don't ever coalesce rows with different post-dial digits
-Made matching of unparsable numbers a little more intelligent by comparing national/postdial portions which have undialable characters removed (rather than exact string match)
-Read and append the post-dial digits from the system call log when building DialerPhoneNumbers to place in the AnnotatedCallLog. Note: PhoneNumberUtil will parse numbers with exactly one post-dial character, but not more than one.
-Use post-dial digits when building the AnnotatedCallLog's FORMATTED_NUMBER value
-Display the formatted number in CallDetails when the name is missing, instead of the unformatted number
-Don't set the displayNumber in CallDetails when the name is missing, because we are showing the (formatted) number via the nameOrNumber field.
-Treat numbers with post-dial digits as invalid in PartitionedNumbers; batch operations are not possible with these numbers because their normalized representations strip the post-dial digits (and they are significant for contact matching)
Bug: 70989632
Test: unit and manual
PiperOrigin-RevId: 182557754
Change-Id: Idcdefce0946a189e5b350a53ec2a16a96a8d4552
Diffstat (limited to 'java/com/android/dialer/calllog/database')
-rw-r--r-- | java/com/android/dialer/calllog/database/Coalescer.java | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/java/com/android/dialer/calllog/database/Coalescer.java b/java/com/android/dialer/calllog/database/Coalescer.java index 3c2585e01..b10dea24a 100644 --- a/java/com/android/dialer/calllog/database/Coalescer.java +++ b/java/com/android/dialer/calllog/database/Coalescer.java @@ -156,6 +156,10 @@ public class Coalescer { return false; } + if (!meetsAssistedDialingCriteria(row1, row2)) { + return false; + } + DialerPhoneNumber number1; DialerPhoneNumber number2; try { @@ -172,15 +176,6 @@ public class Coalescer { } catch (InvalidProtocolBufferException e) { throw Assert.createAssertionFailException("error parsing DialerPhoneNumber proto", e); } - - if (!number1.hasDialerInternalPhoneNumber() || !number2.hasDialerInternalPhoneNumber()) { - // An empty number should not be combined with any other number. - return false; - } - - if (!meetsAssistedDialingCriteria(row1, row2)) { - return false; - } return dialerPhoneNumberUtil.isMatch(number1, number2); } |