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

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

Don't crash apps unfairly under FAS

When an app calls startForegroundService() from a bg state (e.g. from a
broadcast receiver) but the user has placed it under FAS, it's incorrect
to crash the app:  it hasn't actually violated the fg/bg restrictions
contract.  Fail quietly instead, just like the legacy-app case when O+
restrictions are imposed on it.

Change-Id: I3e8ed2ea6bdbf4167249132ddf9b7c549b9a8062
Fixes: 79235311
Test: ApiDemos [before and after changing target sdk to O+]
Test: atest android.app.cts.ServiceTest
parent 98c2f7f9
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