diff options
| -rw-r--r-- | core/java/android/app/Notification.java | 10 | ||||
| -rw-r--r-- | services/core/java/com/android/server/notification/NotificationRecord.java | 10 |
2 files changed, 7 insertions, 13 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index a6338fbd6b77..dce15b833bbb 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -8937,16 +8937,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. * diff --git a/services/core/java/com/android/server/notification/NotificationRecord.java b/services/core/java/com/android/server/notification/NotificationRecord.java index 1def7ec1753b..5a58f457ba08 100644 --- a/services/core/java/com/android/server/notification/NotificationRecord.java +++ b/services/core/java/com/android/server/notification/NotificationRecord.java @@ -1681,9 +1681,13 @@ public final class NotificationRecord { } if (mTargetSdkVersion >= Build.VERSION_CODES.R - && notification.isStyle(Notification.MessagingStyle.class) - && (mShortcutInfo == null || isOnlyBots(mShortcutInfo.getPersons()))) { - return false; + && 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; |