Commit Graph

93 Commits

Author SHA1 Message Date
Jordan Demeulenaere
ccf94a1bbf Fix the SysUI dialogs size after rotating
This CL fixes a bug where the width of any SystemUIDialog animated by
DialogLaunchAnimator would be smaller than it was supposed to be. See
b/230825604#comment4 for more info.

Bug: 230825604
Test: Manual
Change-Id: Ief2265b93fb4e45138f2f8c890c085d00e86b76d
2022-05-14 00:27:17 +02:00
Luca Zuccarini
c54911bbe3 Add animateRemoval() to the ViewBoundAnimator API.
Allows the user to specify an destination for the addition animation,
and removes the view from the hierarchy animating it towards that
position.

Bug: 224980454
Test: manual and unit tests included
Change-Id: I3d5d6c839ce40d0684f1613f3d48545abde9c309
2022-04-25 16:34:22 +00:00
Luca Zuccarini
6a6305969f Merge "Remove the temporary bounds workaround from ViewBoundAnimator." into tm-dev 2022-04-07 15:06:06 +00:00
Luca Zuccarini
a58f3635a4 Merge "[ViewHierarchyAnimator] Remove all listeners at the end of an animation." into tm-dev 2022-04-07 13:05:04 +00:00
Riddle Hsu
a3348272e7 Merge "Pass background color from transition info to remote animation" into tm-dev 2022-04-07 08:41:17 +00:00
Luca Zuccarini
11d0f55753 [ViewHierarchyAnimator] Remove all listeners at the end of an animation.
Fixes: 228310296
Test: manual and unit tests
Change-Id: I3099ab440c7a219523df499834b3201ee072876a
2022-04-07 08:35:07 +00:00
Luca Zuccarini
0dc4634c7e Remove the temporary bounds workaround from ViewBoundAnimator.
Bug: 221418522
Test: manual and unit tests included
Change-Id: I3219f3c2fd9537b751af098eabe6877da8493c04
2022-04-01 15:04:29 +00:00
Luca Zuccarini
3ccbe8c15a Add animateAddition() to the ViewBoundAnimator API.
The goal is to have a clear API difference between views animating from
not being on screen to being visible and the normal view bound
animations.

Allows the user to specify an origin to the addition animation, and
animates the view starting from that position.

Bug: 224980562
Test: manual and unit tests included
Change-Id: If0e86a3d240582c3e276f76c029cb8d3251e82b0
2022-03-30 14:43:52 +00:00
Riddle Hsu
78c6b6b5fa Pass background color from transition info to remote animation
With shell transition, there won't be task info if the transition
is launching activity in the same task. ActivityLaunchAnimator
assumed the task info is non-null, which causes NPE.

Bug: 223397404
Test: adb shell setprop persist.wm.debug.shell_transit 1; reboot
      Long press quick settings tile from notification multiple
      time. Especially launch the same tile twice, systemui
      should not crash.
Change-Id: I0ad1fef17653d72162d430339ac7e8a716aa9bfe
2022-03-30 12:07:14 +00:00
chaviw
7b7dabc218 Force draw during a blast sync and disable rt animations
When ViewRootImpl is going to draw a frame due to a blast sync request,
we call forceDrawNextFrame to ensure we get a draw this vsync, even if
RT animation rendered a frame. This will ensure that we aren't required
to reschedule a draw either in rt thread or ui thread since we'll get a
frame back as long as there's an available buffer.

We also disable rt animations if a sync set has started with Syncer and
then re-enable when the sync set is complete. This ensures we don't
continue to acquire buffers for a render thread scheduled animation
during a UI animation since we want the UI request to get the buffer.

Test: Open internet dialog from notification shade on 60hz device
Fixes: 217621394
Bug: 200284684
Change-Id: Ic1534d21b0ee2ad82f20ff34df4cbbbad87557fd
2022-03-28 09:41:25 -05:00
chaviw
a2e1f4482a Remove consumeNextDraw and replace with SurfaceSyncer
Replace the usage of consumeNextDraw with the SurfaceSyncer since
it's safer and integrated with VRI in a cleaner way.

Test: Internet Dialog in Notification Shade
Bug: 200284684
Change-Id: Ia837086040329c5fd3b8bb5b0adb0fddb339f3f9
2022-03-24 16:18:37 -05:00
Luca Zuccarini
13d7c3eaae Rename ViewBoundAnimator -> ViewHierarchyAnimator.
This CL exists solely because git refuses to mark files as renamed if
the diff between the before and after is too large.

Bug: 224980562
Test: manual
Change-Id: Ie0c2a878437b189d523d7a6955baa125fd0b2998
2022-03-22 10:31:26 +00:00
Luca Zuccarini
cb5b5a93ee Create a ViewBoundAnimator to animate view layout updates.
Includes the ability of animating a single upcoming layout or all
following layouts until the animator is detached.

Bug: 221432937
Test: unit tests included, also manual
Change-Id: Ie15ab83b1b06ef4d0b388177682ed51479f37dc1
2022-03-09 15:28:39 +00:00
Jordan Demeulenaere
23653cfd20 Find a background to animate when launching a dialog or activity
This CL makes the launch animations a bit more robust by trying to find
a background in the View that is expanded into the activity/dialog
instead of just taking the View background (that can sometimes be null).

See b/222668708#comment1 and #comment2 for before/after videos.

Bug: 222668708
Test: Manual
Change-Id: I590b6d77a7c9b29a73f37e1f8072643cc8c0bcfa
2022-03-07 14:14:30 +01:00
TreeHugger Robot
f8575a83bd Merge "Allowing launch cookies to be passed via pending activity starts" into tm-dev 2022-02-25 00:21:27 +00:00
Selim Cinek
ad59468664 Allowing launch cookies to be passed via pending activity starts
When overriding pending activity starts using remote animations,
we're now also allowing the passage of a launch cookie to associate
the task with the launched app. This allows us to return to the
right widgets for certain apps using broadcast trampolines.

Fixes: 220290671
Test: add Photos widget, return properly to widget
Change-Id: I339ea827836fa53ab5bb1617a72f9e0e5ae0f5ec
2022-02-22 14:30:56 +00:00
Jordan Demeulenaere
8ca8c7b43d Fix the new QS footer buttons animation
This CL fixes the animation triggered when opening an app/dialog from
one of the new QS buttons.

Before this CL, the background of those buttons was oval and therefore
can't animate its radius.

This CL changes the oval shape by a rounded rectangle so that it can
properly animate the radius of the background.

Bug: 217196619
Test: Manual
Change-Id: I77ebbb9be62b3457844e06803ab3ce7b9af5d594
2022-02-22 10:28:48 +01:00
Jordan Demeulenaere
6e77c58de8 Animate dialog to app launches (1/2)
See b/214961273#comment1 and #comment2 for before/after videos as well
as technical explanations on how this animation works.

This CL also enables the generation of Java 8 default method bodies in
interfaces, in the animation library. This is necessary to avoid
unexpected behaviors when using @JvmDefault on an interface +
delegation, which is a common pattern when using the animation library.
See [1] and [2] for more info. Note that this is enabled only for the
animation library (and not SystemUI(Lib)) to avoid breaking code
depending on the (now deprecated) @JvmDefault method in SysUI.

[1] https://youtrack.jetbrains.com/issue/KT-34612
[2] https://blog.jetbrains.com/kotlin/2020/07/kotlin-1-4-m3-generating-default-methods-in-interfaces/

Bug: 214961273
Test: atest DialogLaunchAnimatorTest
Test: Manual
Change-Id: I27d53400a5dc852543a68f5b6f107d9eb08b06db
2022-02-16 14:42:03 +01:00
Evan Rosky
91a630b912 Hook up fixed-rotation logic to shell transitions
This works by separating an app launching to 2 phases
(similar to legacy fixed rotation). First it launches
the app into a different rotation. Once the animation
finishes it creates a new seamless display-rotation
transition.

Because we have displayRotation in windowconfiguration,
we can directly rotate a window's surface instead of
checking explicitly for fixedRotationState. Since the
second-phase is a transition, we don't (ab)use
seamlessRotator. Once the display lines-up, the
surfaces and configurations automatically update.

Since we still want to explore shell-transitions style
rotation (single-transition), add a system property
to turn it off and on.

Bug: 217560545
Test: existing tests and manual tests
Change-Id: I0b34b32ff5b2650a519d3c195df452de446cf515
2022-02-09 17:12:31 -08:00
Evan Rosky
d61906a562 Merge "Adapt shell transitions into legacy remote animations in systemui" 2022-02-09 00:41:34 +00:00
Evan Rosky
8d71275060 Adapt shell transitions into legacy remote animations in systemui
systemui also defines several remote animations. Given the number
and complexity of animation entry-points in sysui, insert a
cheeky hack to swap remotetransitions in for remoteanimations
when shell transitions are enabled.

Bug: 217810915
Test: Open quick-settings, poke Settings icon. Observe animation
      and no paus.
Change-Id: I462034210f28051a03812eb6ae650fa1f0446ef5
2022-02-07 11:24:24 -08:00
TreeHugger Robot
39d319b478 Merge "Disable dialog animation sync on low-RAM devices" 2022-02-03 08:56:56 +00:00
Peter Kalauskas
2c46106012 Disable dialog animation sync on low-RAM devices
In DialogLaunchAnimator, disable animation sync if device is low-RAM.
This is a mitigation to workaround a bug in animations sync which
currently causes the UI to freeze for 4s when opening a dialog on
certain devices.

Also, rename isForTesting to forceDisableSynchronization for clarity

Test: Tap "internet", "power", or "select-user" buttons in QS
Bug: 217621394
Bug: 216391326
Change-Id: I33117466b5002671ee086aedade56737b19c8edb
2022-02-02 16:44:01 -08:00
Josh Tsuji
a1322dee86 Uses ActivityLaunchAnimator for occlusion animations.
This is used when the lock screen is visible and an activity occludes it,
such as the camera. Currently, the camera launches behind the lock screen
and then the lock screen janks out of the way to show the camera.

There are currently some pretty severe performance issues, but I'm not sure
yet whether that's due to the new launch animator, or the fact that the
old animation is so janky that you can't really tell. I'm investigating
that, but we should get this into the build to start working out any bugs
with the remote occlude animations.

This requires remote occlude animations to be enabled:
adb shell setprop persist.wm.enable_remote_keyguard_animation 2

Test: atest SystemUITests
Bug: 197312643
Change-Id: Id801e44c25c6e2340b4269d215b9a1c056f0ceff
2022-02-02 15:22:23 -05:00
Jordan Demeulenaere
83dbe11921 Fade out UFPS icon when launching an app over it (1/2)
Before this CL, the UDFPS affordance would instantly disappear after
launching an Activity (like Device Controls) over the lockscreen.

This CL now nicely fades out the affordance during the launch animation,
unless the Activity requested the UDFPS (like the Wallet).

See b/213555622#comment1 for before/after videos.

Bug: 213555622
Test: Open device controls and wallet over lockscreen
Change-Id: I589a4a6c10a118d05fae87b70d14c924d468b63f
2022-01-10 11:08:06 +01:00
TreeHugger Robot
c917a93d54 Merge "Fix dialog accessibility issues." into sc-v2-dev am: 65ce0da897 am: 1f0415d24b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16477357

Change-Id: Iaf4377ed7488c4535b313fe15f8c159fe704899a
2021-12-15 17:18:35 +00:00
Jordan Demeulenaere
42c17888e8 Fix dialog accessibility issues.
This CL fixes some accessibility issues that would happen with dialogs
launched by the DialogLaunchAnimator. See bugs for more info.

Bug: 204944038
Bug: 208951968
Bug: 208951526
Fixes: 204944038
Fixes: 208951968
Fixes: 208951526
Test: Manual
Change-Id: I35b12a6e2bb2c4ae8556178fb634deb963457db6
2021-12-15 15:43:56 +01:00
Jordan Demeulenaere
f7d3ea8718 Merge changes Ia5accb74,Ic4d7def4,I30bd56fc into sc-v2-dev am: 7339a87bf3 am: 2b18ddbd1b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16357603

Change-Id: I1745d8adda977f90ef308e21c0dcc2e0ff0e1234
2021-12-07 10:56:05 +00:00
Jordan Demeulenaere
7339a87bf3 Merge changes Ia5accb74,Ic4d7def4,I30bd56fc into sc-v2-dev
* changes:
  Change DialogLaunchAnimator X-axis interpolator
  Extract interpolators and durations out of LaunchAnimator
  Synchronize dialog launch animation using BLAST
2021-12-07 10:09:36 +00:00
Jordan Demeulenaere
8c68088b67 Change DialogLaunchAnimator X-axis interpolator
This dialog changes the interpolator used to animate the X-axis position
of dialogs during the launch animation. This avoid animating the dialog
out of the screen bounds (see b/208241926#comment1).

Bug: 208241926
Test: Manual
Change-Id: Ia5accb747615fcc8410b5c488ff13617556305be
2021-12-06 17:09:45 +01:00
Jordan Demeulenaere
401bc29fac Extract interpolators and durations out of LaunchAnimator
This CL extracts the durations and interpolators from LaunchAnimator so
that we can use different durations and interpolators in the
DialogLaunchAnimator (compared to the ActivityLaunchAnimator).

This CL is a no-op and does not change the interpolators and durations
yet. Those will be changed in a follow-up CL.

Bug: 208241926
Test: Manual
Change-Id: Ic4d7def45cabc8c73700efcec67706eaf81b2b9e
2021-12-06 17:08:41 +01:00
Chris Li
d206f4b3a3 Merge "Do not use prefixOrderIndex for animation layer" into sc-v2-dev am: af715328d3 am: 2f7bdbc104
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16379907

Change-Id: I16eb1a80291217f66ae318391cd7cbe6f08241fb
2021-12-04 05:37:07 +00:00
Chris Li
91010a79de Do not use prefixOrderIndex for animation layer
We may set a z-order different from the prefix order, for example
TaskDisplayArea#adjustRootTaskLayer. As a result, we should no longer
set animation leash layer based on the prefix order.

Fix: 208793409
Test: manually test launching activity over another
Change-Id: If8d545ca7a9ac42162262ad3a8f95b4ac9f65585
2021-12-03 20:50:00 +08:00
Jordan Demeulenaere
9ba35a2704 Synchronize dialog launch animation using BLAST
This CL synchronizes the start of the launch and the end of the exit
dialog animations using BLAST. This replaces the previous
synchronization that was performed using preDraw listeners, which was
not optimal as it led to flickering (and was also slower).

Bug: 193634619
Test: Manual
Change-Id: I30bd56fcd082b76c4c7693da8c1d59bc2f6f781b
2021-12-03 12:11:02 +01:00
Jordan Demeulenaere
c40a7942ee Refactor DialogLaunchAnimator and remove host dialog (1/2) am: c424d4801f am: 9797237337
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16346347

Change-Id: I88cff2ce3ba91ca661ce10ec98e00f433f9b6a15
2021-12-01 14:00:37 +00:00
Jordan Demeulenaere
c424d4801f Refactor DialogLaunchAnimator and remove host dialog (1/2)
This CL is a refactoring of the DialogLaunchAnimator and a major change
in how it works internally.

Before this CL, when DialogLaunchAnimator.show(originalDialog, ...) was
called, it would create a fullscreen dialog (called hostDialog) to
which we would add the content view stolen from the originalDialog (that
would then be hidden). We would then run the launch animation in the
host dialog and listen for show(), hide() or dismiss() calls to the
originalDialog to know when we should show(), hide() or dismiss() the
hostDialog.

The main reason we did that was because there was no way to override the
dismiss() behavior of the originalDialog, which we need to do given that
we want to animate the dialog into the view that showed the dialog
before actually dismissing it.

This approach had multiple downsides:
 - We were showing the dialog content view inside a different window
   than the one in which it was created, therefore any change made to or
   any listener added to the originalDialog window was lost.
 - Code calling DialogLaunchAnimator.showFromView needed to know that
   their dialog content will be moved to another window, which is
   unexpected and can lead to subtle bugs.
 - We were waiting for 2 dialogs to be shown instead of 1 before being
   able to start the animation.

This CL does what we should have done since the beginning: it adds a
hidden API to Dialog so that we can override what happens when
Dialog.dismiss() is called. This allows the DialogLaunchAnimator to run
the exit animation into the view that triggered the dialog before
actually dismissing it. The only modification that
DialogLaunchAnimator.show(originalDialog, ...) now does to the
originalDialog is making its window fullscreen and inserting two views
between the originalDialog DecorView and its children. The first
inserted view is a fullscreen transparent background used to dismiss the
dialog when the user taps outside the dialog content. The second
inserted view is a View that we size and position the same way that the
DecorView was before we made it fullscreen, and to which we set the
originalDialog background. This view now serves as a "fake window" with
the same size, background and position as the original window
(DecorView).

This CL improves the time to start the launch animation by 20-25%
(measured in a totally unrigorous logcat way).

Bug: 193634619
Test: atest DialogLaunchAnimatorTest
Change-Id: If09eda7b06e83b3ed7714cec97afef08b3d9fd3e
2021-12-01 10:53:23 +01:00
Jordan Demeulenaere
df8f2a9001 Merge "Animate the power menu when triggered from QS" into sc-v2-dev am: f1650d861b am: b00e0e0d21
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16214754

Change-Id: I5104fa833dd1c3db7c479dbe1eafe60ec81f0da4
2021-11-26 09:40:59 +00:00
Jordan Demeulenaere
95b7f9b071 Animate the power menu when triggered from QS
This CL animates the power menu when it is triggered from its QS button.
It does that by first adding support for fullscreen dialogs in
DialogLaunchAnimator, given that the power menu dialog is fullscreen for
legacy reasons.
Note that I first tried to migrate it to a non fullscreen dialog, but I
hit issues with the ConstraintLayout + Flow that are used to display the
grid of the power menu items (see b/206097842 for more info).

In this CL, I also removed:
 - Custom window flags that were added in the past and don't seem to be
   needed anymore.
 - The handwritten animation when triggering from the power button. We
   now simply fade the dialog in/out like we animate all the other
   dialogs (approved by UX in b/202257171#comment16). I will improve
   this default animation in a follow-up CL too.
 - Some dialog reinflation that would happen when the configuration or
   UI mode would change. For the former, I still make sure that we
   recompute the maximum number of items per row. For the latter, it
   would not happen while this dialog is shown as changing the UI mode
   would require dismissing the dialog first anyways.

See b/202257171#comment11 for a video.

Bug: 202257171
Test: Manual
Test: atest GlobalActionsDialogLiteTest
Change-Id: Ib5facb579c8dce114f29c07502a4a10b50d281be
2021-11-25 14:46:40 +01:00
Bill Lin
e12377c5eb 1/ Inject InteractionJankMonitor for unit test
This purpose of InteractionJankMonitor.begin() and
InteractionJankMonitor.end() is used for e2e tests
(scenario / latency / benchmark tests)

SysUI had setup dagger for InteractionJankMonitor,
it would be helpful on unittest if inject instance
in SysUI code directly.

Test: atest SystemUITests
Bug: 206720526
Change-Id: I59af3f444bbc836c2ae2c0ef0803f788dba9ab46
2021-11-22 10:03:45 +08:00
Fabian Kozynski
6bdb2f1f27 Animate dialog stack and use in UserSwitcher
Allows to dismiss a dialog stack (dialogs launched from dialog content)
by dismissing the top one to the original touchSurface. After this, all
the intermediate dialogs are dismissed.

Use this in the user switcher dialog.

When adding users, the dialog that opens to set the name and picture is
not part of this stack (it's a separate activity), so the dialog stack
is collapsed before launching the activity.

Test: atest SystemUITests
Bug: 185360864
Change-Id: Ife8e0f9189783b69034ce660d1075c3f76fbbf06
2021-11-16 13:24:09 -05:00
Fabian Kozynski
327d67cb2a [DO NOT MERGE] Animate dialog stack and use in UserSwitcher
Allows to dismiss a dialog stack (dialogs launched from dialog content)
by dismissing the top one to the original touchSurface. After this, all
the intermediate dialogs are dismissed.

Use this in the user switcher dialog.

When adding users, the dialog that opens to set the name and picture is
not part of this stack (it's a separate activity), so the dialog stack
is collapsed before launching the activity.

Test: atest SystemUITests
Bug: 185360864
Change-Id: Ife8e0f9189783b69034ce660d1075c3f76fbbf06
2021-11-16 13:23:55 -05:00
Jordan Demeulenaere
79bd0cafdd Fix regression when launching the media output dialog
This CL fixes a regression that was caused by ag/16191211: when opening
the media output dialog, we would animate from the media dialog content
instead of its parent (that has the dialog background).

This CL changes that by detecting that the view we are launching from is
actually the content of a dialog that was animated using
DialogLaunchAnimator, and animates its parent to also animate the
background.

See b/200781817#comment8 for before/after videos.

Bug: 200781817
Test: Manual
Change-Id: I20cf8bdff8b6d29e9aa458f96d65851a0298f98d
2021-11-12 14:32:27 +01:00
Jordan Demeulenaere
b905ab10df Animate the Internet dialog height changes
This CL animates the height of the Internet dialog when it changes,
using a custom layout animator.

Note that I have tried using TransitionManager to get a better animation
(that would also properly fade elements in & out) but hit a few bugs
that made me lose confidence in TM (see b/203045010).

See b/201046726#comment20 for a video.

Bug: 201046726
Test: Manual
Change-Id: I02a0bfe67b705ea68e0d82a310a4361a94c1200d
2021-11-09 14:31:14 +01:00
Jordan Demeulenaere
f928f5b2e3 Wrap animated dialog view inside another view
Before this CL, when animating a dialog from a View, we would extract
the original dialog Window background and set it as the background of
the original dialog content View. This would cause problems if that
original dialog content View had some paddings and if the background had
insets, as setting the View background would mess up the View paddings.

This CL now adds an additional View between the host dialog root and the
original dialog content Wiew. We set the original dialog Window
background to this additional View, so that the original dialog View
remains unchanged.

Bug: 193634619
Test: atest DialogLaunchAnimatorTest
Test: Manual, launch the User Switcher dialog and observe that the
      paddings are correct.
Change-Id: I64e688431c2d205f0cf200b9debfe195dc3e2364
2021-11-04 11:20:12 +01:00
Jordan Demeulenaere
2642eed1f1 Resize dialogs when the configuration changes
Before this CL, system dialogs would not react to configuration changes,
which would cause weird UI issues when folding into a smaller screen.

This CL makes all SystemUIDialog's listen for configuration changes, and
resize their window accordingly.

Bug: 204042506
Test: Manual
Change-Id: I4cf1dbfff2a95c83ed3e240d165eae60660c429b
2021-11-03 14:44:21 +01:00
Jordan Demeulenaere
2d5edc3344 Disable dialog exit animation when locking (1/2)
Before this CL, when an animated dialog was dismissed because we were
locking the device, we would run the exit animation while fading out the
dialog window with the current doze amount. This did not look really
good.

This CL now disables the exit animation when the dialog is dismissed
because the device was locked.

See b/193634619#comment8 for before/after videos.

Bug: 193634619
Test: Manual
Change-Id: I516b5c0e9ccf9d5650b5708350472aeb209d71e5
2021-11-03 14:41:42 +01:00
Jordan Demeulenaere
cd2a1b2ad0 Synchronize dialog launch animations
This CL adds some synchronization to the dialog launch animation to
avoid flickering at the beginning and the end of the animation. It does
so by drawing the touch surface twice (in both the original window and
the dialog window) using a temporary ghost that is added/removed
before/after the animation.

I decided not to reuse the ghosts created by
GhostedViewLaunchAnimatorController because this would make this change
much more invasive, which I wanted to avoid given that the end goal is
to use BLAST synchronization instead of this CL.

Change-Id: Iac2eb2a2e78801a43847eebc72679c4952a73f1f
Bug: 193634619
Test: Manual
2021-10-28 17:41:55 +02:00
Jordan Demeulenaere
0b229eae8d Animate the internet dialog launch.
This CL animates the launch of the internet dialog from the touch
surface that started the dialog.

Note that changes of the content of the dialog itself are not animated
yet, this will be done in a follow-up CL.

See b/201046726 for before/after videos.

Bug: 201046726
Test: Manual
Change-Id: Iaf45371eec5d8cf1f5c6a13ebf20474a0b565abc
2021-10-28 17:41:25 +02:00
TreeHugger Robot
6366f4e22a Merge "Hiding split shade status bar for heads up notifications" into sc-v2-dev 2021-10-19 17:01:26 +00:00
Michal Brzezinski
12dfa2498e Hiding split shade status bar for heads up notifications
Changing split shade status bar alpha so that it's dependent on shade expansion. This has two effects:
- it doesn't show on HUN (alpha = 0), which is the main issue
- it's animated on expansion and transition between launcher status bar and split shade status bar is less jarring - this likely needs to be adjusted in the future but for now should be good enough.

Also splitting getNotificationScrimAlpha into two separate ethods as it's usage got weirder over time and inline comments in method calls got outdated.
Also moving split of getNotificationScrimAlpha to seperate object - it feels a bit weird that this very specific interpolation calculation is in the general Interpolation object.

Bug: 198595419
Test: Receive HUN and NOT see split shade status bar on top of regular status bar
Change-Id: I3bfcd0697da4798fc845d2636303fd3616e131fc
2021-10-18 13:40:35 +01:00