Fixed a bug where the expanded layout would flash
When the heads up disappeared from the shade, it's layout would
switch to the expanded state. We're now delaying this until
the animation is done.
Change-Id: I6c5c970f6b471fb10b197922dfea520b07c84abc
Fixes: 29318819
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
index 8987081..39fce7b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
@@ -186,6 +186,7 @@
}
};
private OnClickListener mOnClickListener;
+ private boolean mHeadsupDisappearRunning;
private View mChildAfterViewWhenDismissed;
private View mGroupParentWhenDismissed;
private boolean mRefocusOnDismiss;
@@ -769,6 +770,11 @@
return mChildrenContainer;
}
+ public void setHeadsupDisappearRunning(boolean running) {
+ mHeadsupDisappearRunning = running;
+ mPrivateLayout.setHeadsupDisappearRunning(running);
+ }
+
public View getChildAfterViewWhenDismissed() {
return mChildAfterViewWhenDismissed;
}
@@ -1174,8 +1180,8 @@
return getMinHeight();
} else if (mIsSummaryWithChildren && !mOnKeyguard) {
return mChildrenContainer.getIntrinsicHeight();
- } else if (mIsHeadsUp) {
- if (isPinned()) {
+ } else if (mIsHeadsUp || mHeadsupDisappearRunning) {
+ if (isPinned() || mHeadsupDisappearRunning) {
return getPinnedHeadsUpHeight(true /* atLeastMinHeight */);
} else if (isExpanded()) {
return Math.max(getMaxExpandHeight(), mHeadsUpHeight);