summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/app
diff options
context:
space:
mode:
authorlinyuh <linyuh@google.com>2017-10-18 17:48:58 -0700
committerEric Erfanian <erfanian@google.com>2017-10-19 08:39:19 -0700
commitb8337d12753806ac478621a0a1e53a5d9b21c996 (patch)
tree578ed8f84a41fa1d91deb257d02b7db7955652e7 /java/com/android/dialer/app
parent4041c22d478a8a0f052c437cbfcee7ea5834e479 (diff)
Take into account special dialable characters when grouping calls in the call log UI.
Currently we use PhoneNumberUtils#compare(String, String) to determine whether two numbers in the call log should be grouped. The method ignores special dialable characters such as "#", "*", "+", etc, which can cause phone numbers and service dialing numbers to be grouped. For example, suppose the user has a contact named "John Smith" with number 123456789 and a contact named "Service" with number #123456789, and called each contact once. The old grouping logic will put the two numbers in the same group. The new grouping logic in this CL can separate the two numbers. Bug: 30225112 Test: CallLogGroupBuilderTest, PhoneNumberHelperTest PiperOrigin-RevId: 172683494 Change-Id: Ie9e7b7418d6d7c74830cbae09c04ff1feb1b827d
Diffstat (limited to 'java/com/android/dialer/app')
-rw-r--r--java/com/android/dialer/app/calllog/CallLogGroupBuilder.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/java/com/android/dialer/app/calllog/CallLogGroupBuilder.java b/java/com/android/dialer/app/calllog/CallLogGroupBuilder.java
index 513c8aa59..f689571bd 100644
--- a/java/com/android/dialer/app/calllog/CallLogGroupBuilder.java
+++ b/java/com/android/dialer/app/calllog/CallLogGroupBuilder.java
@@ -21,7 +21,6 @@ import android.os.Build.VERSION;
import android.os.Build.VERSION_CODES;
import android.support.annotation.Nullable;
import android.support.annotation.VisibleForTesting;
-import android.telephony.PhoneNumberUtils;
import android.text.TextUtils;
import android.text.format.Time;
import com.android.contacts.common.util.DateUtils;
@@ -194,7 +193,7 @@ public class CallLogGroupBuilder {
if (PhoneNumberHelper.isUriNumber(number1) || PhoneNumberHelper.isUriNumber(number2)) {
return compareSipAddresses(number1, number2);
} else {
- return PhoneNumberUtils.compare(number1, number2);
+ return PhoneNumberHelper.compare(number1, number2);
}
}