summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelim Cinek <cinek@google.com>2016-07-13 14:34:56 -0700
committergitbuildkicker <android-build@google.com>2016-08-31 22:20:59 -0700
commit7f5d46a8691843afc8d7bc5d6890220f8197b09e (patch)
tree200ae87c8a0f48a3a62a76f56182f61218d1ef61
parentc662295d8267339eac31d0efe6bef57827559429 (diff)
downloadbase-7f5d46a8691843afc8d7bc5d6890220f8197b09e.tar.gz
Fixed a bug where the headsup would be stuck disappearing
Change-Id: I56d6be69f6e59c1bec647e7e70e50a36b793f895 Fixes: 30120962 (cherry picked from commit a4155bb7c0da61a41bb7bd9907f05157ec731661)
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
index 7de38797adcc..17d3d71fd50b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
@@ -2347,6 +2347,7 @@ public class NotificationStackScrollLayout extends ViewGroup
if (hasAddEvent) {
// This child was just added lets remove all events.
mHeadsUpChangeAnimations.removeAll(mTmpList);
+ ((ExpandableNotificationRow ) child).setHeadsupDisappearRunning(false);
}
mTmpList.clear();
return hasAddEvent;
@@ -2604,6 +2605,10 @@ public class NotificationStackScrollLayout extends ViewGroup
type = row.wasJustClicked()
? AnimationEvent.ANIMATION_TYPE_HEADS_UP_DISAPPEAR_CLICK
: AnimationEvent.ANIMATION_TYPE_HEADS_UP_DISAPPEAR;
+ if (row.isChildInGroup()) {
+ // We can otherwise get stuck in there if it was just isolated
+ row.setHeadsupDisappearRunning(false);
+ }
} else {
StackViewState viewState = mCurrentStackScrollState.getViewStateForView(row);
if (viewState == null) {
@@ -3093,6 +3098,22 @@ public class NotificationStackScrollLayout extends ViewGroup
requestChildrenUpdate();
runAnimationFinishedRunnables();
clearViewOverlays();
+ clearHeadsUpDisappearRunning();
+ }
+
+ private void clearHeadsUpDisappearRunning() {
+ for (int i = 0; i < getChildCount(); i++) {
+ View view = getChildAt(i);
+ if (view instanceof ExpandableNotificationRow) {
+ ExpandableNotificationRow row = (ExpandableNotificationRow) view;
+ row.setHeadsupDisappearRunning(false);
+ if (row.isSummaryWithChildren()) {
+ for (ExpandableNotificationRow child : row.getNotificationChildren()) {
+ child.setHeadsupDisappearRunning(false);
+ }
+ }
+ }
+ }
}
private void clearViewOverlays() {