diff options
| -rw-r--r-- | services/core/java/com/android/server/am/ActiveServices.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java index 26e9bf52f456..2fa0be21a8b0 100644 --- a/services/core/java/com/android/server/am/ActiveServices.java +++ b/services/core/java/com/android/server/am/ActiveServices.java @@ -3867,8 +3867,10 @@ public final class ActiveServices { Slog.w(TAG_SERVICE, "Exception from scheduleTimeoutServiceForType: " + e); } - // ANR the service after giving the service some time to clean up. - mFGSAnrTimer.start(sr, mAm.mConstants.mFgsAnrExtraWaitDuration); + if (android.app.Flags.introduceNewServiceOntimeoutCallback()) { + // ANR the service after giving the service some time to clean up. + mFGSAnrTimer.start(sr, mAm.mConstants.mFgsAnrExtraWaitDuration); + } } } |