From d4776a52b45a9f83f0c67f7e967c36ec9cb2c17a Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Tue, 14 Feb 2017 18:50:16 -0800 Subject: [PATCH] Made the notificationViewStates static We shouldn't hold an implicit reference to the row, let's fix that. Bug: 35345204 Test: runtest systemui Change-Id: Ifa0ba0bd07850ae575059b6368791d60d1091616 --- .../systemui/statusbar/ExpandableNotificationRow.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java index 66d0957622741..3648a060e6192 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java @@ -1990,7 +1990,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { mAboveShelf = aboveShelf; } - public class NotificationViewState extends ExpandableViewState { + public static class NotificationViewState extends ExpandableViewState { private final StackScrollState mOverallState; @@ -2011,8 +2011,11 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { @Override protected void onYTranslationAnimationFinished(View view) { super.onYTranslationAnimationFinished(view); - if (mHeadsupDisappearRunning) { - setHeadsUpAnimatingAway(false); + if (view instanceof ExpandableNotificationRow) { + ExpandableNotificationRow row = (ExpandableNotificationRow) view; + if (row.isHeadsUpAnimatingAway()) { + row.setHeadsUpAnimatingAway(false); + } } }