summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Selim Cinek <cinek@google.com> 2016-02-19 12:22:33 -0800
committer Selim Cinek <cinek@google.com> 2016-02-22 15:57:00 -0800
commit0934bd9942c6fe848faf9f007546a7ba0ce4978e (patch)
tree4e52c61cb4b89486aab8514df6bf0d5b3634f6bd
parented1a33cc86a80017be195f1c6485ef8089b992ac (diff)
Fixed a bug where the dozemode was incorrectly applied
This could lead to invisible white text. Bug: 27147160 Change-Id: I1196c251c795a7e271545405fb3936bcbb84cb19
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
index 647f0bfd0e26..bc859229b451 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
@@ -523,7 +523,13 @@ public class NotificationContentView extends FrameLayout {
}
public void setDark(boolean dark, boolean fade, long delay) {
- if (mDark == dark || mContractedChild == null) return;
+ setDark(dark, fade, delay, false /* force */);
+ }
+
+ public void setDark(boolean dark, boolean fade, long delay, boolean force) {
+ if ((!force && mDark == dark) || mContractedChild == null) {
+ return;
+ }
mDark = dark;
dark = dark && !mShowingLegacyBackground;
if (mVisibleType == VISIBLE_TYPE_CONTRACTED || !dark) {
@@ -571,7 +577,6 @@ public class NotificationContentView extends FrameLayout {
selectLayout(false /* animate */, true /* force */);
if (mContractedChild != null) {
mContractedWrapper.notifyContentUpdated(entry.notification);
- mContractedWrapper.setDark(mDark, false /* animate */, 0 /* delay */);
}
if (mExpandedChild != null) {
mExpandedWrapper.notifyContentUpdated(entry.notification);
@@ -579,6 +584,7 @@ public class NotificationContentView extends FrameLayout {
if (mHeadsUpChild != null) {
mHeadsUpWrapper.notifyContentUpdated(entry.notification);
}
+ setDark(mDark, false /* animate */, 0 /* delay */, true /* force */);
}
private void updateSingleLineView() {