Skip to content
Commit 8a865d9b authored by Hui Yu's avatar Hui Yu
Browse files

Apply restriction at startForegroundService() call.

Apply FGS background startForeground() restriction at
Context.startForegroundService() call (the startServiceLocked()
method with fgRequired flag), this is earlier than later
apply restriction at Service.startForeground() call so the service will
not start at all if Context.startForegroundService() and mAllowStartForeground
 is false.

Bug: 157473819
Test: atest atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java

Change-Id: Id5c69d697e845376f49b5071e09fdb971d0a4255
parent 8fd758e5
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