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

Commit d2d49ae2 authored by Sanjana Sunil's avatar Sanjana Sunil
Browse files

Ensure the sandbox is cached when the app is

The sandbox should not be more important than the app - avoid making it
more important than other background processes regardless of activity.

Bug: 299590597
Test: atest SdkSandboxLifecycleHostTest

Change-Id: I43c934f8e2336dae6b7048d7f9dccad93c765856
parent f079b207
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2230,8 +2230,10 @@ public class OomAdjuster {
                            || now < (s.lastActivity + mConstants.MAX_SERVICE_INACTIVITY)) {
                        // This service has seen some activity within
                        // recent memory, so we will keep its process ahead
                        // of the background processes.
                        if (adj > SERVICE_ADJ) {
                        // of the background processes. This does not apply
                        // to the SDK sandbox process since it should never
                        // be more important than its corresponding app.
                        if (!app.isSdkSandbox && adj > SERVICE_ADJ) {
                            adj = SERVICE_ADJ;
                            state.setAdjType("started-services");
                            if (DEBUG_OOM_ADJ_REASON || logUid == appUid) {