Add rtc fields to pushed alarm atoms

Test: statsd_testdrive 368 10106

Bug: 177556103
Change-Id: Iaf7f04370b73118723cd2fbb08fd18b43aa70d8d
This commit is contained in:
Suprabh Shukla
2021-05-05 17:26:12 -07:00
parent c5535ff014
commit 9b8ab9c13a
2 changed files with 5 additions and 3 deletions

View File

@@ -1135,7 +1135,7 @@ public class AlarmManagerService extends SystemService {
this(context, new Injector(context));
}
private static boolean isRtc(int type) {
static boolean isRtc(int type) {
return (type == RTC || type == RTC_WAKEUP);
}

View File

@@ -72,7 +72,8 @@ class MetricsHelper {
alarmStore.getCount(
a -> (a.getRequestedElapsed() > now + INDEFINITE_DELAY)),
alarmStore.getCount(a -> (a.repeatInterval != 0)),
alarmStore.getCount(a -> (a.alarmClock != null))
alarmStore.getCount(a -> (a.alarmClock != null)),
alarmStore.getCount(a -> AlarmManagerService.isRtc(a.type))
));
return StatsManager.PULL_SUCCESS;
}
@@ -101,7 +102,8 @@ class MetricsHelper {
(a.flags & AlarmManager.FLAG_ALLOW_WHILE_IDLE) != 0,
a.alarmClock != null,
a.repeatInterval != 0,
reasonToStatsReason(a.mExactAllowReason));
reasonToStatsReason(a.mExactAllowReason),
AlarmManagerService.isRtc(a.type));
}
static void pushAlarmBatchDelivered(int numAlarms, int wakeups) {