Files
app_Settings/src/com/android/settings/fuelgauge/Estimate.java
Salvador Martinez db1efa3e03 Update BatteryInfo to include averageTimeToDischarge
This updates the Estimate data model class as well as the places
it is used to populate the new field when available.

Test: robotests
Bug: 74020365
Change-Id: Ibcecf933819f8b8cd8514205768569e9bd7d1517
(cherry picked from commit 453db0cdbc)
Merged-In: 453db0cdbc
2018-03-07 20:39:59 +00:00

19 lines
593 B
Java

package com.android.settings.fuelgauge;
public class Estimate {
// Value to indicate averageTimeToDischarge could not be obtained
public static final int AVERAGE_TIME_TO_DISCHARGE_UNKNOWN = -1;
public final long estimateMillis;
public final boolean isBasedOnUsage;
public final long averageDischargeTime;
public Estimate(long estimateMillis, boolean isBasedOnUsage,
long averageDischargeTime) {
this.estimateMillis = estimateMillis;
this.isBasedOnUsage = isBasedOnUsage;
this.averageDischargeTime = averageDischargeTime;
}
}