Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30b60195 authored by Wesley.CW Wang's avatar Wesley.CW Wang
Browse files

Remove unnecessary converting us to ms in BatteryInfo

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
Change-Id: Iefbd8751608eb749367cf08a4a9b184b948a6d33
parent a8cf9a79
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -204,7 +204,7 @@ public class BatteryInfo {
        final long prediction = discharging
                ? stats.computeBatteryTimeRemaining(elapsedRealtimeUs) : 0;
        final Estimate estimate = new Estimate(
                PowerUtil.convertUsToMs(prediction),
                prediction,
                false, /* isBasedOnUsage */
                EstimateKt.AVERAGE_TIME_TO_DISCHARGE_UNKNOWN);
        BatteryUtils.logRuntime(LOG_TAG, "time for regular BatteryInfo", startTime);