+2
−1
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
When an app is on the top of the activity stack but the screen is not on, this doesn't really count as a top app in the normal sense. In particular, we'd really like to apply the normal restrictions we have on background and cached apps: no network access, no ability to use wake locks, etc. (In other words, in this state the app's activity is stopped, so from its perspective it is no different than the user leaving it to go to another app.) To do this, we change the order of the TOP_SLEEPING proc state out from the range of foreground states down to between the cached and background states. Test: ActivityManagerProcessStateTest Bug: 70808931 Change-Id: I994caba8c27553a452de75efa358be0e683d046f