[Notifs] Replace `isPinned` boolean with a 3-option enum instead.
Currently, notifications can only be shown heads up if we decide the notification should be heads up when it's added or updated. With the status bar notification chips, notifications will *also* be shown heads up if the user taps on the notification chip. The status bar needs to have different behavior based on whether the notification is HUNing because it was added/updated or because the user tapped on the chip: - If added/updated like normal: Hide the clock, show just the new notification icon, hide the chips - If user tapped on chip: Show clock, show the chip, hide the notification icons This CL replaces the `isPinned` boolean with a 3-option enum so that we know *why* a notification is being shown heads-up. A future CL will use PinnedStatus.PinnedDueToChip when the user taps on a chip and update the status bar behavior accordingly. Bug: 364653005 Flag: EXEMPT refactor Test: Key notification CUJs work: - Receive notif while unlocked -> notif HUNs - Swipe up on HUN -> notif snoozed - Swipe left/right on HUN -> notif dismissed - Tap on HUN -> launches activity - Receive notif while locked with bypass enabled -> notif HUNs - Receive notif while locked with bypass disabled -> notif becomes part of stack - Enable notification cooldown -> notifs cool down Test: atest BaseHeadsUpManagerTest HeadsUpManagerPhoneTest Change-Id: Ic60a75e8651a02aa7d7b435f39a01c634332e0c0
Loading
Please register or sign in to comment