Home | History | Annotate | Download | only in health
      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 HealthStats#getStats(int) HealthStats.getStats(int)} with the
     22  * {@link UidHealthStats#STATS_PACKAGES UidHealthStats.STATS_PACKAGES} key.
     23  */
     24 public final class PackageHealthStats {
     25 
     26     private PackageHealthStats() {
     27     }
     28 
     29     /**
     30      * Key for a HealthStats with {@link ServiceHealthStats} keys for each of the
     31      * services defined in this apk.
     32      */
     33     @HealthKeys.Constant(type=HealthKeys.TYPE_STATS)
     34     public static final int STATS_SERVICES = HealthKeys.BASE_PACKAGE + 1;
     35 
     36     /**
     37      * Key for a map of the number of times that a package's wakeup alarms have fired
     38      * while the device was on battery.
     39      *
     40      * @see android.app.AlarmManager
     41      */
     42     @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENTS)
     43     public static final int MEASUREMENTS_WAKEUP_ALARMS_COUNT = HealthKeys.BASE_PACKAGE + 2;
     44 
     45     /**
     46      * @hide
     47      */
     48     public static final HealthKeys.Constants CONSTANTS
     49             = new HealthKeys.Constants(PackageHealthStats.class);
     50 }
     51