Skip to content
Snippets Groups Projects
Commit 7c100bf7 authored by Jing Ji's avatar Jing Ji
Browse files

Include the check on the mAllowStartByBindings flag in the BG-FGS start logic

The previous CL for the b/276963716 refactored the checks on the BG-FGS
start restriction. Here we're updating the check to include the flag
"mAllowStartByBindings".

There will be follow-up CLs which would eventually get rid of the
use of mAllowStartInBindService, maybe based on the targetSDK level
check.

Bug: 302248694
Test: atest android.app.cts.ActivityManagerFgsBgStartTest
Test: atest CtsShortFgsTestCases
Change-Id: I01f045bddcf78363a3295f141ff06a7f9db7e970
parent 0c8c883e
No related branches found
No related tags found
No related merge requests found
......@@ -246,7 +246,9 @@ final class ServiceRecord extends Binder implements ComponentName.WithComponentN
int getFgsAllowStart() {
return mAllowStartForegroundNoBinding != REASON_DENIED
? mAllowStartForegroundNoBinding
: mAllowStartInBindService;
: (mAllowStartByBindings != REASON_DENIED
? mAllowStartByBindings
: mAllowStartInBindService);
}
boolean isFgsAllowedStart() {
......
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