Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4fba341d authored by Caitlin Shkuratov's avatar Caitlin Shkuratov
Browse files

[SB][Notif] Stop HUN animation at status bar if HUN has notif chip.

If a notification has a status bar chip, we don't want the HUN animation
to cover that chip. This is especially obvious if you tap the status bar
chip to show the HUN, but in general we don't want the HUN to obscure
the chip.

This CL does this by having NotificationStackScrollLayoutController
maintain a list of currently visible chips.
 - For the appear animation, the new HeadsUpAnimationEvent class stores
   whether there's a status bar chip and StackStateAnimator uses it.
 - For the disappear animation, we set the status bar chip status on the
   ExpandableNotificationRow and StackScrollAlgorithm uses it.

This also should be pretty extensible if we later want the HUN appear
animation to come from the chip or the HUN disappear animation to return
back into the chip.

Fixes: 393369891
Bug: 364653005
Flag: com.android.systemui.status_bar_notification_chips

Test: Send promoted notification, tap status bar chip -> verify HUN
animation starts and stops at the status bar height for both folded &
unfolded
Test: Trigger normal HUN -> verify HUN animation goes on top of status
bar like usual
Test: Tap status bar chip then open that notification's app -> verify
HUN disappear animation goes on top of status bar like usual
Test: Trigger a promoted notification HUN while that app is visible,
then close app before HUN animates away -> verify HUN disappear
animation stops at status bar

Test: atest HeadsUpAnimatorTest StackStateAnimatorTest
StackScrollAlgorithmTest

Change-Id: Ib170238f2e2084120777ae2885e64d8e7b2eb68b
parent bdb2c65f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment