Merge "Modify start/stop condition for mScreenDozeTimer." am: 83ed488383 am: 8d8d85b93e
am: 6ccd3310db
Change-Id: Iba10dc657081b184f14e21f8a2a0e86fb9146faa
This commit is contained in:
@@ -4754,11 +4754,11 @@ public class BatteryStatsImpl extends BatteryStats {
|
||||
final long uptime = mClocks.uptimeMillis();
|
||||
|
||||
boolean updateHistory = false;
|
||||
if (isScreenDoze(state)) {
|
||||
if (isScreenDoze(state) && !isScreenDoze(oldState)) {
|
||||
mHistoryCur.states |= HistoryItem.STATE_SCREEN_DOZE_FLAG;
|
||||
mScreenDozeTimer.startRunningLocked(elapsedRealtime);
|
||||
updateHistory = true;
|
||||
} else if (isScreenDoze(oldState)) {
|
||||
} else if (isScreenDoze(oldState) && !isScreenDoze(state)) {
|
||||
mHistoryCur.states &= ~HistoryItem.STATE_SCREEN_DOZE_FLAG;
|
||||
mScreenDozeTimer.stopRunningLocked(elapsedRealtime);
|
||||
updateHistory = true;
|
||||
|
||||
Reference in New Issue
Block a user