Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c2805ff authored by roldenburg's avatar roldenburg Committed by Copybara-Service
Browse files

Add additional logging to missed call notification code path

Bug: 73877234
Test: just logging
PiperOrigin-RevId: 188256051
Change-Id: Ic9486b3fc1d97338cb016b86a243612baa6282fe
parent 6ce88e74
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);
+8 −0
Original line number Diff line number Diff line
@@ -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();