Allow setting User Restrictions per user type
FULL and PROFILE user types now have their default restrictions delineated in UserTypeFactory. The restrictions for these user types can be customized in config_user_types, along with the other user type customization. Note: even though FULL user types can now be customized, the only supported customization is user restrictions. Moreover, new FULL user types cannot be defined. This cl also has the following repercussions: -When a user is created (but not yet started), the applied restrictions are not propagated as an update (prior to this, the restrictions for new users - other than guest - were set via setUserRestriction, which did more than just store the data). When the user is started, the restrictions will still be propagated. -When a user is created via adb, its default restrictions are applied. Previously this was not the case except for guest users. -When an Admin user is created/set, it is now the callers responsibility to adjust its restrictions. UserManager will no longer automatically remove the DISALLOW_SMS/DISALLOW_OUTGOING_CALLS restrictions for Admins. Also note that Restricted Users have additional hardcoded restrictions, indepent of this cl. Test: atest UserManagerServiceUserTypeTest Test: atest UserManagerTest Bug: 142482943 Bug: 143491938 Change-Id: Idfec610da871aea2bc7109d11d1eb9a957e080a4
Loading
Please register or sign in to comment