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

Commit de4f9a34 authored by Felipe Leme's avatar Felipe Leme
Browse files

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
parent fcf250b4
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