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

Commit 2faf1638 authored by archisha's avatar archisha Committed by Archisha Baranwal
Browse files

Repurpose flag for enabling night mode binder cache as a bugfix flag.

Bug: 325295348
Flag: ACONFIG core.java.android.app.UiModeManager.enableNightModeBinderCache DEVELOPMENT
Test: NA
Change-Id: I33af49247567d9e60662877299f5aeaf7e014901
parent 39087e18
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();
            }
        }