Commit Graph

290 Commits

Author SHA1 Message Date
samcackett
76331b6c17 Add metric logging for fake landscape usage
- Reuse existing TaskSwitcherContainer for Overview metric logging
- Log current orientation state for Overview when interacting with
gestures or via three button nav
- Log current orientation state on each phone rotation

Bug: 332870519
Test: Manual
Flag: NA
Change-Id: Ia10cf1acb809432175daab55151998f0d77362f9
2024-05-15 09:42:08 +01:00
Jordan Demeulenaere
5512003c0d Delay TransitionAnimator.onAnimationEnd by one frame (2/4)
Bug: 330672236
Test: atest ActivityTransitionAnimatorTest
Test: atest DialogTransitionAnimatorTest
Flag: N/A
Change-Id: I81e85df79256d013f6c3ef5cb58a5d96c0c7deec
2024-05-08 16:28:53 +02:00
Sunny Goyal
89931316a2 Moving various nav-bar configs out of feature flags
Bug: 332588958
Test: Presubmit
Flag: None
Change-Id: Ia4dc5b69bcf4d461e3444b9e37bb7334bb74aae4
2024-04-08 16:54:04 -07:00
Luca Zuccarini
c9cbc9d5a1 Introduce a new Home animation for workspace and the outgoing task.
The values are currently the same for all display and orientation
configurations, but they might change before launch.

There are a couple known imperfections:
* Swiping out of a hotseat app with very low velocity doesn't look
  great
* Sometimes, if the window movement reaches its final location faster
  than the background is done scaling, there is a small snap in icon
  position

Bug: 298089923
Flag: ACONFIG com.android.launcher3.enable_scaling_reveal_home_animation DISABLED
Test: verified with the flag on and off

Change-Id: Id54c7f0a76f62108d8b92a3b5e78634fff64dbef
2024-03-14 10:48:02 +00:00
Federico Baron
f9aa2a4a47 Merge "Remove logspam for resolved bug" into main 2024-03-08 16:29:17 +00:00
fbaron
7e5d855886 Remove logspam for resolved bug
b/318394698 was fixed so we can now remove these logs.

Fix: 321837497
Test: N/A
Flag: NONE
Change-Id: Ifc8b18238778f6aa2c0ad1be5df627c07cbaf1d8
2024-03-07 11:11:36 -08:00
Sunny Goyal
f584b32811 Using fractions in MultiValueUpdateListener instead of absolute durations
This ensures that any global animation scale applies properly

Bug: 327645429
Flag: NONE
Test: Manual
Change-Id: I12205429dca5a87208fa9964b3307fb718af4fd0
2024-03-04 09:15:11 -08:00
Luca Zuccarini
0547036143 Merge "Move remote animation utils to the Animation lib." into main 2024-02-27 13:53:59 +00:00
Johannes Gallmann
c71b48c658 Transfer coordinate into new Rect instead of in-place
Other parts of the animation rely on currentRectF to remain stable, therefore we shouldn't modify the RectF object in place.

Bug: 323628523
Flag: NONE
Test: Manual, i.e. verifying that widget close (and app close) animation animates correctly regardless of device orientation
Change-Id: I48e9ed047b956db654192eef39e5d94fbac53553
2024-02-23 12:30:46 +01:00
Luca Zuccarini
df33f361b0 Move remote animation utils to the Animation lib.
This is so that they can be used within the Animation lib itself, while
remaining available to all current users, since the SysUI shared lib
also depends on Animation lib.

Bug: 323863002
Flag: NA
Test: still builds, tests still pass, manually tested areas that depend
on these utils.

Change-Id: I10de17b51c05054efe957ed1073a1cbe6baf05c5
2024-02-21 15:03:51 +00:00
Luca Zuccarini
9fd2b31005 Merge "Rename a few more animations classes to cover transitions in general." into main 2024-02-08 16:34:22 +00:00
Luca Zuccarini
9ac91ffa63 Merge "Rename ActivityLaunchAnimator to cover transitions in general." into main 2024-02-08 10:15:43 +00:00
Luca Zuccarini
a2dd8a2629 Rename a few more animations classes to cover transitions in general.
Soon they will be used for both launches and returns, so these names
are more accurate.

Bug: 323863002
Flag: NA
Test: still builds (no functionality change)
Change-Id: I618780f0416a466a6672a2e694cb3e3ffd3f1396
2024-02-06 17:06:26 +00:00
Luca Zuccarini
1fcfe364ba Rename ActivityLaunchAnimator to cover transitions in general.
Soon it will be used for both launches and returns, so this name is
more accurate.

Bug: 323863002
Flag: NA
Test: still builds (no functionality change)
Change-Id: Iaff2589401af24c6e9f604b3d7fa11e819fc941a
2024-02-06 14:07:44 +00:00
Johannes Gallmann
8a631d09d0 Fix crash for predictive back to home fallback animation
Bug: 323046568
Flag: ACONFIG com.android.window.flags.predictive_back_system_anims TEAMFOOD
Test: Manual, i.e. verify no crash for predictive back to home fallback
animation
Change-Id: I8bd5ddb3f97376a9d9bc4bdf1e3a55e7f53a192f

Change-Id: I1f53b3fafb8d508a0e0b67dda16eae36191f197c
2024-02-01 12:40:37 +01:00
Sunny Goyal
4b67d7f47f Adding an abort listener in app launches to clear state
Bug: 318394698
Test: Verified on device
Flag: None
Change-Id: Ib6108782429abb5dfd9c4e42246e4a93ddf10f55
2024-01-26 17:16:31 +00:00
Johannes Gallmann
c9be821856 Merge "Fix TaplTestsQuickstep.testPressback failure (2)" into main 2024-01-26 08:48:41 +00:00
fbaron
e5e37faa1f Add logs to debug b/318394698
Flag: NONE
Test: n/a
Bug: 318394698
Change-Id: I3142dafeae0ba31713f514e690c5b7bb730541b0
2024-01-19 13:24:18 -08:00
Johannes Gallmann
898b9af9a2 Merge "Fix stuck wallpaper with predictive back" into main 2024-01-15 09:51:42 +00:00
Johannes Gallmann
f263e9d307 Fix TaplTestsQuickstep.testPressback failure (2)
Since anim is empty in the predictiveBack case, the animationEnd listener needs to be added to rectFSpringAnim instead

Bug: 318675970
Flag: ACONFIG com.android.systemui.predictive_back_system_animations STAGING
Test: TaplTestsQuickstep
Change-Id: Ibb3fd44c56b9d5370362f994762554eff02edbe6
2024-01-10 14:20:38 +00:00
Johannes Gallmann
eb6f3ae46d Fix window corner radius for predictive back to home on Felix
Bug: 316873212
Flag: ACONFIG com.android.window.flags.predictive_back_system_animations DISABLED
Test: Manual, i.e. verifying on device that window corner radius matches the device corner radius during predictive back to home
Change-Id: Ided0a09597b88a75e82dbd2ff94e7d7af5fadaa9
2024-01-09 08:25:43 +00:00
Johannes Gallmann
dacd86e053 Merge "Fix TaplTestsQuickstep.testPressback failure" into main 2024-01-09 08:13:39 +00:00
Johannes Gallmann
48a425df95 Fix TaplTestsQuickstep.testPressback failure
In the predictive back to home case, no WALLPAPER_OPEN_ANIMATION_FINISHED_MESSAGE event was sent to AccessibilityManagerCompat, which caused TaplTestsQuickstep.testPressback to fail.

Bug: 318675970
Flag: ACONFIG com.android.systemui.predictive_back_qs_dialog_anim DEVELOPMENT
Test: TaplTestsQuickstep
Change-Id: I326577575d9e51e0f9ae879bca76e9c254f4ea34
2024-01-08 13:31:51 +01:00
Johannes Gallmann
d0aa5b82db Fix stuck wallpaper with predictive back
Bug: 315149515
Flag: NONE
Test: Manual, i.e. visually verifying that wallpaper never jumps to a new zoom level with predictive back enabled
Change-Id: I17b12bdfd3ef5c9cffbc64df3d26ae140e506dc6
2024-01-05 11:30:58 +01:00
Johannes Gallmann
436b9939e3 Hide app icon during predictive back to home
Bug: 311337169
Flag: ACONFIG com.android.systemui.predictive_back_qs_dialog_anim DEVELOPMENT
Test: Manual, i.e. testing predictive back to home on device and verifying visually that app icon behaves correctly
Change-Id: I91491d91d004d81f4abc67c361c8824eba8dfdcd
2024-01-03 16:45:16 +01:00
Anushree Ganjam
b8a71816e1 [Refactor] Use constants from Cuj.java instead of InteractionJankMonitorWrapper.
Bug: 303105164
Test: Manual
Flag: NA
Change-Id: I05a36fc0421502cd472dd79035b73a69d05592d2
2023-12-13 16:43:16 -08:00
Vadim Tryshev
3277cbdb17 Fixing non-sending wallpaper animation finish event
Wallpaper animation may be interrupted with an animation to go to Normal state.
Then the animation won't succeed, but it will still end.

Bug: 315074923
Flag: N/A
Test: presubmit
Change-Id: I15a106de78030f6935978539d333cc85ee95b4e7
2023-12-08 14:11:55 -08:00
Vadim Tryshev
61434924f0 Waiting for wallpaper animation completion when configuring new widget
This will help to ensure that Launcher state has settled before continuing the test.

Bug: 313926097
Flag: N/A
Test: presubmit
Change-Id: Ice7ae8a2517d68c53d135a34cc33e11f3203f788
2023-12-05 13:32:41 -08:00
Johannes Gallmann
1de8952a30 Fix task window losing scale when going back to home
Bug: 305934426
Flag: NONE
Test: Manual, i.e. testing back to home with different devices and device orientations
Change-Id: I3eddbc918de95be713aecb469501b01e6b7b3d3b
2023-11-28 11:33:29 +01:00
Luca Zuccarini
d9421f929c Merge "Revert "Reuse the main depth controller for launch animations."" into main 2023-10-27 23:01:00 +00:00
Luca Zuccarini
8209517c2c Revert "Reuse the main depth controller for launch animations."
This reverts commit ff2b38e366.

Reason for revert: Caused jank regressions: b/307779813, b/307766171.

Change-Id: I3d513196f9fd8f0768affdda73c0ab8924790037
2023-10-27 12:24:08 +00:00
Luca Zuccarini
d7e3d8ab90 Merge "Reuse the main depth controller for launch animations." into main 2023-10-24 14:31:20 +00:00
Sunny Goyal
8bbd8d4c43 Remove RPC due to unnecessary permission check
Bug: 302400996
Test: Presubmit
Flag: N/A
Change-Id: I9c03e95f37e6e7be8a61ad6f5f7548b4860a1704
2023-10-18 10:52:17 -07:00
Schneider Victor-tulias
3c732aa71b Merge "Default to using AppLaunchAnimationRunner when no LaunchableView can be found" into main 2023-10-17 17:22:07 +00:00
Schneider Victor-tulias
7802dfb44d Default to using AppLaunchAnimationRunner when no LaunchableView can be found
Flag: not needed:
Fixes: 305699288
Test: ran launcher and launched apps
Change-Id: I5ab4f3c7d976e463c29340a4a00edf37e15abf47
2023-10-17 11:30:21 -04:00
Luca Zuccarini
ff2b38e366 Reuse the main depth controller for launch animations.
The two controllers don't own any unique state, other than the current
depth state. These two _should_ never diverge anyway, because there is
only one valid depth at any given time. By using the same controller all
the time we can enforce this invariant.

Everything else is basically just registered and unregistered listeners,
which the main controller already does properly and always has the same
state in that regard as the ad-hoc one that we're removing.

Finally we don't need to take care of any cleanup explicitly, as we did
before.

Bug: 293427436
Flag: N/A
Test: manual
Change-Id: If6ea68847a60254df76e806eac2679ae0415bfe0
2023-10-17 12:16:25 +00:00
Stefan Andonian
17ee527e15 Don't show FloatingIconView during Back to Home Animation when animations are disabled.
Bug: 235915161
Test: Reproduced the issue locally, then verified that the fix worked as
desired without introducing unwanted side effects.

Change-Id: I3db3b2ddbd34a2ef19eae10282758df32c2d5b3f
2023-10-05 17:44:12 +00:00
Luca Zuccarini
850a282446 [Toast] Fix ANR when tapping on rich card chip. am: ba44979d79 am: f876cb4bf4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24894969

Change-Id: Iac57076c82c798876d7d94c9f03d3fc1d34bc09f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-29 18:41:51 +00:00
Luca Zuccarini
ba44979d79 [Toast] Fix ANR when tapping on rich card chip.
This method recursively looks up the view hierarchy for a suitable view
to animate. The wrong variable was causing an infinite loop by never
updating the object being checked for the end condition.

With the fix, the animation behaves as expected.

Fix: 302568434
Flag: ENABLE_SEARCH_RESULT_LAUNCH_ANIMATION
Test: see video in the bug.
Change-Id: I123e50f1618a1e48256c0c976eeb46c93e8391b2
Merged-In: I123e50f1618a1e48256c0c976eeb46c93e8391b2
2023-09-29 11:41:55 +00:00
Wei Sheng Shih
64116af237 Merge "Transfer the animation bounds to another coordinate if needed." into main 2023-09-14 10:02:28 +00:00
wilsonshih
3228322d49 Transfer the animation bounds to another coordinate if needed.
For a remote close animation target, because the orientation can be
different from launcher, so when launcher applying surface animation
to it, there should do another coordinate transfer based on it's
coordinate.
Also for closing animation, there shouldn't use #getWindowTargetBounds
because it only search for opening target.
There is no change when launcher's orientation matches animation target.

Bug: 254805643
Bug: 298318284
Test: close activity in each oritation, verify the position of remote
animaiton target is aligned with the floating view.

Change-Id: I7799357695a467f1bfc653e4f058a5e646ea2405
2023-09-14 02:41:21 +00:00
Schneider Victor-tulias
9e6a845ca4 Merge "Add error handling to prevent IllegalArgumentException" into udc-qpr-dev 2023-09-11 15:30:05 +00:00
Schneider Victor-tulias
785a7511b6 Add error handling to prevent IllegalArgumentException
ActivityLaunchAnimator.Controller.fromView requires an instance of LaunchableView, however findViewWithBackground had no checks to return one. updated the check to make the exception less likely.

Flag: not needed
Fixes: 297564681
Test: ran launcher and launched apps
Change-Id: Iddbe55c1ff66b067f8456d058cbc60a2a698c4ae
Merged-In: Iddbe55c1ff66b067f8456d058cbc60a2a698c4ae
2023-09-05 13:58:42 +00:00
Schneider Victor-tulias
0fb4b268e5 Add error handling to prevent IllegalArgumentException
ActivityLaunchAnimator.Controller.fromView requires an instance of LaunchableView, however findViewWithBackground had no checks to return one. updated the check to make the exception less likely.

Flag: not needed
Fixes: 297564681
Test: ran launcher and launched apps
Change-Id: Iddbe55c1ff66b067f8456d058cbc60a2a698c4ae
2023-09-05 13:57:11 +00:00
Fengjiang Li
e180de6b20 Fix memory leak of Launcher activityfrom QuickstepTransitionManager and LauncherBackAnimationController
We should also avoid using non-static inner class that extends IOnBackInvokedCallback.Stub and IRemoteAnimationRunner.Stub inside LauncherBackAnimationController, which references the entire LauncherBackAnimationController object.

1. When launcher is created, a Runnable is posted to ShellExecutor to call BackAnimationController#registerAnimation
2. When launcher is later destroyed, another Runnable is posted to same ShellExecturo to call BackAnimationController#unregisterAnimation
3. If the execturo queued the 1st runnable, then we have leaked LauncherBackAnimationController object, including Launcher activity.

This CL fixes the leak by making the Stub static inner classes, and use weak reference hold reference to launcher activity.

Bug: 297806573
Test: Grab a heap dump and this reference no longer exist
Flag: N/A
Change-Id: I78853e900a98399b02682ba2d9179e544a4030d5
2023-08-30 23:43:20 -07:00
Sunny Goyal
57a83b5732 Using CUJ_APP_CLOSE_TO_HOME_FALLBACK when fallback animaiton is playing
Bug: 281873427
Test: N/A
Flag: N/A
Change-Id: I7745b8b7d7b48fa5a4f58e8db7e99865226e81d5
2023-08-16 12:30:27 -07:00
Sunny Goyal
c1d1e68a82 Removing some unused overrides in Launcher
> Changing AddItemActivity to use RemoteAnimation directly
  to avoidTransitionManager override

Bug: 273828110
Test: Manual
Flag: N/A
Change-Id: I49777e7eeba00319476b0a239bc1cdac37833457
2023-08-11 12:31:49 -07:00
Andy Wickham
ea12dd4e39 Merge "Make some things public for reuse." into udc-qpr-dev 2023-07-31 18:19:22 +00:00
Johannes Gallmann
19721d5e28 Merge "Extract Launcher resource interpolators to Animation Library" into udc-qpr-dev 2023-07-31 12:36:43 +00:00
Andy Wickham
2f72b2efb8 Make some things public for reuse.
Test: With sister change.
Flag: N/A
Bug: 292000892
Change-Id: I8a20b9d4d5df748f90d907a10fe99d066d700170
2023-07-28 16:15:20 -07:00