Merge "Don't run AttentionDetector when wakelock is held" into qt-dev

This commit is contained in:
TreeHugger Robot
2019-05-29 04:56:52 +00:00
committed by Android (Google) Code Review

View File

@@ -2085,7 +2085,8 @@ public final class PowerManagerService extends SystemService
nextTimeout = -1;
}
if ((mUserActivitySummary & USER_ACTIVITY_SCREEN_BRIGHT) != 0) {
if ((mUserActivitySummary & USER_ACTIVITY_SCREEN_BRIGHT) != 0
&& (mWakeLockSummary & WAKE_LOCK_STAY_AWAKE) == 0) {
nextTimeout = mAttentionDetector.updateUserActivity(nextTimeout);
}