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

Commit d4a2cf09 authored by Suprabh Shukla's avatar Suprabh Shukla Committed by Automerger Merge Worker
Browse files

Merge "Log the time of the wakeup in KernelWakeupReported" into udc-dev am:...

Merge "Log the time of the wakeup in KernelWakeupReported" into udc-dev am: cdb63f90 am: 80e02eb5

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



Change-Id: Ic3745efcba1b232e5d7e16f4b27b2e2a488be901
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 60beab6f 80e02eb5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1675,6 +1675,7 @@ public class BatteryStatsImpl extends BatteryStats {
    String mLastWakeupReason = null;
    long mLastWakeupUptimeMs = 0;
    long mLastWakeupElapsedTimeMs = 0;
    private final HashMap<String, SamplingTimer> mWakeupReasonStats = new HashMap<>();
    public Map<String, ? extends Timer> getWakeupReasonStats() {
@@ -5048,7 +5049,7 @@ public class BatteryStatsImpl extends BatteryStats {
            SamplingTimer timer = getWakeupReasonTimerLocked(mLastWakeupReason);
            timer.add(deltaUptimeMs * 1000, 1, elapsedRealtimeMs); // time in in microseconds
            FrameworkStatsLog.write(FrameworkStatsLog.KERNEL_WAKEUP_REPORTED, mLastWakeupReason,
                    /* duration_usec */ deltaUptimeMs * 1000);
                    /* duration_usec */ deltaUptimeMs * 1000, mLastWakeupElapsedTimeMs);
            mLastWakeupReason = null;
        }
    }
@@ -5059,6 +5060,7 @@ public class BatteryStatsImpl extends BatteryStats {
        mHistory.recordWakeupEvent(elapsedRealtimeMs, uptimeMs, reason);
        mLastWakeupReason = reason;
        mLastWakeupUptimeMs = uptimeMs;
        mLastWakeupElapsedTimeMs = elapsedRealtimeMs;
    }
    @GuardedBy("this")