Commit Graph

121 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
Andy Wickham
22dee942b5 Cancel manual animation if LauncherState changes during drag.
Previously, the following would cause the All Apps panel to appear
in NORMAL state:

1. Start dragging to all apps
2. During the drag, something sets Launcher to NORMAL
3. Release finger  -> animation to all apps completes, but state
   is still NORMAL

Side effects of this:
 - On large screens, All Apps draws its background on Launcher's
   ScrimView only if the current state is All Apps. So in this
   case, the apps just floated above the workspace.
 - On handheld, touches are handled by workspace even though you
   can see the All Apps list. So e.g. if you swipe down, the
   notification shade appears rather than all apps panel hiding
   (although it seems this touch issue was addressed separately).

I'm not sure if this is the main/only case of this state mismatch
happening, but verified with local async state changes that this
could in theory happen. We haven't been able to organically repro
the bug reliably. That being said, it feels plausible that a well
timed screen lock during the all apps transition could also hit
this case.

Demo videos with hard-coded state change to NORMAL 2 seconds after
you start swiping up to all apps (note I release my finger at the
end of each video):
https://drive.google.com/drive/folders/1ul8ep9N2M5oc6ZSbf_ZHQwp9IwTpz7GB?resourcekey=0-4LAufl0rkvtjvgZC0L-eMQ&usp=drive_link

Bug: 239394946
Bug: 331600490
Test: Manual with local async launcher state changes
Flag: NA
Change-Id: I6364dbde8aea67f5d1c525edf57ed7eb26096cf9
2024-04-11 16:00:34 -07: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
Sunny Goyal
3e596d3aa4 Updating the top scrim to also use dynamicaly generated bitmap
Bug: 237818532
Test: Verified on device
Flag: N/A
Change-Id: I22ceb470677ab9df53e40fb78f0292b7fd5e2241
2023-06-01 19:20:04 +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
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
Brandon Dayauon
d4a60b394f Fix jumpiness when dragging surface down and up.
Currently the overshoot only works when you first open all apps and try
to extend the all apps to the top (making it overshoot). This pull works
when you go mFromState:Normal -> mToState:AllApps. However once the all
apps is set and you move the surface down then up..that overshoot
animation jumps AFTER your finger goes all the way up and off the
screen. At this point, once all apps is completely opened.. the states are
mFromState:AllApps -> mToState:Normal.

Now with this change, it addresses the jumpiness by considering the
current states (mFromState==AllApps) by
including the same onPull() but with different calculations

bug: 240669628
test: manual - videos included in bug thread
Change-Id: I7873f1ec22574f87fab3d2f11d1f5a5f81dfb5bc
2022-08-23 01:20:22 +00:00
Alex Chau
a70e23384f Fix overview and quickswitch gesture logging
- Log Home -> Overview gesture
- Log Home -> quickswitch as LAUNCHER_QUICKSWITCH_RIGHT

Bug: 219686410
Test: Local log in StatsLogCompatManager
Change-Id: Ic88fefd5af58dc03779f77b12611843c40706b1c
2022-05-05 14:33:27 +01: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
Sunny Goyal
0ecfb69596 Removing overscroll pluging support
Bug: 201677812
Test: Presubmit
Change-Id: Id8136e99746946ba840754ef8e71a4574f49938e
2021-10-06 11:23:46 -07:00
Brian Isganitis
ec4a56a311 Support overriding All Apps EDU animation on drag
Test: Dragging during All Apps EDU animation overrides the animation.
Bug: 160218103
Change-Id: I1c0a2d047bcb43ea7ce30cf87182b392dac313e4
2021-07-21 17:39:00 +00:00
Hyunyoung Song
54a44d4c44 All apps motion
Bug: 189970327
Test: manual

TL;DR;;

equation: settleVelocity = releaseVelocity + interpolator 2nd deritive * t

Change-Id: I86fec339523fbc3bb347dec4affbd2d1c063d13d
2021-06-16 11:17:59 -07:00
Hyunyoung Song
222a59e79a Implement overshoot and squish motion in all apps open
Bug: 187475924
Bug: 183062683
Test: manual

Change-Id: I33b6c647c45ff467c6d49cf3796f92ca366ab3f1
2021-05-11 13:49:45 -07:00
Sunny Goyal
4ed0fb5074 Removing dependency on wallpaper colors and using theme resources
Bug: 184676715
Test: Manual
Change-Id: Ie9a9a784c4a8a8cd484bfd8ea463deedcd4deed6
2021-04-27 16:29:08 -07:00
thiruram
0eabc781b1 [AA+] Fix missing InstanceId for LAUNCHER_ALLAPPS_CLOSE_DOWN event.
Before: https://screenshot.googleplex.com/8ZYxhujUR3amgmF.png
After: https://screenshot.googleplex.com/AZ7PExbBhGW2pAC.png

Bug: 178562918
Test: Manual
Change-Id: Id0bc54049e3a13cd53aaa37d0acee27ec7433fab
2021-04-02 14:34:26 -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
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
b96cf5cdf2 Fix some issues with TwoButtonNavbarTouchController
- Use same swipe height as the tests use to get to Overview
- Use mStartState instead of fromState when determining
  target state, to disallow swiping through states, i.e.
  from NORMAL to OVERVIEW back to NORMAL in one long swipe
  up gesture. Instead, now swipe up from NORMAL goes to
  OVERVIEW and swipe up from OVERVIEW goes to NORMAL.

Fixes: 177316094
Change-Id: Ic8e9c8650d4cf11eec344802e3569413bfd5d7bc
(cherry picked from commit a24b9ff69d)
2021-03-02 18:14:03 +00:00
Samuel Fufa
c7d72e55ec Merge "Break up nasa search results" into sc-dev 2021-02-24 13:39:12 +00:00
Vadim Tryshev
06df8d7262 Merge "Instrumenting swiping up to all apps for jank" into sc-dev 2021-02-23 18:32:23 +00:00
Samuel Fufa
9ffaee3110 Break up nasa search results
+ replace IME feature flag launcher setting

Test: Manual
Bug: 178638266
Change-Id: Id013cd247cfa2b33cdf62ee3239ad1bacc35b5da
2021-02-22 09:10:18 -06:00
vadimt
2b6d18230b Instrumenting swiping up to all apps for jank
Bug: 178656784
Test: manual
Change-Id: I2332f0f358dc7312dc7ad0b88bc51db5bfa8be6c
2021-02-10 15:24:02 -08:00
Adam Cohen
501e139c6e Draw the workspace scrim in the LauncherRootView instead of DragLayer
=> The entire DragLayer is translated during the -1 transition which creates a janky looking edge at the top of the screen

=> By bumping the scrim up a level, we avoid this

=> Separated WorkspaceAndHotseatScrim into two separate scrims, since only part of the scrim needed to be bumped up to a level. Further, it was an overloaded class.

=> We had previously been implicitly relying on the fact that the scrim was rendered in the Workspace parent; we need to make sure to propagate workspace inavlidations to the container of the scrim. While things would still work without this change, it's more correct to leave it, as we no longer assume a hierarchy for functinoality.

Bug: 178215332

Test: manual verification. See video in bug.

Change-Id: I0a76ddf35ceea8c9635367f69380ef24f42e9479
2021-02-10 19:16:26 +00:00
Hyunyoung Song
f19c579706 Disable default IME in all apps if DISABLE_INITIAL_IME_IN_ALLAPPS is on
Bug: 173447266
Test: manual
Change-Id: Ib5c03b20cc7f09fdc2d066dd20fb7ccbb1e154f5
2021-01-10 21:09:19 -08:00
vadimt
c610f26404 Removing unused tracing
Test: presubmit
Bug: 139891609
Change-Id: I30b432d329d6606b3d955409c167bddbacce8a37
2020-12-11 19:43:49 -08:00
Tony Wickham
7199acdbad Add null check to AbstractStateChangeTouchController#onDragEnd()
Fixes: 171444185
Change-Id: I32eec545c849164463e2820603bfb6dc26260f11
2020-11-23 16:09:07 -08:00
Sunny Goyal
ff9e7d6aa9 Removing separate Cancel and End callbacks and using AnimationListener instead
This removes the additional step of invoking these callbacks separately

Change-Id: I0b60047a44f179ba725f15b1e791e336884869c9
2020-11-05 16:35:11 -08:00
Hyunyoung Song
a34766a176 IME bounds after DOWN->UP Motion event sequence
Bug: 170739594

Change-Id: I1aa8dd2ced7c017e57d3c14c02d5b78900a46caa
2020-10-28 12:49:56 -07: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
fd58da6a75 Wrapping display properties in a wrapper class
This would allow us to support gestures on multiple-displays

Change-Id: I8f426bbdf04520f4189cadce2bde6aab4933c8d9
2020-08-12 13:43:56 -07:00
Sunny Goyal
eaf7a95546 Changing minimum supported Launcher version to 26
Change-Id: I49fcf874430ac53c3246371e179fbd828e14e4da
2020-07-29 17:30:19 -07:00
Hyunyoung Song
d25dabb466 Add InsetTransitionController to device search
Also removed plugin support as if both the feature flag and
the plugin is turned on, there are object/resource contention

Bug: 161594550

Change-Id: I2cb98e83c46c7e47db96b90fa8d7cb9620643221
2020-07-24 13:57:16 -07:00
Hyunyoung Song
801f81fba5 Log Launcher transitions to WW
- ONRESUME / ONSTOP
- HOME_GESTURE
- OVERVIEW_GESTURE
- QUICKSWITCH
- SWIPELEFT/SWIPERIGHT

Bug: 156875719
Bug: 148822714
Bug: 137777105

Debug log: go/launcher-log-parity

Change-Id: I64a0deab4996b5be36320fbe0339f320891c53e0
2020-06-22 12:09:06 -07:00
Tony Wickham
779955390c Add null check before updating animation progress
Haven't been able to reproduce it locally, but seems theoretically
possible if we get an onDrag() event right after something else
cancels the animation (which clears the animation controller).

Bug: 157900227
Change-Id: Ia134aa948e62d39f71e41dd4e6b98f3227ae0522
2020-06-10 15:36:52 -05:00
Hyunyoung Song
ef9a6972ce AllAppsSearch interface change Version 3
Change-Id: I79f635582075a1e33e970e4f4eb6ec653572fefe
2020-05-27 17:16:56 -07:00
vadimt
f95cfce267 More logging for swiping to Overview instead of All Apps
Bug: 156095088
Change-Id: Ia4d59b43225c7652cfc0ae72c05a5477deeb842b
2020-05-19 12:49:17 -07:00
vadimt
ad87034d1f More logging for pause non-detection
Bug: 156044202
Change-Id: I1c995b6c28f7108b96ff74aa8c3c71f70f8b3fb6
2020-05-08 15:09:37 -07:00
vadimt
2794f563a0 Adding tracing for switching to overview instead of all apps
Bug: 156095088
Change-Id: I1257617192e913d06edd0879396957b1e40524b7
2020-05-08 10:39:29 -07:00
Jon Miranda
c298078241 Add staggered workspace animation to keyguard unlock animation.
Added behind FeatureFlag.KEYGUARD_ANIMATION due to dependency on
Ie94ab8ecd35e9dcc28d0b8f7aaeb058e15b0f80b.

Added dynamic resource unlock_staggered_velocity_dp_per_s so that the
animation can be tuned.

Bug: 151238866
Change-Id: I4d349d32cc7d86be3cdc582c2a7c565be2931444
2020-03-17 14:27:35 -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
Sunny Goyal
cfaa4889e6 Enabling springs for start dismiss animation
> Adding flag support for PendingAnimation which can be used
  to define custom behavior for various animations
> Using SpringAnimationBuild for spring animation instead of
  SpringObjectanimator

Change-Id: I41ca34b0574981bb3fc7894639a321c12e6feac1
2020-03-06 22:59:03 -08:00
Vinit Nayak
a406f727ad Add vertical layout support for Overview in portrait
WM is making changes which allows apps to maintain
their orientation independent of the orientation of
the foreground app. This allows recents to always start
in portrait even when the app currently running is in
landscape. This means we have to give the illusion of
a landscape oriented overview when user swipes up in
gesterual nav when launcher is started in portrait
configuration.

PagedOrientationHandler abstracts all coordinate specific
logic from Paged/RecentsView primarily, but also all
other dynamic calculations throughout launcher.
PagedViewOrientationState is the single point of exposure
to other classes that depend on those changes. The goal
is to also minimize holding state to allow for default
implementations of PagedOrientationHandler for all the
3p/Fallback classes. PagedViewOrientationState also
holds other data around rotation that isn't
specifically tied to view logic.

The fake landscape overview can be toggled with:
adb shell settings put global forced_rotation [0/1]

Fixes: 146176182
Change-Id: I65d8d4e9f92b93931cbe0053ccaf0cda8d2ffd6c
2020-03-02 18:02:35 -08:00
Jon Miranda
d59b6c59c8 Disable All Apps spring.
Bug: 147302669
Change-Id: I36cf13e94cf2d418909df345a4e36d827ac7eedf
2020-02-10 12:18:42 -08:00