summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Selim Cinek <cinek@google.com> 2015-06-01 06:11:19 -0700
committer Selim Cinek <cinek@google.com> 2015-06-02 13:01:11 +0000
commit233241f13d5d7f841d3db80408429d4d0a528c78 (patch)
tree62a6dda143e476429301899ce244a64ae9913a60
parent60598075a0d54dcb4287d77c91b946e6c407a669 (diff)
Fixed a crash with HUNs
Bug: 21500600 Change-Id: Idf0a7be5d58bb5c666b930a0beada1e0ed2869aa
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java11
1 files changed, 6 insertions, 5 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 e73c593529d0..4ae800fcef0c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
@@ -1655,8 +1655,13 @@ public class NotificationStackScrollLayout extends ViewGroup
* @return Whether an animation was generated.
*/
private boolean generateRemoveAnimation(View child) {
+ if (mAddedHeadsUpChildren.contains(child)) {
+ removeChildFromHeadsUpChangeAnimations(child);
+ mAddedHeadsUpChildren.remove(child);
+ return false;
+ }
if (mIsExpanded && mAnimationsEnabled && !isChildInInvisibleGroup(child)) {
- if (!mChildrenToAddAnimated.contains(child) && !mAddedHeadsUpChildren.contains(child)) {
+ if (!mChildrenToAddAnimated.contains(child)) {
// Generate Animations
mChildrenToRemoveAnimated.add(child);
mNeedsAnimation = true;
@@ -1664,10 +1669,6 @@ public class NotificationStackScrollLayout extends ViewGroup
} else {
mChildrenToAddAnimated.remove(child);
mFromMoreCardAdditions.remove(child);
- boolean remove = mAddedHeadsUpChildren.remove(child);
- if (remove) {
- removeChildFromHeadsUpChangeAnimations(child);
- }
return false;
}
}