From 0c2805ffe1f08ee163b4fe721ce086b5530e84f0 Mon Sep 17 00:00:00 2001 From: roldenburg Date: Wed, 7 Mar 2018 16:46:43 -0800 Subject: Add additional logging to missed call notification code path Bug: 73877234 Test: just logging PiperOrigin-RevId: 188256051 Change-Id: Ic9486b3fc1d97338cb016b86a243612baa6282fe --- .../dialer/app/calllog/MissedCallNotificationReceiver.java | 2 ++ java/com/android/dialer/app/calllog/MissedCallNotifier.java | 8 ++++++++ 2 files changed, 10 insertions(+) (limited to 'java/com/android/dialer/app/calllog') diff --git a/java/com/android/dialer/app/calllog/MissedCallNotificationReceiver.java b/java/com/android/dialer/app/calllog/MissedCallNotificationReceiver.java index 641be854a..f24b3cd98 100644 --- a/java/com/android/dialer/app/calllog/MissedCallNotificationReceiver.java +++ b/java/com/android/dialer/app/calllog/MissedCallNotificationReceiver.java @@ -46,6 +46,8 @@ public class MissedCallNotificationReceiver extends BroadcastReceiver { return; } + LogUtil.enterBlock("MissedCallNotificationReceiver.onReceive"); + int count = intent.getIntExtra( EXTRA_NOTIFICATION_COUNT, CallLogNotificationsService.UNKNOWN_MISSED_CALL_COUNT); diff --git a/java/com/android/dialer/app/calllog/MissedCallNotifier.java b/java/com/android/dialer/app/calllog/MissedCallNotifier.java index 80901ce88..158ae2b03 100644 --- a/java/com/android/dialer/app/calllog/MissedCallNotifier.java +++ b/java/com/android/dialer/app/calllog/MissedCallNotifier.java @@ -106,6 +106,8 @@ public class MissedCallNotifier implements Worker, Void> { @VisibleForTesting @WorkerThread void updateMissedCallNotification(int count, @Nullable String number) { + LogUtil.enterBlock("MissedCallNotifier.updateMissedCallNotification"); + final int titleResId; CharSequence expandedText; // The text in the notification's line 1 and 2. @@ -137,6 +139,7 @@ public class MissedCallNotifier implements Worker, Void> { if (count == CallLogNotificationsService.UNKNOWN_MISSED_CALL_COUNT) { // If the intent did not contain a count, and we are unable to get a count from the // call log, then no notification can be shown. + LogUtil.i("MissedCallNotifier.updateMissedCallNotification", "unknown missed call count"); return; } @@ -144,6 +147,9 @@ public class MissedCallNotifier implements Worker, Void> { boolean useCallList = newCalls != null; if (count == 1) { + LogUtil.i( + "MissedCallNotifier.updateMissedCallNotification", + "1 missed call, looking up contact info"); NewCall call = useCallList ? newCalls.get(0) @@ -188,6 +194,8 @@ public class MissedCallNotifier implements Worker, Void> { expandedText = context.getString(R.string.notification_missedCallsMsg, count); } + LogUtil.i("MissedCallNotifier.updateMissedCallNotification", "preparing notification"); + // Create a public viewable version of the notification, suitable for display when sensitive // notification content is hidden. Notification.Builder publicSummaryBuilder = createNotificationBuilder(); -- cgit v1.2.3