Loading core/res/res/xml/config_user_types.xml +2 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,8 @@ Supported optional properties (to be used as shown in the example above) are as For profile and full users: default-restrictions (with values defined in UserRestrictionUtils.USER_RESTRICTIONS) enabled user-properties max-allowed For profile users only: max-allowed-per-parent icon-badge Loading services/core/java/com/android/server/pm/UserTypeFactory.java +1 −0 Original line number Diff line number Diff line Loading @@ -397,6 +397,7 @@ public final class UserTypeFactory { } setIntAttribute(parser, "enabled", builder::setEnabled); setIntAttribute(parser, "max-allowed", builder::setMaxAllowed); // Process child elements. final int depth = parser.getDepth(); Loading services/tests/servicestests/res/xml/usertypes_test_full.xml +2 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,8 @@ <user-types> <full-type name='android.test.1' max-allowed-per-parent='12' > max-allowed-per-parent='12' max-allowed='17' > <default-restrictions no_remove_user='true' no_bluetooth='true' /> <badge-colors> <item res='@*android:color/profile_badge_1' /> Loading services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserTypeTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -355,6 +355,7 @@ public class UserManagerServiceUserTypeTest { UserTypeDetails details = builders.get(userTypeFull).createUserTypeDetails(); assertEquals(UNLIMITED_NUMBER_OF_USERS, details.getMaxAllowedPerParent()); assertFalse(details.isEnabled()); assertEquals(17, details.getMaxAllowed()); assertTrue(UserRestrictionsUtils.areEqual( makeRestrictionsBundle("no_remove_user", "no_bluetooth"), details.getDefaultRestrictions())); Loading Loading
core/res/res/xml/config_user_types.xml +2 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,8 @@ Supported optional properties (to be used as shown in the example above) are as For profile and full users: default-restrictions (with values defined in UserRestrictionUtils.USER_RESTRICTIONS) enabled user-properties max-allowed For profile users only: max-allowed-per-parent icon-badge Loading
services/core/java/com/android/server/pm/UserTypeFactory.java +1 −0 Original line number Diff line number Diff line Loading @@ -397,6 +397,7 @@ public final class UserTypeFactory { } setIntAttribute(parser, "enabled", builder::setEnabled); setIntAttribute(parser, "max-allowed", builder::setMaxAllowed); // Process child elements. final int depth = parser.getDepth(); Loading
services/tests/servicestests/res/xml/usertypes_test_full.xml +2 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,8 @@ <user-types> <full-type name='android.test.1' max-allowed-per-parent='12' > max-allowed-per-parent='12' max-allowed='17' > <default-restrictions no_remove_user='true' no_bluetooth='true' /> <badge-colors> <item res='@*android:color/profile_badge_1' /> Loading
services/tests/servicestests/src/com/android/server/pm/UserManagerServiceUserTypeTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -355,6 +355,7 @@ public class UserManagerServiceUserTypeTest { UserTypeDetails details = builders.get(userTypeFull).createUserTypeDetails(); assertEquals(UNLIMITED_NUMBER_OF_USERS, details.getMaxAllowedPerParent()); assertFalse(details.isEnabled()); assertEquals(17, details.getMaxAllowed()); assertTrue(UserRestrictionsUtils.areEqual( makeRestrictionsBundle("no_remove_user", "no_bluetooth"), details.getDefaultRestrictions())); Loading