Commit Graph

3958 Commits

Author SHA1 Message Date
Tony Wickham
3af714f052 Remove overscroll on running task when it's not attached to RecentsView
This allows the running task to follow the finger freely until motion
pause is detected (or when trying to quick switch in a direciton that
has no tasks, as RecentsView is still attached until you swipe up).

Bug: 149934536
Change-Id: If68166e962af9f28c56017838f720e15ddb96560
2020-08-05 13:37:48 -07:00
TreeHugger Robot
ffc06198ff Merge "Rewrite long swipe resistance ("pullback") logic" into ub-launcher3-rvc-qpr-dev 2020-08-03 22:11:30 +00:00
Tony Wickham
354a436f4e Rewrite long swipe resistance ("pullback") logic
- 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
Merged-In: Ib0f9da18e10cc9ddf1a2f82ed767f237c89d3a41
2020-08-03 21:01:46 +00:00
TreeHugger Robot
bf84725855 Merge "Creating UI tests for overview action buttons." into ub-launcher3-rvc-qpr-dev 2020-07-31 21:03:54 +00:00
Sreyas
bf103f16b1 Creating UI tests for overview action buttons.
Change-Id: Ie6298064a068dc978ca33fb64e1856c3ba2a8cb1
2020-07-31 13:20:08 -07:00
TreeHugger Robot
073673e173 Merge "Fixing wrong velocity state when there are too few samples" into ub-launcher3-rvc-qpr-dev 2020-07-31 18:12:40 +00:00
Sunny Goyal
48afb6b3b9 Fixing wrong velocity state when there are too few samples
Bug: 160568387
Change-Id: I32b3b7ee1bff5595941fc0c0b37c9f5a28d1a1fa
2020-07-30 15:44:05 -07:00
Pinyao Ting
553d4dfe7d Minimal Phone Mode (part-2)
Integrate with ContentProvider from Digital Wellbeing

Change-Id: Ie1fbb706e767ac5d760d686af88a9a0adf162418
2020-07-30 22:07:20 +00:00
TreeHugger Robot
d354443535 Merge "Fix adjacent task offset distance" into ub-launcher3-rvc-qpr-dev 2020-07-29 22:26:31 +00:00
Tony Wickham
16eb9226c5 Fix adjacent task offset distance
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
2020-07-29 22:17:33 +00:00
TreeHugger Robot
a2f9ea5233 Merge "Revert "Fix bug where double swipe gets us stuck in Hint state while in Overview."" into ub-launcher3-rvc-qpr-dev 2020-07-29 19:55:36 +00:00
Jonathan Miranda
f496ea4634 Revert "Fix bug where double swipe gets us stuck in Hint state while in Overview."
This reverts commit a8c08584a7.

Reason for revert: "caused a regression with quick switch from home: if you start the gesture then swipe back to the left, it ends up launching the task anyway"

Change-Id: I8e12e2de46b6fc6a3faeb0336762da08080c61d6
2020-07-29 19:03:29 +00:00
Andy Wickham
91fbf6619a Merge "Adds haptics to Overview gesture in Sandbox." into ub-launcher3-rvc-qpr-dev 2020-07-28 01:43:56 +00:00
thiruram
b6d0607d8b Logs system navigation details part of launcher snapshot logging.
Bug: 157997545
Change-Id: I18e908dc62bb790c3a77e1aacd0236a7d84e8ce5
Merged-In: I18e908dc62bb790c3a77e1aacd0236a7d84e8ce5
2020-07-27 16:32:21 -07:00
TreeHugger Robot
8527620201 Merge "Fixing touches getting ignored just after swipe-up" into ub-launcher3-rvc-qpr-dev 2020-07-27 17:36:41 +00:00
Andy Wickham
17f379bf4b Adds haptics to Overview gesture in Sandbox.
Change-Id: I4b8ec88bfc051de287b1b8ac27c4b5ab9ac90bbf
2020-07-24 16:49:15 -07:00
Sunny Goyal
ff4b142789 Fixing touches getting ignored just after swipe-up
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
2020-07-24 16:48:56 -07:00
TreeHugger Robot
6039c70261 Merge "Fixing oav text overlap." into ub-launcher3-rvc-qpr-dev 2020-07-23 22:26:16 +00:00
TreeHugger Robot
6e1861104c Merge "Handle uiMode changes" into ub-launcher3-rvc-qpr-dev 2020-07-23 21:17:35 +00:00
Winson Chung
0ad7b172e6 Handle uiMode changes
- Launcher already dedupes if there are no theme changes

Bug: 148988542
Test: adb shell cmd uimode car yes/no, adb shell cmd uimode night yes/no
Change-Id: Ia83f02d18a0433c8be59d1f488e58b38476ba5ff
Merged-In: Ia83f02d18a0433c8be59d1f488e58b38476ba5ff
2020-07-23 21:05:31 +00:00
TreeHugger Robot
9da3ccf611 Merge "Use TouchDelegate to listen for icon view taps on RecentsView" into ub-launcher3-rvc-qpr-dev 2020-07-23 20:55:55 +00:00
Vinit Nayak
ccf92c6587 Use TouchDelegate to listen for icon view taps on RecentsView
Using a negative margin to move the icon view to stick out above
the task prevents that part sticking out from receiving touches.
They go directly through to RecentsView, which interprets it as a
touch to home.
Now we use a touch delegate that recents view passes touches to
before processing it directly.

Note we can't override should steal touches from children in
LauncherRecentsView because the icon view isn't actually seen
as a child of RecentsView if it's outside of the task view area.

Fixes: 159820339
Test: Touching anywhere on the icon works.
Scrolled to previous/next tasks and in different
rotations and verified tap registers correctly.

Change-Id: I4559c34b20079e06aac401e2c93ac36a74b653ea
2020-07-23 13:20:21 -07:00
thiruram
a4661192ff Limit launcher snapshot logging once per day.
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)
2020-07-22 15:51:03 -07:00
TreeHugger Robot
7416a9097a Merge "Use display of activity to get rotation for recents" into ub-launcher3-rvc-qpr-dev 2020-07-22 17:35:32 +00:00
thiruram
3344b8ce3d Fixes missing field mappings from launcher_atom.ItemInfo to Statslog.
Bug: 161284668
Change-Id: I70b247e896bfcad5f6dbb6ce3ec5ed7aa57b8a61
2020-07-21 21:04:50 +00:00
Sunny Goyal
30ac97d938 Adding home animation support for non-system Launcher
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
2020-07-21 11:43:21 -07:00
Samuel Fufa
7dc81afc4d Merge "Fix hotseat file log name formatting" into ub-launcher3-rvc-qpr-dev 2020-07-21 16:22:57 +00:00
Riddle Hsu
354b8fc081 Use display of activity to get rotation for recents
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
2020-07-21 06:15:35 +00:00
TreeHugger Robot
a64362ee73 Merge "Create a new instance of rotation touch helper per device state" into ub-launcher3-rvc-qpr-dev 2020-07-20 23:19:26 +00:00
Samuel Fufa
93802e2612 Merge "Allow multiple hotseat restorations in single session" into ub-launcher3-rvc-qpr-dev 2020-07-20 22:27:36 +00:00
Winson Chung
5b7bf9147b Create a new instance of rotation touch helper per device state
Change-Id: I4e4288eaf37aab5bf0b8115f5e06e64459c20f00
(cherry picked from commit 00850fb588)
2020-07-20 22:05:46 +00:00
Samuel Fufa
bd1f4c6a76 Allow multiple hotseat restorations in single session
restoreBackup uses mBackupRestored to prevent multiple restorations happening at once. This change is required to reset the value of mBackupRestored if a new backup is created.

Bug: 160033826
Test: Manual
Change-Id: I33836b26cf3876955cc14dcc8ec06202f3fe7fac
2020-07-20 14:14:47 -07:00
Bill Yi
d5821326f8 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I344fea4e320a851f0d04a3308c9f7f2dca4c934e
2020-07-20 14:00:53 -07:00
Samuel Fufa
453475d568 Fix hotseat file log name formatting
Bug: 161001172
Test: Manual
Change-Id: Ia03eeb897003267ce608430c94b3b01876939234
2020-07-20 12:50:21 -07:00
Jon Miranda
a8c08584a7 Fix bug where double swipe gets us stuck in Hint state while in Overview.
With the second swipe, we never complete the swipe to Overview

NoButtonNavbarToOverviewTouchController#maybeSwipeInteractionToOverviewComplete
- mReachedOverview = true
- mDetector.isSettlingState = false

And then the second swipe starts the state transition to Hint but then
it never gets completed because:
1. The animation starts
2. Gets cancelled
3. Starts again
4. Finishes, but is not marked as success since the cancel in #2 was never
   set back to false

Bug: 160759508
Change-Id: I8c3972e6209c3d5a4a0bdd9f9b7683de18105d57
2020-07-20 10:29:29 -07:00
TreeHugger Robot
dbca5a4190 Merge "Notify TaskViews of updated orientation state" into ub-launcher3-rvc-qpr-dev 2020-07-17 23:31:54 +00:00
Sunny Goyal
7d9c18392d Merge "Preventing disambiguation screen when swiping up" into ub-launcher3-rvc-dev am: c031040a2f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12141301

Change-Id: I59ec7dd9e689d4f3a712364a74f341d730f00f8e
2020-07-17 19:20:16 +00:00
TreeHugger Robot
21ff5c4ff0 Merge "Persist prediction cache on every update" into ub-launcher3-rvc-dev am: 1cc0010eba
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12077679

Change-Id: I5f2cbe314dfb249594a2dff70cda5188cad60fa1
2020-07-17 19:19:40 +00:00
Sunny Goyal
12f46d521a Fixing recents orientation (when home rotation is allowed) during swipe-up
Bug: 158781568
Bug: 160149607
Change-Id: I27be09febcdb6f19687469db34b002ce682aa0cb
Merged-In: I27be09febcdb6f19687469db34b002ce682aa0cb
(cherry picked from commit 141c231d2f)
2020-07-17 18:53:01 +00:00
Sreyas
5e19073c23 Fixing oav text overlap.
Bug: 159240113

Change-Id: I89d8249c21cca86f21cdf57a017745237b4b6cf1
2020-07-17 00:57:56 +00:00
TreeHugger Robot
4b1d1a0f18 Merge "Prevent showing TaskMenuView if icon isn't present" into ub-launcher3-rvc-qpr-dev 2020-07-17 00:04:41 +00:00
Tony Wickham
94be66acd6 Fix tracking window being slightly off when swiping from an app
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)
2020-07-16 20:03:36 +00:00
TreeHugger Robot
eb2eb38cc2 Merge "Move rotation logic to RotationTouchHelper" into ub-launcher3-rvc-qpr-dev 2020-07-16 05:14:25 +00:00
Vinit Nayak
0affd89031 Move rotation logic to RotationTouchHelper
No functional changes.

Fixes: 159764370
Change-Id: Ie7739a62242377bda69c86bd46e24d2f847f17e0
2020-07-15 22:03:14 -07:00
Sreyas Rangaraju
e1037c63dd Merge "Disabling overview actions when thumbnail is not loaded." into ub-launcher3-rvc-qpr-dev 2020-07-15 23:31:51 +00:00
Sreyas
0d2eea3316 Reset disabled flags when action buttons lose visibility.
Bug: 159993889
Change-Id: Id2a38eee5de067d5e8f1df425644dfdcb3334cdb
2020-07-15 16:16:43 -07:00
Sreyas
68330a93fa Disabling overview actions when thumbnail is not loaded.
Bug: 160331177
Change-Id: I05eaec7d6f2e3f2ba71d8148a4e97dcf5a1522c6
2020-07-15 19:46:09 +00:00
Sunny Goyal
ec78aef4fc Merge "Fixing swiping up on home interrupting animation" into ub-launcher3-rvc-qpr-dev 2020-07-14 16:01:43 +00:00
Sunny Goyal
93188d61da Fixing swiping up on home interrupting animation
Bug: 161180005
Change-Id: Ida59b87b2fb5905d98b0090630a6ce32fc9c36c8
2020-07-13 17:44:56 -07:00
TreeHugger Robot
add69c70c4 Merge "Fix velocity in StaggeredWorkspaceAnimation." into ub-launcher3-rvc-qpr-dev 2020-07-13 22:20:33 +00:00