From 60122be6747c4f79b96f6808158f8f7e7548b7d3 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Wed, 15 Apr 2015 18:16:50 -0700 Subject: [PATCH] Fixed a bug where the notification size was incorrect When an activity was shown and the device was locked the notification had the wrong size if they were redacted. Bug: 20086154 Change-Id: I37448a2ba1c027cffd1f945b031d08f0fd90f638 --- .../systemui/statusbar/ExpandableNotificationRow.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java index 33a07d99ce763..cb8217e26f2f7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java @@ -62,7 +62,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { private boolean mShowingPublic; private boolean mSensitive; private boolean mShowingPublicInitialized; - private boolean mShowingPublicForIntrinsicHeight; + private boolean mHideSensitiveForIntrinsicHeight; /** * Is this notification expanded by the system. The expansion state can be overridden by the @@ -570,13 +570,15 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { } boolean inExpansionState = isExpanded(); int maxContentHeight; - if (mIsHeadsUp) { + if (mSensitive && mHideSensitiveForIntrinsicHeight) { + return mRowMinHeight; + } else if (mIsHeadsUp) { if (inExpansionState) { maxContentHeight = Math.max(mMaxExpandHeight, mHeadsUpHeight); } else { maxContentHeight = Math.max(mRowMinHeight, mHeadsUpHeight); } - } else if ((!inExpansionState && !mChildrenExpanded) || mShowingPublicForIntrinsicHeight) { + } else if ((!inExpansionState && !mChildrenExpanded)) { maxContentHeight = mRowMinHeight; } else if (mChildrenExpanded) { maxContentHeight = mChildrenContainer.getIntrinsicHeight(); @@ -661,7 +663,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { } public void setHideSensitiveForIntrinsicHeight(boolean hideSensitive) { - mShowingPublicForIntrinsicHeight = mSensitive && hideSensitive; + mHideSensitiveForIntrinsicHeight = hideSensitive; } public void setHideSensitive(boolean hideSensitive, boolean animated, long delay,