From 665bd416945c0c089f78d733e45d7532eb74f5b4 Mon Sep 17 00:00:00 2001 From: calderwoodra Date: Wed, 4 Oct 2017 15:10:41 -0700 Subject: Inserting post call notes now compares notifications using fuzzy matching. Bug: 65559651 Test: MissedCallNotifierTest PiperOrigin-RevId: 171070314 Change-Id: I57e6e0b55a07430daad944473ae4eb427d56ee96 --- java/com/android/dialer/app/calllog/MissedCallNotifier.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'java') diff --git a/java/com/android/dialer/app/calllog/MissedCallNotifier.java b/java/com/android/dialer/app/calllog/MissedCallNotifier.java index 084713fdc..eb7fab8fc 100644 --- a/java/com/android/dialer/app/calllog/MissedCallNotifier.java +++ b/java/com/android/dialer/app/calllog/MissedCallNotifier.java @@ -49,6 +49,7 @@ import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; import com.android.dialer.common.concurrent.DialerExecutor.Worker; import com.android.dialer.compat.android.provider.VoicemailCompat; +import com.android.dialer.enrichedcall.FuzzyPhoneNumberMatcher; import com.android.dialer.notification.DialerNotificationManager; import com.android.dialer.notification.NotificationChannelId; import com.android.dialer.notification.NotificationManagerUtils; @@ -267,7 +268,8 @@ public class MissedCallNotifier implements Worker, Void> { List newCalls = callLogNotificationsQueryHelper.getNewMissedCalls(); if (newCalls != null && !newCalls.isEmpty()) { for (NewCall call : newCalls) { - if (call.number.equals(number.replace("tel:", ""))) { + if (FuzzyPhoneNumberMatcher.matches(call.number, number.replace("tel:", ""))) { + LogUtil.i("MissedCallNotifier.insertPostCallNotification", "Notification updated"); // Update the first notification that matches our post call note sender. DialerNotificationManager.notify( context, -- cgit v1.2.3