Skip to content
Commit c0006519 authored by arangelov's avatar arangelov Committed by Antoan Angelov
Browse files

Add STATE_USER_PROFILE_FINALIZED as an additional user state

This will be used as an intermediate state after
STATE_USER_PROFILE_COMPLETE once the work profile has been created.

With the current admin-integrated flow refactoring changes,
the work profile will be finalized earlier than before.
Therefore, we add this new state so that SetupWizard
can differentiate between this state and STATE_USER_UNMANAGED.

Instead of the user states for work profile provisioning being
STATE_USER_UNMANAGED -> STATE_USER_PROFILE_COMPLETE ->
STATE_USER_UNMANAGED, they will now be STATE_USER_UNMANAGED ->
STATE_USER_PROFILE_COMPLETE -> STATE_USER_PROFILE_FINALIZED.

Note that CTS testing this API is infeasible, since it's
a system API and it requires the MANAGE_PROFILE_AND_DEVICE_OWNERS
signature permission which can't be granted to a CTS app.

Bug: 161402545
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest#testSetUserProvisioningState_managedProfileFromSetupWizard_primaryUser
Change-Id: I421d8ad431de6aef779a0b58b7f074ffc74dda48
parent 75a720cf
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment