diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java
index b8e09cce93b9cce47573702213ce5cef430b403c..24eba4acb6a5bde5acfb2dc17267a927731fe016 100644
--- a/services/core/java/com/android/server/am/ActiveServices.java
+++ b/services/core/java/com/android/server/am/ActiveServices.java
@@ -3696,7 +3696,9 @@ 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();
-            mFGSAnrTimer.start(sr, anrTime);
+            if (android.app.Flags.introduceNewServiceOntimeoutCallback()) {
+                mFGSAnrTimer.start(sr, anrTime);
+            }
         }
     }