Fix Screen Attention reporting ABSENT twice
AttentionDetector should not be called when the screen policy is DIM. Bug: 150338359 Test: atest AttentionDetectorTest + manually confirmed with logging Change-Id: Ia58f9f5618fd1aca71e55e3299412cde16308da2
This commit is contained in:
@@ -2338,8 +2338,7 @@ public final class PowerManagerService extends SystemService
|
||||
nextTimeout = -1;
|
||||
}
|
||||
|
||||
if (((mUserActivitySummary & USER_ACTIVITY_SCREEN_BRIGHT) != 0
|
||||
|| (mUserActivitySummary & USER_ACTIVITY_SCREEN_DIM) != 0)
|
||||
if ((mUserActivitySummary & USER_ACTIVITY_SCREEN_BRIGHT) != 0
|
||||
&& (mWakeLockSummary & WAKE_LOCK_STAY_AWAKE) == 0) {
|
||||
nextTimeout = mAttentionDetector.updateUserActivity(nextTimeout,
|
||||
screenDimDuration);
|
||||
|
||||
Reference in New Issue
Block a user