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

Commit 51503c1a authored by Jernej Virag's avatar Jernej Virag Committed by Android (Google) Code Review
Browse files

Merge "Repurpose flag for enabling night mode binder cache as a bugfix flag." into main

parents 4457e6e8 2faf1638
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

package android.app;

import static android.app.Flags.enableNightModeCache;
import static android.app.Flags.enableNightModeBinderCache;

import android.annotation.CallbackExecutor;
import android.annotation.FlaggedApi;
@@ -916,7 +916,7 @@ public class UiModeManager {
     *
     * @hide
     */
    @FlaggedApi(Flags.FLAG_ENABLE_NIGHT_MODE_CACHE)
    @FlaggedApi(Flags.FLAG_ENABLE_NIGHT_MODE_BINDER_CACHE)
    public static void invalidateNightModeCache() {
        IpcDataCache.invalidateCache(IpcDataCache.MODULE_SYSTEM,
                NIGHT_MODE_API);
@@ -938,7 +938,7 @@ public class UiModeManager {
     * @see #setNightMode(int)
     */
    public @NightMode int getNightMode() {
        if (enableNightModeCache()) {
        if (enableNightModeBinderCache()) {
            return mNightModeCache.query(null);
        } else {
            return getNightModeFromServer();
+5 −2
Original line number Diff line number Diff line
package: "android.app"

flag {
     namespace: "system_performance"
     name: "enable_night_mode_cache"
     namespace: "systemui"
     name: "enable_night_mode_binder_cache"
     description: "Enables the use of binder caching for system night mode."
     bug: "255999432"
     metadata {
         purpose: PURPOSE_BUGFIX
     }
}
 No newline at end of file
+2 −2
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
package com.android.server;

import static android.app.Flags.modesApi;
import static android.app.Flags.enableNightModeCache;
import static android.app.Flags.enableNightModeBinderCache;
import static android.app.UiModeManager.ContrastUtils.CONTRAST_DEFAULT_VALUE;
import static android.app.UiModeManager.DEFAULT_PRIORITY;
import static android.app.UiModeManager.MODE_ATTENTION_THEME_OVERLAY_OFF;
@@ -148,7 +148,7 @@ final class UiModeManagerService extends SystemService {
        @Override
        public void set(int mode) {
            mNightModeValue = mode;
            if (enableNightModeCache()) {
            if (enableNightModeBinderCache()) {
                UiModeManager.invalidateNightModeCache();
            }
        }