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

Commit 7d889283 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove cache_user_properties_correctly_read_only" into main

parents 8bee3cf3 c24e18ec
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -182,17 +182,6 @@ flag {
  is_fixed_read_only: true
}

flag {
    name: "cache_user_properties_correctly_read_only"
    namespace: "multiuser"
    description: "UserProperties cache needs to take into account who the callingUid is."
    bug: "369198539"
    metadata {
        purpose: PURPOSE_BUGFIX
  }
  is_fixed_read_only: true
}

flag {
    name: "cache_user_info_read_only"
    namespace: "multiuser"
+0 −9
Original line number Diff line number Diff line
@@ -4043,15 +4043,6 @@ public class UserManager {
            throw new IllegalArgumentException("Cannot access properties for user " + userId);
        }

        if (!android.multiuser.Flags.cacheUserPropertiesCorrectlyReadOnly() || userId < 0) {
            // This is the historical code path, when all flags are false.
            try {
                return mService.getUserPropertiesCopy(userId);
            } catch (RemoteException re) {
                throw re.rethrowFromSystemServer();
            }
        }

        final int callingUid = Binder.getCallingUid();
        final int processUid = Process.myUid();
        if (processUid == Process.SYSTEM_UID && callingUid != processUid) {
+2 −4
Original line number Diff line number Diff line
@@ -1110,10 +1110,8 @@ public class UserManagerService extends IUserManager.Stub {
    private static final void initPropertyInvalidatedCaches() {
        UserManager.invalidateIsUserUnlockedCache();
        UserManager.invalidateQuietModeEnabledCache();
        if (android.multiuser.Flags.cacheUserPropertiesCorrectlyReadOnly()) {
        UserManager.invalidateStaticUserProperties();
        UserManager.invalidateUserPropertiesCache();
        }
        UserManager.invalidateCacheOnUserListChange();
        UserManager.invalidateUserRestriction();
    }