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:
@@ -58,12 +58,10 @@ public class DebugEstimatesLoader extends AsyncLoader<List<BatteryInfo>> {
|
||||
|
||||
Estimate estimate = powerUsageFeatureProvider.getEnhancedBatteryPrediction(context);
|
||||
if (estimate == null) {
|
||||
estimate = new Estimate(0, false);
|
||||
estimate = new Estimate(0, false, Estimate.AVERAGE_TIME_TO_DISCHARGE_UNKNOWN);
|
||||
}
|
||||
BatteryInfo newInfo = BatteryInfo.getBatteryInfo(getContext(), batteryBroadcast, stats,
|
||||
elapsedRealtimeUs, false,
|
||||
PowerUtil.convertMsToUs(estimate.estimateMillis),
|
||||
estimate.isBasedOnUsage);
|
||||
estimate, elapsedRealtimeUs, false);
|
||||
|
||||
List<BatteryInfo> infos = new ArrayList<>();
|
||||
infos.add(oldinfo);
|
||||
|
||||
Reference in New Issue
Block a user