From 16f334e5c1bfbb7af0f015211b3c09dafe0e998d Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Thu, 18 Jul 2019 16:00:55 -0700 Subject: [PATCH] Fixed the layout of media heads up notifications Previously the heads up layout was strangely clipped because we were using the expanded layout. We're now using the collapsed layout instead. In order to allow this, the media notification needs to wrap it's height properly. Fixes: 136507638 Test: show heads up media notification Change-Id: Ib091b0e776b5cd1a615c9ea0121a3115817b7f64 --- core/java/android/app/Notification.java | 3 +-- .../res/layout/notification_template_material_media.xml | 8 ++++---- core/res/res/values/dimens.xml | 2 +- core/res/res/values/symbols.xml | 1 + packages/SystemUI/res/values/dimens.xml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index 475dccb0923e2..f66448f518c83 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -8101,8 +8101,7 @@ public class Notification implements Parcelable */ @Override public RemoteViews makeHeadsUpContentView(boolean increasedHeight) { - RemoteViews expanded = makeMediaBigContentView(); - return expanded != null ? expanded : makeMediaContentView(); + return makeMediaContentView(); } /** @hide */ diff --git a/core/res/res/layout/notification_template_material_media.xml b/core/res/res/layout/notification_template_material_media.xml index 13fef67c5e2f2..575295b1be459 100644 --- a/core/res/res/layout/notification_template_material_media.xml +++ b/core/res/res/layout/notification_template_material_media.xml @@ -15,7 +15,7 @@ ~ limitations under the License --> - - + diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml index 039bc4d925a1c..665387943bbd8 100644 --- a/core/res/res/values/dimens.xml +++ b/core/res/res/values/dimens.xml @@ -279,7 +279,7 @@ 1dp - 92dp + 106dp 64dp diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index d13c715db4681..1f5a0100a0a71 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -3797,6 +3797,7 @@ + diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index aa25cf9996366..bef1fc2f271cf 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -112,7 +112,7 @@ 17dp - 106dp + @*android:dimen/notification_min_height 146dp