Added UserFilter and new methods on UMS that use it.
Currently, UMS has many getUsers() methods, which can take up to 4 arguments (like getUsersInternal(boolean excludePartial, boolean excludeDying, boolean excludePreCreated, boolean resolveNullNames)); this approach is already hard to use (for example, it pollutes the code with call-site comments like /* excludePartial= */ true) and maintain (for example, to add other conditions like onlyFullAdmins). So, this CL adds a new UserFilter POJO, and 2 getUsers() methods that uses it, althoguh it doesn't refactor the existing methods to use it yet (as they're not unit-tested). It also adds a getNumberOfUsers() method which will be used to count the number of admins in some scenarios. Flag: EXEMPT new code that's not used yet Test: atest FrameworksMockingServicesTests:UserFilterTest Test: atest -it FrameworksMockingServicesTests --test-filter=.*testGetUsersWithFilterAndGetNumberOfUsers.* Bug: 419086491 Change-Id: Id0cba5f4873740db050e0a524e1ed7efb2016f12
Loading
Please register or sign in to comment