summaryrefslogtreecommitdiff
path: root/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
AgeCommit message (Collapse)Author
2021-10-06Removing overscroll pluging supportSunny Goyal
Bug: 201677812 Test: Presubmit Change-Id: Id8136e99746946ba840754ef8e71a4574f49938e
2021-07-21Support overriding All Apps EDU animation on dragBrian Isganitis
Test: Dragging during All Apps EDU animation overrides the animation. Bug: 160218103 Change-Id: I1c0a2d047bcb43ea7ce30cf87182b392dac313e4
2021-06-16All apps motionHyunyoung Song
Bug: 189970327 Test: manual TL;DR;; equation: settleVelocity = releaseVelocity + interpolator 2nd deritive * t Change-Id: I86fec339523fbc3bb347dec4affbd2d1c063d13d
2021-05-11Implement overshoot and squish motion in all apps openHyunyoung Song
Bug: 187475924 Bug: 183062683 Test: manual Change-Id: I33b6c647c45ff467c6d49cf3796f92ca366ab3f1
2021-04-27Removing dependency on wallpaper colors and using theme resourcesSunny Goyal
Bug: 184676715 Test: Manual Change-Id: Ie9a9a784c4a8a8cd484bfd8ea463deedcd4deed6
2021-04-02[AA+] Fix missing InstanceId for LAUNCHER_ALLAPPS_CLOSE_DOWN event.thiruram
Before: https://screenshot.googleplex.com/8ZYxhujUR3amgmF.png After: https://screenshot.googleplex.com/AZ7PExbBhGW2pAC.png Bug: 178562918 Test: Manual Change-Id: Id0bc54049e3a13cd53aaa37d0acee27ec7433fab
2021-03-29Remove Overview atomic animation supportTony Wickham
- 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-10Revert "Revert "Removing insets controller animation as part of ..."Sunny Goyal
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-10Revert "Removing insets controller animation as part of all-apps..."Pasty Chang
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-08Removing insets controller animation as part of all-apps openingSunny Goyal
Adding support for easier extension of StateHandlers Bug: 180143210 Test: Verified on device Change-Id: If6a088d1482c9b268b21786c4694f6e0927be0c3
2021-03-04Removing old logsWinson Chung
Bug: 156095088 Test: Presubmit Change-Id: I61b44fd4ee96de405482f9cf9b6a06d87a295898
2021-03-02Fix some issues with TwoButtonNavbarTouchControllerTony Wickham
- 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 a24b9ff69d20cdceadca2ad4f206db43f1e2899e)
2021-02-24Merge "Break up nasa search results" into sc-devSamuel Fufa
2021-02-23Merge "Instrumenting swiping up to all apps for jank" into sc-devVadim Tryshev
2021-02-22Break up nasa search resultsSamuel Fufa
+ replace IME feature flag launcher setting Test: Manual Bug: 178638266 Change-Id: Id013cd247cfa2b33cdf62ee3239ad1bacc35b5da
2021-02-10Instrumenting swiping up to all apps for jankvadimt
Bug: 178656784 Test: manual Change-Id: I2332f0f358dc7312dc7ad0b88bc51db5bfa8be6c
2021-02-10Draw the workspace scrim in the LauncherRootView instead of DragLayerAdam Cohen
=> 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-01-10Disable default IME in all apps if DISABLE_INITIAL_IME_IN_ALLAPPS is onHyunyoung Song
Bug: 173447266 Test: manual Change-Id: Ib5c03b20cc7f09fdc2d066dd20fb7ccbb1e154f5
2020-12-11Removing unused tracingvadimt
Test: presubmit Bug: 139891609 Change-Id: I30b432d329d6606b3d955409c167bddbacce8a37
2020-11-23Add null check to AbstractStateChangeTouchController#onDragEnd()Tony Wickham
Fixes: 171444185 Change-Id: I32eec545c849164463e2820603bfb6dc26260f11
2020-11-05Removing separate Cancel and End callbacks and using AnimationListener insteadSunny Goyal
This removes the additional step of invoking these callbacks separately Change-Id: I0b60047a44f179ba725f15b1e791e336884869c9
2020-10-28IME bounds after DOWN->UP Motion event sequenceHyunyoung Song
Bug: 170739594 Change-Id: I1aa8dd2ced7c017e57d3c14c02d5b78900a46caa
2020-09-27Good riddance UserEventDispatcherHyunyoung Song
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-08-12Wrapping display properties in a wrapper classSunny Goyal
This would allow us to support gestures on multiple-displays Change-Id: I8f426bbdf04520f4189cadce2bde6aab4933c8d9
2020-07-29Changing minimum supported Launcher version to 26Sunny Goyal
Change-Id: I49fcf874430ac53c3246371e179fbd828e14e4da
2020-07-24Add InsetTransitionController to device searchHyunyoung Song
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-06-22Log Launcher transitions to WWHyunyoung Song
- 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-10Add null check before updating animation progressTony Wickham
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-05-27AllAppsSearch interface change Version 3Hyunyoung Song
Change-Id: I79f635582075a1e33e970e4f4eb6ec653572fefe
2020-05-19More logging for swiping to Overview instead of All Appsvadimt
Bug: 156095088 Change-Id: Ia4d59b43225c7652cfc0ae72c05a5477deeb842b
2020-05-08More logging for pause non-detectionvadimt
Bug: 156044202 Change-Id: I1c995b6c28f7108b96ff74aa8c3c71f70f8b3fb6
2020-05-08Adding tracing for switching to overview instead of all appsvadimt
Bug: 156095088 Change-Id: I1257617192e913d06edd0879396957b1e40524b7
2020-03-17Add staggered workspace animation to keyguard unlock animation.Jon Miranda
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-16Moving animation config so a separate classSunny Goyal
Using PendingAnimation for animation builder. This will allow us to easily add SpringAnimation to stateAnimation Change-Id: I8d88489a5da6fc85747ef9be7c13858b441cd28a
2020-03-11Removing some properties out of AnimationBuilderSunny Goyal
AnimationBuilder and PendingAnimation have similar logic. This will allow to unify the two classes Change-Id: Id8c1d8a7020d132adbccdc6c80538ed6556cb75e
2020-03-06Enabling springs for start dismiss animationSunny Goyal
> 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-02Add vertical layout support for Overview in portraitVinit Nayak
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-02-10Disable All Apps spring.Jon Miranda
Bug: 147302669 Change-Id: I36cf13e94cf2d418909df345a4e36d827ac7eedf
2020-02-03Enable All Apps spring.Jon Miranda
Bug: 147302669 Change-Id: I944ce7d181c554d840329a3affe0dee76eed9143
2020-01-28Two-zone model: swipe up from nav bar vs above itTony Wickham
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-15Merge "Fix BaseSwipeDetector#setState() called inside another setState()" ↵TreeHugger Robot
into ub-launcher3-master
2020-01-09Fix BaseSwipeDetector#setState() called inside another setState()Tony Wickham
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-07Enable working springs. Move unstable springs to a seperate feature flag.Jon Miranda
Bug: 147302669 Change-Id: I7a1b9b0e68cc68ad943b5af2b8cf7f80b5680eaa
2019-11-14Improve quick switch from home by tracking both x and y motionTony Wickham
- 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-10-24Refactor SwipeDetector to track both axesTony Wickham
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-08-01Fill the log container as hotseat or workspace based on position.Becky Qiu
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-07-31Add OverviewScrim to show below overview but above workspaceTony Wickham
- 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-24Using the first frame delay based on the display refresh rate instead ofSunny Goyal
hardcoding it to 16ms > Creating a utility class for caching display property changes Bug: 128940249 Change-Id: I6f9a214548de65bd1c8530508d665ee88312da4a
2019-07-11Defer jumping to NORMAL state if overview is still peekingTony Wickham
Bug: 137316430 Change-Id: I1ace19bb229d07bd9dfe5ed6f60c63715b9f8cf2
2019-07-11Removing tracing for a fixed bug.vadimt
Bug: 133867119 Change-Id: I796118f5ff0c27db002bb0e3369e651c95b06bbe