Merge "Add new method to differentiate custom notifications" into udc-dev am: bda9feabf6

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22501282

Change-Id: Ia9f735a18948ee1e418882483ccc9a462abccdd8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Shuming Hao
2023-04-07 17:53:36 +00:00
committed by Automerger Merge Worker

View File

@@ -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
*