diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-09-28 20:59:07 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-09-28 20:59:07 +0000 |
commit | ea2f430dd5f5f5f08bb5c9438696112f44423abe (patch) | |
tree | eb2b91eaa8fafe6041c27dae82a68888ba771a93 /java/com/android/dialer/app/calllog/MissedCallNotifier.java | |
parent | 126469d1020dbcb88146d595414faf9a0c4a1a28 (diff) | |
parent | 96aea2a8f42bfc55dd2b08c51698efb0d0559109 (diff) |
Merge changes I0ff396b5,I3b668c3a,Iab630f19,I6ef204ac
* changes:
Use goAsync() and dialer executor to insert post call notifications
Add the assisted dialing logic module.
Refactor DialerStrictMode into an interface.
Adding logging for transcription polling requests
Diffstat (limited to 'java/com/android/dialer/app/calllog/MissedCallNotifier.java')
-rw-r--r-- | java/com/android/dialer/app/calllog/MissedCallNotifier.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/java/com/android/dialer/app/calllog/MissedCallNotifier.java b/java/com/android/dialer/app/calllog/MissedCallNotifier.java index de766191a..084713fdc 100644 --- a/java/com/android/dialer/app/calllog/MissedCallNotifier.java +++ b/java/com/android/dialer/app/calllog/MissedCallNotifier.java @@ -45,6 +45,7 @@ import com.android.dialer.app.contactinfo.ContactPhotoLoader; import com.android.dialer.app.list.DialtactsPagerAdapter; import com.android.dialer.callintent.CallInitiationType; import com.android.dialer.callintent.CallIntentBuilder; +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; @@ -83,7 +84,7 @@ public class MissedCallNotifier implements Worker<Pair<Integer, String>, Void> { this.callLogNotificationsQueryHelper = callLogNotificationsQueryHelper; } - static MissedCallNotifier getIstance(Context context) { + public static MissedCallNotifier getInstance(Context context) { return new MissedCallNotifier(context, CallLogNotificationsQueryHelper.getInstance(context)); } @@ -259,7 +260,10 @@ public class MissedCallNotifier implements Worker<Pair<Integer, String>, Void> { return NOTIFICATION_TAG_PREFIX + callUri; } + @WorkerThread public void insertPostCallNotification(@NonNull String number, @NonNull String note) { + Assert.isWorkerThread(); + LogUtil.enterBlock("MissedCallNotifier.insertPostCallNotification"); List<NewCall> newCalls = callLogNotificationsQueryHelper.getNewMissedCalls(); if (newCalls != null && !newCalls.isEmpty()) { for (NewCall call : newCalls) { @@ -270,10 +274,11 @@ public class MissedCallNotifier implements Worker<Pair<Integer, String>, Void> { getNotificationTagForCall(call), NOTIFICATION_ID, getNotificationForCall(call, note)); - break; + return; } } } + LogUtil.i("MissedCallNotifier.insertPostCallNotification", "notification not found"); } private Notification getNotificationForCall( |