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

Commit c9399a80 authored by Adam Lesinski's avatar Adam Lesinski Committed by Android (Google) Code Review
Browse files

Merge "Fix overcounting of mobile radio" into mnc-dev

parents f1ca5777 d9b48d57
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ public class MobileRadioPowerCalculator extends PowerCalculator {
    public MobileRadioPowerCalculator(PowerProfile profile, BatteryStats stats) {
        mPowerRadioOn = profile.getAveragePower(PowerProfile.POWER_RADIO_ACTIVE);
        for (int i = 0; i < mPowerBins.length; i++) {
            mPowerBins[i] = profile.getAveragePower(PowerProfile.POWER_RADIO_ACTIVE, i);
            mPowerBins[i] = profile.getAveragePower(PowerProfile.POWER_RADIO_ON, i);
        }
        mPowerScan = profile.getAveragePower(PowerProfile.POWER_RADIO_SCANNING);
        mStats = stats;
@@ -128,7 +128,9 @@ public class MobileRadioPowerCalculator extends PowerCalculator {
        }

        if (power != 0) {
            if (signalTimeMs != 0) {
                app.noCoveragePercent = noCoverageTimeMs * 100.0 / signalTimeMs;
            }
            app.mobileActive = remainingActiveTimeMs;
            app.mobileActiveCount = stats.getMobileRadioActiveUnknownCount(statsType);
            app.mobileRadioPowerMah = power;