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

Commit 5ef853cb authored by Anton Kulakov's avatar Anton Kulakov
Browse files

Add PROCESS_CAPABILITY_FOREGROUND_AUDIO_CONTROL to sandbox process

when bound client has this capability.

Sandbox process should be able to take audio focus when client app
in foreground.

Bug: 335809734
Test: SdkSandboxMediaTest
Change-Id: I684d66c603deeb939ddbf87f78c0cb2a21ebbddd
parent 9e372f47
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2610,6 +2610,15 @@ public class OomAdjuster {
                }
            }

            // Sandbox should be able to control audio only when bound client
            // has this capability.
            if ((cstate.getCurCapability()
                    & PROCESS_CAPABILITY_FOREGROUND_AUDIO_CONTROL) != 0) {
                if (app.isSdkSandbox) {
                    capability |= PROCESS_CAPABILITY_FOREGROUND_AUDIO_CONTROL;
                }
            }

            if (couldRecurse && shouldSkipDueToCycle(app, cstate, procState, adj, cycleReEval)) {
                return false;
            }