Loading core/java/android/app/Notification.java +13 −3 Original line number Diff line number Diff line Loading @@ -5999,8 +5999,10 @@ public class Notification implements Parcelable setHeaderlessVerticalMargins(contentView, p, hasSecondLine); // Update margins to leave space for the top line (but not for headerless views like // HUNS, which use a different layout that already accounts for that). if (Flags.notificationsRedesignTemplates() && !p.mHeaderless) { // HUNS, which use a different layout that already accounts for that). Templates that // have content that will be displayed under the small icon also use a different margin. if (Flags.notificationsRedesignTemplates() && !p.mHeaderless && !p.mHasContentInLeftMargin) { int margin = getContentMarginTop(mContext, R.dimen.notification_2025_content_margin_top); contentView.setViewLayoutMargin(R.id.notification_main_column, Loading Loading @@ -9502,7 +9504,8 @@ public class Notification implements Parcelable .text(null) .hideLeftIcon(isOneToOne) .hideRightIcon(hideRightIcons || isOneToOne) .headerTextSecondary(isHeaderless ? null : conversationTitle); .headerTextSecondary(isHeaderless ? null : conversationTitle) .hasContentInLeftMargin(true); RemoteViews contentView = mBuilder.applyStandardTemplateWithActions( isConversationLayout ? mBuilder.getConversationLayoutResource() Loading Loading @@ -14673,6 +14676,7 @@ public class Notification implements Parcelable Icon mPromotedPicture; boolean mCallStyleActions; boolean mAllowTextWithProgress; boolean mHasContentInLeftMargin; int mTitleViewId; int mTextViewId; @Nullable CharSequence mTitle; Loading @@ -14698,6 +14702,7 @@ public class Notification implements Parcelable mPromotedPicture = null; mCallStyleActions = false; mAllowTextWithProgress = false; mHasContentInLeftMargin = false; mTitleViewId = R.id.title; mTextViewId = R.id.text; mTitle = null; Loading Loading @@ -14764,6 +14769,11 @@ public class Notification implements Parcelable return this; } public StandardTemplateParams hasContentInLeftMargin(boolean hasContentInLeftMargin) { mHasContentInLeftMargin = hasContentInLeftMargin; return this; } final StandardTemplateParams hideSnoozeButton(boolean hideSnoozeButton) { this.mHideSnoozeButton = hideSnoozeButton; return this; core/res/res/layout/notification_2025_template_expanded_messaging.xml +1 −2 Original line number Diff line number Diff line Loading @@ -36,14 +36,13 @@ android:clipChildren="false" android:orientation="vertical"> <!-- Note: the top margin is being set in code based on the estimated space needed for the header text. --> <com.android.internal.widget.RemeasuringLinearLayout android:id="@+id/notification_main_column" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="top" android:layout_weight="1" android:layout_marginTop="@dimen/notification_2025_header_height" android:layout_marginEnd="@dimen/notification_content_margin_end" android:orientation="vertical" android:clipChildren="false" Loading Loading
core/java/android/app/Notification.java +13 −3 Original line number Diff line number Diff line Loading @@ -5999,8 +5999,10 @@ public class Notification implements Parcelable setHeaderlessVerticalMargins(contentView, p, hasSecondLine); // Update margins to leave space for the top line (but not for headerless views like // HUNS, which use a different layout that already accounts for that). if (Flags.notificationsRedesignTemplates() && !p.mHeaderless) { // HUNS, which use a different layout that already accounts for that). Templates that // have content that will be displayed under the small icon also use a different margin. if (Flags.notificationsRedesignTemplates() && !p.mHeaderless && !p.mHasContentInLeftMargin) { int margin = getContentMarginTop(mContext, R.dimen.notification_2025_content_margin_top); contentView.setViewLayoutMargin(R.id.notification_main_column, Loading Loading @@ -9502,7 +9504,8 @@ public class Notification implements Parcelable .text(null) .hideLeftIcon(isOneToOne) .hideRightIcon(hideRightIcons || isOneToOne) .headerTextSecondary(isHeaderless ? null : conversationTitle); .headerTextSecondary(isHeaderless ? null : conversationTitle) .hasContentInLeftMargin(true); RemoteViews contentView = mBuilder.applyStandardTemplateWithActions( isConversationLayout ? mBuilder.getConversationLayoutResource() Loading Loading @@ -14673,6 +14676,7 @@ public class Notification implements Parcelable Icon mPromotedPicture; boolean mCallStyleActions; boolean mAllowTextWithProgress; boolean mHasContentInLeftMargin; int mTitleViewId; int mTextViewId; @Nullable CharSequence mTitle; Loading @@ -14698,6 +14702,7 @@ public class Notification implements Parcelable mPromotedPicture = null; mCallStyleActions = false; mAllowTextWithProgress = false; mHasContentInLeftMargin = false; mTitleViewId = R.id.title; mTextViewId = R.id.text; mTitle = null; Loading Loading @@ -14764,6 +14769,11 @@ public class Notification implements Parcelable return this; } public StandardTemplateParams hasContentInLeftMargin(boolean hasContentInLeftMargin) { mHasContentInLeftMargin = hasContentInLeftMargin; return this; } final StandardTemplateParams hideSnoozeButton(boolean hideSnoozeButton) { this.mHideSnoozeButton = hideSnoozeButton; return this;
core/res/res/layout/notification_2025_template_expanded_messaging.xml +1 −2 Original line number Diff line number Diff line Loading @@ -36,14 +36,13 @@ android:clipChildren="false" android:orientation="vertical"> <!-- Note: the top margin is being set in code based on the estimated space needed for the header text. --> <com.android.internal.widget.RemeasuringLinearLayout android:id="@+id/notification_main_column" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="top" android:layout_weight="1" android:layout_marginTop="@dimen/notification_2025_header_height" android:layout_marginEnd="@dimen/notification_content_margin_end" android:orientation="vertical" android:clipChildren="false" Loading