Commit Graph

35 Commits

Author SHA1 Message Date
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
Pat Manning
cc31ba5360 Do not animate moving to rest state on CHANGE_ACTIVE_SCREEN.
Fix: 259380717
Test: manual
Change-Id: Icec103b26603290c7998977fa9c4d89132620a9d
2022-12-21 11:37:47 +00:00
Jeremy Sim
08a9bcac1f Fix issue with Overview thumbnails appearing blank in certain situations
This CL fixes an issue where canceling any Launcher animation by entering Quick Switch would cause Overview to appear with all thumbnail tiles blank.

The issue occurred because we recently added a reset() to Overview that triggered on all state transition animation cancels. This fixed some issues, but introduced this bug.

Fixed by tailoring the reset() to only fire on animation cancels within BaseRecentsView and FallbackRecentsView.

Fixes: 246232494
Fixes: 243471493
Test: Manual
Change-Id: I175a22d52597a63e164a6f3b9353c62b199b0712
2022-09-17 16:01:46 -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
Jeremy Sim
b33471a21f Fix bug with Launcher animation canceling, esp. around OverviewSplitSelect
This commit fixes a bug where the user could cancel animations when transitioning between Launcher states, potentially resulting in a state where Overview elements (task thumbnails etc.) were wrongly hidden or invisible.

The bug occurred because functions such as createInitialSplitSelectAnimation() and createAtomicAnimation() did not carry out any cleanup upon animation failure. This resulted in RecentsView potentially being in a polluted state for the next launch.

Bug was fixed by adding cleanup routines to two onAnimationEnd listeners.

Fixes: 242715097
Test: Manual
Change-Id: I05415ecf515e247aa535e3ca8371e540c3189b01
2022-09-01 20:51:53 -07:00
TreeHugger Robot
4608bd00dc Merge "Revert "Set mState = mCurrentStableState in onAnimationCancel()"" into tm-dev 2022-05-16 18:15:14 +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
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
Jon Miranda
a234a8ea85 Testing to see if waiting for transition to end will fix flaky tests
Test: presubmit
Bug: 202735477
Change-Id: Icf62003b9f422cf0e327365260c36f6d57b71aef
2021-11-05 12:31:15 -07:00
vadimt
155ce05218 Removing unused tracing
Test: presubmit
Bug: 192018189
Change-Id: I31e6fd8410e879aeda0249d89f650e1a41de6030
2021-09-14 16:42:59 -07:00
vadimt
bc79473313 Logging for Nexus home activity appearing after to-home gesture in L3.
Utilities.IS_RUNNING_IN_TEST_HARNESS is used as a condition
for logging in the background NexusLauncher where sDebugTracing is
not set.

Bug: 192018189
Test: presubmit
Change-Id: Ib08656a12c778b7bf968532e3ba899a03031fd7b
2021-08-17 18:13:50 -07: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
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
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
Tony Wickham
52bbcc3976 Invert StateAnimationConfig.PLAY_ANIMATION as SKIP_ALL_ANIMATIONS
This allows the default flag to be 0 instead of PLAY_ANIMATION, and is
aligned with the existing SKIP_OVERVIEW and SKIP_DEPTH_CONTROLLER
flags.

Test: Navigate to various states, works as before
Bug: 175137718
Change-Id: I2af1792e7fbd5bca82afb225290fd6b545368dcf
2021-03-29 11:59:14 -07: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
Hyunyoung Song
a907a995c9 Hide keyboard only when scrolling happens
Bug: 179307221
Test: see attached video

Change-Id: I9b13c8f62122a6d7bf56a28c830be9a9dbfee52a
2021-03-16 00:05:04 -07:00
Sunny Goyal
b5181c8c39 Revert "Revert "Removing insets controller animation as part of ..."
Revert "Revert "Moving insets animation to StateHandler so that ..."

Revert submission 13823490-revert-13810332-insetcontroller-CLXXLCZAUM

Reason for revert: Fixed original error in ag/13823726
Reverted Changes:
Ie19a3fd90:Revert "Moving insets animation to StateHandler so...
I4eb33772a:Revert "Removing insets controller animation as pa...

Change-Id: I7fb395c51ea99081913bc99515257e98c0a32754
2021-03-10 07:39:12 +00:00
Pasty Chang
13358f65ab Revert "Removing insets controller animation as part of all-apps..."
Revert "Moving insets animation to StateHandler so that it can b..."

Revert submission 13810332-insetcontroller

Reason for revert: QsbLayout#getEditText() return object is changed, but extended class HotseatQsbWidget wasn't updated.

https://android-build.googleplex.com/builds/submitted/7197042/aosp_crosshatch-userdebug/latest/view/logs/build_error.log

Reverted Changes:
If6a088d14:Removing insets controller animation as part of al...
I296415604:Moving insets animation to StateHandler so that it...

Change-Id: I4eb33772acd887d6e1d92a9ecde41cf1e0687896
2021-03-10 06:58:51 +00:00
Sunny Goyal
0724113b3d Removing insets controller animation as part of all-apps opening
Adding support for easier extension of StateHandlers

Bug: 180143210
Test: Verified on device
Change-Id: If6a088d1482c9b268b21786c4694f6e0927be0c3
2021-03-08 18:38:25 -08:00
Winson Chung
13c20193eb Removing old logs
Bug: 156095088
Test: Presubmit
Change-Id: I61b44fd4ee96de405482f9cf9b6a06d87a295898
2021-03-04 06:16:41 +00:00
Tony Wickham
4fb5f74bb4 Track OverviewToHomeAnim with StateManager
This way we mark the the current state as NORMAL at the start of
the animation, and cancel it as part of other state transitions.
This allows us to interact with launcher (e.g. to go to all apps
or pull down the notification shade) during the animation.

Also use OverviewToHomeAnim from RecentsView#startHome() to
ensure the animation is consistent, e.g. doesn't fade out
RecentsView, scrolls to page 1, etc.

Bug: 144170434
Change-Id: I5348565b9e705d8ffba39818dde9efe82b16bb7a
2020-08-14 14:38:24 -07:00
Tony Wickham
e6f9e0eb7e Revert "Update overview from home transitions"
This reverts commit f3bc797182.

Reason for revert: updating upstream, need to wait to cherry-pick until that's approved

Change-Id: I702286dba66fb4582ab682a5b0b8cd80ccebf346
2020-08-10 19:13:17 +00:00
Tony Wickham
f3bc797182 Update overview from home transitions
For both NoButtonNavbarToOverviewTouchController and
NavBarToHomeTouchController:
- Have consistent resistance applied such that RecentsView scales
  down and translates up slightly (but not as much as from an app)
- Have consistent animation to home if you fling to that state
  rather than stay in overview. This is handled by a new class,
  OverviewToHomeAnim, which consolidates logic from NBTHTC and
  overrides some interpolators such that RecentsView doesn't fade
  out or translate downwards during the animation (it just slides
  off the screen while the home animation plays).

Also make overview actions not clickable when alpha == 0, so that
you can tap the hotseat/qsb during the transition from home to
overview.

Bug: 144170434
Change-Id: Ic291f285ff2f63c477633c48d4fadb23cf70c28a
2020-08-08 19:18:57 +00:00
Sunny Goyal
eaf7a95546 Changing minimum supported Launcher version to 26
Change-Id: I49fcf874430ac53c3246371e179fbd828e14e4da
2020-07-29 17:30:19 -07:00
Jonathan Miranda
f496ea4634 Revert "Fix bug where double swipe gets us stuck in Hint state while in Overview."
This reverts commit a8c08584a7.

Reason for revert: "caused a regression with quick switch from home: if you start the gesture then swipe back to the left, it ends up launching the task anyway"

Change-Id: I8e12e2de46b6fc6a3faeb0336762da08080c61d6
2020-07-29 19:03:29 +00:00
Jon Miranda
a8c08584a7 Fix bug where double swipe gets us stuck in Hint state while in Overview.
With the second swipe, we never complete the swipe to Overview

NoButtonNavbarToOverviewTouchController#maybeSwipeInteractionToOverviewComplete
- mReachedOverview = true
- mDetector.isSettlingState = false

And then the second swipe starts the state transition to Hint but then
it never gets completed because:
1. The animation starts
2. Gets cancelled
3. Starts again
4. Finishes, but is not marked as success since the cancel in #2 was never
   set back to false

Bug: 160759508
Change-Id: I8c3972e6209c3d5a4a0bdd9f9b7683de18105d57
2020-07-20 10:29:29 -07:00
Tony Wickham
5d4e8541d0 Fix QSB animating separately from workspace during stagger anim
- Don't play any state animation if animComponents == 0
- StaggeredWorkspaceAnim handles depth controller

Bug: 157596833
Change-Id: I6ae4c5da2e837c61b57349e708b7499af8e14aaa
2020-05-28 16:42:45 -05:00
Sunny Goyal
672d02cd39 Unifying swipe handling for fallback launcher
Previosuly we had a different swipe handler for 3P Launcher which
started either recents or Launcher based on the initial interaction
(horizontal or vertical). This was primarily because we had to wait
for recents transition to finish before starting another activity
which could delay going to home.

Now we always start recents transition to recentsActivity. This allows
us to use the same swipe handling logic as QuickstepLauncher. Home
activity can be started while recents transition is running and can be
controlled using onTaskAppeared callback.

Bug: 156924169
Bug: 156398988
Bug: 156295255
Change-Id: Ib9f02e0281e8d674bde2f4a81eca5fc8a5962144
2020-05-19 19:41:30 -07:00
Sunny Goyal
b9abae9f0f Using taskView simulator for animation a task to recentsView
Also applying transform params in DeviceLockedInputConsumer directly
instead of going through AppWindowAnimationHelper

Bug: 156398988
Bug: 155816922
Change-Id: I791e1a9feb07c4fb787130f8d040a4f404faf734
2020-05-15 14:07:29 -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