Fix tutorial background color not up-to-date occasionally
1. Fix bug in the legacy code flow
- Obtain color from contextThemeWrapper Theme_DeviceDefault_DayNight
- In OneHandedDisplayAreaOrganizer#finishOffset()
Remove redundant call "cb.onStartTransition" due to
ambugiuous.
2. Improve performance
- Remove redundunt callbacks.
- Avoid create/remove leash on each start/end cycle.
- Dispatch Transaction to bkg leash through onAnimationUpdate()
bkg leash apply the same Transaction of display area.
- Adjust animation duration of Tutorial panel.
- Move bkg leash depend on yPos value to reduce SF
componsition overhead.
3. Improve code readibility
- Code flow : Register -> onStart() -> show background ->
detach background -> Unregister -> remove leash.
- Remove redundant synchronization due to wmshell already
guarantee thread safe.
- Move getTranslationFraction to SettingsUtil.
- Move getTransitionDuration to SettingsUtil.
Bug: 194507756
Bug: 193589897
Test: Local verify when changing dark theme and wallpaper theme.
Test: atest WMShellUnitTests
Change-Id: Ib55753be9e9f4665c20ad34437f86bf80cc9f3b4
11 files changed