Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1dac6ad1 authored by Ioana Alexandru's avatar Ioana Alexandru
Browse files

Rename hasContentInLeftMargin

Switch to a more accurate name, since we need this to be false for
conversations even if they do, in fact, have content in the left
margin. The purpose of this param is essentially to skipp setting the
special top margin for aligning the content under the top line view.

Bug: 378660052
Flag: android.app.notifications_redesign_templates
Test: builds
Change-Id: I7891c5c55bd37b075f1c025c819f05b7cd22d540
parent 83e10599
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -6002,7 +6002,7 @@ public class Notification implements Parcelable
            // 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) {
                    && !p.mHeaderless && !p.mSkipTopLineAlignment) {
                int margin = getContentMarginTop(mContext,
                        R.dimen.notification_2025_content_margin_top);
                contentView.setViewLayoutMargin(R.id.notification_main_column,
@@ -9503,7 +9503,7 @@ public class Notification implements Parcelable
                    .hideLeftIcon(isOneToOne)
                    .hideRightIcon(hideRightIcons || isOneToOne)
                    .headerTextSecondary(isHeaderless ? null : conversationTitle)
                    .hasContentInLeftMargin(true);
                    .skipTopLineAlignment(true);
            RemoteViews contentView = mBuilder.applyStandardTemplateWithActions(
                    isConversationLayout
                            ? mBuilder.getConversationLayoutResource()
@@ -14681,7 +14681,7 @@ public class Notification implements Parcelable
        Icon mPromotedPicture;
        boolean mCallStyleActions;
        boolean mAllowTextWithProgress;
        boolean mHasContentInLeftMargin;
        boolean mSkipTopLineAlignment;
        int mTitleViewId;
        int mTextViewId;
        @Nullable CharSequence mTitle;
@@ -14707,7 +14707,7 @@ public class Notification implements Parcelable
            mPromotedPicture = null;
            mCallStyleActions = false;
            mAllowTextWithProgress = false;
            mHasContentInLeftMargin = false;
            mSkipTopLineAlignment = false;
            mTitleViewId = R.id.title;
            mTextViewId = R.id.text;
            mTitle = null;
@@ -14774,8 +14774,8 @@ public class Notification implements Parcelable
            return this;
        }
        public StandardTemplateParams hasContentInLeftMargin(boolean hasContentInLeftMargin) {
            mHasContentInLeftMargin = hasContentInLeftMargin;
        public StandardTemplateParams skipTopLineAlignment(boolean skipTopLineAlignment) {
            mSkipTopLineAlignment = skipTopLineAlignment;
            return this;
        }