Merge "Fixed an issue where notifications wouldn't animate on height change" into sc-dev am: cf3dbf7a4d am: ad4f48badc

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15080838

Change-Id: I8c59e066e1dbd3628520d8683f0454574cc4fdca
This commit is contained in:
Selim Cinek
2021-06-24 14:34:54 +00:00
committed by Automerger Merge Worker

View File

@@ -2482,7 +2482,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
protected void onLayout(boolean changed, int left, int top, int right, int bottom) { protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
int intrinsicBefore = getIntrinsicHeight(); int intrinsicBefore = getIntrinsicHeight();
super.onLayout(changed, left, top, right, bottom); super.onLayout(changed, left, top, right, bottom);
if (intrinsicBefore != getIntrinsicHeight() && intrinsicBefore != 0) { if (intrinsicBefore != getIntrinsicHeight()
&& (intrinsicBefore != 0 || getActualHeight() > 0)) {
notifyHeightChanged(true /* needsAnimation */); notifyHeightChanged(true /* needsAnimation */);
} }
if (mMenuRow != null && mMenuRow.getMenuView() != null) { if (mMenuRow != null && mMenuRow.getMenuView() != null) {