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
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
- 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
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
- 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
hardcoding it to 16ms
> Creating a utility class for caching display property changes
Bug: 128940249
Change-Id: I6f9a214548de65bd1c8530508d665ee88312da4a
This time, Launcher doesn't send a completion event upon switching from
Home to all apps.
Bug: 133867119
Change-Id: I3738cf10a14ea288df2dfda387aafda022beb349
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
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
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
- 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
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
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
The public API of the library has finalized; flakiness has been removed;
code polished.
Bug: 110103162
Test: TaplTests suite
Change-Id: Ic156bbfeedb1cb9c4a48ef907f97e396e8e81936
Before, we were just controlling the components as far as we had left,
which was fine since they are just a subtle effect anyway. But now that
we don't fade out until the very end, this means that long swiping from
home usually kept recents in the background during the entire swipe and
then abruptly disappear after letting go. Now we make sure the entire
atomic animation plays by the time we reach all apps, so recents will
fade out in all cases.
Bug: 79867407
Change-Id: I7cb6790d9055bc76b4b73ed761604042a308c987
- All apps content fades in quickly so that icons are opaque by the time
they are on screen
- Recents fades out late so that we don't see it as translucent while
the transition is continuing (the translucent icon top of tranclucent
task view looks bad, for instance)
- Fix colored scrim that appears over recents - was using 0 to 1 instead
of 255
Bug: 79867407
Change-Id: I4f50423157f7870c8d0708f586a72e3e5a7b6559
> Finishing the atomic animation to that proper states are applied
> Offsetting the duration of atomic animation so that it completes along with
the swipe animation
Bug: 80432882
Bug: 86308723
Bug: 80549582
Change-Id: I8a3b44c2c7017e241b2fbdbb96c5d67edbb359d1
- Don't have double haptic on quick scrub
- Correctly check interpolated progress to determine final state,
so that it always aligns with the haptic (i.e. passing the haptic
means letting go will go to the new state)
Bug: 109709720
Change-Id: I702bb76a4c15f932f923e81a14cc49f6a9126cb8
This includes swiping/fling up from a fullscreen app and swiping/fling
down a task to a fullscreen app.
Test: swipe up when app is fullscreen
Fixes: 80543530
Change-Id: Iee259284cc6d4fe1e784532f0822ffd38cdee280
When you swipe up to overview from home, we should allow touches on
recents even if the overshoot animation isn't finished. If the
touch is below the all apps progress, we continue to intercept to
allow for double swipe up.
Bug: 80093992
Change-Id: Ifdca61e7cfc1f7a713c067596cc0c1bd3154b44e
This was leading to a pending animation running while the state had changes,
leaving user in an inconsistent state.
Various atomic animation fixes
> Ensuring that there is only one success listener on atomic animation, so that atomic
controller is created only once and to the final mToState
> If atomic controller is already running, skip animating the atomic conmonenets as
part of main animaiton
> Cancel atomic controller if it is going to a different state
Bug: 80549582
Bug: 109583168
Change-Id: Ie7a032e0fa73b1f1c2ef53055c08d16444f0385e
Previously we were logging new states as we swipe past them; now we just
log the start and end states when lifting your finger.
Bug: 80102083
Change-Id: Icec6c3dab1441023a3cdcadb7b56ecef8313cb8c