Commit Graph

30 Commits

Author SHA1 Message Date
Tony Wickham
7eb5b53865 Keep insets stable when taskbar is destroyed/recreated
- Calculate nav bar insets ourselves. Currently when taskbar is going to be present, we use taskbarSize as the nav bar insets. This is consistent with other existing calculations, but going forward we should instead always use the nav bar size instead of taskbar size, given we don't want taskbar to inset launcher (since taskbar is hidden).
- Also update tappable insets to be 0 in gesture mode. Test: Swipe to all apps, ensure there's no background protection at the bottom.

Test: Rotate device, no visual jumps
Test: Stash taskbar, quick switch a couple times without settling, and swipe up to overview; no jank due to reapplyState()

Bug: 198798034
Fixes: 197232424
Fixes: 197212581
Change-Id: I4c2bb5816dbb214846bd9f2a46c6f759c0545911
2021-09-21 13:52:36 -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
Alex Chau
071862edbd Merge "Show overview as grid in fallback recents" into sc-dev 2021-03-17 00:49:29 +00:00
Alex Chau
ecd12b32c9 Show overview as grid in fallback recents
- Replace mShowAsGrid with state specific mOverviewGridEnabled and mCurrentGestureEndTarget
- Avoid showing invisible home task in grid
- Fix quick switch out of orientation in fallback recents
- Add a HOME state to switch to when starting home, to avoid showing grid overview briefly in quick switch
- Separate clear all button and overview actions handling
- Always maintain first task's fullscreen translation at 0 to avoid jumping when mOverviewFullscreenEnabled changes
- Moved fullscreenTranslation calculation to RecentsView
- Added GestureEndTarget -> BaseState translation to allow querying displayOverviewAsGrid for a displayOverviewTasksAsGrid

Bug: 174464863
Test: Launch overveiw from home, launch overveiw from app, launch into app, test for both small and large screens
Change-Id: Iee06d94d3067ea45cadd2051717223ddc0e6e70c
2021-03-16 17:08:03 +00: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
Sunny Goyal
9cc6ecfa11 Fixing dragView not getting removed on returning home
Bug: 179330150
Test: Verified on device
Change-Id: Id0baadac36b700bd1c57382b0024c248063f9127
2021-02-12 13:08:04 -08:00
Sunny Goyal
6c0c61acd8 Keeping Launcher in overview UI if activity is restarting
due to UI mode changes

Test: Verified Launcher behavior locally
Bug: 148988542
Change-Id: Id83e5e0892666af1420e8f8c711b83f1ea355188
2020-12-08 19:22:01 -08: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
Sunny Goyal
9d89f75ce4 Fixing fallback recents not getting proper insets on configuration change
> Using common code for Launcher and recents for insets dispatching
> Fixing recents auto closing when there is no running task

Bug: 158750568
Bug: 159133601
Change-Id: Iee25c603a77a1ac546ada1840f3afaf5797b8802
2020-06-19 11:41:53 -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