From d06c41c970a4cf3ef23d4633ac2998496da0a0b6 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Mon, 6 Jul 2015 14:51:36 -0700 Subject: [PATCH] Fixed a bug where redacted notifications had the wrong height When redacted notifications were added on the lockscreen, it's size might have been incorrect sometimes. Bug: 22235304 Change-Id: I30f665bc8e725cdd40a20051e995b10e77f96918 --- .../statusbar/stack/NotificationStackScrollLayout.java | 8 ++++++++ 1 file changed, 8 insertions(+) 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 f98840b6e1390..36d33d9eca8fe 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java @@ -1763,6 +1763,7 @@ public class NotificationStackScrollLayout extends ViewGroup } private void onViewAddedInternal(View child) { + updateHideSensitiveForChild(child); mStackScrollAlgorithm.notifyChildrenChanged(this); ((ExpandableView) child).setOnHeightChangedListener(this); generateAddAnimation(child, false /* fromMoreCard */); @@ -1775,6 +1776,13 @@ public class NotificationStackScrollLayout extends ViewGroup } } + private void updateHideSensitiveForChild(View child) { + if (mAmbientState.isHideSensitive() && child instanceof ExpandableView) { + ExpandableView expandableView = (ExpandableView) child; + expandableView.setHideSensitiveForIntrinsicHeight(true); + } + } + public void notifyGroupChildRemoved(View row) { onViewRemovedInternal(row); }