Skip to content
Commit c7933aca authored by Christopher Tate's avatar Christopher Tate
Browse files

Suppress all background-state services in user-forced app standby

Foreground services are treated as normal services when the user has
placed the app under FAS restrictions.  The API contract for the app
is unchanged -- for example, if the app calls startForegroundService()
in this state it will still ANR if it fails to call startForeground()
as promised.  All service starts are quietly suppressed unless the app
is showing foreground UI.

If an app is already running a foreground service when FAS is applied,
that service is taken out of the fg state and thereafter treated like an
ordinary background service in a background state:  after 1 minute, the
service is summarily stopped by the OS.

Bug: 73559697
Test: ApiDemos fg service suite
Test: atest CtsAppTestCases
Change-Id: Icc5fb180b90cb5d902e96aeb92a93f6daf00bd9b
parent 3912a7f5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment