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

Commit a26afd94 authored by Archisha Baranwal's avatar Archisha Baranwal Committed by Android (Google) Code Review
Browse files

Merge "Improve cache invalidation criteria for night mode and current mode type." into main

parents 12c60df3 b12b57fb
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -153,11 +153,13 @@ final class UiModeManagerService extends SystemService {

        @Override
        public void set(int mode) {
            if (mNightModeValue != mode) {
                mNightModeValue = mode;
                if (enableNightModeBinderCache()) {
                    UiModeManager.invalidateNightModeCache();
                }
            }
        }
    };
    private int mNightModeCustomType = UiModeManager.MODE_NIGHT_CUSTOM_TYPE_UNKNOWN;
    private int mAttentionModeThemeOverlay = UiModeManager.MODE_ATTENTION_THEME_OVERLAY_OFF;
@@ -207,11 +209,13 @@ final class UiModeManagerService extends SystemService {

        @Override
        public void set(int mode) {
            if (mCurrentModeTypeValue != mode) {
                mCurrentModeTypeValue = mode;
                if (enableCurrentModeTypeBinderCache()) {
                    UiModeManager.invalidateCurrentModeTypeCache();
                }
            }
        }
    };
    private int mSetUiMode = 0;
    private boolean mHoldingConfiguration = false;