Remove userActivitySummary condition for inattentive sleep
User activity with flag USER_ACTIVITY_FLAG_NO_CHANGE_LIGHTS, as triggered when a wakelock with flag ON_AFTER_RELEASE is released, should not extend the time the device is awake when the inattentive sleep timeout expires. This change removes the userActivitySummary condition in isBeingKeptFromInattentiveSleepLocked. When this method is called, we have already checked that since last user activity, attentive_timeout has expired, so checking userActivitySummary is not required. When a user activity with USER_ACTIVITY_NO_CHANGE_LIGHTS extends the dim timeout, the userActivitySummary condition prevented the device from going to sleep. Bug: 202090650 Test: atest PowerManagerServiceTests Test: Set short attentive_timeout, autoplay a series of short YouTube videos, confirm the device goes to sleep after attentive_timeout has expired Change-Id: I2bcf2e65757118b82df52cbcf57d5017a9ce72f5
Loading
Please register or sign in to comment