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

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

Remove cache_user_properties_correctly_read_only

Remove the flag cache_user_properties_correctly_read_only. It is
eligible for cleanup.

Test: presubmit
Flag: EXEMPT removing android.multiuser.cache_user_properties_correctly_read_only
Bug: 409607443
Bug: 369198539
Change-Id: I7223feaeeb2b853a43f57d7a6ec4886d2e7fca7a
parent 98139c51
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -147,17 +147,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
@@ -4032,15 +4032,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
@@ -1109,10 +1109,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();
    }