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

Commit 05da4d1a authored by Adam Lesinski's avatar Adam Lesinski Committed by Android Git Automerger
Browse files

am fc29dd14: am c9399a80: Merge "Fix overcounting of mobile radio" into mnc-dev

* commit 'fc29dd14':
  Fix overcounting of mobile radio
parents 05da8527 fc29dd14
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;