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

Commit cfcc0200 authored by Piyush Singhania's avatar Piyush Singhania Committed by Android (Google) Code Review
Browse files

Merge "Fix: Replace modsFlagOnOrNone with mods in CachedProperty" into main

parents 08efacfe 91e4d15f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -5901,7 +5901,7 @@ public class UserManager {
     * @param userHandle The user handle of the profile to be queried.
     * @return true if the profile is in quiet mode, false otherwise.
     */
    @CachedProperty(modsFlagOnOrNone = {})
    @CachedProperty(mods = {})
    public boolean isQuietModeEnabled(UserHandle userHandle) {
        if (android.multiuser.Flags.cacheQuietModeState()) {
            final int userId = userHandle.getIdentifier();
@@ -6662,7 +6662,7 @@ public class UserManager {
     * @hide
     */
    @UnsupportedAppUsage
    @CachedProperty(modsFlagOnOrNone = {}, api = "user_manager_users")
    @CachedProperty(mods = {}, api = "user_manager_users")
    public int getUserSerialNumber(@UserIdInt int userId) {
        // Read only flag should is to fix early access to this API
        // cacheUserSerialNumber to be removed after the
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ public class CacheConfig {
                : methodAnnotation.module();
        mClassName = classElement.getSimpleName().toString();
        mQualifiedName = classElement.getQualifiedName().toString();
        mModifiers = new CacheModifiers(methodAnnotation.modsFlagOnOrNone());
        mModifiers = new CacheModifiers(methodAnnotation.mods());
        mMethodName = method.getSimpleName().toString();
        mPropertyName = getPropertyName(mMethodName);
        mApiName = methodAnnotation.api().isEmpty() ? getUniqueApiName(mClassName, mPropertyName)
+4 −4
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ public class Custom {
     * @param userId - user Id
     * @return number of days till birthday of given user Id
     */
    @CachedProperty(modsFlagOnOrNone = {CacheModifier.STATIC})
    @CachedProperty(mods = {CacheModifier.STATIC})
    public int getDaysTillBirthday(int userId) {
        return CustomCache.getDaysTillBirthday(mService::getDaysTillBirthday, userId);
    }
@@ -59,7 +59,7 @@ public class Custom {
     * @param userId - user Id
     * @return number of days since birthday of given user Id
     */
    @CachedProperty(modsFlagOnOrNone = {})
    @CachedProperty(mods = {})
    public int getDaysSinceBirthday(int userId) {
        return ((CustomCache) mCache).getDaysSinceBirthday(mService::getDaysSinceBirthday, userId);
    }
@@ -69,7 +69,7 @@ public class Custom {
     *
     * @return number of days till birthay of current user
     */
    @CachedProperty(modsFlagOnOrNone = {CacheModifier.STATIC}, max = 1)
    @CachedProperty(mods = {CacheModifier.STATIC}, max = 1)
    public int getDaysTillMyBirthday() {
        return CustomCache.getDaysTillMyBirthday((Void) -> mService.getDaysTillMyBirthday());
    }
@@ -80,7 +80,7 @@ public class Custom {
     *
     * @return number of days since birthay of current user
     */
    @CachedProperty(modsFlagOnOrNone = {}, max = 1, api = "my_unique_key")
    @CachedProperty(mods = {}, max = 1, api = "my_unique_key")
    public int getDaysSinceMyBirthday() {
        return ((CustomCache) mCache).getDaysSinceMyBirthday(
                (Void) -> mService.getDaysSinceMyBirthday());
+4 −4
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ public class Default {
     * @param userId - user Id
     * @return number of days till birthday of given user Id
     */
    @CachedProperty(modsFlagOnOrNone = {CacheModifier.STATIC})
    @CachedProperty(mods = {CacheModifier.STATIC})
    public int getDaysTillBirthday(int userId) {
        return DefaultCache.getDaysTillBirthday(mService::getDaysTillBirthday, userId);
    }
@@ -52,7 +52,7 @@ public class Default {
     * @param userId - user Id
     * @return number of days since birthday of given user Id
     */
    @CachedProperty(modsFlagOnOrNone = {})
    @CachedProperty(mods = {})
    public int getDaysSinceBirthday(int userId) {
        return ((DefaultCache) mCache).getDaysSinceBirthday(mService::getDaysSinceBirthday, userId);
    }
@@ -62,7 +62,7 @@ public class Default {
     * @return number of days till birthay of current user
     */
    @CachedProperty(
            modsFlagOnOrNone = {CacheModifier.STATIC},
            mods = {CacheModifier.STATIC},
            max = 1)
    public int getDaysTillMyBirthday() {
        return DefaultCache.getDaysTillMyBirthday((Void) -> mService.getDaysTillMyBirthday());
@@ -74,7 +74,7 @@ public class Default {
     * @return number of days since birthay of current user
     */
    @CachedProperty(
            modsFlagOnOrNone = {},
            mods = {},
            max = 1,
            api = "my_unique_key")
    public int getDaysSinceMyBirthday() {