Commit Graph

290 Commits

Author SHA1 Message Date
Luca Zuccarini
627d67549f Animate depth from the right value on Taskbar All Apps launches.
`MyDepthController` in `QuickstepTransitionLauncher` assumes that we
want the background to always animate the same way, matching the rest
state of the workspace (depth == 0). However, in Taskbar All Apps the
background is visible, and depth != 0. We now initialize the one-off
`DepthController` for launches to take into account the latest depth set
by the top level `DepthController`, so there is no jumpcut at the
beginning of the animation.

Note that in my opinion we should use the same `DepthController` for all
cases, rather than having this one-off. I'm looking into the feasibility
of that change, but for now this fixes the issue at hand.

Fix: 292959100
Flag: N/A
Test: manual, see videos in the bug

Change-Id: Id90e8e728cc3e2ccf7d92148fbb0d6ff3e6fd6ca
2023-07-26 15:37:44 +00:00
Johannes Gallmann
a82eebd286 Extract Launcher resource interpolators to Animation Library
Bug: 292080029
Test: atest InterpolatorResourcesTest
Change-Id: I65dba4eb3f96844d4f9a4d0af608c0bd8e77ccc2
2023-07-22 09:52:53 +02:00
Fengjiang Li
da718e9749 Log appear animation's scale factor
Test: Grabbed a bug report b/291974797
Flag: N/A
Bug: 290320302
Change-Id: Ic33dc94806b838a03a2203bdd5701a1eeaeeb7bf
2023-07-20 11:08:14 -07:00
Hongwei Wang
49b9fbd188 Merge "Polish home-key from split to pip transition" into udc-dev am: ca08d75e4a am: 93551e9496
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23833485

Change-Id: I0a6ef4eee4dfc6244b5ee4a7716c1e625923d4b8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-29 17:58:16 +00:00
Hongwei Wang
ca08d75e4a Merge "Polish home-key from split to pip transition" into udc-dev 2023-06-29 17:17:03 +00:00
Winson Chung
551cbc4969 Merge "Workaround for handling the restart of an already visible task" into udc-dev am: 0da5208bb3 am: c8a2f9111b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23785437

Change-Id: I2a7ebbac3c510d32b70ee57dd8323123800ff09a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-28 07:52:58 +00:00
Winson Chung
57c2a79e47 Workaround for handling the restart of an already visible task
- If a task is already visible, then startActivity is a no-op and the
  remote transition that launcher expects to run is not started. As a
  workaround (until restarts are an actual transition), listen for
  the case where a task is restarted and invoke the end callbacks

Fixes: 286016555
Test: Repro steps on the bug
Change-Id: Iec3ab97c8817a5e95399cec90f891d65f369d234
2023-06-28 05:51:54 +00:00
Jerry Chang
3651051182 Polish home-key from split to pip transition
Includes WINDOWING_MODE_MULTI_WINDOW closing target to the condition of
playing fallback animation. So the remaining splitting task won't be
play with iconview animation when home-key to auto-pip consumed another
splitting task in pip transition handler.

Bug: 281476331
Test: repro steps of the bug
Test: pass existing tests
Video: http://recall/-/fLARJNt42LVxc3tt86SneW/eelqATeE1REoOtOEDxeDVR
Change-Id: If05d8841a6a940e61f71683422ef1a3d4e3597c7
2023-06-28 02:10:34 +00:00
TreeHugger Robot
796c3bbd02 Merge "Restore strong reference to animation runner" into udc-dev am: 1f3c56af5b am: 7733c11623
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23793397

Change-Id: I5f485e204fa56b319f250a467eb448622be9f01f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-27 03:54:56 +00:00
Winson Chung
6cfe2e6cbe Restore strong reference to animation runner
- The remote animation factory needs to be strongly referenced since
  the only other reference is a weakly held one from
  LauncherAnimationRunner, and if a gc happens in between starting
  the animation and the onAnimationStart() callback, then the
  animation will not play.

Fixes: 284106887
Test: Force a gc after creating a remote app launch animation and ensure
      that the runner still exists when the animation starts

Change-Id: I5f584451b41c666916801b8ea0cb470c7ab9fc51
2023-06-26 23:55:23 +00:00
Sunny Goyal
6e1e11bb5c Merge "Fising launcher stuck on blur" into udc-dev am: ef6fbb5be8 am: 81b856468e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23621509

Change-Id: I5eb5546f2df74bf236b70b38ed3e0f8d032faf6d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-09 07:39:16 +00:00
Sunny Goyal
521c2a038b Fising launcher stuck on blur
The same surface can become invalid, in which case we need to wait
until the next draw to apply blur

Bug: 284411563
Test: Verified on device
Change-Id: Ifb6be94756fd00c5925e11a6b7d57f206e063a17
2023-06-08 13:18:34 -07:00
Kateryna Ivanova
7120373bbc Migrate Interpolators from Launcher3 to the public animation library
Test: atest
Bug: 271850966
Change-Id: Iba999f2e753764a37d35e508e707df02388432e9
2023-05-30 07:20:38 +00:00
Luca Zuccarini
07c3491ec2 Merge "Add a view type check to ensure the right animation is used." into udc-dev 2023-05-25 15:42:51 +00:00
Luca Zuccarini
f898ee474c Merge "Remove redundant instances of depth controller." into udc-dev 2023-05-24 11:35:21 +00:00
Luca Zuccarini
a96dcb0cc7 Remove redundant instances of depth controller.
During each app launch, a new `MyDepthController` is instantiated, which
registers two of its methods as listeners for cross window blur and
opaqueness. This controller's usefulness spans that specific animation
only, but the listeners are never unregistered. This creates conflicts
when an opaqueness signal happens, which cause the background to flicker
(see videos).

Bug: 283335820
Test: manual, see videos in the bug
Flag: not needed, bug fix
Change-Id: I3dcb0b8ff0aa77bf3183a926889d0131b17bcaa4
2023-05-23 15:33:17 +00:00
Tony Huang
2083c5450d Hide divider immediately if going to launcher
Divider should hide immediately when going to launcher, this fix
the divider hidden delay in 3-btn-nav mode.

Fix: 283058496
Test: manual
Test: pass existing tests
Change-Id: Ia4eaba8020c564cc95b8652fe0f7066b653b9df4
2023-05-22 16:38:14 +08:00
Luca Zuccarini
2449a01b22 Add a view type check to ensure the right animation is used.
Bug: 265134143
Test: recorded perfetto trace, see bug
Change-Id: If6abc36f0f43c6bb632fc824c19717c1231b32dc
2023-05-19 09:51:15 +00:00
Treehugger Robot
f3fdca59d2 Merge "Revert "Fix null-pointers in SurfaceTransactionApplier constructor."" into udc-dev 2023-05-10 21:40:40 +00:00
Sunny Goyal
64809780ce Revert "Fix null-pointers in SurfaceTransactionApplier constructor."
This reverts commit d86c5657e0.

Reason for revert: b/281294745

Change-Id: Ib2680b60346a9bc5932057707d0ef105441f324d
2023-05-10 19:34:01 +00:00
Schneider Victor-tulias
a40de23f04 Merge "Fix null-pointers in SurfaceTransactionApplier constructor." into udc-dev 2023-05-08 16:50:13 +00:00
Schneider Victor-tulias
d86c5657e0 Fix null-pointers in SurfaceTransactionApplier constructor.
A recurring class of null pointers are caused by using views with no view root implementation in SurfaceTransactionApplier from QuickstepTransitionManager. This can happen when we use launcher views after it has been destroyed.

- No longer using mDragLayer in getFallbackClosingWindowAnimators; simply applying the transaction immediately.
- Forcefully using getFallbackClosingWindowAnimators when launcher is destroyed.

Flag: not needed
Bug: 278833389
Test: launches and closed several apps in 3-button and gesture nav mode
Change-Id: I83b3aec1488fe9666bd0301a6044a181bb05dbdd
2023-05-05 21:53:50 +00:00
Lucas Silva
4a0f9298d1 Update QuickstepTransitionManager to allow remote transitions to be
overridden

Bug: 280585150
Test: flashed device, and verified along with other changes in this
topic
Flag: ENABLE_DREAM_TRANSITION

Change-Id: Ic62ab51e0b95253127aa0c4fc8a4ea613afafaa3
2023-05-03 11:44:27 -04:00
Robin Lee
7e5594928c Remove keyguard state from onAnimationCancelled
Reason for revert: b/276433230

Test: atest CtsWindowManagerDeviceTestCases:KeyguardTests
Test: atest PowerKeyGestureTests
Bug: 276433230
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:11e6fdd982ab7e6df951dcfe97948f81a8f36d75)
Merged-In: I62d760206dfd13ba4de7a77d2906b0f90bd2c343
Change-Id: I62d760206dfd13ba4de7a77d2906b0f90bd2c343
2023-04-21 09:06:02 +00:00
Evan Rosky
b8f82c1a9d Merge "Improve transition logging" into udc-dev 2023-03-31 20:43:15 +00:00
Evan Rosky
8869bb5f40 Improve transition logging
Adding debug-names to remote transitions so that
they can be identified across processes

Bug: 276349701
Test: existing tests since this doesn't change logic
Change-Id: I41400feeb2dd91971f8c750613085c80af309aea
2023-03-30 15:28:43 -07:00
Jerry Chang
7e51edd808 Fix wrong surface positioning when animating a split pair to home
Use the screen based position instead of parent-relative position to
make sure the surface was placing at the expected position while
animation apps to home.

Bug: 273685456
Test: http://recall/-/fLARJNt42LVxc3tt86SneW/c2pLS6FwyEMweiLiWqqzPa
Change-Id: Iea79e6d2b9ab591fe18c5ac7a0d89bb90a461145
2023-03-29 07:21:33 +00:00
Jon Miranda
6e816aaf37 Merge "Add a way to fade out taskbar view when closing an app in the taskbar." into tm-qpr-dev am: 149246f077 am: ce06cf89b0
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22141153

Change-Id: I919b45021c1fbc2a5d5c30c2d5eca71a672cd5be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-21 14:14:43 +00:00
Jon Miranda
ce06cf89b0 Merge "Add a way to fade out taskbar view when closing an app in the taskbar." into tm-qpr-dev am: 149246f077
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22141153

Change-Id: Ia0212c2829b01c5b0faf120d6303b7cf6d147ad6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-21 13:33:32 +00:00
Jon Miranda
149246f077 Merge "Add a way to fade out taskbar view when closing an app in the taskbar." into tm-qpr-dev 2023-03-21 13:01:30 +00:00
Jon Miranda
4202d43e48 Merge "Tune springs when app animates home into the hotseat on devices with a taskbar." into tm-qpr-dev am: fad8c1c449 am: 03bb5fe49c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22146526

Change-Id: I0adde19b10d0bf6c25c5025453fd361a0804cf62
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-20 22:12:54 +00:00
Jon Miranda
03bb5fe49c Merge "Tune springs when app animates home into the hotseat on devices with a taskbar." into tm-qpr-dev am: fad8c1c449
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22146526

Change-Id: Iaa1d5cf3e030398c97841fe604ad923cce4e25e7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-20 21:34:11 +00:00
Jon Miranda
fad8c1c449 Merge "Tune springs when app animates home into the hotseat on devices with a taskbar." into tm-qpr-dev 2023-03-20 20:54:27 +00:00
Jon Miranda
c0c1c55c5d Add a way to fade out taskbar view when closing an app in the taskbar.
Prior to this change, if taskbar is showing and we are cloing an app
that is visible in the taskbar, the taskbar view would immediately
disappear.

Now we will fade out the view until the animation is 33% complete,
at which point the 'space' will be clear for the FloatingIconView
to settle at its final location.

Bug: 273961611
Test: open app in hotseat
      note that the taskbar view is gone immediately
      have taskbar visible, close app that is shown in taskbar
      note that the taskbar view fades out

Change-Id: I5589e2ce3033cfa19669d1bfaf568aef2a96015e
2023-03-20 18:21:42 +00:00
Jon Miranda
18c53ac26b Tune springs when app animates home into the hotseat on devices
with a taskbar.

Thought about using the Builder pattern here but the CL becomes
much larger due to SwipePipToHomeAnimator having its own
Builder.

Bug: 268026344
Test: swipe up to close app thats in hotseat
      swipe back to close app thats in hotseat

Change-Id: Idd0729224374579753fc91c7820f3b04a7d3e1a4
2023-03-20 10:56:43 -07:00
Jon Miranda
a479a6e3fd Merge "Keep foreground drawable centered during app open/close animation." into tm-qpr-dev am: ad94440c5f am: d0c8aa31bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22140592

Change-Id: Iee4811dc9cef70e390514106cbc32ea618d1b759
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-20 17:23:17 +00:00
Jon Miranda
d0c8aa31bd Merge "Keep foreground drawable centered during app open/close animation." into tm-qpr-dev am: ad94440c5f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22140592

Change-Id: I7c5c1c5f39906eb5e4f5caff4ec4a8c828e5300c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-20 16:45:42 +00:00
Jon Miranda
ad94440c5f Merge "Keep foreground drawable centered during app open/close animation." into tm-qpr-dev 2023-03-20 16:14:43 +00:00
Jon Miranda
f23e2d1e16 Keep foreground drawable centered during app open/close animation.
For apps that use AdaptiveIcon, we used to animate the foreground
drawable independently from the background. This is sometimes
perceived as jank so we remove the animation since it is very subtle
in the best case scenario.

Bug: 268026344
Test: open/close apps/folders that use AdaptiveIcons
Change-Id: I500bf56e04823757d511d909a93d3b30703249a1
2023-03-20 16:13:02 +00:00
Jon Miranda
69847f9b9a Merge "Only hide taskbar view for app launches w/ transient taskbar." into tm-qpr-dev am: 15ca085d5c am: fdbc99b712
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21986398

Change-Id: I95f5dba2c5908b72a88e4e90a88eb57cf53be9a9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-14 00:59:47 +00:00
Jon Miranda
fdbc99b712 Merge "Only hide taskbar view for app launches w/ transient taskbar." into tm-qpr-dev am: 15ca085d5c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21986398

Change-Id: Ib4837e460463b9c56b57d85e52c8c460945cf5c6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-14 00:24:00 +00:00
Jon Miranda
c58dc1063a Only hide taskbar view for app launches w/ transient taskbar.
Bug: 246635237
Test: launch app w/ 3 button nav
      -> observe taskbar view always visible
      launch app w/ gesture nav / transient taskbar
      -> taskbar view hidden during animation

Change-Id: I6233a9bb6f23ee5f516f5d4712631da214ebc14e
2023-03-13 11:13:42 -07:00
Jon Miranda
634c2bee5a Merge "Hide taskbar view for app open/close animation." into tm-qpr-dev am: 1671b704b3 am: 1ffac1c8ac
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21808184

Change-Id: Idc10dfb261a20fe2f925ba24caf33e6caed3c850
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-09 01:39:32 +00:00
Jon Miranda
1ffac1c8ac Merge "Hide taskbar view for app open/close animation." into tm-qpr-dev am: 1671b704b3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21808184

Change-Id: I113319547da7b51366e4be2aeb94a51d976b7382
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-09 01:04:21 +00:00
Jon Miranda
acdf07e0b7 Hide taskbar view for app open/close animation.
Bug: 246635237
Test: open app in hotseat
      close app in hotseat
      the 'matching' view in taskbar should be hidden
      tested icon, predicted icon, folders in taskbar/hotseat
Change-Id: I74382480826afafe6ae58e78faf26fe10812e29b
2023-03-08 10:37:25 -08:00
Johannes Gallmann
10dd8449bf Merge "Add onEndCallback to ContainerAnimationRunner" into tm-qpr-dev am: 83683829f7 am: 72313feac1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21750179

Change-Id: I55a17ffd869cd33e53296d7aef80e27e88a1cf4b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-07 20:50:00 +00:00
Johannes Gallmann
72313feac1 Merge "Add onEndCallback to ContainerAnimationRunner" into tm-qpr-dev am: 83683829f7
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21750179

Change-Id: Iebc90a935e9bbdd865f2fd03b531e5f5bcfefa66
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-06 19:54:47 +00:00
Johannes Gallmann
f54b88d2d6 Add onEndCallback to ContainerAnimationRunner
Bug: 247121782
Test: Manual, i.e. tested that callback is invoked after launch animation
Change-Id: Ie52ffa1b76de01943dd16346560768b3ecced118
2023-03-03 16:55:07 +01:00
Alex Chau
cbab01c721 Merge "Land ENABLE_TASKBAR_IN_OVERVIEW" into tm-qpr-dev am: 6a10a003d6 am: a1907c710e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21538759

Change-Id: Ibf2a35e5d54d2938a00cb251ddb71656f6308207
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-01 18:19:32 +00:00
Alex Chau
a1907c710e Merge "Land ENABLE_TASKBAR_IN_OVERVIEW" into tm-qpr-dev am: 6a10a003d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/21538759

Change-Id: I47517820ce6448ac3b123ac1044ef07ccc60308b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-01 17:43:43 +00:00