Loading services/core/java/com/android/server/am/ActivityManagerService.java +11 −2 Original line number Diff line number Diff line Loading @@ -4436,8 +4436,17 @@ public class ActivityManagerService extends IActivityManager.Stub packageName, null, userId); } final boolean clearPendingIntentsForStoppedApp = (android.content.pm.Flags.stayStopped() && packageStateStopped); boolean clearPendingIntentsForStoppedApp = false; try { clearPendingIntentsForStoppedApp = (packageStateStopped && android.content.pm.Flags.stayStopped()); } catch (IllegalStateException e) { // It's unlikely for a package to be force-stopped early in the boot cycle. So, if we // check for 'packageStateStopped' which should evaluate to 'false', then this should // ensure we are not accessing the flag early in the boot cycle. As an additional // safety measure, catch the exception and ignore to avoid causing a device restart. clearPendingIntentsForStoppedApp = false; } if (packageName == null || uninstalling || clearPendingIntentsForStoppedApp) { final int cancelReason; if (packageName == null) { Loading Loading
services/core/java/com/android/server/am/ActivityManagerService.java +11 −2 Original line number Diff line number Diff line Loading @@ -4436,8 +4436,17 @@ public class ActivityManagerService extends IActivityManager.Stub packageName, null, userId); } final boolean clearPendingIntentsForStoppedApp = (android.content.pm.Flags.stayStopped() && packageStateStopped); boolean clearPendingIntentsForStoppedApp = false; try { clearPendingIntentsForStoppedApp = (packageStateStopped && android.content.pm.Flags.stayStopped()); } catch (IllegalStateException e) { // It's unlikely for a package to be force-stopped early in the boot cycle. So, if we // check for 'packageStateStopped' which should evaluate to 'false', then this should // ensure we are not accessing the flag early in the boot cycle. As an additional // safety measure, catch the exception and ignore to avoid causing a device restart. clearPendingIntentsForStoppedApp = false; } if (packageName == null || uninstalling || clearPendingIntentsForStoppedApp) { final int cancelReason; if (packageName == null) { Loading