- Rename "pullback" to "resistance" to reduce confusion.
- Remove mDragLengthFactorStartPullback & mDragLengthFactorMaxPullback
- Add AnimatorControllerWithResistance, which has 2 controllers, one
for the normal shift to overview, then one to apply the resistance
when swiping beyond that.
- Don't hack animator interpolators/progress; insteaad, allow progress
to go > 1 (which will run the separate resistance animator).
- Don't start launcher controller separately from window controller;
instead, both are controlled by mCurrentShift in updateFinalShift().
- The resistance animation logic is shared by both the active window
and launcher (RecentsView).
Bug: 149934536
Change-Id: Ib0f9da18e10cc9ddf1a2f82ed767f237c89d3a41
distance and others
1) Use more precise statements when calculating gesture distance
and refine ACTION_CANCEL motion events and others.
2) Check system property "ro.support_one_handed_mode" to enable or
disable one-handed quicksteps gesture feature.
Bug: 160315874
Test: make and install
Test: manual enable one handed mode and swipe down to trigger
Test: manual start one handed and rotate device
Change-Id: Ib27f9b6f92edda3cbff1ecb554b1a70f2e56e552
Instead of calculating an overall distance for tasks to translate
based on RecentsView width, calculate the distance for the tasks
to the left and right of the midpoint based on how far the first
adjacent tasks in those directions are from being offscreen.
Changes made to make "distance to offscreen" calculations possible:
- Update TaskView curve scale to reach final scale as soon as it is
completely offscreen. Before, it would reach its final scale just
shy of that point (calculations were off).
- As we update RecentsView scale, calculate how much the new scale
will push out tasks that are just offscreen.
- With both above, we can calculate the scale and position of a
TaskView such that it is just offscreen, and interpolate
between its current position and that position.
Tests:
- Task comes in immediately when quick switching from home, and
doesn't shift as you swipe directly upwards.
- When swiping far up from an app, tasks come in from all the way
offscreen, and cover distance appropriately (e.g. if you're
scrolled a bit to the right when you pause, the left adjacent
app will move faster to cover the farther distance).
- Task modalness: entering Select mode now animates adjacent tasks
at the same rate as the scaling up, because they move only the
distance needed to get offscreen (before they moved way too far
and thus seemed to be much faster than the rest of the animation).
Bug: 149934536
Change-Id: Ie3fffe0e5c304cb16e7637f058f5ce72cee40aeb
Merged-In: Ie3fffe0e5c304cb16e7637f058f5ce72cee40aeb
Instead of calculating an overall distance for tasks to translate
based on RecentsView width, calculate the distance for the tasks
to the left and right of the midpoint based on how far the first
adjacent tasks in those directions are from being offscreen.
Changes made to make "distance to offscreen" calculations possible:
- Update TaskView curve scale to reach final scale as soon as it is
completely offscreen. Before, it would reach its final scale just
shy of that point (calculations were off).
- As we update RecentsView scale, calculate how much the new scale
will push out tasks that are just offscreen.
- With both above, we can calculate the scale and position of a
TaskView such that it is just offscreen, and interpolate
between its current position and that position.
Tests:
- Task comes in immediately when quick switching from home, and
doesn't shift as you swipe directly upwards.
- When swiping far up from an app, tasks come in from all the way
offscreen, and cover distance appropriately (e.g. if you're
scrolled a bit to the right when you pause, the left adjacent
app will move faster to cover the farther distance).
- Task modalness: entering Select mode now animates adjacent tasks
at the same rate as the scaling up, because they move only the
distance needed to get offscreen (before they moved way too far
and thus seemed to be much faster than the rest of the animation).
Bug: 149934536
Change-Id: Ie3fffe0e5c304cb16e7637f058f5ce72cee40aeb
Moving the input proxy logic outside the recents controller, so that it
is not lied to the controller lifecycle.
> Fixing input consumer not getting registered if recentsController
was not received until ACTION_UP
> Fixing input events being ignored after finishing recentsAnimation,
but before handler is invalidated
Bug: 161750900
Change-Id: Ib06617caef77f18a71c5a231e781291c3a4ee57e
* changes:
Guard swipe to notification gesture with system settings preference
Update state and touch region after one handed overlay changed
Hook one-handed gesture to expand notification panel by default
Enable one-handed mode gestural in QuickStep
This change will make sure launcher snapshot is logged only once in 24hrs interval using sharedpreference.
Bug: 161375303
Change-Id: Iab6b25d931b2e91ae5647e266bd68ead86c99bc6
Merged-In: Iab6b25d931b2e91ae5647e266bd68ead86c99bc6
(cherry picked from commit efa41c1c52)
This change will make sure launcher snapshot is logged only once in 24hrs interval using sharedpreference.
Bug: 161375303
Change-Id: Iab6b25d931b2e91ae5647e266bd68ead86c99bc6
When user swipes up to home, Launcher will receive a onNewIntent
callwith a bundle-extra gesture_nav_contract_v1. It will contain
the componentName & UserHandle of the closing app & a callback.
Launcher can use the callback to return the final position where
the app should animate to and an optional surface to be used for
crossFade animation. The surface cleanup can be handled in
onEnterAnimationComplete.
Change-Id: I76fdd810fdcb80b71f7d7588ccac8976d9dfe278
Bug: 154080211
Test: make and install, check the gesture works as expectedly
Change-Id: Ibd6bbd595d2fba5d68e66eb54e4a7fec160b9bf8
(cherry picked from commit 779efaca91)
Notify to expand notification panel through SystemUiProxy when
one-handed mode disabled and one-handed gesture detected.
Bug: 154080211
Test: make and install
Test: manual disable one handed mode and swipe down to trigger
Test: verified the gesture works even outside of home page
Change-Id: Iacc0e506ccd04dd81f6182759c8af7d686a7b77b
(cherry picked from commit dd3eb7d075)
Handling swipe-down/swipe-up gestural in device bottom area
for one-handed mode
1) The regsion is larger than gesture navigationbar view
2) One handed gestural in quickstep only active on NO_BUTTON, TWO_BUTTONS mode
3) One handed gestural only support on portrait mode
Bug: 150747547
Bug: 154189137
Bug: 156988988
Test: make and install
Test: manual enable one handed mode and swipe down to trigger
Test: manual start one handed and rotate device
Change-Id: I7b2447bfb2fe4082c95176b62934b98077b84920
(cherry picked from commit 7d375e31fe)
The rotation of WindowConfiguration in Configuration is non-public
field. There is no guarantee that the information will be updated.
E.g. a 180 degree rotation change won't make difference to the
public configurations, so the Resources will keep the old one.
The display rotation of activity is accurate to use for its content
because even the activity is transformed to different rotation than
the physical display, there is FixedRotationAdjustments to adjust
the information which will be consistent as how the activity is
laid out.
Bug: 159877752
Test: 1. Enable auto rotation.
2. Launch some portrait activities.
3. Put device in reverse portrait (upside down).
4. Launch a landscape activity.
5. Swipe to another activity with full-sensor orientation.
6. Return to home and enter recents to check the task views
of step 2 don't show upside down.
Change-Id: I5e16e71d43b8892a394c06de9e76fb3d4ad55919
> Adding a listener in StartsLogManager for listening to events.
This allows events to be directored to the predictor only if
it is already running, instead of creating it.
> Unifying the event format to be same as hotseat predictor
Bug: 160748731
Change-Id: Ib00e6249ff642c030f00bcad5b748255e704d16a
Test: swipe up from an app in landscape, seascape, and portrait,
and verify the window tracks with the finger 1:1 until pullback
Bug: 149934536
Change-Id: Ia469877e7152c8135e0b9153f69c191ba86cbd14
(cherry picked from commit f0a1b2ccd8)
* Velocity should match the direction of the spring values.
(Swipe direction is upwards, but icons move downwards on screen).
* Remove additional conversion to pxPerS since getDimension already does that.
Bug: 160003774
Change-Id: I12912edb2354c4a30c538da6ca3789c46d82b94d
(cherry picked from commit 54003963d8)