Commit 531448d1 authored by Xing Liu's avatar Xing Liu Committed by Commit Bot

Update notification: Add shown notification metric.

This CL adds the notification shown metrics for update notification,
which informs the user to update Chrome in play store.

Bug: 952354
Change-Id: Id0a6c1a944ec2bdadfc782926591e8b51d9a616c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1585233Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Commit-Queue: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#654667}
parent 569e277a
......@@ -26,6 +26,7 @@ import org.chromium.chrome.browser.ChromeActivity;
import org.chromium.chrome.browser.IntentHandler;
import org.chromium.chrome.browser.document.ChromeLauncherActivity;
import org.chromium.chrome.browser.lifecycle.Destroyable;
import org.chromium.chrome.browser.notifications.ChromeNotification;
import org.chromium.chrome.browser.notifications.ChromeNotificationBuilder;
import org.chromium.chrome.browser.notifications.NotificationBuilderFactory;
import org.chromium.chrome.browser.notifications.NotificationConstants;
......@@ -126,8 +127,12 @@ public class UpdateNotificationController implements Destroyable {
.setContentText(getUpdateNotificationTextBody());
builder.setContentIntent(createContentIntent(mUpdateStatus));
ChromeNotification notification = builder.buildChromeNotification();
NotificationManagerProxy notificationManager = new NotificationManagerProxyImpl(mActivity);
notificationManager.notify(builder.buildChromeNotification());
notificationManager.notify(notification);
NotificationUmaTracker.getInstance().onNotificationShown(
NotificationUmaTracker.SystemNotificationType.UPDATES,
notification.getNotification());
updateLastPushedTimeStamp();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment