Create a flag to allow starting managed user in background

Currently DPM.createAndManageUser does not start the user in the
background, leading to a potential race between user having access to
the secondary user and admin having time to push policies. To mitigate
this we're adding a flag that allows secondary users to be started in
background as part of the API. The admin can then apply policies before
switching to that user.

Bug: 64382185
Test: cts-tradefed run singleCommand cts -m DevicePolicyManager --test
com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageUser_StartUserInBackground
--abi arm64-v8a
Change-Id: Id6f6ab7584a249680c8554c21977cbb69a220332
5 files changed