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

Commit c244ac8d authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Don't throw ANR if onTimeout flag is disabled." into main

parents 8a3083a2 21492dcd
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -3867,10 +3867,12 @@ public final class ActiveServices {
                Slog.w(TAG_SERVICE, "Exception from scheduleTimeoutServiceForType: " + e);
            }

            if (android.app.Flags.introduceNewServiceOntimeoutCallback()) {
                // ANR the service after giving the service some time to clean up.
                mFGSAnrTimer.start(sr, mAm.mConstants.mFgsAnrExtraWaitDuration);
            }
        }
    }

    void onFgsAnrTimeout(ServiceRecord sr) {
        final int fgsType = getTimeLimitedFgsType(sr.foregroundServiceType);