From 51ae05d92047049250ddbfd6c4998cb7cbca017d Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Tue, 9 Sep 2014 15:51:38 +0200 Subject: [PATCH] Fixed a bug that the icon was not animating anymore when updating. Bug: 16043845 Change-Id: I0cdb1ee5ddefd4404cd9a6cab61baf1b281a457b --- .../src/com/android/systemui/statusbar/BaseStatusBar.java | 4 +--- .../systemui/statusbar/stack/NotificationStackScrollLayout.java | 8 +++++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index c8fb1e6c5452..bf9b73de635f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -1924,9 +1924,6 @@ public abstract class BaseStatusBar extends SystemUI implements : null; // Reapply the RemoteViews - if (entry.row != null) { - entry.row.resetHeight(); - } contentView.reapply(mContext, entry.expanded, mOnClickHandler); if (bigContentView != null && entry.getBigContentView() != null) { bigContentView.reapply(mContext, entry.getBigContentView(), @@ -1945,6 +1942,7 @@ public abstract class BaseStatusBar extends SystemUI implements entry.row.setOnClickListener(null); } entry.row.notifyContentUpdated(); + entry.row.resetHeight(); } protected void notifyHeadsUpScreenOn(boolean screenOn) { 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 6c559fbb88a7..67ba8d2023ca 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java @@ -1547,7 +1547,7 @@ public class NotificationStackScrollLayout extends ViewGroup mStackScrollAlgorithm.notifyChildrenChanged(this); ((ExpandableView) child).setOnHeightChangedListener(this); generateAddAnimation(child, false /* fromMoreCard */); - updateAnimationState(mAnimationsEnabled && mIsExpanded, child); + updateAnimationState(child); } public void setAnimationsEnabled(boolean animationsEnabled) { @@ -1564,6 +1564,11 @@ public class NotificationStackScrollLayout extends ViewGroup } } + private void updateAnimationState(View child) { + updateAnimationState(mAnimationsEnabled && mIsExpanded, child); + } + + private void updateAnimationState(boolean running, View child) { if (child instanceof ExpandableNotificationRow) { ExpandableNotificationRow row = (ExpandableNotificationRow) child; @@ -1961,6 +1966,7 @@ public class NotificationStackScrollLayout extends ViewGroup mRequestViewResizeAnimationOnLayout = true; } mStackScrollAlgorithm.onReset(view); + updateAnimationState(view); } private void updateScrollPositionOnExpandInBottom(ExpandableView view) { -- 2.11.0