Remove unnecessary converting us to ms
The class "Estimate" has the menber estimateMillis and the unit of batteryUsageStats.getBatteryTimeRemainingMs() is millisecond,so converting from us to ms is unnecessary. Bug: 187379252 Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge.BatteryInfoTest Test: manual Change-Id: If7c1092c1b7e5f74f8907ffe0248eccf3535ac0c
This commit is contained in:
@@ -400,7 +400,7 @@ public class BatteryUtils {
|
|||||||
// couldn't get estimate from cache or provider, use fallback
|
// couldn't get estimate from cache or provider, use fallback
|
||||||
if (estimate == null) {
|
if (estimate == null) {
|
||||||
estimate = new Estimate(
|
estimate = new Estimate(
|
||||||
PowerUtil.convertUsToMs(batteryUsageStats.getBatteryTimeRemainingMs()),
|
batteryUsageStats.getBatteryTimeRemainingMs(),
|
||||||
false /* isBasedOnUsage */,
|
false /* isBasedOnUsage */,
|
||||||
EstimateKt.AVERAGE_TIME_TO_DISCHARGE_UNKNOWN);
|
EstimateKt.AVERAGE_TIME_TO_DISCHARGE_UNKNOWN);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user