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

Commit 168e2693 authored by Jing Ji's avatar Jing Ji Committed by Automerger Merge Worker
Browse files

Merge "Clamp the scaling factor of battery usage in app battery tracker" into...

Merge "Clamp the scaling factor of battery usage in app battery tracker" into tm-dev am: d73ce7e2 am: 456c7772

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17738166



Change-Id: Ib47fbc4a894e1e792d05ef106ba0dc58cb2d5f80
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 04342fc4 456c7772
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -654,7 +654,7 @@ final class AppBatteryTracker extends BaseAppStateTracker<AppBatteryPolicy>
            final long start = stats.getStatsStartTimestamp();
            final long end = stats.getStatsEndTimestamp();
            final double scale = expectedDuration > 0
                    ? (expectedDuration * 1.0d) / (end - start) : 1.0d;
                    ? Math.min((expectedDuration * 1.0d) / (end - start), 1.0d) : 1.0d;
            final AppBatteryPolicy bgPolicy = mInjector.getPolicy();
            for (UidBatteryConsumer uidConsumer : uidConsumers) {
                // TODO: b/200326767 - as we are not supporting per proc state attribution yet,