Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 41c4fc17 authored by Adam Bookatz's avatar Adam Bookatz
Browse files

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
parent 3df32c4e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment