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

Commit 264c92d9 authored by Jeff DeCew's avatar Jeff DeCew Committed by Android (Google) Code Review
Browse files

Merge "Do not allow notifications with custom views in the Conversations section." into main

parents 165a8a55 16122118
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -8936,16 +8936,6 @@ public class Notification implements Parcelable
            }
        }
        /**
         * @hide
         */
        public boolean displayCustomViewInline() {
            // This is a lie; True is returned for conversations to make sure that the custom
            // view is not used instead of the template, but it will not actually be included.
            return Flags.notificationNoCustomViewConversations()
                    && mConversationType != CONVERSATION_TYPE_LEGACY;
        }
        /**
         * @return the text that should be displayed in the statusBar when heads upped.
         * If {@code null} is returned, the default implementation will be used.
+7 −3
Original line number Diff line number Diff line
@@ -1681,10 +1681,14 @@ public final class NotificationRecord {
        }

        if (mTargetSdkVersion >= Build.VERSION_CODES.R
                && notification.isStyle(Notification.MessagingStyle.class)
                && (mShortcutInfo == null || isOnlyBots(mShortcutInfo.getPersons()))) {
                && notification.isStyle(Notification.MessagingStyle.class)) {
            if (mShortcutInfo == null || isOnlyBots(mShortcutInfo.getPersons())) {
                return false;
            }
            if (Flags.notificationNoCustomViewConversations() && hasUndecoratedRemoteView()) {
                return false;
            }
        }
        if (mHasSentValidMsg && mShortcutInfo == null) {
            return false;
        }