Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package 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 | */ |
| 25 | public 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 Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 77 | /** |
| 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 Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 82 | @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 Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 133 | /** |
| 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 Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 137 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 138 | public static final int MEASUREMENT_WIFI_IDLE_MS = HealthKeys.BASE_UID + 16; |
| 139 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 140 | /** |
| 141 | * Key for a measurement of number of millseconds the wifi transmitter was |
| 142 | * receiving data for this uid. |
| 143 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 144 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 145 | public static final int MEASUREMENT_WIFI_RX_MS = HealthKeys.BASE_UID + 17; |
| 146 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 147 | /** |
| 148 | * Key for a measurement of number of millseconds the wifi transmitter was |
| 149 | * transmitting data for this uid. |
| 150 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 151 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 152 | public static final int MEASUREMENT_WIFI_TX_MS = HealthKeys.BASE_UID + 18; |
| 153 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 154 | /** |
| 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 Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 159 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 160 | public static final int MEASUREMENT_WIFI_POWER_MAMS = HealthKeys.BASE_UID + 19; |
| 161 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 162 | /** |
| 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 Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 166 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 167 | public static final int MEASUREMENT_BLUETOOTH_IDLE_MS = HealthKeys.BASE_UID + 20; |
| 168 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 169 | /** |
| 170 | * Key for a measurement of number of millseconds the bluetooth transmitter was |
| 171 | * receiving data for this uid. |
| 172 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 173 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 174 | public static final int MEASUREMENT_BLUETOOTH_RX_MS = HealthKeys.BASE_UID + 21; |
| 175 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 176 | /** |
| 177 | * Key for a measurement of number of millseconds the bluetooth transmitter was |
| 178 | * transmitting data for this uid. |
| 179 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 180 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 181 | public static final int MEASUREMENT_BLUETOOTH_TX_MS = HealthKeys.BASE_UID + 22; |
| 182 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 183 | /** |
| 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 Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 188 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 189 | public static final int MEASUREMENT_BLUETOOTH_POWER_MAMS = HealthKeys.BASE_UID + 23; |
| 190 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 191 | /** |
| 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 Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 195 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 196 | public static final int MEASUREMENT_MOBILE_IDLE_MS = HealthKeys.BASE_UID + 24; |
| 197 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 198 | /** |
| 199 | * Key for a measurement of number of millseconds the mobile radio transmitter was |
| 200 | * receiving data for this uid. |
| 201 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 202 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 203 | public static final int MEASUREMENT_MOBILE_RX_MS = HealthKeys.BASE_UID + 25; |
| 204 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 205 | /** |
| 206 | * Key for a measurement of number of millseconds the mobile radio transmitter was |
| 207 | * transmitting data for this uid. |
| 208 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 209 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 210 | public static final int MEASUREMENT_MOBILE_TX_MS = HealthKeys.BASE_UID + 26; |
| 211 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 212 | /** |
| 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 Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 217 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 218 | public static final int MEASUREMENT_MOBILE_POWER_MAMS = HealthKeys.BASE_UID + 27; |
| 219 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 220 | /** |
| 221 | * Key for a measurement of number of millseconds the wifi controller was |
| 222 | * active on behalf of this uid. |
| 223 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 224 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 225 | public static final int MEASUREMENT_WIFI_RUNNING_MS = HealthKeys.BASE_UID + 28; |
| 226 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 227 | /** |
| 228 | * Key for a measurement of number of millseconds that this uid held a full wifi lock. |
| 229 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 230 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 231 | public static final int MEASUREMENT_WIFI_FULL_LOCK_MS = HealthKeys.BASE_UID + 29; |
| 232 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 233 | /** |
| 234 | * Key for a timer for the count and duration of wifi scans done by this uid. |
| 235 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 236 | @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER) |
| 237 | public static final int TIMER_WIFI_SCAN = HealthKeys.BASE_UID + 30; |
| 238 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 239 | /** |
| 240 | * Key for a measurement of number of millseconds that this uid was performing |
| 241 | * multicast wifi traffic. |
| 242 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 243 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 244 | public static final int MEASUREMENT_WIFI_MULTICAST_MS = HealthKeys.BASE_UID + 31; |
| 245 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 246 | /** |
| 247 | * Key for a timer for the count and duration of audio playback done by this uid. |
| 248 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 249 | @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER) |
| 250 | public static final int TIMER_AUDIO = HealthKeys.BASE_UID + 32; |
| 251 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 252 | /** |
| 253 | * Key for a timer for the count and duration of video playback done by this uid. |
| 254 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 255 | @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER) |
| 256 | public static final int TIMER_VIDEO = HealthKeys.BASE_UID + 33; |
| 257 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 258 | /** |
| 259 | * Key for a timer for the count and duration this uid had the flashlight turned on. |
| 260 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 261 | @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER) |
| 262 | public static final int TIMER_FLASHLIGHT = HealthKeys.BASE_UID + 34; |
| 263 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 264 | /** |
| 265 | * Key for a timer for the count and duration this uid had the camera turned on. |
| 266 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 267 | @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER) |
| 268 | public static final int TIMER_CAMERA = HealthKeys.BASE_UID + 35; |
| 269 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 270 | /** |
| 271 | * Key for a timer for the count and duration of when an activity from this uid |
| 272 | * was the foreground activitiy. |
| 273 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 274 | @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER) |
| 275 | public static final int TIMER_FOREGROUND_ACTIVITY = HealthKeys.BASE_UID + 36; |
| 276 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 277 | /** |
| 278 | * Key for a timer for the count and duration of when this uid was doing bluetooth scans. |
| 279 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 280 | @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER) |
| 281 | public static final int TIMER_BLUETOOTH_SCAN = HealthKeys.BASE_UID + 37; |
| 282 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 283 | /** |
| 284 | * Key for a timer for the count and duration of when this uid was in the "top" process state. |
| 285 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 286 | @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER) |
| 287 | public static final int TIMER_PROCESS_STATE_TOP_MS = HealthKeys.BASE_UID + 38; |
| 288 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 289 | /** |
| 290 | * Key for a timer for the count and duration of when this uid was in the "foreground service" |
| 291 | * process state. |
| 292 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 293 | @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER) |
| 294 | public static final int TIMER_PROCESS_STATE_FOREGROUND_SERVICE_MS = HealthKeys.BASE_UID + 39; |
| 295 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 296 | /** |
| 297 | * Key for a timer for the count and duration of when this uid was in the "top sleeping" |
| 298 | * process state. |
| 299 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 300 | @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER) |
| 301 | public static final int TIMER_PROCESS_STATE_TOP_SLEEPING_MS = HealthKeys.BASE_UID + 40; |
| 302 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 303 | /** |
| 304 | * Key for a timer for the count and duration of when this uid was in the "foreground" |
| 305 | * process state. |
| 306 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 307 | @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER) |
| 308 | public static final int TIMER_PROCESS_STATE_FOREGROUND_MS = HealthKeys.BASE_UID + 41; |
| 309 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 310 | /** |
| 311 | * Key for a timer for the count and duration of when this uid was in the "background" |
| 312 | * process state. |
| 313 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 314 | @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER) |
| 315 | public static final int TIMER_PROCESS_STATE_BACKGROUND_MS = HealthKeys.BASE_UID + 42; |
| 316 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 317 | /** |
| 318 | * Key for a timer for the count and duration of when this uid was in the "cached" process |
| 319 | * state. |
| 320 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 321 | @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER) |
| 322 | public static final int TIMER_PROCESS_STATE_CACHED_MS = HealthKeys.BASE_UID + 43; |
| 323 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 324 | /** |
| 325 | * Key for a timer for the count and duration this uid had the vibrator turned on. |
| 326 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 327 | @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER) |
| 328 | public static final int TIMER_VIBRATOR = HealthKeys.BASE_UID + 44; |
| 329 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 330 | /** |
| 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 Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 335 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 336 | public static final int MEASUREMENT_OTHER_USER_ACTIVITY_COUNT = HealthKeys.BASE_UID + 45; |
| 337 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 338 | /** |
| 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 Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 343 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 344 | public static final int MEASUREMENT_BUTTON_USER_ACTIVITY_COUNT = HealthKeys.BASE_UID + 46; |
| 345 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 346 | /** |
| 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 Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 351 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 352 | public static final int MEASUREMENT_TOUCH_USER_ACTIVITY_COUNT = HealthKeys.BASE_UID + 47; |
| 353 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 354 | /** |
| 355 | * Key for a measurement of number of bytes received for this uid by the mobile radio. |
| 356 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 357 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 358 | public static final int MEASUREMENT_MOBILE_RX_BYTES = HealthKeys.BASE_UID + 48; |
| 359 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 360 | /** |
| 361 | * Key for a measurement of number of bytes transmitted for this uid by the mobile radio. |
| 362 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 363 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 364 | public static final int MEASUREMENT_MOBILE_TX_BYTES = HealthKeys.BASE_UID + 49; |
| 365 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 366 | /** |
| 367 | * Key for a measurement of number of bytes received for this uid by the wifi radio. |
| 368 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 369 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 370 | public static final int MEASUREMENT_WIFI_RX_BYTES = HealthKeys.BASE_UID + 50; |
| 371 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 372 | /** |
| 373 | * Key for a measurement of number of bytes transmitted for this uid by the wifi radio. |
| 374 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 375 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 376 | public static final int MEASUREMENT_WIFI_TX_BYTES = HealthKeys.BASE_UID + 51; |
| 377 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 378 | /** |
| 379 | * Key for a measurement of number of bytes received for this uid by the bluetooth radio. |
| 380 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 381 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 382 | public static final int MEASUREMENT_BLUETOOTH_RX_BYTES = HealthKeys.BASE_UID + 52; |
| 383 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 384 | /** |
| 385 | * Key for a measurement of number of bytes transmitted for this uid by the bluetooth radio. |
| 386 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 387 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 388 | public static final int MEASUREMENT_BLUETOOTH_TX_BYTES = HealthKeys.BASE_UID + 53; |
| 389 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 390 | /** |
| 391 | * Key for a measurement of number of packets received for this uid by the mobile radio. |
| 392 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 393 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 394 | public static final int MEASUREMENT_MOBILE_RX_PACKETS = HealthKeys.BASE_UID + 54; |
| 395 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 396 | /** |
| 397 | * Key for a measurement of number of packets transmitted for this uid by the mobile radio. |
| 398 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 399 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 400 | public static final int MEASUREMENT_MOBILE_TX_PACKETS = HealthKeys.BASE_UID + 55; |
| 401 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 402 | /** |
| 403 | * Key for a measurement of number of packets received for this uid by the wifi radio. |
| 404 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 405 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 406 | public static final int MEASUREMENT_WIFI_RX_PACKETS = HealthKeys.BASE_UID + 56; |
| 407 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 408 | /** |
| 409 | * Key for a measurement of number of packets transmitted for this uid by the wifi radio. |
| 410 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 411 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 412 | public static final int MEASUREMENT_WIFI_TX_PACKETS = HealthKeys.BASE_UID + 57; |
| 413 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 414 | /** |
| 415 | * Key for a measurement of number of packets received for this uid by the bluetooth radio. |
| 416 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 417 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 418 | public static final int MEASUREMENT_BLUETOOTH_RX_PACKETS = HealthKeys.BASE_UID + 58; |
| 419 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 420 | /** |
| 421 | * Key for a measurement of number of packets transmitted for this uid by the bluetooth radio. |
| 422 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 423 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
| 424 | public static final int MEASUREMENT_BLUETOOTH_TX_PACKETS = HealthKeys.BASE_UID + 59; |
| 425 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 426 | /** |
| 427 | * Key for a timer for the count and duration the mobile radio was turned on for this uid. |
| 428 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 429 | @HealthKeys.Constant(type=HealthKeys.TYPE_TIMER) |
| 430 | public static final int TIMER_MOBILE_RADIO_ACTIVE = HealthKeys.BASE_UID + 61; |
| 431 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 432 | /** |
| 433 | * Key for a measurement of the number of milliseconds spent by the CPU running user space |
| 434 | * code for this uid. |
| 435 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 436 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
Joe Onorato | bee44ae | 2016-04-19 11:02:26 -0700 | [diff] [blame] | 437 | public static final int MEASUREMENT_USER_CPU_TIME_MS = HealthKeys.BASE_UID + 62; |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 438 | |
Joe Onorato | 181cada | 2016-05-09 10:31:41 -0700 | [diff] [blame] | 439 | /** |
| 440 | * Key for a measurement of the number of milliseconds spent by the CPU running kernel |
| 441 | * code for this uid. |
| 442 | */ |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 443 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
Joe Onorato | bee44ae | 2016-04-19 11:02:26 -0700 | [diff] [blame] | 444 | public static final int MEASUREMENT_SYSTEM_CPU_TIME_MS = HealthKeys.BASE_UID + 63; |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 445 | |
| 446 | /** |
| 447 | * An estimate of the number of milliamp-microsends used by this uid. |
Adam Lesinski | d4abd1e | 2017-04-12 11:29:13 -0700 | [diff] [blame] | 448 | * |
| 449 | * @deprecated this measurement is vendor-dependent and not reliable. |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 450 | */ |
Adam Lesinski | d4abd1e | 2017-04-12 11:29:13 -0700 | [diff] [blame] | 451 | @Deprecated |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 452 | @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT) |
Joe Onorato | bee44ae | 2016-04-19 11:02:26 -0700 | [diff] [blame] | 453 | public static final int MEASUREMENT_CPU_POWER_MAMS = HealthKeys.BASE_UID + 64; |
Joe Onorato | 713fec8 | 2016-03-04 10:34:02 -0800 | [diff] [blame] | 454 | |
| 455 | /** |
| 456 | * @hide |
| 457 | */ |
| 458 | public static final HealthKeys.Constants CONSTANTS = new HealthKeys.Constants(UidHealthStats.class); |
| 459 | } |
| 460 | |