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

Commit ba82ea3c authored by Varun Shah's avatar Varun Shah Committed by Android Build Coastguard Worker
Browse files

Don't throw ANR if onTimeout flag is disabled.

Bug: 327566365
Test: atest CtsFgsTimeoutTestCases
(cherry picked from commit 21492dcd)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:78f268a3bbbba1233aba5ba675563b2b62d90f76)
Merged-In: I6601fd1af8cd617bae5e3c3deb1019d65c5e3908
Change-Id: I6601fd1af8cd617bae5e3c3deb1019d65c5e3908
parent 8e203216
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -3696,9 +3696,11 @@ public final class ActiveServices {
            // is not "now". Compute the time from "now" when starting the anr timer.
            final long anrTime = sr.getEarliestStopTypeAndTime().second
                    + mAm.mConstants.mFgsAnrExtraWaitDuration - SystemClock.uptimeMillis();
            if (android.app.Flags.introduceNewServiceOntimeoutCallback()) {
                mFGSAnrTimer.start(sr, anrTime);
            }
        }
    }

    private void maybeUpdateFgsTrackingLocked(ServiceRecord sr, boolean extendTimeout) {
        if (!sr.isFgsTimeLimited()) {