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