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

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
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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() {