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

Commit 9a796f3b authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Prevent Conversations from using custom views.

Conversations with custom views do not look like conversations, and mess with the consistency of the shade and cause users confusion about why a totally normal-looking notification marked as silent is not int he silent section of the shade.

Flag: android.app.notification_no_custom_view_conversations
Fixes: 368817201
Test: validated with culprit app's notification
Change-Id: Id34a532e04c03cd4a1af36c205fb72356312f72f
parent aa594514
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -8839,6 +8839,16 @@ 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.
+8 −1
Original line number Diff line number Diff line
@@ -104,6 +104,13 @@ flag {
  bug: "339523906"
}

flag {
  name: "notification_no_custom_view_conversations"
  namespace: "systemui"
  description: "Ensures that conversations are not allowed to use Custom Views."
  bug: "368817201"
}

flag {
  name: "keyguard_private_notifications"
  namespace: "systemui"