adb shell pm get-max-users --user-type USER_TYPE
get-max-users historically gave the overall device max of users, to the extent that such a concept properly existed. However, we have now replaced this concept with the concept of max number of *switchable* users. We therefore update this shell command's behaviour accordingly: * If no parameter is given, we give the max number of switchable users, in line with the past behaviour. This way, tests and scripts can continue to determine how many regular users can be added. * Allows a user-type parameter to be given. If it is given, gives the max number of allowed users for the particular user type. * Introduce a mechanism to get the current remaining number of users of the given type that can be created, which is what many tests actually care about anyway. In this fashion, we can get the max number of any particular type of user, as well as the overall device *switchable* max. Test: TestDeviceTest Test: PackageManagerShellCommandMultiUserTest Flag: android.multiuser.decouple_max_users_from_profiles Bug: 394178333 Bug: 407111025 Bug: 413464199 Change-Id: Iaee28c5245648f7735ca4ec10e97c98e71c25ca1
Loading
Please register or sign in to comment