diff options
| author | Mady Mellor <madym@google.com> | 2019-03-27 14:03:46 -0700 |
|---|---|---|
| committer | Mady Mellor <madym@google.com> | 2019-03-28 13:07:17 -0700 |
| commit | 7eb18efce482b5b824bf40e0f8b3104a9dee231d (patch) | |
| tree | 81c1018bf8eb893f9997c9f637ad0c3105cce05b /core/java | |
| parent | e456bdf2d0b60eb6e8dae67094f500ff5b28e896 (diff) | |
Introduce FLAG_BUBBLE & mark notifs allowed to bubble with it
- It's a hidden flag
- This just marks the notifs but doesn't actually do anything else
- Tests that the flag is added appropriately
Bug: 128459529
Test: atest NotificationManagerServiceTest
Change-Id: I291911ead540a9c6e7f99716d0730b1faaf5533b
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/app/Notification.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index 5549d6b80ea6..11fa343df0d3 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -617,6 +617,13 @@ public class Notification implements Parcelable */ public static final int FLAG_CAN_COLORIZE = 0x00000800; + /** + * Bit to be bitswised-ored into the {@link #flags} field that should be + * set if this notification can be shown as a bubble. + * @hide + */ + public static final int FLAG_BUBBLE = 0x00001000; + public int flags; /** @hide */ @@ -6243,6 +6250,15 @@ public class Notification implements Parcelable return false; } + /** + * @return true if this is a notification that can show as a bubble. + * + * @hide + */ + public boolean isBubbleNotification() { + return (flags & Notification.FLAG_BUBBLE) != 0; + } + private boolean hasLargeIcon() { return mLargeIcon != null || largeIcon != null; } |
