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

Commit 41c90c0e authored by Gavin Corkery's avatar Gavin Corkery
Browse files

Make SDK sandbox BAL check multi-user aware

The existing logic does not work for multi-user apps, as the
BAL logic checks whether the user 0 app uid has an active
visible window. Instead, use the multi-user uid for this check.

Test: Manual
Bug: 287476371
Change-Id: I2e2bffb4c38ad43d50f48fa71345d9b7bb605272
parent a59b9e7c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -280,7 +280,7 @@ public class BackgroundActivityStartController {
        // visible window.
        if (Process.isSdkSandboxUid(realCallingUid)) {
            int realCallingSdkSandboxUidToAppUid =
                    Process.getAppUidForSdkSandboxUid(UserHandle.getAppId(realCallingUid));
                    Process.getAppUidForSdkSandboxUid(realCallingUid);

            if (mService.hasActiveVisibleWindow(realCallingSdkSandboxUidToAppUid)) {
                return logStartAllowedAndReturnCode(BAL_ALLOW_SDK_SANDBOX,