summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/app/calllog
diff options
context:
space:
mode:
authorroldenburg <roldenburg@google.com>2018-03-07 16:46:43 -0800
committerCopybara-Service <copybara-piper@google.com>2018-03-07 17:17:47 -0800
commit0c2805ffe1f08ee163b4fe721ce086b5530e84f0 (patch)
tree7f4ccf6ea2cb8212b5ab82f702343b5afde2452d /java/com/android/dialer/app/calllog
parent6ce88e749ff71631fd0050ba127351dee39a1536 (diff)
Add additional logging to missed call notification code path
Bug: 73877234 Test: just logging PiperOrigin-RevId: 188256051 Change-Id: Ic9486b3fc1d97338cb016b86a243612baa6282fe
Diffstat (limited to 'java/com/android/dialer/app/calllog')
-rw-r--r--java/com/android/dialer/app/calllog/MissedCallNotificationReceiver.java2
-rw-r--r--java/com/android/dialer/app/calllog/MissedCallNotifier.java8
2 files changed, 10 insertions, 0 deletions
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<Pair<Integer, String>, 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<Pair<Integer, String>, 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<Pair<Integer, String>, 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<Pair<Integer, String>, 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();