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

Commit d0279eca authored by Dmitri Plotnikov's avatar Dmitri Plotnikov
Browse files

Fix CPU attribution when power stats collection is disabled

Bug: 313830933
Test: atest CtsStatsdAtomHostTestCases:android.cts.statsdatom.batterystats.BatteryUsageStatsTests

Change-Id: Id752c5c4d993d499ff843da6da0b34ee8d201dc8
parent 7ab7a215
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ public class BatteryUsageStatsProvider {

                // Power calculators are applied in the order of registration
                mPowerCalculators.add(new BatteryChargeCalculator());
                if (mPowerStatsExporterEnabled) {
                if (!mPowerStatsExporterEnabled) {
                    mPowerCalculators.add(
                            new CpuPowerCalculator(mCpuScalingPolicies, mPowerProfile));
                }
@@ -385,7 +385,6 @@ public class BatteryUsageStatsProvider {
    }

    public void setPowerStatsExporterEnabled(boolean enabled) {

        mPowerStatsExporterEnabled = enabled;
    }
}