Commit Graph

30 Commits

Author SHA1 Message Date
Sunny Goyal
98b5e1f077 Adding support for skipping animation cancel on reapply
Bug: 314279319
Test: Verified on device
Flag: None
Change-Id: I0a6e9eef77a1d917c0fce7d4bddd079ceeb10c99
2024-01-09 10:35:43 -08:00
Tracy Zhou
de8e25cf11 [Trackpad] Do not reverse two-finger gestures on the homescreen when reverse scrolling is on
- Swipe up to pull up all apps
- Swipe down to pull down notifications
- Same gesture to close in reverse scrolling mode

Bug: 301966246
Bug: 301966690
Test: manual
Change-Id: Ia3770ce8b279d24b2de4844f441f14e0feaf57c7
2023-11-02 12:30:50 -07:00
Andy Wickham
17ef3bde32 Use DECELERATED_EASE for workspace scale for all apps on tablet.
This helps it feel less abrupt and more connected to the gesture.

Demo video: https://drive.google.com/file/d/1TRQzMQfpmsCR5VYE9KXCT9IauOmApUYK/view?usp=drive_link&resourcekey=0-beONDiqU42HcVPj-M7O32A

Fix: 290257598
Test: Manual
Flag: N/A
Change-Id: I62577e2b3e937ab5e72b33754f98517fe5406a08
2023-07-07 17:34:54 -07:00
Andy Wickham
64896f3098 Put the "floating" in ENABLE_FLOATING_SEARCH_BAR.
This means adding the search view to the drag layer, so it can
persist and animate across Launcher states (i.e. Home, All Apps,
Overview, Overview from App).

Some high level things:
 - LauncherState now has a flag indicating if the floating
   search bar should be visible, as well as a method indicating
   how high it should rest when the keyboard is not showing. By
   default the height is set negative if the flag is not present,
   so the search bar will rest off screen in that state.
 - LauncherState also has a new method indicating if the search
   bar should show as a pill when not focused. Currently this is
   done in phone portrait mode in all apps and overview.
 - SearchUiManager now has a method for gestures to hint that
   the search bar will be focused or unfocused soon, e.g. for
   the app -> overview case, we hint that it will be focused
   when crossing the threshold, and unfocused if retracting.
   This allows the search bar to animate during the gesture
   and take or release focus after the state change completes.
 - AllAppsTransitionController lets the apps panel translate in
   from the bottom of the screen, for example when coming from
   an app and we don't want to pop it in halfway up the screen.
   Instead it can slide in gracefully from behind the keyboard
   and floating search bar.
 - KeyboardInsetAnimationCallback can now notify listeners of
   keyboard alpha changes during controlled animations. And
   StateAnimationConfig has a new animation type to control
   the keyboard alpha during the all apps transition.
 - This new ANIM_ALL_APPS_KEYBOARD_FADE is used to pop the
   keyboard in at the threshold for going from an app to all apps.
   Note that its position moves linearly before this, so the
   search bar starts moving up accordingly before the keyboard
   alpha is non-0.

Fix: 266761289
Fix: 268845147
Fix: 267683921
Fix: 265849321
Fix: 266446733
Fix: 269301440
Bug: 275635606
Bug: 259619990
Bug: 261866704
Test: Manual with all the state transitions on phone and tablet
(also folding/unfolding foldable).
Flag: ENABLE_FLOATING_SEARCH_BAR, ENABLE_ALL_APPS_FROM_OVERVIEW
(latter just for the background app interpolator changes).

Change-Id: I6f06552e95747348a62260279626cf407bf145b0
2023-06-12 21:55:24 +00: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
Andy Wickham
830e4b7ce0 Add long swipe from app to overview gesture (with flag).
High level:
 - As you swipe up from an app (OtherActivityInputConsumer),
   a state transition animation to All Apps is created in
   AnimatorControllerWithResistance. The animation is played
   alongside the Recents resistance animation (i.e. past the
   settling point of Overview, which is at mCurrentShift 1).
 - The actual state transition to All Apps only happens if you
   release your finger in the "all apps region." This is set to
   mCurrentShift 2, so double the distance that Overview rests.
 - A haptic plays whenever you enter or exit this region, and
   the all apps animation is set to 0 until the region is
   active. This is so it's clear that something different is
   happening.
 - The panel that was previously used for tablets is now used
   for phones during this transition. It comes in at full
   opacity when you enter the region, and the contents (apps
   and search suggestions) fade in as you continue swiping.
 - The only gesture that is recognized in the all apps region
   is a fling downwards, which will return you to the previous
   app. Otherwise a left/right/up fling or slow release will
   finish the all apps transition.
 - The threshold is ignored if the flag is disabled (default)
   or if FallbackActivityInterface is active.

Flag:
The threshold is ignored if ENABLE_ALL_APPS_FROM_OVERVIEW is
disabled (default).

Bug: 259619990
Bug: 275132633
Test: Manual with and without the flag enabled
Change-Id: Ie311b77252416d97677b2c56fad61dfd392b6fe8
2023-04-26 10:52:04 -07:00
Brandon Dayauon
12c193e6c5 Implement diff haptics going into all apps
Notes:
* the reason why 0.6 -> 1 never happened was because of AllAppsSwipeController where
it had a clampToProgress. By changing lowerbound to 0 the progress actually shows fully 0->1

- composed the haptics in the constructor
- added new listener class in AATransitionController

Added featureflag

bug: 233751149
test: Manually - presubmit, ran “make -j7 Launcher3” from master branch  photo: https://screenshot.googleplex.com/8r5FZh6buzkQMjk
Change-Id: I5e1a24170fdbfdd35b8d8f24af0ec5e8586641a2
2023-02-07 11:36:42 -08:00
Luca Zuccarini
fb4429f0b0 Revert^2 "Update timings for the Home <> All Apps transition."
e18ac479e5

Change-Id: Id09987b2c67be70e62349574973d4bc62b10bc9d
Bug: 263221786
2023-01-10 17:05:29 +00:00
Luca Zuccarini
e18ac479e5 Revert "Update timings for the Home <> All Apps transition."
Revert submission 20641089-b/254835725

Reason for revert: b/263221786

Reverted changes: /q/submissionid:20641089-b/254835725

Change-Id: I6aa0955b4ac7ed47ea254514b364b0ab94b632bf
2022-12-27 14:18:05 +00:00
Luca Zuccarini
43e3d45042 Update timings for the Home <> All Apps transition.
Also updates some interpolators to make the manual and atomic
transitions more homogeneous.

Also also updates the commit point so it matches the transition point
between the two states exactly.

Note: the background scale is currently too much, and it needs to be 1/3
of the total distance to match the Workspace scaling. To do this, we
simply scale down the depth by a factor of 3 when calling the background
zoom-out API in the DepthController.

Bug: 254835725
Test: see videos in bug

Change-Id: I605546921e9ee4dfc852794c56495c72f0b916e1
2022-12-07 13:12:16 +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
Luca Zuccarini
c703f3a3e0 Unify the source of truth for NORMAL <> ALL_APPS transitions.
Bug: 231682175
Bug: 234812580
Test: manual
Change-Id: I5b66735474915d7a59bda337f67df37ff397908a
2022-06-16 16:40:26 +00:00
Luca Zuccarini
a6c36eb4d0 Merge "Update the workspace and background scale interpolators." into tm-dev 2022-06-01 16:51:42 +00:00
Luca Zuccarini
a36af25ab7 Remove workspace fade from ALL_APPS > NORMAL transition.
This applies to phones only for the one-off transition (Home gesture or
swipe back. See before and after videos in the bug.

Bug: 234359814
Test: manual
Change-Id: I8f4fc9ec40687b641a721bd28b32fcf50514861f
2022-05-31 15:46:28 +00:00
Luca Zuccarini
7ee40a4190 Update the workspace and background scale interpolators.
The spec had a typo (EMPHASIZED_DECELERATE instead of
EMPHASIZED_ACCELERATE). In addition, we're now using LINEAR for the
background since the feel is smoother this way. Cleared with motion
(simonroberts@).

Bug: 232418544
Test: manual
Change-Id: I492dbe8008856d331836793177f1dd58c3265ca2
2022-05-30 09:47:40 +00:00
Luca Zuccarini
1c89ee8cb1 Additional polish for the NORMAL<->ALL_APPS transitions.
The depth of ALL_APPS is set to 2 because in the legacy transitions the
swap happens at 0.5. The depth controller bounds the value to 1, so for
the second half of the animation the value is always 1. Because of this,
in order to have the right timing during the blur and scale we cap the
interpolator to 0.5.

Workspace fade is also removed, per spec.

Bug: 232418544
Test: manual
Change-Id: Idfd92c8b2b571ad911a0a5a59d39c5911e4131e4
2022-05-13 22:23:42 +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
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
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
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
sfufa@google.com
3b6b03b756 [Search] Introduce feature flag ENABLE_ONE_SEARCH
Bug: 201781284
Test: Manual
Change-Id: I31f8b6fe5664c874e4c9605a1d174807b6170df0
2021-10-13 11:28:09 -07:00
Samuel Fufa
776443b337 [AllApps] NORMAL <-> ALL_APPS motion clean fixes for AOSP
- Avoids drawing on scrim when headerProtection is not enabled.
- Defines a default staggered animation for all apps scrim and content per S design guidelines

[preview attached to bug]

Bug: 191259805
Test: visual
Change-Id: I0d625c9f0caba158ff58f12a39b4f18aedead84b
2021-09-10 18:30:33 -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
Winson Chung
f99351888c Revert "Revert "Merge commit '8d14dbe041199d611839140f1c9285fd4174e9f4' ...""
This reverts commit 087a9e39b6.

Change-Id: I05b17a6e4aaaef6de3c2fa26aad45a39eb2833f9
2020-10-23 09:27:48 -07:00
Alistair Delva
087a9e39b6 Revert "Merge commit '8d14dbe041199d611839140f1c9285fd4174e9f4' ..."
Revert "Merging from ub-launcher3-master @ build 6877130"

Revert "Merging from ub-launcher3-master @ build 6877130"

Revert "Merging from ub-launcher3-master @ build 6877130"

Revert submission 12738409-merge_ub-launcher3-master_6877130

Reason for revert: Introduced crashes to global presubmit

Reverted Changes:
I624658ce6:Merge commit '8d14dbe041199d611839140f1c9285fd4174...
Iccd2f1e3a:Merging from ub-launcher3-master @ build 6877130
I791d64951:Merging from ub-launcher3-master @ build 6877130
Icdd32ab01:Merging from ub-launcher3-master @ build 6877130

Bug: 169963211
Change-Id: I77a4ae59e823147beae8dd7cb9b54ccdace2c7f4
2020-10-05 14:46:26 +00:00
Hyunyoung Song
95786e077d Good riddance UserEventDispatcher
Bug: 165675920
Bug: 161381246

TL;DR;;
- nano -> lite proto
- add all the missing logs to WW
- pin item related logging fix
- Removed logging for assistant

sgrep "com.android.launcher3.userevent.nano." | cut -f1 -d: | xargs sed -i -e 's/userevent\.nano\./userevent\./g'

Change-Id: Ie2a49fdd891cacbd7ef40a1dc9e41ff0574c7517
2020-09-27 13:41:49 -07:00
Sunny Goyal
f3ac703256 Moving animation config so a separate class
Using PendingAnimation for animation builder.
This will allow us to easily add SpringAnimation to stateAnimation

Change-Id: I8d88489a5da6fc85747ef9be7c13858b441cd28a
2020-03-16 19:36:36 -07:00
Sunny Goyal
003782f93c Removing some properties out of AnimationBuilder
AnimationBuilder and PendingAnimation have similar logic. This will
allow to unify the two classes

Change-Id: Id8c1d8a7020d132adbccdc6c80538ed6556cb75e
2020-03-11 16:35:36 -07:00
Tony Wickham
5aeb3b84b8 Refactor SwipeDetector to track both axes
Existing clients now use the SingleAxisSwipeDetector subclass. A
followup CL will add BothAxesSwipeDetector, whose first client will be
the quick switch from home controller.

Bug: 126596417
Change-Id: I54c71088cfe99ff28cdc719a1eb7a7d06ac95d2d
2019-10-24 10:38:17 -07:00
Sunny Goyal
210e174c9c Subclassing Launcher instead of using UiFactory
Allows us to override only the required methods, instead of providing
a proxy method for everything

Change-Id: I816dcdb2a8d5432496050118ded0f2bbe7122cf7
2019-10-21 11:10:21 -07:00