Loading core/java/android/app/activity_manager.aconfig +0 −10 Original line number Diff line number Diff line Loading @@ -51,16 +51,6 @@ flag { } } flag { namespace: "backstage_power" name: "enable_fgs_timeout_crash_behavior" description: "Enable the new behavior where the app is crashed once an FGS times out." bug: "339526947" metadata { purpose: PURPOSE_BUGFIX } } flag { namespace: "backstage_power" name: "skip_bg_mem_trim_on_fg_app" Loading services/core/java/com/android/server/am/ActiveServices.java +14 −27 Original line number Diff line number Diff line Loading @@ -2460,19 +2460,11 @@ public final class ActiveServices { } else if (lastTimeOutAt > 0) { // Time limit was exhausted within the past 24 hours and the app // has not been in the TOP state since then, throw an exception. final String exceptionMsg = "Time limit already exhausted for" throw new ForegroundServiceStartNotAllowedException( "Time limit already exhausted for " + "foreground service type " + ServiceInfo.foregroundServiceTypeToLabel( foregroundServiceType); // Only throw an exception if the new crashing logic gate // is enabled; otherwise, reset the limit temporarily. if (android.app.Flags.enableFgsTimeoutCrashBehavior()) { throw new ForegroundServiceStartNotAllowedException( exceptionMsg); } else { Slog.wtf(TAG, exceptionMsg); fgsTypeInfo.reset(); } foregroundServiceType)); } } } else { Loading Loading @@ -3979,7 +3971,6 @@ public final class ActiveServices { final String reason = "A foreground service of type " + ServiceInfo.foregroundServiceTypeToLabel(fgsType) + " did not stop within its timeout: " + sr.getComponentName(); if (android.app.Flags.enableFgsTimeoutCrashBehavior()) { // Crash the app Slog.e(TAG_SERVICE, "FGS Crashed: " + sr); traceInstant("FGS Crash: ", sr); Loading @@ -3990,10 +3981,6 @@ public final class ActiveServices { ForegroundServiceDidNotStopInTimeException .createExtrasForService(sr.getComponentName())); } } else { // Log a WTF instead of crashing the app while the new behavior is gated. Slog.wtf(TAG, reason); } } } Loading Loading
core/java/android/app/activity_manager.aconfig +0 −10 Original line number Diff line number Diff line Loading @@ -51,16 +51,6 @@ flag { } } flag { namespace: "backstage_power" name: "enable_fgs_timeout_crash_behavior" description: "Enable the new behavior where the app is crashed once an FGS times out." bug: "339526947" metadata { purpose: PURPOSE_BUGFIX } } flag { namespace: "backstage_power" name: "skip_bg_mem_trim_on_fg_app" Loading
services/core/java/com/android/server/am/ActiveServices.java +14 −27 Original line number Diff line number Diff line Loading @@ -2460,19 +2460,11 @@ public final class ActiveServices { } else if (lastTimeOutAt > 0) { // Time limit was exhausted within the past 24 hours and the app // has not been in the TOP state since then, throw an exception. final String exceptionMsg = "Time limit already exhausted for" throw new ForegroundServiceStartNotAllowedException( "Time limit already exhausted for " + "foreground service type " + ServiceInfo.foregroundServiceTypeToLabel( foregroundServiceType); // Only throw an exception if the new crashing logic gate // is enabled; otherwise, reset the limit temporarily. if (android.app.Flags.enableFgsTimeoutCrashBehavior()) { throw new ForegroundServiceStartNotAllowedException( exceptionMsg); } else { Slog.wtf(TAG, exceptionMsg); fgsTypeInfo.reset(); } foregroundServiceType)); } } } else { Loading Loading @@ -3979,7 +3971,6 @@ public final class ActiveServices { final String reason = "A foreground service of type " + ServiceInfo.foregroundServiceTypeToLabel(fgsType) + " did not stop within its timeout: " + sr.getComponentName(); if (android.app.Flags.enableFgsTimeoutCrashBehavior()) { // Crash the app Slog.e(TAG_SERVICE, "FGS Crashed: " + sr); traceInstant("FGS Crash: ", sr); Loading @@ -3990,10 +3981,6 @@ public final class ActiveServices { ForegroundServiceDidNotStopInTimeException .createExtrasForService(sr.getComponentName())); } } else { // Log a WTF instead of crashing the app while the new behavior is gated. Slog.wtf(TAG, reason); } } } Loading