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
This commit is contained in:
@@ -2,11 +2,17 @@ package com.android.settings.fuelgauge;
|
||||
|
||||
public class Estimate {
|
||||
|
||||
public final long estimateMillis;
|
||||
public final boolean isBasedOnUsage;
|
||||
// Value to indicate averageTimeToDischarge could not be obtained
|
||||
public static final int AVERAGE_TIME_TO_DISCHARGE_UNKNOWN = -1;
|
||||
|
||||
public Estimate(long estimateMillis, boolean isBasedOnUsage) {
|
||||
this.estimateMillis = estimateMillis;
|
||||
this.isBasedOnUsage = isBasedOnUsage;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user