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

Commit ab0a6a5e authored by Felipe Leme's avatar Felipe Leme
Browse files

Changed HsumBootUserInitializer so it "demotes" the main user if needed.

The main user is created on first boot on devices that set
config_isMainUserPermanentAdmin to true. But the concept of main user
is temporary (and eventually will be deprecated), so we need a way to
"demote" the main user once a device doesn't need it; for now, we'll
simply change the flag on boot when the property changes (which is
what this CL do) as the main user is not quite deprecated yet (and
there shouldn't be any devices other than some internal ones that
would be making this transition), although in the future we might
need a more sophisticated mechanism (like an internal callback to let
SystemServices know about the demotion).

Test: atest HsumBootUserInitializerTest
Test: atest FrameworksMockingServicesTests --test-filter=".*UserManagerServiceMockedTest#.*DemoteMainUser.*"

Bug: 402486365
Flag: android.multiuser.create_initial_user

Change-Id: I6807d6ab12a16cc5a892d1bdca91a4fd3b761fe3
parent da84cef0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment