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

Commit cc437bf6 authored by zhuguangqing's avatar zhuguangqing Committed by android-build-merger
Browse files

Merge "Modify start/stop condition for mScreenDozeTimer." am: 83ed4883 am:...

Merge "Modify start/stop condition for mScreenDozeTimer." am: 83ed4883 am: 8d8d85b9 am: 6ccd3310
am: 2fc30b6e

Change-Id: Ibc88f31f1cee5c78f4b7ed8f6a3b03df9dc56ad8
parents 99d3e083 2fc30b6e
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -4754,11 +4754,11 @@ public class BatteryStatsImpl extends BatteryStats {
            final long uptime = mClocks.uptimeMillis();
            final long uptime = mClocks.uptimeMillis();
            boolean updateHistory = false;
            boolean updateHistory = false;
            if (isScreenDoze(state)) {
            if (isScreenDoze(state) && !isScreenDoze(oldState)) {
                mHistoryCur.states |= HistoryItem.STATE_SCREEN_DOZE_FLAG;
                mHistoryCur.states |= HistoryItem.STATE_SCREEN_DOZE_FLAG;
                mScreenDozeTimer.startRunningLocked(elapsedRealtime);
                mScreenDozeTimer.startRunningLocked(elapsedRealtime);
                updateHistory = true;
                updateHistory = true;
            } else if (isScreenDoze(oldState)) {
            } else if (isScreenDoze(oldState) && !isScreenDoze(state)) {
                mHistoryCur.states &= ~HistoryItem.STATE_SCREEN_DOZE_FLAG;
                mHistoryCur.states &= ~HistoryItem.STATE_SCREEN_DOZE_FLAG;
                mScreenDozeTimer.stopRunningLocked(elapsedRealtime);
                mScreenDozeTimer.stopRunningLocked(elapsedRealtime);
                updateHistory = true;
                updateHistory = true;