summaryrefslogtreecommitdiff
path: root/libs/androidfw/FileStream.cpp
diff options
context:
space:
mode:
author Nicolo' Mazzucato <nicomazz@google.com> 2023-11-20 11:49:17 +0000
committer Nicolo' Mazzucato <nicomazz@google.com> 2023-11-27 15:45:49 +0000
commit24c5a7c911eb49c8da194d88736bb08cabb64ddf (patch)
tree420e934cab811d0d99c354f982864b4d26e68b54 /libs/androidfw/FileStream.cpp
parent73330b61c51f92377a6213bd31f7592546e29b68 (diff)
Enable unfold animation progress calculation in arbitrary thread
This cl changes some classes to make unfold animation progresses calculation happen on an arbitrary thread. Now there are 2 consumers of progresses calulated in the background: 1. Launcher process. Launcher receives animation progresses from SystemUI. if SystemUI janks (e.g. due to notification measuring), launcher would have janked as well. After this change, Launcher receives the progresses calculted in the background, so it is unaffected by systemui main thread being blocked. 2. The dark scrim added after unfold (controlled by "UnfoldLightRevealOverlayAnimation") is now fully independent from the main thread: as it also uses the background progress, and the window is using a separate UI thread, it will not jank when the systemui main thread is stuck. For now the only missing part is receiving the screenStatus in the bg thread. When we tried it caused regressions in the past. All other signals can now happen either on the unfold progress thread or main. Most classes have been changed to be created with an arbitrary Handler. In the unfold lib there are 2 now: (1) UnfoldMain and (2) UnfoldBg. There are now 2 injectable versions of FoldStateProvider. The default one that uses the main thread (and should not have any change in behaviour), and the new one annotated with @UnfoldBgProgress, that receives and executes all (except screen state) the calculations in the background. PhysicsBasedUnfoldTransitionProgressProvider can now use any of those. Only when the handler provided is different than the main one, another scheduler (that works in the background) is provided to the DynamicAnimation. + UnfoldLightRevealOverlayAnimation moved to the new UnfoldBg thread. Bug: 277879146 Bug: 310572965 Bug: 307511460 Bug: 292472402 Flag: ACONFIG unfold_animation_background_progress DISABLED Test: DeviceFoldStateProviderTest, PhysicsBasedUnfoldTransitionProgressProviderTest + manual + perfetto trace Change-Id: I767263b6a5f3c6fd3b6f52c946d724599013a47c
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions