From 00708abfe6edf668094ef56a0a4f0760a63a110e Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Thu, 9 Feb 2017 18:15:48 -0800 Subject: [PATCH] The transformhelper now also transforms gone views Because a notification's views could change from GONE to VISIBLE without notifying the transformhelper, we're now adding the transformed views even if they are gone at the resolution time. This fixes a bug where the Time would fade in / out properly. This also fixes another bug where the time could remain invisible. Test: add notification group without any header text and observe smooth fading when expanding group Change-Id: I1d6b0126df1550a71baa2e7729bdf9664b934b02 Fixes: 35127160 --- .../android/systemui/statusbar/ViewTransformationHelper.java | 3 --- .../systemui/statusbar/notification/TransformState.java | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ViewTransformationHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/ViewTransformationHelper.java index 1c89e32a02bc7..535300573c6eb 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ViewTransformationHelper.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ViewTransformationHelper.java @@ -224,9 +224,6 @@ public class ViewTransformationHelper implements TransformableView { stack.push(viewRoot); while (!stack.isEmpty()) { View child = stack.pop(); - if (child.getVisibility() == View.GONE) { - continue; - } Boolean containsView = (Boolean) child.getTag(TAG_CONTAINS_TRANSFORMED_VIEW); if (containsView == null) { // This one is unhandled, let's add it to our list. diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java index d15ab10e09ac5..c3f1cb1c7a93a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java @@ -69,7 +69,8 @@ public class TransformState { public void transformViewFrom(TransformState otherState, float transformationAmount) { mTransformedView.animate().cancel(); if (sameAs(otherState)) { - if (mTransformedView.getVisibility() == View.INVISIBLE) { + if (mTransformedView.getVisibility() == View.INVISIBLE + || mTransformedView.getAlpha() != 1.0f) { // We have the same content, lets show ourselves mTransformedView.setAlpha(1.0f); mTransformedView.setVisibility(View.VISIBLE);