Skip to content
Commit f4020408 authored by Jason Chang's avatar Jason Chang
Browse files

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
parent 776fea73
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment