lineage_patches_unified/patches_platform/frameworks_base/0022-SystemUI-Initialize-QS-tiles-in-inactive-state.patch
2024-04-21 16:33:07 +08:00

35 lines
1.5 KiB
Diff

From 11a452ed141a31cff8d0ff3c10c28c189a2dffe7 Mon Sep 17 00:00:00 2001
From: Danny Lin <danny@kdrag0n.dev>
Date: Mon, 11 Oct 2021 19:25:02 -0700
Subject: [PATCH 22/34] SystemUI: Initialize QS tiles in inactive state
Now that the QS fragment is recreated when changing the UI mode (so that
it follows light/dark themes), all tiles flash with active color briefly
because the new views become visible before states are refreshed.
Initializing tiles in the inactive state is much less disruptive, and
the effect is very hard to see as compared to the active color because
the background color is much less prominent.
Change-Id: I048171d503f5533e91bab486b8805ac15c329f31
---
.../plugin/src/com/android/systemui/plugins/qs/QSTile.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
index 5d85fbade873..0c7c46d8d31d 100644
--- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
+++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/qs/QSTile.java
@@ -154,7 +154,7 @@ public interface QSTile {
@ProvidesInterface(version = State.VERSION)
public static class State {
public static final int VERSION = 1;
- public static final int DEFAULT_STATE = Tile.STATE_ACTIVE;
+ public static final int DEFAULT_STATE = Tile.STATE_INACTIVE;
public Icon icon;
public Supplier<Icon> iconSupplier;
--
2.34.1