Commit Graph

88 Commits

Author SHA1 Message Date
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
Jon Miranda
2e8828bd30 Enable All Apps spring.
Bug: 147302669

Change-Id: I944ce7d181c554d840329a3affe0dee76eed9143
2020-02-03 14:03:47 -08:00
Tony Wickham
4fdba14cfb Two-zone model: swipe up from nav bar vs above it
When ENABLE_OVERVIEW_ACTIONS flag is enabled, swiping up from the nav
bar goes to overview if you hold, or the first home screen if you don't.

- Added NoButtonNavBarToOverviewTouchController, which extends
  FlingAndHoldTouchController but only works if you start from the nav
  bar. Otherwise it falls back to PortraitStatesTouchController to
  handle normal state transition to all apps.
- Added HintState. This is where the workspace/hotseat/qsb scale down
  when you swipe up from the nav bar, to hint that you're about to
  either go to overview or the first home screen.
  - Added getQsbScaleAndTranslation() to allow Overview and Hint states
    to treat it as part of the hotseat.
  - Since Overview needs to show above the QSB as it's animating, bring
    Overview to the front and update OverviewScrim to handle the case
    where there's no view above Overview to draw the scrim beneath.
- ENABLE_OVERVIEW_ACTIONS is always false in 2-button mode, since the
  shelf is crucial to that mode.

Bug: 143361609
Change-Id: I743481bb239dc77f7024dc98ba68a43534da2637
2020-01-28 18:31:10 -08:00
TreeHugger Robot
2abd13a80b Merge "Fix BaseSwipeDetector#setState() called inside another setState()" into ub-launcher3-master 2020-01-15 22:03:01 +00:00
Tony Wickham
3f330429a3 Fix BaseSwipeDetector#setState() called inside another setState()
Clients of BaseSwipeDetector are required to call finishedScrolling(),
which calls setState(IDLE). An obvious place to call this is in
onDragEnd(), which itself is called from a setState(SETTLING). If the
client does this, then the SETTLING state actually clobbers the IDLE
state, leading to undefined behavior. The reason we don't see this in
practice is because we usually call finishedScrolling() after an
animation from onDragEnd() instead of calling it immediately.

To fix this, we add a simple queue such that any calls to setState()
while one is in progress have to wait and are executed in turn. This
ensures we get all the proper state callbacks and end in the correct
one.

Also fix an incorrect call in AbstractStateChangeTouchController which
was masked by this bug. We were calling setState(IDLE) in onDragStart(),
which only worked because the original setState(DRAGGING) incorrectly
clobbered this. Now we only setState(IDLE) (via finishedScrolling())
when we fully clear the state, i.e. when the interaction is finished.

Test: added testInterleavedSetState

Bug: 141939911
Change-Id: Iae630ee7101921b57a85d40646468cf19f59b674
2020-01-09 15:39:38 -08:00
Jon Miranda
40f0eb2188 Enable working springs. Move unstable springs to a seperate feature flag.
Bug: 147302669
Change-Id: I7a1b9b0e68cc68ad943b5af2b8cf7f80b5680eaa
2020-01-07 11:25:22 -08:00
Tony Wickham
37a0970bf5 Improve quick switch from home by tracking both x and y motion
- Add NoButtonQuickSwitchTouchController which uses
  BothAxesSwipeDetector to track horizontal and vertical motion.
- Initially, we only detect swipe left to right to quick switch
  (like before), but then we allow swipe up to either go to
  overview (if you hold) or back home (if you don't hold).
- xDisplacement transitions non-overview components out (e.g. shelf
  and workspace), and translates overview in.
- yDisplacement translates overview up and scales it down

Bug: 126596417
Change-Id: Id679ad84c08246e205c667a78ed5df00d7276258
2019-11-14 15:50:18 -08: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
Becky Qiu
84fa94e2fc Fill the log container as hotseat or workspace based on position.
Test: manual
Bug: 137953006

Swipe from workspace:
07-30 15:15:44.031  9779  9779 D UserEvent: action:FLING direction=UP direction=UP
07-30 15:15:44.031  9779  9779 D UserEvent:  Source child:WORKSPACE id=0 span(951,1313)	parent:WORKSPACE id=0
07-30 15:15:44.031  9779  9779 D UserEvent:  Destination child:ALLAPPS
07-30 15:15:44.031  9779  9779 D UserEvent:  Elapsed container 826 ms, session 9361 ms, action 0 ms

Swipe from hotseat:
07-30 15:15:46.010  9779  9779 D UserEvent: action:FLING direction=UP direction=UP
07-30 15:15:46.010  9779  9779 D UserEvent:  Source child:HOTSEAT id=0 span(786,1908)	parent:WORKSPACE id=0
07-30 15:15:46.010  9779  9779 D UserEvent:  Destination child:ALLAPPS
07-30 15:15:46.010  9779  9779 D UserEvent:  Elapsed container 1139 ms, session 11339 ms, action 0 ms

Change-Id: I959528889fda778efc569bb59e7f44d3bd5b81bc
2019-08-01 22:24:44 +00:00
Tony Wickham
c088051c29 Add OverviewScrim to show below overview but above workspace
- Refactor some basic scrim logic to Scrim class and have
  WorkspaceAndHotseatScrim and OverviewScrim extend it
- Draw OverviewScrim under recents unless predictions are disabled, in
  which case draw it under hotseat (since that is in recents)
- Remove sysui scrim (behind status bar and nav bar) when overview is
  peeking

Bug: 132455160
Change-Id: Ia5d6f54582a4c5a70e3b2d4a98281567edd68519
2019-07-31 14:44:28 -07:00
Sunny Goyal
4e6c45bcd3 Using the first frame delay based on the display refresh rate instead of
hardcoding it to 16ms

> Creating a utility class for caching display property changes

Bug: 128940249
Change-Id: I6f9a214548de65bd1c8530508d665ee88312da4a
2019-07-24 10:12:37 -07:00
Tony Wickham
e1463f5580 Defer jumping to NORMAL state if overview is still peeking
Bug: 137316430
Change-Id: I1ace19bb229d07bd9dfe5ed6f60c63715b9f8cf2
2019-07-11 16:55:01 -07:00
vadimt
2af71dd058 Removing tracing for a fixed bug.
Bug: 133867119
Change-Id: I796118f5ff0c27db002bb0e3369e651c95b06bbe
2019-07-11 20:18:32 +00:00
vadimt
8f9cf2f38f Calling sendStateEventToTest() from a place guaranteed to be called
See discussion in the bug

Bug: 133867119
Change-Id: Id162cfa3b0a0aafe17dd9b41e2c4b5d02c411830
2019-06-10 18:01:58 -07:00
vadimt
a8f77a6afd More debug tracing for switching to all apps not sending the final event
(to the test)

Bug: 134172603
Bug: 133867119
Change-Id: I00cf3a35daefa23d2e72a89d21e6ce37c8a9a46d
2019-05-31 13:34:24 -07:00
vadimt
17f9d57ac7 Add debug tracing for a lab-only flake
This time, Launcher doesn't send a completion event upon switching from
Home to all apps.

Bug: 133867119
Change-Id: I3738cf10a14ea288df2dfda387aafda022beb349
2019-05-29 14:10:28 -07:00
vadimt
8649cf29e4 Remove tracing for fixed bugs
Bug: 129434166
Bug: 131170582
Change-Id: Ia9b356594001d96c69ffbb7f8b767b2f54ed5feb
2019-05-01 16:10:56 -07:00
TreeHugger Robot
3c007368a7 Merge "Cleanup unnecessary override dump method" into ub-launcher3-qt-dev 2019-04-25 23:22:04 +00:00
Hyunyoung Song
9e7d2acc22 Cleanup unnecessary override dump method
Change-Id: Ic2909a4d382362ddec9bcc2c738d13120e792fd8
2019-04-25 16:08:52 -07:00
Hyunyoung Song
efe8475093 Merge "Add important dump logging Bug: 130851537 Bug: 119992316" into ub-launcher3-qt-dev 2019-04-25 22:33:31 +00:00
Hyunyoung Song
a310a80c7b Add important dump logging
Bug: 130851537
Bug: 119992316

Change-Id: I3de7c1d910d1aecd80b47a85284565c79fe0e2cc
2019-04-25 15:14:44 -07:00
Hyunyoung Song
bf44bc342f Fix NPE / add downX,Y location for all swipes/ add extra debugging info
Bug: 122700646
Bug: 127840207

Change-Id: I5862c8950565df172a933114e1fb2f9c4575593e
2019-04-24 16:16:51 -07:00
Tony
e243a9493e Swipe up from nav bar in OVERVIEW or ALL_APPS to go home
Add NavBarToHomeTouchController, which intercepts touches from the nav bar
region when in overview or all apps.

Swiping up from all apps translates it up and slightly fades out app icons,
then letting go springs towards home screen.

Swiping up from overview translates it to the right, then letting go springs
towards the left where it lives in the home state.

Both cases have a strong deceleration while swiping.

Bug: 129571305
Bug: 111926330
Change-Id: I5b7de05f15f0300233343fa2d69fcad624e070f8
2019-04-01 15:48:51 -05:00
TreeHugger Robot
794a68e998 Merge "Fix SwipeDetector positive vs negative for HORIZONTAL direction" into ub-launcher3-master 2019-03-28 20:07:06 +00:00
TreeHugger Robot
2f9b438a3a Merge "Adding tracing for Lab-only flake: drag to workspace doesn't happen" into ub-launcher3-master 2019-03-28 18:43:17 +00:00
Tony
101807d8e7 Fix SwipeDetector positive vs negative for HORIZONTAL direction
Previously left was considered positive and right considered negative.
Now left and down are negative, and right and up are positive.

For RTL, left is positive and right is negative.

Change-Id: Ia31e8c687c8c2716fc632b2fe88aa8955b934bce
2019-03-27 19:45:04 -05:00
Tony
1787ee9596 Peek overview on motion pause, then animate fully on touch up
Add AnimationComponents.ATOMIC_OVERVIEW_PEEK_COMPONENT, and rename
previous ATOMIC_COMPONENT to ATOMIC_OVERVIEW_SCALE_COMPONENT.

When SWIPE_HOME is enabled:
- Overview lives to the left of Workspace, which is encoded in
  LauncherState.NORMAL.getOverviewScaleAndTranslation().
- Create atomic animation based on ATOMIC_OVERVIEW_PEEK_COMPONENT
  and OVERVIEW_PEEK state when swiping and holding from home screen.

Bug: 111926330
Change-Id: Iab6dbef7238dae15b3036d4b2a026b781eee6b4b
2019-03-27 19:45:04 -05:00
vadimt
0b339b5273 Adding tracing for Lab-only flake: drag to workspace doesn't happen
Bug: 129434166
Change-Id: I4433a4848b57da42412a9108a0965ff13c708c39
2019-03-27 17:42:25 -07:00
vadimt
42a88b9681 Sending state ordinals from Launcher to TAPL
This improves diagnostics.

Test: TAPL tests
Change-Id: I0ebb533513405372ea7c58a36910160cfb6d8368
2019-02-14 13:08:01 -08:00
Sunny Goyal
8b2b4e24ee Adding support for swipe and hold to overview from home screen to all-apps
- After the atomic animation ends, overview jumps slightly because the
  normal -> all apps transition puts it at a different position than
  normal -> overview

Bug: 111926330
Change-Id: I6ca359b3ef2fc4d0b6b96229d8bf118bd0db9649
2019-01-28 15:51:19 -08:00
Jon Miranda
7e390c3b17 Revert "Revert "Add spring to shelf for home <-> overview <-> all apps state transitions.""
This reverts commit 2bdac8f7e5.

Reason for revert: Reverting and added fix to crash

Change-Id: I20508eb05c85ba5dfba52630aa9becea270f890b
2019-01-08 16:43:45 -08:00
Jonathan Miranda
2bdac8f7e5 Revert "Add spring to shelf for home <-> overview <-> all apps state transitions."
This reverts commit e018711aac.

Reason for revert: investigating crash

Change-Id: I157b61a9f1bd46e2fcd3f2f883d3b5c23ca314af
2019-01-05 00:04:20 +00:00
Jon Miranda
e018711aac Add spring to shelf for home <-> overview <-> all apps state transitions.
Added new SpringObjectAnimator class that wraps an ObjectAnimator so the
Object can be controlled via the Animator or via a SpringAnimation. It extends
ValueAnimator so that it remains compatible with AnimatorPlaybackController.

Code is behind feature flag toggle QUICKSTEP_SPRINGS.

Bug: 111698021
Change-Id: I1b20179ede37e89a6a6bb2a45d407cc74c99ac4e
2019-01-04 11:12:53 -08:00
Tony
6cfb0edb41 Fix end state when animating launcher after swipe up from an app
Previously we were comparing the controller's progress at the time of
the end of the animation... which is always 1. Instead, we should be
comparing the effective final progress based on the interpolator.

Change-Id: I18110b5a3b914839860931187f39cfa11182b3e2
2018-11-29 11:35:16 -08:00