UserTypeDetails - new enabled option
Adds an option for enabling/disabling a user type.
enabled=0 means disabled (otherwise it is enabled).
We use an int (rather than a boolean) to make it clear
what String value does what (1 vs. 0). If we had used a
boolean, we'd have to worry about true/True/TRUE/1/etc.;
with an int, the device will fail to boot if a non-int is
given.
If a user type is diabled, pre-existing users of that type
are unaffected. However, no new users of that type may be
created.
We do NOT simply use the maxAllowed option (setting it to 0
to simulate disalbing) for ease-of-use and to avoid
any potential complications with pre-created users.
Bug: 192577100
Bug: 142482943
Test: atest UserManagerServiceUserTypeTest
Change-Id: I3db25f3a48f9ba18a5dd3e74f6ac9b7638980497
5 files changed