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:
ykhung
2021-05-12 10:30:27 +08:00
committed by YUKAI HUNG
parent 9ef9e1ee0c
commit 8343fe8b0a

View File

@@ -400,7 +400,7 @@ public class BatteryUtils {
// couldn't get estimate from cache or provider, use fallback
if (estimate == null) {
estimate = new Estimate(
PowerUtil.convertUsToMs(batteryUsageStats.getBatteryTimeRemainingMs()),
batteryUsageStats.getBatteryTimeRemainingMs(),
false /* isBasedOnUsage */,
EstimateKt.AVERAGE_TIME_TO_DISCHARGE_UNKNOWN);
}