1713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato/*
2713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato * Copyright (C) 2016 The Android Open Source Project
3713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato *
4713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato * Licensed under the Apache License, Version 2.0 (the "License");
5713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato * you may not use this file except in compliance with the License.
6713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato * You may obtain a copy of the License at
7713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato *
8713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato *      http://www.apache.org/licenses/LICENSE-2.0
9713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato *
10713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato * Unless required by applicable law or agreed to in writing, software
11713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato * distributed under the License is distributed on an "AS IS" BASIS,
12713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato * See the License for the specific language governing permissions and
14713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato * limitations under the License.
15713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato */
16713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato
17713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onoratopackage android.os.health;
18713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato
19713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato/**
20713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato * Keys for {@link HealthStats} returned from
21713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato * {@link HealthStats#getStats(int) HealthStats.getStats(int)} with the
22713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato * {@link PackageHealthStats#STATS_SERVICES PackageHealthStats.STATS_SERVICES} key.
23713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato */
24713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onoratopublic final class ServiceHealthStats {
25713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato
26713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato    private ServiceHealthStats() {
27713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato    }
28713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato
29181cada18a9feab90627ab27070bc00c29ec337aJoe Onorato    /**
30181cada18a9feab90627ab27070bc00c29ec337aJoe Onorato     * Key for a measurement of the number of times this service was started due to calls to
31181cada18a9feab90627ab27070bc00c29ec337aJoe Onorato     * {@link android.content.Context#startService startService()}, including re-launches
32181cada18a9feab90627ab27070bc00c29ec337aJoe Onorato     * after crashes.
33181cada18a9feab90627ab27070bc00c29ec337aJoe Onorato     */
34713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato    @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
35713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato    public static final int MEASUREMENT_START_SERVICE_COUNT = HealthKeys.BASE_SERVICE + 1;
36713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato
37181cada18a9feab90627ab27070bc00c29ec337aJoe Onorato    /**
38181cada18a9feab90627ab27070bc00c29ec337aJoe Onorato     * Key for a measurement of the total number of times this service was started
39181cada18a9feab90627ab27070bc00c29ec337aJoe Onorato     * due to calls to {@link android.content.Context#startService startService()}
40181cada18a9feab90627ab27070bc00c29ec337aJoe Onorato     * or {@link android.content.Context#bindService bindService()} including re-launches
41181cada18a9feab90627ab27070bc00c29ec337aJoe Onorato     * after crashes.
42181cada18a9feab90627ab27070bc00c29ec337aJoe Onorato     */
43713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato    @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
44713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato    public static final int MEASUREMENT_LAUNCH_COUNT = HealthKeys.BASE_SERVICE + 2;
45713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato
46713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato    /**
47713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato     * @hide
48713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato     */
49713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato    public static final HealthKeys.Constants CONSTANTS
50713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato            = new HealthKeys.Constants(ServiceHealthStats.class);
51713fec85b8612256211f09c62b8958a99fe5b9dbJoe Onorato}
52