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

Commit b74952eb authored by Adam Bookatz's avatar Adam Bookatz
Browse files

Explicitly invalidate getUserInfo under its flag

getUserInfo gets invalidated by the same invalidation mechanism as getProfiles, but they have separate flags. So we should handle all flag combinations.

Change-Id: I61b5a703b841c8281b6940060cd91f2ddd03e55e
Flag: android.multiuser.cache_user_info_read_only
Bug: 161915546 
Test: N/A. Just add (redundant) flagging
parent 09429c7d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -6501,7 +6501,11 @@ public class UserManager {
     * @hide
     */
    public static final void invalidateCacheOnUserDataChanged() {
        if (android.multiuser.Flags.cacheProfilesReadOnly()) {
        if (android.multiuser.Flags.cacheProfilesReadOnly()
                || android.multiuser.Flags.cacheUserInfoReadOnly()) {
            // TODO(b/383175685): Rename the invalidation call to make it clearer that it
            // invalidates the caches for both getProfiles and getUserInfo (since they both use the
            // same user_manager_user_data CachedProperty.api).
            UserManagerCache.invalidateProfiles();
        }
    }