Fix/hack MessagingStyle notifications
* Restore the icon size to 36dp * Give them increased height to accommodate the legacy layouts Bug: 163626038 Bug: 173204301 Test: manual Change-Id: Ib6b178b56f094e3053fc7e1d1b459c6f38b15385
This commit is contained in:
@@ -734,7 +734,7 @@
|
||||
<!-- The maximum size of the grayscale icon -->
|
||||
<dimen name="notification_grayscale_icon_max_size">256dp</dimen>
|
||||
|
||||
<dimen name="messaging_avatar_size">@dimen/notification_right_icon_size</dimen>
|
||||
<dimen name="messaging_avatar_size">36dp</dimen>
|
||||
<dimen name="conversation_avatar_size">52dp</dimen>
|
||||
<!-- start margin of the icon circle in the conversation's skin of the header -->
|
||||
<dimen name="conversation_icon_circle_start">28dp</dimen>
|
||||
|
||||
@@ -70,6 +70,7 @@ import com.android.internal.logging.MetricsLogger;
|
||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.internal.util.ContrastColorUtil;
|
||||
import com.android.internal.widget.CachingIconView;
|
||||
import com.android.internal.widget.MessagingLayout;
|
||||
import com.android.systemui.Dependency;
|
||||
import com.android.systemui.Interpolators;
|
||||
import com.android.systemui.R;
|
||||
@@ -654,6 +655,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
|
||||
View expandedView = layout.getExpandedChild();
|
||||
boolean isMediaLayout = expandedView != null
|
||||
&& expandedView.findViewById(com.android.internal.R.id.media_actions) != null;
|
||||
boolean isMessagingLayout = layout.getContractedChild() instanceof MessagingLayout;
|
||||
boolean showCompactMediaSeekbar = mMediaManager.getShowCompactMediaSeekbar();
|
||||
|
||||
if (customView && beforeS && !mIsSummaryWithChildren) {
|
||||
@@ -666,6 +668,12 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
|
||||
}
|
||||
} else if (isMediaLayout && showCompactMediaSeekbar) {
|
||||
minHeight = mNotificationMinHeightMedia;
|
||||
} else if (isMessagingLayout) {
|
||||
// TODO(b/173204301): MessagingStyle notifications currently look broken when we enforce
|
||||
// the standard notification height, so we have to afford them more vertical space to
|
||||
// make sure we don't crop them terribly. We actually need to revisit this and give
|
||||
// them a headerless design, then remove this hack.
|
||||
minHeight = mNotificationMinHeightLarge;
|
||||
} else if (mUseIncreasedCollapsedHeight && layout == mPrivateLayout) {
|
||||
minHeight = mNotificationMinHeightLarge;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user