Commit Graph

197 Commits

Author SHA1 Message Date
Jon Miranda
5945226515 Fix spring not springing when unstashing.
The spring animation was getting cancelled by the reset
animation.

Added a check to avoid creating a new reset animation if we
are already animating to the final value.

Bug: 273961611
Change-Id: I3afb62b89b5f6fbe920906499db2497ef8e94069
Flag: ENABLE_TRANSIENT_TASKBAR
Test: stash transient taskbar
2023-03-22 11:53:58 -07: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
Fengjiang Li
37305d49fa [Predictive Back] Fix bug where closing task bar's all apps will show scale animation even if predicitve back is disabled
TaskbarAllAppsSlideInView.onBackInvoked() can be triggered by ViewGroup.dispatchKeyEvent(event) with KEYCODE_BACK, in that case we should skip scale animation

Test: manual
Fix: b/272317866
Change-Id: I19468cfe4765de5276c479b0f7fa88ec0690bbfd
2023-03-10 08:54:55 -08:00
Fengjiang Li
e884c2c79f Support predictive back from all apps to home
bug: b/238475505
Test: manual

Change-Id: Ibf4f7f41a26b044a538e2cd566d2297ed88f1b99
2023-01-11 22:55:28 +00:00
Federico Baron
47d81686e6 Move AnimatedFloat from quickstep to launcher
We are moving AnimatedFloat to launcher to be able to use this in class in launcher. Having it in launcher will allow us to do restore icon treatment animations to do with scaling the icon size

Bug: 254858049
Test: verified that the device still works
Change-Id: I1c4c47ab436c389a94abf7c910c1a44724efc955
2022-12-08 13:58:07 -08:00
Andy Wickham
493831af1a Fixes for floating search bar (e.g. background protection).
- Adds background protection for the search bar
 - Views animating based on keyboard now support manual swipes.

Bug: 213954333
Bug: 259004115
Bug: 251460671
Test: Manual
Change-Id: I055766126fb46a8e8b48907e442c9e54aaa4badf
2022-12-06 17:59:53 -08:00
Luca Zuccarini
05d19dc261 Make sure that PropertySetter applies the final state.
In some tests with animations disabled, NO_ANIM_PROPERTY_SETTER wasn't
applying the correct final value. See ag/20139786 for more context.

Bug: 251769927
Test: see other CL in topic, plus manual
Change-Id: I296de1a0d64768c43608839745cc7e955ecd2076
2022-10-27 09:31:57 +00:00
Jeremy Sim
a4ba516797 Update animations for TM-QPR: OverviewSplitSelect > Confirmed transition
This change updates the animation for confirming a split.

Includes:
- New timings
- A new interface, SplitAnimationTimings, that centralizes timing values for splitscreen animations

Fixes: 241126570
Test: Manual
Change-Id: I61339964a7254618b368b17f00fda8f5efb53de4
2022-09-19 12:04:33 -07:00
Jeremy Sim
21a5b12b6f Update animations for TM-QPR: Overview > OverviewSplitSelect transition
This change updates the Overview > OverviewSplitSelect animation to the latest spec. This is a re-upload of a previous change, ag/19464657, but no longer will cause the b/241165022 issue.

Includes:
- New timings
- Task thumbnails slide in with an "overshoot" animation
- Icons fade out and fade in appropriately
- SplitInstructionsView has a new compound "unfold" animation

Bug: 236760307
Test: Manual on tablet. Made sure the b/241165022 issue is fixed.
Change-Id: Ia22f6b6d7b9474b782e693fae2320a34a2985b18
2022-09-14 18:06:05 -07:00
Winson Chung
82638f6ef1 Fix missing call to super cancel method
- Without the call, it's interpreted as a successful animation to the
  listener even though it was canceled

Bug: 245829938
Test: Swipe to previous task, immediately after settling touch the
      swipe area again
Change-Id: I531cbda0c2bc8168a312a14854a7a73fafd8f678
2022-09-09 05:58:27 +00:00
Alex Chau
3193522616 Change wallpaper depth value in AllApps bottomsheet
- Cap AllApps wallpaper zoom to workspaceContentScale rather than all the way to max depth (config_wallpaperMaxScale)
- Changed both workspace scale and depth interpolator to correlate with AllApps threshold

Bug: 240580498
Test: manual
Change-Id: I0342a37c72206268dcffc5697a212704a41b020f
2022-09-01 21:26:30 +01:00
Jeremy Sim
2fe7dd7306 Revert "Update animations for TM-QPR: Overview > OverviewSplitSelect transition"
This reverts commit a50bb39048.

Reason for revert: Causes a P1 bug (b/241165022).

Fixes: 241165022
Bug: 236760307
Change-Id: Icc080d9a37e26d70d0f4cf846a4fd39df3b71625
2022-08-18 21:28:54 +00:00
Jeremy Sim
a50bb39048 Update animations for TM-QPR: Overview > OverviewSplitSelect transition
The animation from Overview to OverviewSplitSelect is now updated to the latest spec. See bug for details.
- New timings
- Task thumbnails slide in with a new spring animation
- Icons fade out and fade in appropriately
- SplitInstructionsView has a new compound "unfold" animation

Bug: 236760307
Test: Manual on tablet and phone. Looks good on both true and fake orientations.
Change-Id: If98d4464aa51c876d79bee9672279992a2cf9026
2022-08-14 10:34:51 -07:00
Luca Zuccarini
4618d3471f Merge "Add support for text color animations in PropertySetter." into tm-qpr-dev 2022-06-09 11:26:17 +00:00
Josh Tsuji
be86a05af3 Set visibility when alpha == viewAlpha.
Fixes: 232993553
Test: manually prevent all apps from going away on screen off, then unlock to it and swipe up
Change-Id: If2f30de9940c158b74064b3b935e38abdb8aab5f
2022-06-07 01:44:13 +00:00
Luca Zuccarini
8009c1d446 Add support for text color animations in PropertySetter.
Bug: 233223446
Test: manual
Change-Id: Id321ad7f21e804b1d1063fbe207fb783bb45f759
2022-06-02 16:11:12 +00:00
Sunny Goyal
52bbef9d94 Adding support for customiting the animation in PropertySetter
Bug: 233223446
Test: Manual
Change-Id: I53fc39fa4871c9ea5b6eaf324ec1054140ccc292
2022-05-23 09:55:56 -07:00
Luca Zuccarini
3eb149b055 Merge "Update the NORMAL<->ALL_APPS swipe transitions on phones." into tm-dev 2022-05-17 16:06:27 +00:00
TreeHugger Robot
4608bd00dc Merge "Revert "Set mState = mCurrentStableState in onAnimationCancel()"" into tm-dev 2022-05-16 18:15:14 +00:00
Luca Zuccarini
ea948c2b33 Update the NORMAL<->ALL_APPS swipe transitions on phones.
Bug: 144877924
Test: manual
Change-Id: I47d4cdedea69b921711c33e2905bc429e7d1db35
2022-05-13 19:09:17 +00:00
Alex Chau
5d301a6fca Revert "Set mState = mCurrentStableState in onAnimationCancel()"
This reverts commit 22f8ad0dc0.

Bug: 228276181
Reason for revert: b/232336303, b/232347110

Change-Id: I8fd27e011328c222f0947553197fcf448150fae0
2022-05-12 10:13:08 +00:00
Tony Wickham
b73c57b2f6 Merge "Set mState = mCurrentStableState in onAnimationCancel()" into tm-dev 2022-05-11 21:43:51 +00:00
Luca Zuccarini
e75b1c8a19 Merge "Update the NORMAL->ALL_APPS transition when tapping on QSB on phones." into tm-dev 2022-05-10 22:35:02 +00:00
Luca Zuccarini
ef006c7603 Update the NORMAL->ALL_APPS transition when tapping on QSB on phones.
- New interpolators
- New duration
- Removed workspace translation
- Removed overlapping fades -- are now sequential

See video in the bug.

Bug: 227745955
Test: manual
Change-Id: I19fa19a3806e963a04c5e694a52d3c1b921cf51f
2022-05-06 16:07:17 +00:00
Josh Tsuji
d2ae944a43 Actually interpolate the time value.
This was broken and always linear.

Bug: 229890190
Test: atest SystemUITests
Change-Id: I7db6f5025c0fc70c9899c97ee23e486ede61a085
2022-05-06 15:15:27 +00:00
Alex Chau
f39cc126bf Tune AllApps dismiss animation
- Avoid overriding interpolator in AllAppsTransitionController.setStateWithAnimation as it's no longer needed and it'll wrongly override interpolator for ANIM_ALL_APPS_FADE
- Override ANIM_ALL_APPS_FADE to FINAL_FRAME in QuickstepAtomicAnimationFactory for tap deadzone to dismiss animation, also added EMPHASIZED_ACCELERATE for the dismiss animation
- Tuned dismiss animation across form factors to 300ms

Fix: 220336617
Test: manual
Change-Id: I4b3e827b503dcb1dd39f0bd99d4c1dd5ffdba0f3
2022-04-29 20:31:26 +01:00
Tony Wickham
22f8ad0dc0 Set mState = mCurrentStableState in onAnimationCancel()
Context: there was a bug where you could get stuck in HintState if you
did the following (timing is critical):
1. Short swipe from nav region towards HintState, but not far enough or
   fast enough to commit before letting go; this cancels the state
   animation, returning towards Normal (but, crucially, StateManager
   still has state set as Hint)
2. While previous animation is animating back to Normal, swipe up again,
   but this time faster/farther to actually reach Hint; this time, the
   animation does go towards Hint, but gets stuck there. The reason it
   gets stuck is because StateManager thinks we're already in Hint from
   step 1, so doesn't call onStateTransitionEnd(Hint) in step 2. Thus,
   we never get QuickstepLauncher#onStateSetEnd(Hint), which is what we
   rely on to return to Normal.

Fix is to have StateManager change its internal state to
mCurrentStableState (the state the transition started from) if the
animation is canceled. (Also need to keep that state if restarting the
animation, which AbstractStateChangeTouchController does in onDragEnd,
regardless of whether it ends up going to mFromState or mToState.)

Test: short swipe followed immediately by fast fling from nav region on home successfully goes to HintState and back to Normal
Fixes: 228276181
Change-Id: I2e3aeac06d482b57729416d5de55cc6ffc9df23c
2022-04-19 11:59:04 -07:00
Josh Tsuji
538581639e Merge "Add the staggered ring appear animation!" into tm-dev 2022-04-11 14:32:44 +00:00
Josh Tsuji
feb31ca567 Add the staggered ring appear animation!
Bug: 197636896
Test: a lot of unlocking
Change-Id: I9a713ac12eae5128d409166110cece0b86d89ae4
2022-04-06 14:26:50 -04:00
Alex Chau
c83ea5f8fb Make AllApps bottom sheet follow finger and snap after 30% progress
Bug: 220336617
Test: manual
Change-Id: I0b6296cf5abf0f0a5f34fc2a0b5be93dc93ebf3f
2022-04-06 13:30:41 +01:00
Sunny Goyal
6bc4257d86 Separating refresh rate tracking to a separate class
Bug: 221961069
Test: Presubmit
Change-Id: I04091ebc9f3d88d2dbbde1bf0d5390c815e026d1
2022-02-28 17:13:00 -08:00
Alex Chau
b8c22e1155 Tune AllApps bottom sheet VisD and motion
- Make AllApps bottom sheet solid and appears from bottom
- Teleport AllApps bottom sheet as user drag to reduce drag range
  - Consider teleport interpolation for state transition sdetection
- Tuned workspace motions for AllApps bottom sheet (no translate, shrink)
- Add portrait vertical translate for tablet portrait including taskbar AllApps
- Updated bottom sheet handle and created common variables for other bottom sheets

Bug: 208599118
Test: manual on tablet AllApps, taskbar Allapps and handheld AllApps
Change-Id: I69dba5f155914cd012cc8ef3be1ef71fb2be5a40
2022-02-23 17:08:06 +00:00
Vinit Nayak
2a93bc5b30 Add split support for 3P launcher
* Copied logic mostly from
Base/RecentsViewStateController
* There's one KI crash specific to 3P
(b/209694087)
* Swipe to home animation is TODO, but
then again it also seems incorrect for
full-screen app. 3P has many cosmetic issues
throughout.

Bug: 195607777
Test: Tested w/ Nova launcher with grid
and non-grid, able to invoke split screen with
same animations as 1P launcher

Change-Id: I35a1bc92a51caccac4214289e614000cd47bb503
2021-12-09 12:52:04 -08:00
Tony Wickham
821e37b447 Stash taskbar when IME is present, including during gestures
- SysUI removes SYSUI_STATE_IME_SHOWING when starting a gesture from an app, but because unstashing has implications on the gesture transition (e.g. clips the bottom of the app), we defer handling the ime hiding until the gesture settles. Repurposed the flow that swaps the taskbar background during the gesture to support this case as well.
- Delay the unstash when IME is closing, to align with the end of the IME exit transition
- Remove TaskbarViewController.ALPHA_INDEX_IME now that we stash when IME is opening, since stashing already hides the taskbar icons
- Also support passing a starting progress to the stashed handle reveal animation, to allow it to be reversed when cancelled. For example, when returning to an app that has IME showing, we first start unstashing because we're in an app, but then we get the signal that IME is attached so we stash again almost immediately (within a frame or two).

Test: In both 3 button and fully gestural, open a keyboard in an app, ensure taskbar gets out of the way and then reappears at the end when the keyboard is dismissed
Bug: 202511986
Change-Id: I93c298a98ba369ea6310466ff3f802231c582687
2021-11-23 16:37:06 -08:00
Jonathan Miranda
e2455aa1cf Merge "Significantly reduce gesture feedback when swiping up to home screen." into sc-v2-dev 2021-09-23 23:14:50 +00:00
Jon Miranda
13519e4402 Significantly reduce gesture feedback when swiping up to home screen.
- Uses overscroll damping logic to reduce the velocity
- The start to target rect interpolation can be from the
  start, center, or bottom of the rect depending on where the item
  is on the workspace. This reduces the  amount of distance needed to
  travel between, which helps further reduce gesture feedback.

Bug: 173107751
Test: test closing app that is on:
      -  top row of home screen
      -  middle of home screen
      - in hotseat

Change-Id: I055dd61ca3491807109ff2f6c501bf710c8d340f
2021-09-23 20:13:40 +00:00
y
eb52419282 [Refactor] Extract work profile related logic from AllAppsContainerView to WorkProfileManager
Bug: 195623679
Test: presubmit
Change-Id: I9954fb40034d1804aaf19f0778f95477e48ccc8f
2021-09-22 16:35:56 -07:00
Vinit Nayak
7903758d08 Animate SplitPlaceholderView when entering split from overview
Bugs tracked in b/181704764

Bug: 181704764
Test: Tested on phone and large screen in multiple orientations

Change-Id: I07509006ae3d1f4425dc5119d0c8ed52b41a3bc2
2021-07-22 20:12:26 +00:00
Sunny Goyal
b3eafe97bb Merge "Fixing animation end not-called when cancelling state the animation recursively" into sc-dev 2021-06-21 22:32:23 +00:00
Sunny Goyal
de644313b0 Fixing animation end not-called when cancelling state the animation recursively
Bug: 190856140
Test: Manual
Change-Id: I5d6a00c1d1c0e95e615b7f2115e3e4ebb56b987f
2021-06-21 13:47:49 -07:00
Samuel Fufa
d04a92d1ed Refactor FolderInsetAnimationCallback to be used with any view
- Update ic_corp_off icon to outline
- Remove shadow from work toggle
- Translate work fab when keyboard is shown

Screenshot: https://screenshot.googleplex.com/593tEg7bE4kSS4y

Bug: 191251404
Bug: 191250785
Test: local
Change-Id: Ie7dddfd17eb90575a1e1f67e281070dd8d268f8d
2021-06-16 17:25:53 -05:00
Sunny Goyal
a7b018535b Ensure that the cancel and end listener are called when cancelling state animation
Bug: 190856140
Test: Manual
Change-Id: Ib6b869445cee9fad2a97a590d27429140f2b3ba9
2021-06-11 14:53:55 -07:00
Tony Wickham
26ab4621ce Have AlphaUpdateListener update visibility in onAnimationEnd()
Previously we were only updating visibility in onAnimationSuccess(), which doesn't handle the canceled case.

Test: swipe up from nav bar twice in all apps, ensure all apps is invisible/non-interactable
Bug: 190315266
Change-Id: Ic59e6d4b404de4ee2d17c45d6fa59e2aee70c65f
2021-06-07 22:16:22 +00:00
Pat Manning
cc64218e68 Animate task translation on dismissal.
Test: manual
Bug: 186416527
Fix: 186416527
Change-Id: I3919b96b96fdd490e15968b7c2e680dad7f6e5d6
2021-05-17 16:21:38 +00:00
Tony Wickham
38dd6ec901 Fix AnimatorListeners.forEndCallback()
Override onAnimationEnd(Animator), rather than (Animator, boolean)
which may not be called.

Test: Swipe right to quick switch from home, then swipe back left
(in the same gesture), ensure next quick switch isn't broken.
Bug: 185554764

Change-Id: I53e7526ed5b55fbae9aa654ace70a6ef7561e1d8
2021-05-14 14:49:08 -07:00
Sunny Goyal
01b32466c3 Revert "Revert "Exposing AnimatorListeners in StateManager to receive both success and failure callback""
This reverts commit d7f11d5fb9.

Reason for revert: Fixed initial error
Bug: 185554764

Change-Id: I32cc49f9b3820166736ceb347f33577939aa6efa
2021-05-13 10:23:35 -07:00
Winson Chung
d7f11d5fb9 Revert "Exposing AnimatorListeners in StateManager to receive both success and failure callback"
This reverts commit a75f576890.

Reason for revert: b/187887269
Bug: 187887269

Change-Id: I8a56ff7054e71cf30b113fdaa213397dae0c53cb
2021-05-12 21:25:22 +00:00
Sunny Goyal
a75f576890 Exposing AnimatorListeners in StateManager to receive both success and failure callback
Updating various callers to use onSuccess or onEnd appropriately

Test: Manual
Bug: 185554764
Change-Id: I357dd1fdbe111e7a30d4c8dee520fbd7d9956b7d
2021-05-11 13:53:14 -07:00
Jon Miranda
94e43bd7d8 New motion for ArrowPopup open/close.
Bug: 175329686
Test: long press on apps where container opens above & below
      and where container is aligned left & right

Change-Id: I09bbf57b6e19cc6f022b9a96fb48d8c4ae080813
2021-05-07 19:33:22 -07:00
Zak Cohen
4d35ac3020 Allow Workspace Scrim to be colored per state
Make it possible to set the color of workspace scrim to a different color
per state. Motivated by making Overview Scrim and All Apps scrims different
colors.

Bug: 186253733
Test: Local build and flash
Change-Id: Id7c38ce3c9173308eedfcb7592ececa7bd6bf220
2021-04-27 14:04:46 -07:00