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

Skip to content
Commit ffbe9543 authored by Adam Bookatz's avatar Adam Bookatz
Browse files

DISALLOW_RUN_IN_BACKGROUND works for profiles

If a full user has DISALLOW_RUN_IN_BACKGROUND, it will be stopped
when switching away from it, as expected.
However, if a profile has this restriction (but not its parent), it
currently will not be stopped, which is unexpected. We fix that.

This also fixes a bug whereby setting the no-background restriction on a
profile will stop the profile, even if it is currently in the foreground
(i.e. is a profile of the foreground user).

(Also helps wean one stopUser spot off force==false)

Bug: 324641317
Bug: 324647580
Test: manually applied the restriction, switched users, and confirmed
      that the profile stopped
Test: use adbshell pm set-user-restriction --user # no_run_in_background <0|1>
      on a profile of a background/foreground user and confirm that
      it stops / doesn't stop

Change-Id: Ie7f6cc8dd2075675a71e15a7e14f4e1b06afba9c
parent 3c1f216e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment