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

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

Merge "Add safeguard for package not having state" into main

parents ff5c5bd8 d0e7192e
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -3397,12 +3397,16 @@ public final class ProcessList {
        final boolean wasStopped = info.isStopped();
        // Check if we should mark the processrecord for first launch after force-stopping
        if (wasStopped) {
            boolean wasEverLaunched;
            boolean wasEverLaunched = false;
            if (android.app.Flags.useAppInfoNotLaunched()) {
                wasEverLaunched = !info.isNotLaunched();
            } else {
                try {
                    wasEverLaunched = mService.getPackageManagerInternal()
                            .wasPackageEverLaunched(r.getApplicationInfo().packageName, r.userId);
                } catch (IllegalArgumentException e) {
                    // Package doesn't have state yet, assume not launched
                }
            }
            // Check if the hosting record is for an activity or not. Since the stopped
            // state tracking is handled differently to avoid WM calling back into AM,