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

Skip to content
Commit 113a70ca authored by Jordan Demeulenaere's avatar Jordan Demeulenaere
Browse files

Add OverscrollFactory parameter to STL.{scene,content} builders (1/2)

This CL makes STL use LocalOverscrollFactory when constructing the
overscroll effects of each content, and exposes a new optional
effectFactory parameter to the scene & overlay builders that will be
used for that specific scene/overlay. This allows to easily reuse the
default platform stretch effect and is a better API than forcing the
hardcoded usage of OffsetOverscrollEffect.

One important change in this CL is that I had to remove the orientation
parameter from {Content,Offset}OverscrollEffect, given that Compose
OverscrollFactory.createOverscrollEffect() does not have any such
parameter. The strategy I used was to guess the orientation in which the
effect is used by looking at the first non-null offset, making sure that
the effect is only used in a single orientation that is never changing.

I went ahead and specified the factory for dual shade so that we keep
the default effect (stretching) on phones and use the offset overscroll
on large screens.

Bug: 378470603
Test: atest OverlayTest
Test: Manual, played with Flexiglass with dual shade on & off
Flag: com.android.systemui.scene_container
Change-Id: I70bb9569e0fde97dffae789c8216def91ebfad51
parent 2ae37985
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