diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index f80373912dcbe..63da0a231286e 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -7015,6 +7015,22 @@ public class Notification implements Parcelable return isMediaStyle && hasMediaSession; } + /** + * @return true for custom notifications, including notifications + * with DecoratedCustomViewStyle or DecoratedMediaCustomViewStyle, + * and other notifications with user-provided custom views. + * + * @hide + */ + public Boolean isCustomNotification() { + if (contentView == null + && bigContentView == null + && headsUpContentView == null) { + return false; + } + return true; + } + /** * @return true if this notification is showing as a bubble *