Commit Graph

21 Commits

Author SHA1 Message Date
Lucas Dupin
a8382dc052 Act on scrim visibility
The scrim visibility drives whether the launcher window is opaque or
not. We should track it and apply the flag instead of trying to catch it
through other Launcher life cycles.

Fixes: 195365607
Bug: 196403152
Test: tap on home button while launching app from overview
Change-Id: I2a00b86b602b5dd12c901433b92adcf0170be15e
(cherry picked from commit e4a9469156)
2021-08-23 19:22:02 +00:00
Lucas Dupin
ee9099af7f Revert "Apply depth even when surface is null"
This reverts commit a6c38be150.

Fixes: 193333562
Test: manual
Change-Id: I4fae079e0cd056fc800e5a15389f4795c77e17fb
2021-07-20 14:14:50 -07:00
Lucas Dupin
20a13047ae Use launcher surface when removing launch target
Otherwise events won't be dispatched properly and window opacity will be
wrong.

Test: manual
Fixes: 191149025
Change-Id: Ice7ea86252282c7dc1cb5925dd1bdb8cade89c08
2021-07-02 17:39:10 -07:00
Lucas Dupin
0f00c35268 Decouple zooms and blurs on app launch
We'd like to be able to disable blurs during app launch, but without
disabling zooms as well. The previous sysprop would set the depth of
BackgroundAppState to 0, when what we want is to conserve wallpaper
zoom.

Bug: 191969790
Test: adb shell setprop ro.launcher.blur.appLaunch false
Change-Id: Ie4b26096f6ac723c3981bba2829557e6cc6c733b
2021-06-29 13:02:12 -07:00
Lucas Dupin
b60fff3929 Disable blurs when dev setting or battery saver
Stop rendering blurs whenever a user:
- disables blurs on developer settings
- enables battery saver

Test: manual
Bug: 191814337
Change-Id: I8fd04796054d92171732c8db95b64cfa3ec469ec
2021-06-23 08:37:27 -07:00
Lucas Dupin
a6c38be150 Apply depth even when surface is null
We need to update mDepth even when the surface is null, otherwise
events will be ignored and mDepth will have the wrong value when
waking up from screen-off.

Test: pull up app drawer, screen off, unlock
Test: go to overview, screen off, unlock
Test: launch app, observe blurs and zoom
Fixes: 191153501
Change-Id: I33f5d84a50e24f05a09769b1f7f3c27969f847cd
2021-06-21 16:27:11 -07:00
Lucas Dupin
258e4526b7 Remove blur from launcher when in overview
The App window will be under Launcher, so we can't actually blur
launcher at that time, otherwise the live window will also be blurred.

Test: manual
Bug: 189207458
Change-Id: Ie07449d29d3b0dc60d3787b6d32aa9e46e0bb613
2021-06-04 11:05:37 -07:00
Lucas Dupin
6e50860616 Set blur on effect layer during app launch
Test: manual
Fixes: 189207458
Change-Id: I8fabba92c6831c2fd54fe08156fc9a9b5d141a56
2021-06-01 11:07:17 -07:00
Lucas Dupin
0c6341af99 Make launcher opaque when scrim becomes opaque
This will help with overdraw, because we don't need to draw the
wallpaper.

Test: manual
Test: adb shell dumpsys SurfaceFlinger --timestats -dump
Bug: 187703092
Change-Id: I2ebae94725578e5f4d640cd6b45da3f4d1f21a20
2021-05-20 14:33:39 -07:00
Jon Miranda
d8cc458867 Remove reliance on surface to update depth
- Also no longer resets depth on surface change, as depth is independent
  from blur.

This fixes the bug where depth is not accurately reflected.

Bug: 185680609
Bug: 185189176
Test: launch app and swipe home multiple times
      launch app and back gesture to home

Change-Id: I5e2f4ce08b8bf84b7356fbd080ae732875c5e04e
2021-04-26 14:42:44 -04:00
Tony Wickham
6cd95cd2d8 Remove Overview atomic animation support
- Remove PLAY_ATOMIC_OVERVIEW_SCALE and PLAY_ATOMIC_OVERVIEW_PEEK
- Remove complicated parallel atomic animation support from
  AbstractStateChangeTouchController and subclasses
- Remove some code related to going between Overview <-> AllApps

Test: Swipe between states in all 3 navigation modes
Bug: 175137718
Change-Id: Ice314d46946c3a983cdc6ccf1a67effb5da9156e
2021-03-29 11:59:06 -07:00
Jon Miranda
36d1015997 Add depth animation when multiwindow mode changes.
This is a workaround until we can support app transitions when starting
an activity in mw mode.

Bug: 158613217
Change-Id: I843d6669722c543728ab532e1c4fbd4643f6f135
2020-06-19 16:36:57 -07:00
Jon Miranda
7c57559930 Gates blur code behind BlurUtils#supportsBlursOnWindows.
This "fixes" the bug where wallpaper zoom does not reset to 0 when
screen turns off since we no longer require a valid surface to set the depth
when blur is disabled.

Note that the bug still exists when blur is enabled, which will need to be
fixed in a follow up CL.

Bug: 157946272
Change-Id: I43179435885c95eb2ecf406fa5c291badf5a1ed3
2020-06-12 11:03:10 -07:00
TreeHugger Robot
62382c3f95 Merge "Update home to overview depth interpolator to match other motion" into ub-launcher3-rvc-dev 2020-06-02 20:18:01 +00:00
Tony Wickham
10c2b4f9d9 Update home to overview depth interpolator to match other motion
Overview comes in and workspace goes out at overshoot(1.2), so
the wallpaper depth/blur should match that speed.

Test: go to overview from home in 3 button or 0 button mode,
ensure wallpaper scales down at the same rate as other elements

Bug: 154637581
Change-Id: I03254fa3fdf19f468852bed8aab7ba21203c429a
2020-06-01 14:36:46 -05:00
Jon Miranda
84f6e0182e Fix depth jumping around during transitions.
This is caused because we use mDepth for depth comparisons, but there are
cases where we set mDepth but we do not pass that value to WallpaperManager
(ie. surface is null or not valid) and that leads us into
inconsistent states.

Bug: 155780358
Change-Id: I3faf14416d5783ad472892425eb0bd37dd469a46
2020-05-29 13:06:55 -07:00
Sunny Goyal
35e7d38681 Abstracting out state handler logic into base classes so that it can
also be used in different activity

Change-Id: Ic5e60b21e1429c71f1cd4e7041e70bf4fc9761b7
2020-05-11 16:38:26 -07:00
Lucas Dupin
264cb2ff68 Do not blur if all apps is fully visible
Fixes: 155093795
Fixes: 155203546
Test: manual
Change-Id: I30f4c027e5107a199791e908acbb7ffed94e6a77
2020-04-29 17:49:02 +00:00
Winson Chung
20aeddd853 Dedupe non-perceptable depth updates
Bug: 154304487
Change-Id: I6d96aca555932f4a51aed576d25f7150952bb562
2020-04-17 16:16:44 -07:00
Jon Miranda
dc186e68a1 Add AnimationFlag for SKIP_DEPTH_CONTROLLER.
We use this flag to prevent the depth from being immediately set to 0 when
preparing to animate home.

Bug: 152327671
Change-Id: I614c6ae08b9f9e56ecb94fb51748791a38504583
2020-04-15 15:19:49 -07:00
Sunny Goyal
284a6cfdd7 Removing base no-op implementation of depth controller
Change-Id: Ibf46c0a147d2772033ad469b803e606376978cd7
2020-03-24 16:11:06 -07:00