Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 057eb8c4 authored by Robert Horvath's avatar Robert Horvath
Browse files

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
parent ad2f5e70
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment