From b8337d12753806ac478621a0a1e53a5d9b21c996 Mon Sep 17 00:00:00 2001 From: linyuh Date: Wed, 18 Oct 2017 17:48:58 -0700 Subject: 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 --- java/com/android/dialer/app/calllog/CallLogGroupBuilder.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'java/com/android/dialer/app') 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); } } -- cgit v1.2.3