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

Commit 4f549327 authored by Jing Ji's avatar Jing Ji Committed by Android (Google) Code Review
Browse files

Merge "Allow BG-FGS start on BOOT_COMPLETED if it's exempted for other reasons" into main

parents eb81e130 69475c45
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1168,9 +1168,7 @@ public final class ActiveServices {
    }

    private boolean shouldAllowBootCompletedStart(ServiceRecord r, int foregroundServiceType) {
        @PowerExemptionManager.ReasonCode final int fgsStartReasonCode =
                r.mInfoTempFgsAllowListReason != null ? r.mInfoTempFgsAllowListReason.mReasonCode
                                                      : REASON_DENIED;
        @PowerExemptionManager.ReasonCode final int fgsStartReasonCode = r.getFgsAllowStart();
        if (Flags.fgsBootCompleted()
                && CompatChanges.isChangeEnabled(FGS_BOOT_COMPLETED_RESTRICTIONS, r.appInfo.uid)
                && fgsStartReasonCode == PowerExemptionManager.REASON_BOOT_COMPLETED) {