summaryrefslogtreecommitdiff
path: root/core/java/android/os/BatteryUsageStatsQuery.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/os/BatteryUsageStatsQuery.java')
-rw-r--r--core/java/android/os/BatteryUsageStatsQuery.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/core/java/android/os/BatteryUsageStatsQuery.java b/core/java/android/os/BatteryUsageStatsQuery.java
index 85861bc1d2aa..50804422e92f 100644
--- a/core/java/android/os/BatteryUsageStatsQuery.java
+++ b/core/java/android/os/BatteryUsageStatsQuery.java
@@ -60,6 +60,12 @@ public final class BatteryUsageStatsQuery implements Parcelable {
*/
public static final int FLAG_BATTERY_USAGE_STATS_INCLUDE_HISTORY = 2;
+ /**
+ * Indicates that identifiers of power models used for computations of power
+ * consumption should be included in the BatteryUsageStats.
+ */
+ public static final int FLAG_BATTERY_USAGE_STATS_INCLUDE_POWER_MODELS = 4;
+
private static final long DEFAULT_MAX_STATS_AGE_MS = 5 * 60 * 1000;
private final int mFlags;
@@ -187,6 +193,17 @@ public final class BatteryUsageStatsQuery implements Parcelable {
}
/**
+ * Requests to return identifiers of models that were used for estimation
+ * of power consumption.
+ *
+ * Should only be used for testing and debugging.
+ */
+ public Builder includePowerModels() {
+ mFlags |= BatteryUsageStatsQuery.FLAG_BATTERY_USAGE_STATS_INCLUDE_POWER_MODELS;
+ return this;
+ }
+
+ /**
* Set the client's tolerance for stale battery stats. The data may be up to
* this many milliseconds out-of-date.
*/