summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Selim Cinek <cinek@google.com> 2020-05-22 01:15:07 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-05-22 01:15:07 +0000
commit47716cba4bcae78d75af12d481c7892f62c93dbf (patch)
tree692e59ca83c41a829048e7e78758ea51aeff2d2b
parent7b42f2d3e549e8fc25005d096e8253f400a799c7 (diff)
parenta5a4ee43eba38d39e8fffc91b663f63502e4e3a3 (diff)
Merge "Ensured that the gut's bounds update properly" into rvc-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java11
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationInfo.java11
2 files changed, 20 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java
index 863951e655e9..e0583be1935d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java
@@ -117,6 +117,7 @@ public class NotificationConversationInfo extends LinearLayout implements
@VisibleForTesting
boolean mSkipPost = false;
+ private int mActualHeight;
@Retention(SOURCE)
@IntDef({ACTION_DEFAULT, ACTION_HOME, ACTION_FAVORITE, ACTION_SNOOZE, ACTION_MUTE,
@@ -582,7 +583,15 @@ public class NotificationConversationInfo extends LinearLayout implements
@Override
public int getActualHeight() {
- return getHeight();
+ // Because we're animating the bounds, getHeight will return the small height at the
+ // beginning of the animation. Instead we'd want it to already return the end value
+ return mActualHeight;
+ }
+
+ @Override
+ protected void onLayout(boolean changed, int l, int t, int r, int b) {
+ super.onLayout(changed, l, t, r, b);
+ mActualHeight = getHeight();
}
@VisibleForTesting
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationInfo.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationInfo.java
index 08affa868073..91c31cf58ea0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationInfo.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationInfo.java
@@ -71,6 +71,7 @@ import java.util.Set;
*/
public class NotificationInfo extends LinearLayout implements NotificationGuts.GutsContent {
private static final String TAG = "InfoGuts";
+ private int mActualHeight;
@IntDef(prefix = { "ACTION_" }, value = {
ACTION_NONE,
@@ -583,7 +584,15 @@ public class NotificationInfo extends LinearLayout implements NotificationGuts.G
@Override
public int getActualHeight() {
- return getHeight();
+ // Because we're animating the bounds, getHeight will return the small height at the
+ // beginning of the animation. Instead we'd want it to already return the end value
+ return mActualHeight;
+ }
+
+ @Override
+ protected void onLayout(boolean changed, int l, int t, int r, int b) {
+ super.onLayout(changed, l, t, r, b);
+ mActualHeight = getHeight();
}
@VisibleForTesting