blob: afc9d78dcbd1295370c846a3c2058903fd5d1422 [file] [log] [blame]
Joe Onorato713fec82016-03-04 10:34:02 -08001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.os.health;
18
19/**
20 * Keys for {@link HealthStats} returned from
21 * {@link SystemHealthManager#takeUidSnapshot(int) SystemHealthManager.takeUidSnapshot(int)},
22 * {@link SystemHealthManager#takeMyUidSnapshot() SystemHealthManager.takeMyUidSnapshot()}, and
23 * {@link SystemHealthManager#takeUidSnapshots(int[]) SystemHealthManager.takeUidSnapshots(int[])}.
24 */
25public final class UidHealthStats {
26
27 private UidHealthStats() {
28 }
29
30 /**
31 * How many milliseconds this statistics report covers in wall-clock time while the
32 * device was on battery including both screen-on and screen-off time.
33 */
34 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
35 public static final int MEASUREMENT_REALTIME_BATTERY_MS = HealthKeys.BASE_UID + 1;
36
37 /**
38 * How many milliseconds this statistics report covers that the CPU was running while the
39 * device was on battery including both screen-on and screen-off time.
40 */
41 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
42 public static final int MEASUREMENT_UPTIME_BATTERY_MS = HealthKeys.BASE_UID + 2;
43
44 /**
45 * How many milliseconds this statistics report covers in wall-clock time while the
46 * device was on battery including both screen-on and screen-off time.
47 */
48 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
49 public static final int MEASUREMENT_REALTIME_SCREEN_OFF_BATTERY_MS = HealthKeys.BASE_UID + 3;
50
51 /**
52 * How many milliseconds this statistics report covers that the CPU was running while the
53 * device was on battery including both screen-on and screen-off time.
54 */
55 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
56 public static final int MEASUREMENT_UPTIME_SCREEN_OFF_BATTERY_MS = HealthKeys.BASE_UID + 4;
57
58 /**
59 * Key for a TimerStat for the times a
60 * {@link android.os.PowerManager#FULL_WAKE_LOCK full wake lock}
61 * was acquired for this uid.
62 */
63 @HealthKeys.Constant(type=HealthKeys.TYPE_TIMERS)
64 public static final int TIMERS_WAKELOCKS_FULL = HealthKeys.BASE_UID + 5;
65
66 /**
67 * Key for a TimerStat for the times a
68 * {@link android.os.PowerManager#PARTIAL_WAKE_LOCK full wake lock}
69 * was acquired for this uid.
70 */
71 @HealthKeys.Constant(type=HealthKeys.TYPE_TIMERS)
72 public static final int TIMERS_WAKELOCKS_PARTIAL = HealthKeys.BASE_UID + 6;
73
74 @HealthKeys.Constant(type=HealthKeys.TYPE_TIMERS)
75 public static final int TIMERS_WAKELOCKS_WINDOW = HealthKeys.BASE_UID + 7;
76
Joe Onorato181cada2016-05-09 10:31:41 -070077 /**
78 * Key for a TimerStat for the times a system-defined wakelock was acquired
79 * to allow the application to draw when it otherwise would not be able to
80 * (e.g. on the lock screen or doze screen).
81 */
Joe Onorato713fec82016-03-04 10:34:02 -080082 @HealthKeys.Constant(type=HealthKeys.TYPE_TIMERS)
83 public static final int TIMERS_WAKELOCKS_DRAW = HealthKeys.BASE_UID + 8;
84
85 /**
86 * Key for a map of Timers for the sync adapter syncs that were done for
87 * this uid.
88 */
89 @HealthKeys.Constant(type=HealthKeys.TYPE_TIMERS)
90 public static final int TIMERS_SYNCS = HealthKeys.BASE_UID + 9;
91
92 /**
93 * Key for a map of Timers for the {@link android.app.job.JobScheduler} jobs for
94 * this uid.
95 */
96 @HealthKeys.Constant(type=HealthKeys.TYPE_TIMERS)
97 public static final int TIMERS_JOBS = HealthKeys.BASE_UID + 10;
98
99 /**
100 * Key for a timer for the applications use of the GPS sensor.
101 */
102 @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER)
103 public static final int TIMER_GPS_SENSOR = HealthKeys.BASE_UID + 11;
104
105 /**
106 * Key for a map of the sensor usage for this uid. The keys are a
107 * string representation of the handle for the sensor.
108 */
109 @HealthKeys.Constant(type=HealthKeys.TYPE_TIMERS)
110 public static final int TIMERS_SENSORS = HealthKeys.BASE_UID + 12;
111
112 /**
113 * Key for a HealthStats with {@link PidHealthStats} keys for each of the
114 * currently running processes for this uid.
115 */
116 @HealthKeys.Constant(type=HealthKeys.TYPE_STATS)
117 public static final int STATS_PIDS = HealthKeys.BASE_UID + 13;
118
119 /**
120 * Key for a HealthStats with {@link ProcessHealthStats} keys for each of the
121 * named processes for this uid.
122 */
123 @HealthKeys.Constant(type=HealthKeys.TYPE_STATS)
124 public static final int STATS_PROCESSES = HealthKeys.BASE_UID + 14;
125
126 /**
127 * Key for a HealthStats with {@link PackageHealthStats} keys for each of the
128 * APKs that share this uid.
129 */
130 @HealthKeys.Constant(type=HealthKeys.TYPE_STATS)
131 public static final int STATS_PACKAGES = HealthKeys.BASE_UID + 15;
132
Joe Onorato181cada2016-05-09 10:31:41 -0700133 /**
134 * Key for a measurement of number of millseconds the wifi controller was
135 * idle but turned on on behalf of this uid.
136 */
Joe Onorato713fec82016-03-04 10:34:02 -0800137 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
138 public static final int MEASUREMENT_WIFI_IDLE_MS = HealthKeys.BASE_UID + 16;
139
Joe Onorato181cada2016-05-09 10:31:41 -0700140 /**
141 * Key for a measurement of number of millseconds the wifi transmitter was
142 * receiving data for this uid.
143 */
Joe Onorato713fec82016-03-04 10:34:02 -0800144 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
145 public static final int MEASUREMENT_WIFI_RX_MS = HealthKeys.BASE_UID + 17;
146
Joe Onorato181cada2016-05-09 10:31:41 -0700147 /**
148 * Key for a measurement of number of millseconds the wifi transmitter was
149 * transmitting data for this uid.
150 */
Joe Onorato713fec82016-03-04 10:34:02 -0800151 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
152 public static final int MEASUREMENT_WIFI_TX_MS = HealthKeys.BASE_UID + 18;
153
Joe Onorato181cada2016-05-09 10:31:41 -0700154 /**
155 * Key for a measurement of the estimated number of mA*ms used by this uid
156 * for wifi, that is to say the number of milliseconds of wifi activity
157 * times the mA current during that period.
158 */
Joe Onorato713fec82016-03-04 10:34:02 -0800159 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
160 public static final int MEASUREMENT_WIFI_POWER_MAMS = HealthKeys.BASE_UID + 19;
161
Joe Onorato181cada2016-05-09 10:31:41 -0700162 /**
163 * Key for a measurement of number of millseconds the bluetooth controller was
164 * idle but turned on on behalf of this uid.
165 */
Joe Onorato713fec82016-03-04 10:34:02 -0800166 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
167 public static final int MEASUREMENT_BLUETOOTH_IDLE_MS = HealthKeys.BASE_UID + 20;
168
Joe Onorato181cada2016-05-09 10:31:41 -0700169 /**
170 * Key for a measurement of number of millseconds the bluetooth transmitter was
171 * receiving data for this uid.
172 */
Joe Onorato713fec82016-03-04 10:34:02 -0800173 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
174 public static final int MEASUREMENT_BLUETOOTH_RX_MS = HealthKeys.BASE_UID + 21;
175
Joe Onorato181cada2016-05-09 10:31:41 -0700176 /**
177 * Key for a measurement of number of millseconds the bluetooth transmitter was
178 * transmitting data for this uid.
179 */
Joe Onorato713fec82016-03-04 10:34:02 -0800180 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
181 public static final int MEASUREMENT_BLUETOOTH_TX_MS = HealthKeys.BASE_UID + 22;
182
Joe Onorato181cada2016-05-09 10:31:41 -0700183 /**
184 * Key for a measurement of the estimated number of mA*ms used by this uid
185 * for bluetooth, that is to say the number of milliseconds of activity
186 * times the mA current during that period.
187 */
Joe Onorato713fec82016-03-04 10:34:02 -0800188 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
189 public static final int MEASUREMENT_BLUETOOTH_POWER_MAMS = HealthKeys.BASE_UID + 23;
190
Joe Onorato181cada2016-05-09 10:31:41 -0700191 /**
192 * Key for a measurement of number of millseconds the mobile radio controller was
193 * idle but turned on on behalf of this uid.
194 */
Joe Onorato713fec82016-03-04 10:34:02 -0800195 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
196 public static final int MEASUREMENT_MOBILE_IDLE_MS = HealthKeys.BASE_UID + 24;
197
Joe Onorato181cada2016-05-09 10:31:41 -0700198 /**
199 * Key for a measurement of number of millseconds the mobile radio transmitter was
200 * receiving data for this uid.
201 */
Joe Onorato713fec82016-03-04 10:34:02 -0800202 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
203 public static final int MEASUREMENT_MOBILE_RX_MS = HealthKeys.BASE_UID + 25;
204
Joe Onorato181cada2016-05-09 10:31:41 -0700205 /**
206 * Key for a measurement of number of millseconds the mobile radio transmitter was
207 * transmitting data for this uid.
208 */
Joe Onorato713fec82016-03-04 10:34:02 -0800209 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
210 public static final int MEASUREMENT_MOBILE_TX_MS = HealthKeys.BASE_UID + 26;
211
Joe Onorato181cada2016-05-09 10:31:41 -0700212 /**
213 * Key for a measurement of the estimated number of mA*ms used by this uid
214 * for mobile data, that is to say the number of milliseconds of activity
215 * times the mA current during that period.
216 */
Joe Onorato713fec82016-03-04 10:34:02 -0800217 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
218 public static final int MEASUREMENT_MOBILE_POWER_MAMS = HealthKeys.BASE_UID + 27;
219
Joe Onorato181cada2016-05-09 10:31:41 -0700220 /**
221 * Key for a measurement of number of millseconds the wifi controller was
222 * active on behalf of this uid.
223 */
Joe Onorato713fec82016-03-04 10:34:02 -0800224 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
225 public static final int MEASUREMENT_WIFI_RUNNING_MS = HealthKeys.BASE_UID + 28;
226
Joe Onorato181cada2016-05-09 10:31:41 -0700227 /**
228 * Key for a measurement of number of millseconds that this uid held a full wifi lock.
229 */
Joe Onorato713fec82016-03-04 10:34:02 -0800230 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
231 public static final int MEASUREMENT_WIFI_FULL_LOCK_MS = HealthKeys.BASE_UID + 29;
232
Joe Onorato181cada2016-05-09 10:31:41 -0700233 /**
234 * Key for a timer for the count and duration of wifi scans done by this uid.
235 */
Joe Onorato713fec82016-03-04 10:34:02 -0800236 @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER)
237 public static final int TIMER_WIFI_SCAN = HealthKeys.BASE_UID + 30;
238
Joe Onorato181cada2016-05-09 10:31:41 -0700239 /**
240 * Key for a measurement of number of millseconds that this uid was performing
241 * multicast wifi traffic.
242 */
Joe Onorato713fec82016-03-04 10:34:02 -0800243 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
244 public static final int MEASUREMENT_WIFI_MULTICAST_MS = HealthKeys.BASE_UID + 31;
245
Joe Onorato181cada2016-05-09 10:31:41 -0700246 /**
247 * Key for a timer for the count and duration of audio playback done by this uid.
248 */
Joe Onorato713fec82016-03-04 10:34:02 -0800249 @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER)
250 public static final int TIMER_AUDIO = HealthKeys.BASE_UID + 32;
251
Joe Onorato181cada2016-05-09 10:31:41 -0700252 /**
253 * Key for a timer for the count and duration of video playback done by this uid.
254 */
Joe Onorato713fec82016-03-04 10:34:02 -0800255 @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER)
256 public static final int TIMER_VIDEO = HealthKeys.BASE_UID + 33;
257
Joe Onorato181cada2016-05-09 10:31:41 -0700258 /**
259 * Key for a timer for the count and duration this uid had the flashlight turned on.
260 */
Joe Onorato713fec82016-03-04 10:34:02 -0800261 @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER)
262 public static final int TIMER_FLASHLIGHT = HealthKeys.BASE_UID + 34;
263
Joe Onorato181cada2016-05-09 10:31:41 -0700264 /**
265 * Key for a timer for the count and duration this uid had the camera turned on.
266 */
Joe Onorato713fec82016-03-04 10:34:02 -0800267 @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER)
268 public static final int TIMER_CAMERA = HealthKeys.BASE_UID + 35;
269
Joe Onorato181cada2016-05-09 10:31:41 -0700270 /**
271 * Key for a timer for the count and duration of when an activity from this uid
272 * was the foreground activitiy.
273 */
Joe Onorato713fec82016-03-04 10:34:02 -0800274 @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER)
275 public static final int TIMER_FOREGROUND_ACTIVITY = HealthKeys.BASE_UID + 36;
276
Joe Onorato181cada2016-05-09 10:31:41 -0700277 /**
278 * Key for a timer for the count and duration of when this uid was doing bluetooth scans.
279 */
Joe Onorato713fec82016-03-04 10:34:02 -0800280 @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER)
281 public static final int TIMER_BLUETOOTH_SCAN = HealthKeys.BASE_UID + 37;
282
Joe Onorato181cada2016-05-09 10:31:41 -0700283 /**
284 * Key for a timer for the count and duration of when this uid was in the "top" process state.
285 */
Joe Onorato713fec82016-03-04 10:34:02 -0800286 @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER)
287 public static final int TIMER_PROCESS_STATE_TOP_MS = HealthKeys.BASE_UID + 38;
288
Joe Onorato181cada2016-05-09 10:31:41 -0700289 /**
290 * Key for a timer for the count and duration of when this uid was in the "foreground service"
291 * process state.
292 */
Joe Onorato713fec82016-03-04 10:34:02 -0800293 @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER)
294 public static final int TIMER_PROCESS_STATE_FOREGROUND_SERVICE_MS = HealthKeys.BASE_UID + 39;
295
Joe Onorato181cada2016-05-09 10:31:41 -0700296 /**
297 * Key for a timer for the count and duration of when this uid was in the "top sleeping"
298 * process state.
299 */
Joe Onorato713fec82016-03-04 10:34:02 -0800300 @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER)
301 public static final int TIMER_PROCESS_STATE_TOP_SLEEPING_MS = HealthKeys.BASE_UID + 40;
302
Joe Onorato181cada2016-05-09 10:31:41 -0700303 /**
304 * Key for a timer for the count and duration of when this uid was in the "foreground"
305 * process state.
306 */
Joe Onorato713fec82016-03-04 10:34:02 -0800307 @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER)
308 public static final int TIMER_PROCESS_STATE_FOREGROUND_MS = HealthKeys.BASE_UID + 41;
309
Joe Onorato181cada2016-05-09 10:31:41 -0700310 /**
311 * Key for a timer for the count and duration of when this uid was in the "background"
312 * process state.
313 */
Joe Onorato713fec82016-03-04 10:34:02 -0800314 @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER)
315 public static final int TIMER_PROCESS_STATE_BACKGROUND_MS = HealthKeys.BASE_UID + 42;
316
Joe Onorato181cada2016-05-09 10:31:41 -0700317 /**
318 * Key for a timer for the count and duration of when this uid was in the "cached" process
319 * state.
320 */
Joe Onorato713fec82016-03-04 10:34:02 -0800321 @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER)
322 public static final int TIMER_PROCESS_STATE_CACHED_MS = HealthKeys.BASE_UID + 43;
323
Joe Onorato181cada2016-05-09 10:31:41 -0700324 /**
325 * Key for a timer for the count and duration this uid had the vibrator turned on.
326 */
Joe Onorato713fec82016-03-04 10:34:02 -0800327 @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER)
328 public static final int TIMER_VIBRATOR = HealthKeys.BASE_UID + 44;
329
Joe Onorato181cada2016-05-09 10:31:41 -0700330 /**
331 * Key for a measurement of number of software-generated user activity events caused
332 * by the UID. Calls to userActivity() reset the user activity countdown timer and
333 * keep the screen on for the user's preferred screen-on setting.
334 */
Joe Onorato713fec82016-03-04 10:34:02 -0800335 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
336 public static final int MEASUREMENT_OTHER_USER_ACTIVITY_COUNT = HealthKeys.BASE_UID + 45;
337
Joe Onorato181cada2016-05-09 10:31:41 -0700338 /**
339 * Key for a measurement of number of user activity events due to physical button presses caused
340 * by the UID. Calls to userActivity() reset the user activity countdown timer and
341 * keep the screen on for the user's preferred screen-on setting.
342 */
Joe Onorato713fec82016-03-04 10:34:02 -0800343 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
344 public static final int MEASUREMENT_BUTTON_USER_ACTIVITY_COUNT = HealthKeys.BASE_UID + 46;
345
Joe Onorato181cada2016-05-09 10:31:41 -0700346 /**
347 * Key for a measurement of number of user activity events due to touch events caused
348 * by the UID. Calls to userActivity() reset the user activity countdown timer and
349 * keep the screen on for the user's preferred screen-on setting.
350 */
Joe Onorato713fec82016-03-04 10:34:02 -0800351 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
352 public static final int MEASUREMENT_TOUCH_USER_ACTIVITY_COUNT = HealthKeys.BASE_UID + 47;
353
Joe Onorato181cada2016-05-09 10:31:41 -0700354 /**
355 * Key for a measurement of number of bytes received for this uid by the mobile radio.
356 */
Joe Onorato713fec82016-03-04 10:34:02 -0800357 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
358 public static final int MEASUREMENT_MOBILE_RX_BYTES = HealthKeys.BASE_UID + 48;
359
Joe Onorato181cada2016-05-09 10:31:41 -0700360 /**
361 * Key for a measurement of number of bytes transmitted for this uid by the mobile radio.
362 */
Joe Onorato713fec82016-03-04 10:34:02 -0800363 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
364 public static final int MEASUREMENT_MOBILE_TX_BYTES = HealthKeys.BASE_UID + 49;
365
Joe Onorato181cada2016-05-09 10:31:41 -0700366 /**
367 * Key for a measurement of number of bytes received for this uid by the wifi radio.
368 */
Joe Onorato713fec82016-03-04 10:34:02 -0800369 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
370 public static final int MEASUREMENT_WIFI_RX_BYTES = HealthKeys.BASE_UID + 50;
371
Joe Onorato181cada2016-05-09 10:31:41 -0700372 /**
373 * Key for a measurement of number of bytes transmitted for this uid by the wifi radio.
374 */
Joe Onorato713fec82016-03-04 10:34:02 -0800375 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
376 public static final int MEASUREMENT_WIFI_TX_BYTES = HealthKeys.BASE_UID + 51;
377
Joe Onorato181cada2016-05-09 10:31:41 -0700378 /**
379 * Key for a measurement of number of bytes received for this uid by the bluetooth radio.
380 */
Joe Onorato713fec82016-03-04 10:34:02 -0800381 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
382 public static final int MEASUREMENT_BLUETOOTH_RX_BYTES = HealthKeys.BASE_UID + 52;
383
Joe Onorato181cada2016-05-09 10:31:41 -0700384 /**
385 * Key for a measurement of number of bytes transmitted for this uid by the bluetooth radio.
386 */
Joe Onorato713fec82016-03-04 10:34:02 -0800387 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
388 public static final int MEASUREMENT_BLUETOOTH_TX_BYTES = HealthKeys.BASE_UID + 53;
389
Joe Onorato181cada2016-05-09 10:31:41 -0700390 /**
391 * Key for a measurement of number of packets received for this uid by the mobile radio.
392 */
Joe Onorato713fec82016-03-04 10:34:02 -0800393 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
394 public static final int MEASUREMENT_MOBILE_RX_PACKETS = HealthKeys.BASE_UID + 54;
395
Joe Onorato181cada2016-05-09 10:31:41 -0700396 /**
397 * Key for a measurement of number of packets transmitted for this uid by the mobile radio.
398 */
Joe Onorato713fec82016-03-04 10:34:02 -0800399 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
400 public static final int MEASUREMENT_MOBILE_TX_PACKETS = HealthKeys.BASE_UID + 55;
401
Joe Onorato181cada2016-05-09 10:31:41 -0700402 /**
403 * Key for a measurement of number of packets received for this uid by the wifi radio.
404 */
Joe Onorato713fec82016-03-04 10:34:02 -0800405 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
406 public static final int MEASUREMENT_WIFI_RX_PACKETS = HealthKeys.BASE_UID + 56;
407
Joe Onorato181cada2016-05-09 10:31:41 -0700408 /**
409 * Key for a measurement of number of packets transmitted for this uid by the wifi radio.
410 */
Joe Onorato713fec82016-03-04 10:34:02 -0800411 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
412 public static final int MEASUREMENT_WIFI_TX_PACKETS = HealthKeys.BASE_UID + 57;
413
Joe Onorato181cada2016-05-09 10:31:41 -0700414 /**
415 * Key for a measurement of number of packets received for this uid by the bluetooth radio.
416 */
Joe Onorato713fec82016-03-04 10:34:02 -0800417 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
418 public static final int MEASUREMENT_BLUETOOTH_RX_PACKETS = HealthKeys.BASE_UID + 58;
419
Joe Onorato181cada2016-05-09 10:31:41 -0700420 /**
421 * Key for a measurement of number of packets transmitted for this uid by the bluetooth radio.
422 */
Joe Onorato713fec82016-03-04 10:34:02 -0800423 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
424 public static final int MEASUREMENT_BLUETOOTH_TX_PACKETS = HealthKeys.BASE_UID + 59;
425
Joe Onorato181cada2016-05-09 10:31:41 -0700426 /**
427 * Key for a timer for the count and duration the mobile radio was turned on for this uid.
428 */
Joe Onorato713fec82016-03-04 10:34:02 -0800429 @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER)
430 public static final int TIMER_MOBILE_RADIO_ACTIVE = HealthKeys.BASE_UID + 61;
431
Joe Onorato181cada2016-05-09 10:31:41 -0700432 /**
433 * Key for a measurement of the number of milliseconds spent by the CPU running user space
434 * code for this uid.
435 */
Joe Onorato713fec82016-03-04 10:34:02 -0800436 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
Joe Onoratobee44ae2016-04-19 11:02:26 -0700437 public static final int MEASUREMENT_USER_CPU_TIME_MS = HealthKeys.BASE_UID + 62;
Joe Onorato713fec82016-03-04 10:34:02 -0800438
Joe Onorato181cada2016-05-09 10:31:41 -0700439 /**
440 * Key for a measurement of the number of milliseconds spent by the CPU running kernel
441 * code for this uid.
442 */
Joe Onorato713fec82016-03-04 10:34:02 -0800443 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
Joe Onoratobee44ae2016-04-19 11:02:26 -0700444 public static final int MEASUREMENT_SYSTEM_CPU_TIME_MS = HealthKeys.BASE_UID + 63;
Joe Onorato713fec82016-03-04 10:34:02 -0800445
446 /**
447 * An estimate of the number of milliamp-microsends used by this uid.
Adam Lesinskid4abd1e2017-04-12 11:29:13 -0700448 *
449 * @deprecated this measurement is vendor-dependent and not reliable.
Joe Onorato713fec82016-03-04 10:34:02 -0800450 */
Adam Lesinskid4abd1e2017-04-12 11:29:13 -0700451 @Deprecated
Joe Onorato713fec82016-03-04 10:34:02 -0800452 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
Joe Onoratobee44ae2016-04-19 11:02:26 -0700453 public static final int MEASUREMENT_CPU_POWER_MAMS = HealthKeys.BASE_UID + 64;
Joe Onorato713fec82016-03-04 10:34:02 -0800454
455 /**
456 * @hide
457 */
458 public static final HealthKeys.Constants CONSTANTS = new HealthKeys.Constants(UidHealthStats.class);
459}
460