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

Commit c8dd1b77 authored by Adam Bookatz's avatar Adam Bookatz
Browse files

AllowDelayedLocking as long as run-in-bg allowed

If we stop a user due to no-run-in-background, we should disallow
delayedLocking, since the intention is to prevent it from remaining
unlocked in the background. We did that already, but went too far; we
need to make sure that if the restriction is NOT applied, we do
allowDelayedLocking.

Test: manual
Flag: EXEMPT bugfix
Bug: 370826966
Change-Id: Ia87a0a1afc80a846703d04f9d765147ec012c06b
parent d2a8a229
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2383,7 +2383,7 @@ class UserController implements Handler.Callback {
            // If running in background is disabled or mStopUserOnSwitch mode, stop the user.
            if (hasRestriction || isStopUserOnSwitchEnabled()) {
                Slogf.i(TAG, "Stopping user %d and its profiles on user switch", oldUserId);
                stopUsersLU(oldUserId, /* allowDelayedLocking= */ false, null, null);
                stopUsersLU(oldUserId, /* allowDelayedLocking= */ !hasRestriction, null, null);
                return;
            }
        }