summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2015-06-13 00:27:05 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-13 00:27:07 +0000
commita89904223770a43d4c2e5ecd26400ed8f1db68df (patch)
tree657269863bd44e77d43103608b2faf6149c3ec65 /packages
parent80b34d7b9da0e0738a4a1db78d83cd804372594b (diff)
parent021eee53e52c880a529ece28a3a9edb3cd0776b7 (diff)
downloadframeworks_base-a89904223770a43d4c2e5ecd26400ed8f1db68df.zip
frameworks_base-a89904223770a43d4c2e5ecd26400ed8f1db68df.tar.gz
frameworks_base-a89904223770a43d4c2e5ecd26400ed8f1db68df.tar.bz2
Merge "Fix dark mode for custom views" into mnc-dev
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollState.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java6
4 files changed, 9 insertions, 9 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index 0b49564..79761ec 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -1381,7 +1381,6 @@ public abstract class BaseStatusBar extends SystemUI implements
R.layout.notification_public_default,
contentContainerPublic, false);
publicViewLocal.setIsRootNamespace(true);
- contentContainerPublic.setContractedChild(publicViewLocal);
final TextView title = (TextView) publicViewLocal.findViewById(R.id.title);
try {
@@ -1447,6 +1446,7 @@ public abstract class BaseStatusBar extends SystemUI implements
mContext.getResources().getConfiguration().fontScale);
title.setPadding(0, topPadding, 0, 0);
+ contentContainerPublic.setContractedChild(publicViewLocal);
entry.autoRedacted = true;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
index 8172a4d..86d7f4f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
@@ -311,9 +311,9 @@ public class NotificationContentView extends FrameLayout {
}
int visibleType = calculateVisibleType();
if (visibleType != mVisibleType || force) {
- if (animate && (visibleType == VISIBLE_TYPE_EXPANDED && mExpandedChild != null)
+ if (animate && ((visibleType == VISIBLE_TYPE_EXPANDED && mExpandedChild != null)
|| (visibleType == VISIBLE_TYPE_HEADSUP && mHeadsUpChild != null)
- || visibleType == VISIBLE_TYPE_CONTRACTED) {
+ || visibleType == VISIBLE_TYPE_CONTRACTED)) {
runSwitchAnimation(visibleType);
} else {
updateViewVisibilities(visibleType);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollState.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollState.java
index a70ad43..3768ca4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollState.java
@@ -149,9 +149,6 @@ public class StackScrollState {
// apply dimming
view.setDimmed(state.dimmed, false /* animate */);
- // apply dark
- view.setDark(state.dark, false /* animate */, 0 /* delay */);
-
// apply hiding sensitive
view.setHideSensitive(
state.hideSensitive, false /* animated */, 0 /* delay */, 0 /* duration */);
@@ -159,6 +156,9 @@ public class StackScrollState {
// apply speed bump state
view.setBelowSpeedBump(state.belowSpeedBump);
+ // apply dark
+ view.setDark(state.dark, false /* animate */, 0 /* delay */);
+
// apply clipping
float oldClipTopAmount = view.getClipTopAmount();
if (oldClipTopAmount != state.clipTopAmount) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java
index c995c8e..17e6e3d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java
@@ -243,9 +243,6 @@ public class StackStateAnimator {
// start dimmed animation
child.setDimmed(viewState.dimmed, mAnimationFilter.animateDimmed);
- // start dark animation
- child.setDark(viewState.dark, mAnimationFilter.animateDark, delay);
-
// apply speed bump state
child.setBelowSpeedBump(viewState.belowSpeedBump);
@@ -253,6 +250,9 @@ public class StackStateAnimator {
child.setHideSensitive(viewState.hideSensitive, mAnimationFilter.animateHideSensitive,
delay, duration);
+ // start dark animation
+ child.setDark(viewState.dark, mAnimationFilter.animateDark, delay);
+
if (wasAdded) {
child.performAddAnimation(delay, mCurrentLength);
}