Commit 2f134301 authored by Xing Liu's avatar Xing Liu Committed by Commit Bot

Download notification: Obsolete a notification notification metric.

This CL obsoletes the following metric:
Android.DownloadManager.ServiceStopped.DownloadNotification.

This metric seems to be used during the foreground service migration
for download notification. Now the migration is done, this is no longer
used.

Bug: 1130635
Change-Id: I96c65a960f0abad6629454c1e99abe3a36fc9fe1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2485873Reviewed-by: default avatarMark Pearson <mpearson@chromium.org>
Reviewed-by: default avatarShakti Sahu <shaktisahu@chromium.org>
Reviewed-by: default avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820420}
parent d4daf411
......@@ -132,7 +132,7 @@ public class DownloadForegroundServiceImpl extends DownloadForegroundService.Imp
DownloadNotificationUmaHelper.recordForegroundServiceLifecycleHistogram(
DownloadNotificationUmaHelper.ForegroundLifecycle.STOP);
DownloadNotificationUmaHelper.recordServiceStoppedHistogram(
DownloadNotificationUmaHelper.ServiceStopped.STOPPED, true /* withForeground */);
DownloadNotificationUmaHelper.ServiceStopped.STOPPED);
// Handle notifications and stop foreground.
if (stopForegroundNotification == StopForegroundNotification.KILL) {
......@@ -173,7 +173,7 @@ public class DownloadForegroundServiceImpl extends DownloadForegroundService.Imp
// In the case the service was restarted when the intent is null.
if (intent == null) {
DownloadNotificationUmaHelper.recordServiceStoppedHistogram(
DownloadNotificationUmaHelper.ServiceStopped.START_STICKY, true);
DownloadNotificationUmaHelper.ServiceStopped.START_STICKY);
// Allow observers to restart service on their own, if needed.
getService().stopSelf();
......@@ -186,7 +186,7 @@ public class DownloadForegroundServiceImpl extends DownloadForegroundService.Imp
@Override
public void onDestroy() {
DownloadNotificationUmaHelper.recordServiceStoppedHistogram(
DownloadNotificationUmaHelper.ServiceStopped.DESTROYED, true /* withForeground */);
DownloadNotificationUmaHelper.ServiceStopped.DESTROYED);
DownloadForegroundServiceObservers.alertObserversServiceDestroyed();
super.onDestroy();
}
......@@ -194,7 +194,7 @@ public class DownloadForegroundServiceImpl extends DownloadForegroundService.Imp
@Override
public void onTaskRemoved(Intent rootIntent) {
DownloadNotificationUmaHelper.recordServiceStoppedHistogram(
DownloadNotificationUmaHelper.ServiceStopped.TASK_REMOVED, true /*withForeground*/);
DownloadNotificationUmaHelper.ServiceStopped.TASK_REMOVED);
DownloadForegroundServiceObservers.alertObserversTaskRemoved();
super.onTaskRemoved(rootIntent);
}
......@@ -202,7 +202,7 @@ public class DownloadForegroundServiceImpl extends DownloadForegroundService.Imp
@Override
public void onLowMemory() {
DownloadNotificationUmaHelper.recordServiceStoppedHistogram(
DownloadNotificationUmaHelper.ServiceStopped.LOW_MEMORY, true /* withForeground */);
DownloadNotificationUmaHelper.ServiceStopped.LOW_MEMORY);
super.onLowMemory();
}
......
......@@ -108,18 +108,11 @@ public final class DownloadNotificationUmaHelper {
* understand the frequency of unexpected stops (low memory, task removed, etc).
* @param stopType Type of the foreground stop that is being recorded ({@link ServiceStopped}).
*/
static void recordServiceStoppedHistogram(
@ServiceStopped int stopType, boolean withForeground) {
static void recordServiceStoppedHistogram(@ServiceStopped int stopType) {
if (!LibraryLoader.getInstance().isInitialized()) return;
if (withForeground) {
RecordHistogram.recordEnumeratedHistogram(
"Android.DownloadManager.ServiceStopped.DownloadForeground", stopType,
ServiceStopped.NUM_ENTRIES);
} else {
RecordHistogram.recordEnumeratedHistogram(
"Android.DownloadManager.ServiceStopped.DownloadNotification", stopType,
ServiceStopped.NUM_ENTRIES);
}
}
/**
......
......@@ -744,6 +744,9 @@ reviews. Googlers can read more about this at go/gwsq-gerrit.
<histogram name="Android.DownloadManager.ServiceStopped.DownloadNotification"
enum="DownloadNotificationServiceStopped" expires_after="M85">
<obsolete>
Deprecated as of 10/2020
</obsolete>
<owner>xingliu@chromium.org</owner>
<owner>clank-downloads@google.com</owner>
<summary>
......
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