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

Commit 6d91bf39 authored by Tim Murray's avatar Tim Murray
Browse files

CachedAppOptimizer: skip freeze when do-not-freeze is set

A rebind with BIND_WAIVE_PRIORITY marks the process as do-not-freeze,
but CAO was not correctly skipping the freeze message once
do-not-freeze was set.

Test: atest com.android.cts.netpolicy.HostsideConnOnActivityStartTest#testStartActivity_default
Bug: 336393009
Change-Id: I97da0057da81ec4c571e37090f50fb84eddd2f48
parent a3466f4b
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -2371,6 +2371,14 @@ public final class CachedAppOptimizer {
                    return;
                }

                if (opt.shouldNotFreeze()) {
                    if (DEBUG_FREEZER) {
                        Slog.d(TAG_AM, "Skipping freeze because process is marked "
                                + "should not be frozen");
                    }
                    return;
                }

                if (pid == 0 || opt.isFrozen()) {
                    // Already frozen or not a real process, either one being
                    // launched or one being killed