Files
frameworks_base/core/java/android
Adam Bookatz c9bc9adfd7 UserManager.getProfileType hidden API and caching
Currently we have a few APIs for isXXXProfile. In the case of managed
profiles, we cachce the results.

Here, we introduce a new hidden API getProfileType, which gets and
caches the user type (string), if the user type is a profile. That way,
we automatically have the caching benefits for all profiles, not just
managed profiles.

We only do this for profiles because they have a relaxed permission
requirement. Other user types have strong restrictions, so we do not use
their more general getters here.

Test: atest UserManagerTest
Change-Id: I36b4caead83954518d6fc48860af61f8988f19a9
2022-02-10 13:17:28 -08:00
..
2022-02-10 01:09:47 +00:00
…