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
The top activity in TaskActivitiesReport can be filter out if the state
of top activity is INITIALIZING, this doesn't make sense for splash
screen, because the state of the top activity do can be INITIALIZING.
Create a filed targetActivityInfo in StartingWindowInfo to specify the
starting activity info.
Bug: 193459277
Test: atest SplashscreenTests StartingSurfaceDrawerTests
Change-Id: Ifec7aff644013a0426e0622162ab24f6b9fb3d8f
Filter out the translucent pixels when compute the foreground colors
of an adaptive icon, which should make sense because the translucent
pixels on icon should only used for decoration, do not let it affect
the opaque pixels, also with this filter we won't drop down the
performance when using palette.
Bug: 193304878
Test: manual launch single color background apps.
Change-Id: Ia9873cf907d30bb7f30318a289a54159d0a51ee3
The stack trace in b/194344478 and b/194280568 is actually from the
preceding ActivityThreadTest test, which does not fail but does crash
certain test cases after that.
Since we may set a start delay on the content overlay fading out
animation, there is chance that onTaskVanished happens before it is
actually started. It's also possible that onTaskVanished happens during
the content overlay fadeout. This CL should have addressed both cases.
Bug: 194344478
Bug: 194280568
Test: atest --iteration 5 \
ActivityThreadTest#testHandlePictureInPictureRequested_overriddenToEnter \
ScreenshotTests#testScreenshotSecureLayers \
TaskStackChangedListenerTest#testTaskChangeCallBacks
Change-Id: I81c0622966df32e02db7cb5aa3cd42d7c4af735e
Merged-In: I81c0622966df32e02db7cb5aa3cd42d7c4af735e
the top of One-handed mode
1. Implement the Dynamic color theme at the top Tutorial area
but the color should not be the same as the recents UI.
2. Do not translate Tutorial icon & text vertically, then provide
quick subtle fade-in effect for Tutorial window.
3. Apply new icon for tutorial.
Bug: 193126258
Bug: 193589897
Test: Local verify when changing dark theme and wallpaper theme.
Test: Local verify Tutorial icon & text fade-in effect.
Test: atest SystemUITests
Test: atest WMShellTests
Test: Perfetto check enter & exit performance
Change-Id: I60f4e7a709f3a27fe6c7f480f1012caccdbbe5ec
Use the shared launcher library to draw legacy icon.
Bug: 193780874
Test: launch app which still using legacy icon from Launcher.
Change-Id: Id8ccb5b6c532880ff207526fd754e92fdd08e284
Included in this CL
- when there is no source rect hint, use a content overlay during the transition
- otherwise, take account the display cutout to offset/inset the source
rect hint
Test with following variants when entering PiP in button nav
- from 0 / 90 / 270 rotation
- with or without source rect hint
- display cutout mode set to default or shortEdge
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/cxk4vy8VenQPSv83vHEs22
Bug: 191310680
Test: manual, see the test cases listed and video above
Change-Id: Ie54a54de6e55397e25024373ea4e2855fde2d9f7
Merged-In: Ie54a54de6e55397e25024373ea4e2855fde2d9f7
If errors occured during finishFrame that caused us to not have a
semaphore or possibly destroy the semaphore early we will end up
with a null mDestroySemaphoreContext in swapBuffers which we tried
to destroy unconditionally.
I haven't repro'd the connected bug, but based on the crash stack
this seems like the likely cause.
Test: manual code inspection and build.
Bug: 191950033
Change-Id: I0fbd33edff3552b91b980da9e3b2c45bc52a2dd0
Ensure GrContext::submit() is always called after either
Bitmap#prepareToDraw() or if DrawFrameTask skipped drawing.
In either case texture uploads & deletions will be scheduled,
but without the submit they won't actually be performed. This
can end up running out of RAM.
Bug: 189393671
Test: manual test app
Change-Id: I57477c64457558487e9e5ec0a979ad9099a8cb2c
The region outside of the BQ crop rect is potentially
garbage. Avoid sampling from it.
Fixes: 189656466
Test: CTS PixelCopyTests & DecodeAccuracyTest
Change-Id: I2910d93471f08aaf807ac9f87fdf84cf29cf4143
SystemUI does not need to re-calculate background color of starting
window because Shell library is bound to SystemUI, so status bar can
get background color directly, also this can support to get the
background color from snapshot starting window.
Also fix the starting window listener did not receiveing background
color successful because makeSplashScreenContentView is execute on
another background thread, so there should block the splash screen
thread until the background color is estimated.
Bug: 192213918
Bug: 192659309
Test: manual launch apps from Notification and Launcher, ensure the
color is correctly send to SystemUI or Launcher.
Change-Id: I626cb23d7aebfe4e032fad285bfad374c0e11cea
Previously, we tried to tuning boottime of SysUI
See go/systemuiboottiming_ohm
- Reduce access setting provide at SysUI start-up
- Remove unused obervers
1. Timeout
2. TapAppExit
- Update mShortcutEnabled state at ctor
Test: manual enable OHM shortcut, rebot
make sure shortcut function works
Test: atest WMShellUnitTests
Test: asit/perf/boottime_test
Bug: 193225130
Change-Id: I2753f8b1e47622c00b9c6d2f4cd319c6e43634ea
- Always show tutorial for user to know device state
is in One-handed mode.
- Clean the redundant params from ctor
Test: manual trigger OHM
Test: atest WMShellUnitTests
Bug: 192648901
Change-Id: I10c3f3f29190b672fb88471df3cf374a994cdaa7
This field actually requires a special lock, mFrameMetricsReporterMutex.
But there isn't a GUARDED_BY annotation for it. And even if there was,
the compiler feature of -Wthread-safety was not active in this code, so
this error would not have been caught.
To fix this, enable the compiler annotation and add GUARDED_BY
annotation to mFrameMetricsReporter.
And finally, use this lock to properly protect this field.
Bug: 192330836
Test: atest hwui_unit_tests
Change-Id: I76950bfa01bbd7ccdc54c4e8c114430b5aeddf1a
This reverts commit 76370b6fe6.
Reason for revert: Fix the merge break in ShellTaskOrganizerTests.java
Fix: 193069342
Test: atest WMShellUnitTests:ShellTaskOrganizerTests
Change-Id: I02c4bddc407eaac0ebb7cd5abb0b394f242d4d6e
Fix race condition in SystemUIBootTiming issue.
1. Avoid updateOneHandedEnabled() called twice during init
a. [O] come from setOneHandedEnabled()
b. [X] come from setSwipeToNotificationEnabled()
2. Passively waiting shortcut enabled changed callback, and then
query setting ACCESSIBILITY_BUTTON_TARGETS status.
3. Add a new flag isShortcutEnabled to cache shortcut enabled
state.
4. By new OHM Settings UX design setSwipeToNotificationEnabled()
should NOT setEnabledGesturalOverlay().
5. Remove redundant auto enabled Toast and print in log instead.
(In general case, user is not able to see the Toast)
Test: atest google/perf/boottime/boottime-test
Test: atest SystemUITests
Test: atest WMShellTests
Test: manual factory reboot, OHM should disabled by default
Bug: 192612924
Change-Id: I8b24c99bc8bd5bfb17c73a6bb8494109d9a8170d