From a738ca4170a8fe6f871c75bcb17960bdaeac8c56 Mon Sep 17 00:00:00 2001 From: Steve Elliott Date: Mon, 24 Feb 2020 17:36:17 -0500 Subject: Increase avatar and sender name sizes in MessagingStyle Bug: 146664602 Test: manual Change-Id: Ibdb11de94bbc2482fca36bd9e9e320867c1d9620 --- core/res/res/values/dimens.xml | 2 +- core/res/res/values/styles_device_defaults.xml | 5 ++++- packages/SystemUI/res/values/dimens.xml | 3 +++ .../statusbar/notification/row/ExpandableNotificationRow.java | 10 ++++++++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml index 4f221d0d85fd..e1d94f50f260 100644 --- a/core/res/res/values/dimens.xml +++ b/core/res/res/values/dimens.xml @@ -685,7 +685,7 @@ @dimen/notification_right_icon_size - @dimen/notification_right_icon_size + 52dp 24dp diff --git a/core/res/res/values/styles_device_defaults.xml b/core/res/res/values/styles_device_defaults.xml index 64768cf4c730..966f495c96e5 100644 --- a/core/res/res/values/styles_device_defaults.xml +++ b/core/res/res/values/styles_device_defaults.xml @@ -146,7 +146,7 @@ easier. @style/TextAppearance.DeviceDefault.Notification + diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 1c2404f1921e..9caaa9f8565d 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -124,6 +124,9 @@ 160dp + + 118dp + 64dp diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java index 500813318484..97755fcb8ea9 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java @@ -28,6 +28,7 @@ import android.animation.ObjectAnimator; import android.animation.ValueAnimator.AnimatorUpdateListener; import android.annotation.NonNull; import android.annotation.Nullable; +import android.app.Notification; import android.app.NotificationChannel; import android.content.Context; import android.content.pm.PackageInfo; @@ -148,6 +149,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView private int mNotificationMinHeight; private int mNotificationMinHeightLarge; private int mNotificationMinHeightMedia; + private int mNotificationMinHeightMessaging; private int mNotificationMaxHeight; private int mIncreasedPaddingBetweenElements; private int mNotificationLaunchHeight; @@ -630,10 +632,16 @@ public class ExpandableNotificationRow extends ActivatableNotificationView && expandedView.findViewById(com.android.internal.R.id.media_actions) != null; boolean showCompactMediaSeekbar = mMediaManager.getShowCompactMediaSeekbar(); + Class style = + mEntry.getSbn().getNotification().getNotificationStyle(); + boolean isMessagingLayout = Notification.MessagingStyle.class.equals(style); + if (customView && beforeP && !mIsSummaryWithChildren) { minHeight = beforeN ? mNotificationMinHeightBeforeN : mNotificationMinHeightBeforeP; } else if (isMediaLayout && showCompactMediaSeekbar) { minHeight = mNotificationMinHeightMedia; + } else if (isMessagingLayout) { + minHeight = mNotificationMinHeightMessaging; } else if (mUseIncreasedCollapsedHeight && layout == mPrivateLayout) { minHeight = mNotificationMinHeightLarge; } else { @@ -1635,6 +1643,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView R.dimen.notification_min_height_increased); mNotificationMinHeightMedia = NotificationUtils.getFontScaledHeight(mContext, R.dimen.notification_min_height_media); + mNotificationMinHeightMessaging = NotificationUtils.getFontScaledHeight(mContext, + R.dimen.notification_min_height_messaging); mNotificationMaxHeight = NotificationUtils.getFontScaledHeight(mContext, R.dimen.notification_max_height); mMaxHeadsUpHeightBeforeN = NotificationUtils.getFontScaledHeight(mContext, -- cgit v1.2.3-59-g8ed1b