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

Commit 078dbc16 authored by Varun Shah's avatar Varun Shah Committed by Cherrypicker 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
24D1-dev is based on 24Q2-release. Therefore, we merged this CL to 24D1-dev.
parent 6b003be2
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()) {