OSDN Git Service

Fixed animation jank in notification groups
authorSelim Cinek <cinek@google.com>
Fri, 12 Feb 2016 01:21:16 +0000 (17:21 -0800)
committerSelim Cinek <cinek@google.com>
Fri, 12 Feb 2016 01:53:12 +0000 (17:53 -0800)
When group children are animating from single line to expanded,
the animation was jarring.

Change-Id: I4b248b2f59a842befaa0f5d5440c55f140584da2

packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java

index 5e0e620..d5361dd 100644 (file)
@@ -496,7 +496,8 @@ public class NotificationContentView extends FrameLayout {
                 return VISIBLE_TYPE_EXPANDED;
             }
         } else {
-            if (viewHeight <= mContractedChild.getHeight() || noExpandedChild) {
+            if (noExpandedChild || (viewHeight <= mContractedChild.getHeight()
+                    && (!mIsChildInGroup || !mContainingNotification.isExpanded()))) {
                 return VISIBLE_TYPE_CONTRACTED;
             } else {
                 return VISIBLE_TYPE_EXPANDED;