summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorcalderwoodra <calderwoodra@google.com>2017-10-04 15:10:41 -0700
committerEric Erfanian <erfanian@google.com>2017-10-04 16:02:23 -0700
commit665bd416945c0c089f78d733e45d7532eb74f5b4 (patch)
tree3b8746686143df521d5bfec88c72c7e2668feb87 /java
parent88e17b4f505ec2989c386db9ae08790b44b431e7 (diff)
Inserting post call notes now compares notifications using fuzzy matching.
Bug: 65559651 Test: MissedCallNotifierTest PiperOrigin-RevId: 171070314 Change-Id: I57e6e0b55a07430daad944473ae4eb427d56ee96
Diffstat (limited to 'java')
-rw-r--r--java/com/android/dialer/app/calllog/MissedCallNotifier.java4
1 files changed, 3 insertions, 1 deletions
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<Pair<Integer, String>, Void> {
List<NewCall> 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,