blob: cc48b3eb9e14c35d7bddc45a49c9077e342c6a4c [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 HealthStats#getStats(int) HealthStats.getStats(int)} with the
22 * {@link PackageHealthStats#STATS_SERVICES PackageHealthStats.STATS_SERVICES} key.
23 */
24public final class ServiceHealthStats {
25
26 private ServiceHealthStats() {
27 }
28
Joe Onorato181cada2016-05-09 10:31:41 -070029 /**
30 * Key for a measurement of the number of times this service was started due to calls to
31 * {@link android.content.Context#startService startService()}, including re-launches
32 * after crashes.
33 */
Joe Onorato713fec82016-03-04 10:34:02 -080034 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
35 public static final int MEASUREMENT_START_SERVICE_COUNT = HealthKeys.BASE_SERVICE + 1;
36
Joe Onorato181cada2016-05-09 10:31:41 -070037 /**
38 * Key for a measurement of the total number of times this service was started
39 * due to calls to {@link android.content.Context#startService startService()}
40 * or {@link android.content.Context#bindService bindService()} including re-launches
41 * after crashes.
42 */
Joe Onorato713fec82016-03-04 10:34:02 -080043 @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
44 public static final int MEASUREMENT_LAUNCH_COUNT = HealthKeys.BASE_SERVICE + 2;
45
46 /**
47 * @hide
48 */
49 public static final HealthKeys.Constants CONSTANTS
50 = new HealthKeys.Constants(ServiceHealthStats.class);
51}