Validate bg restrictions vs foreground services
Validate that when an app under background execution restriction has a
started foreground service (which is permitted when the app is the top
UI), its process state is demoted to ordinary SVC when it is moved out
of the top state -- i.e. the foreground service is not permitted to
continue with that level of privilege.
Bug: 139436349
Test: atest CtsAppTestCases:android.app.cts.ActivityManagerProcessStateTest\#testBgRestrictedForegroundService
Change-Id: I977563a1ad93a845ed7b7eb109b1287dfbf1a1ab
6 files changed