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
Loading
Please register or sign in to comment