OSDN Git Service

Prevent extra work on the same timestamp
authorAlex Salo <asalo@google.com>
Wed, 1 May 2019 21:18:46 +0000 (14:18 -0700)
committerAlex Salo <asalo@google.com>
Mon, 13 May 2019 22:40:45 +0000 (22:40 +0000)
commitcbe610ac8b105df0d69e918b3cee3b380bf744e8
tree1fa791047a97b1bec0326c4c54150b86ea343ef1
parent1198fc4e7101db6cc7206594d489bb92b3d954ac
Prevent extra work on the same timestamp

AttentionDetector gets called a lot, and there is no reason to do
any work, unless it is called with a new timestamp.

Bug: 111939367
Test: verified by doing FSOP + atest AttentionDetectorTest
Change-Id: If427bd3358e0ea35279fb5d235c2fd137df036ac
services/core/java/com/android/server/attention/AttentionManagerService.java
services/core/java/com/android/server/power/AttentionDetector.java
services/tests/servicestests/src/com/android/server/power/AttentionDetectorTest.java