Commit Graph

23286 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
Sreyas Rangaraju
58ca5c8729 Merge "Introducing a new gesture scope" into ub-launcher3-rvc-qpr-dev 2020-07-28 20:03:27 +00:00
Samuel Fufa
0cfcdc2170 Merge "Adding tracing for work profile removal" into ub-launcher3-rvc-qpr-dev 2020-07-28 17:52:21 +00:00
Samuel Fufa
cfec6b5151 Adding tracing for work profile removal
Bug: 159671700
Change-Id: I6e1bcdfbf1bbaab989106ce2979575652a3fb404
2020-07-28 17:09:08 +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
vadimt
00ad8ee720 Introducing a new gesture scope
Gesture may occur outside of Launcher and not trigger system gesture recognition
by TIS.

Change-Id: Ibbb0180d6ef3856ab652164e6f3c1c86488a4caa
(cherry picked from commit a37ecee104)
2020-07-27 20:56:12 +00:00
Sunny Goyal
c3e4d2c7ab Fixing touches getting ignored just after swipe-up am: 1a286a189e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12240767

Change-Id: Iabaa1f7f6320c7ccc359a41dc40ca50d2ec169a3
2020-07-27 18:55:11 +00:00
Sunny Goyal
1a286a189e 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
(cherry picked from commit ff4b142789)
2020-07-27 17:56:18 +00: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
5484fd3e7a Merge "Minimal Phone Mode (part-1)" into ub-launcher3-rvc-qpr-dev 2020-07-24 18:16:16 +00: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
TreeHugger Robot
1a32f951f7 Merge "Pass through touches in FolderIcon padding area" into ub-launcher3-rvc-qpr-dev 2020-07-23 18:47:26 +00:00
Samuel Fufa
3c3116826b Pass through touches in FolderIcon padding area
Pass touch events happening in padding of folder icon to workspace. BubbleTextView already does this.

Bug: 161014416
Test: Manual
Change-Id: Ibfa24adb2d84efbfab36f02a2240837f03858e43
2020-07-23 11:09:20 -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
Jonathan Miranda
20d3187d88 Merge "Fix folder crash where view is added when it already has a parent." into ub-launcher3-rvc-qpr-dev 2020-07-21 20:13:06 +00:00
Pinyao Ting
422015cb9f Minimal Phone Mode (part-1)
Include feature flag for minimal phone mode

Bug: 161462256
Test: manual
Change-Id: I4ddbe7fd2fd73b4cfaa27ab18c210f38133dd3c2
2020-07-21 11:45:36 -07: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
TreeHugger Robot
664020146f Merge "Fix launcher crash after restore with some specific widgets." into ub-launcher3-rvc-qpr-dev 2020-07-21 18:30:11 +00: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
Pinyao Ting
f1af0171b7 Fix launcher crash after restore with some specific widgets.
The internal implementation of PendingAppWidgetHostView#getDefaultViews
uses the same view across updates which causes the exception in
AppWidgetHostView#applyContent when it tries to call addView() because
the view has already been added to its parent view in previous iteration.

Bug: 151901506
Test: manual
Change-Id: Ieccec814ac514e592d0d4f196b60ba89aec0d661
2020-07-20 17:55:14 -07:00
Jon Miranda
447ea429cd Fix folder crash where view is added when it already has a parent.
The fix is to prevent re-arrangement if the views are already unbound.

This is caused when:
- Folder is open
- Item has deep shortcuts
- Long press on deep shortcut to create DragView that could land in the
  folder if the folder did not auto close. This is important because it
  starts a drag within the folder

The folder unbinds all views as part of the Folder close complete callback.
And then the folder exit alarm gets triggered (because we drag DragView
outside of the folder) which causes the folder items to get
rearranged and added back to the folder's CellLayout.

Bug: 161559911
Change-Id: I142589b2c541dc21c47a67c20a93e627732107ef
2020-07-20 16:54:17 -07: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
TreeHugger Robot
f55ccf4350 Merge "Fix bug where realtimeReorder is called after views have been unbound." into ub-launcher3-rvc-qpr-dev 2020-07-20 23:01:30 +00:00
Jon Miranda
0f620500b0 Fix bug where realtimeReorder is called after views have been unbound.
Bug: 161498651
Change-Id: I89beaad9a91bfa1763454965bf95ba1a94d29902
2020-07-20 15:28:25 -07: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
TreeHugger Robot
6822ae9fae [automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" into ub-launcher3-rvc-dev am: 78d22259fe -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12195526

Change-Id: Id2840e90f68772eef8e126df22595059c7b73d7a
2020-07-20 22:06:03 +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
TreeHugger Robot
78d22259fe Merge "Import translations. DO NOT MERGE ANYWHERE" into ub-launcher3-rvc-dev 2020-07-20 21:56:52 +00:00
Bill Yi
008c2d17c8 [automerger skipped] Import translations. DO NOT MERGE ANYWHERE am: 25ed0dce25 -s ours
am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12195530

Change-Id: If7dfe29ab40a0cb420e8fe66245d72994295f132
2020-07-20 21:54:36 +00:00