summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jeff DeCew <jeffdq@google.com> 2022-07-07 18:23:36 +0000
committer Jeff DeCew <jeffdq@google.com> 2022-07-07 18:26:34 +0000
commitd5428a51c0b8d3abe0fdfe0cc510903a70ef3aab (patch)
treece338b3acdd30b61e9e0cf6e384699c7c99ba851
parent9b723322f13a369b2b3eccfe507059187b635904 (diff)
Workaround a notification inflation race condition.
Change-Id: Ic13890a4a97628920f5e70d0f0cc24cc00b4829c Fixes: 227880269 Fixes: 238037994 Test: manual
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
index cd4a44e1c6e0..94341ba4bb19 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
@@ -141,7 +141,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
public static final float DEFAULT_HEADER_VISIBLE_AMOUNT = 1.0f;
private static final long RECENTLY_ALERTED_THRESHOLD_MS = TimeUnit.SECONDS.toMillis(30);
- private boolean mUpdateSelfBackgroundOnUpdate;
+ // We don't correctly track dark mode until the content views are inflated, so always update
+ // the background on first content update just in case it happens to be during a theme change.
+ private boolean mUpdateSelfBackgroundOnUpdate = true;
private boolean mNotificationTranslationFinished = false;
private boolean mIsSnoozed;
private boolean mIsFaded;