Commit Graph

14731 Commits

Author SHA1 Message Date
Andy Wickham 17d0080cc3 Adjusts Clear all to be vertically centered with the tasks.
I made a sample task where the content of the app was
centered, and I added lines to demonstrate the center
while in Overview. As you can see, the center of the
app content is slightly different from the TaskView
in Recents - it seems part of the bottom of the app
gets removed when transitioning to Recents (for the
rounded corner radius or nav bar?). On Pixel 4, I
had to add 46dp of padding to the bottom line for it
to appear at the bottom of the screenshot in Recents.

Screenshot: https://drive.google.com/file/d/1xzQNXWb0T0UGDhDS9Ov-AduM3nd-pfg8/view?usp=sharing
Before: https://drive.google.com/file/d/1ghN9VWP44XjcZkdmI106dy4_jB4Vs4J3/view?usp=sharing

Rotating between landscape and portrait:
https://drive.google.com/file/d/1OD5aKT9LCE5w950-6AaHfWXU4sLyW3Qe/view?usp=sharing

Fixes: 154964045
Change-Id: I594057e3b5df58c5a907b6ca14daa700d5011b7b
2020-08-05 19:44:07 -07:00
Tony Wickham b8b3e957a6 Fix TaskViewTouchController success progress to match haptic
We use the interpolated progress of the animation contoller target
to determine success, but only the child animation had the
interpolator set. Updating the parent to use the same interpolator
ensures getInterpolatedProgress() returns the same one used to
play the haptic.

Fixes: 161536946
Change-Id: Ibc2aef67f53efa01f2b185cf03140bad4bb5c421
2020-08-05 18:43:53 -07:00
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
Tracy Zhou e7c1769e30 Merge "Revert "Finish recents animation when launching another task in Overview"" into ub-launcher3-master 2020-08-05 17:42:43 +00:00
Winson Chung b3d7ecc15b Merge "Close system dialogs when opening all apps from system action" into ub-launcher3-master 2020-08-05 05:49:31 +00:00
Winson Chung dd15acea87 Close system dialogs when opening all apps from system action
Bug: 161685099
Change-Id: I67313340102816828a95e8f9e7d8fa19b4ca3c55
2020-08-04 21:53:49 -07:00
Jason Chang 8aaafc9186 Merge "Refactoring One-Handed feature flag and others" into ub-launcher3-master 2020-08-05 04:28:29 +00:00
Tracy Zhou f8e9b467ae Revert "Finish recents animation when launching another task in Overview"
This reverts commit e62eaa16b3.

Reason for revert: No longer necessary

Change-Id: I9ed533147ac5546b7da6c9e3a51f5a7e6c8ef8e6
2020-08-04 21:57:14 +00:00
Samuel Fufa e8bea3ea7a Allow search results decoration [part 2/3]
[Video attached to bug report]

Bug: 162480567
Test: Manual
Change-Id: Iff285abde5b2a3f3f3a63e7318020cfe7572af49
2020-08-04 10:28:28 -07:00
Jason Chang f66f2f66cf Refactoring One-Handed feature flag and others
Purify some conditions for reducing redundancy codes.

Test: manual
Change-Id: I2f39207424f9db3fb6b12bc08bee525f3dfab0aa
2020-08-04 19:59:42 +08:00
Raman Tenneti ab98166c36 AOSP/Launcher3 - Update language to comply with Android's inclusive language guidance.
See https://source.android.com/setup/contribute/respectful-code for reference

BUG=161896447

Test: make and Presubmit verify.

Change-Id: I44e903046dd4cd9c7c07872fc56a8d552eb09522
2020-08-04 00:35:03 +00:00
TreeHugger Robot cb89edcbcc Merge "Changing minimum supported Launcher version to 26" into ub-launcher3-master 2020-08-03 22:24:14 +00: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
Tony Wickham 03c38c5c66 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
2020-08-03 13:59:38 -07:00
Sunny Goyal 35376a3591 Using StatsLog for notifyingAppPredictor
> 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
2020-08-01 07:02:31 +00:00
TreeHugger Robot 707727b6ae Merge "Creating UI tests for overview action buttons." into ub-launcher3-rvc-qpr-dev am: bf84725855 am: 8c10f6801f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12242419

Change-Id: I3cd8c26f5e774c5d54683c21006060d2d19fdf19
2020-07-31 21:54:17 +00:00
Tracy Zhou ccb7029e31 Merge "Reset live tile task view simulator params" into ub-launcher3-master 2020-07-31 21:32:33 +00:00
TreeHugger Robot 8c10f6801f Merge "Creating UI tests for overview action buttons." into ub-launcher3-rvc-qpr-dev am: bf84725855
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12242419

Change-Id: I3e5cb20529c97ee62c3fac12d2900760b01c8708
2020-07-31 21:26:58 +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
Tracy Zhou ca9590c390 Reset live tile task view simulator params
Since we reuse the same mLiveTileTaskViewSimulator in the RecentsView, we need to reset the params after it settles in Overview from swipe up so that we don't render with obsolete param values.

Test: manual
Fixes: 160911104
Change-Id: I523a321e44d867c5bb68afe93e7a83e7ae23498b
2020-07-31 13:20:57 -07:00
Sreyas bf103f16b1 Creating UI tests for overview action buttons.
Change-Id: Ie6298064a068dc978ca33fb64e1856c3ba2a8cb1
2020-07-31 13:20:08 -07:00
TreeHugger Robot 3834574916 Merge "Fixing wrong velocity state when there are too few samples" into ub-launcher3-rvc-qpr-dev am: 073673e173 am: 52e00d2287
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12275360

Change-Id: I8856f0a4699ba21a1b2bf0ff278c48dad6a423cc
2020-07-31 18:49:34 +00:00
TreeHugger Robot 52e00d2287 Merge "Fixing wrong velocity state when there are too few samples" into ub-launcher3-rvc-qpr-dev am: 073673e173
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12275360

Change-Id: I3911c0987c4e5bff00b92d1bb3b6ca6538d6a843
2020-07-31 18:31:06 +00: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
Jason Chang c22726e067 Merge "Refactoring to use more precise statements when calculating gesture distance and others" into ub-launcher3-master 2020-07-31 02:19:17 +00:00
TreeHugger Robot 54b1d57db0 Merge "Log entire touchable region rect" into ub-launcher3-master 2020-07-31 01:17:11 +00:00
Pinyao Ting 9e13c951f2 Minimal Phone Mode (part-2) am: 553d4dfe7d am: d5d44bcda7
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12193271

Change-Id: I760776ca825f728a44dde88de9f45400324f6ced
2020-07-30 23:28:14 +00:00
Pinyao Ting d5d44bcda7 Minimal Phone Mode (part-2) am: 553d4dfe7d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12193271

Change-Id: Ieeafead98eab2fda1309295f63b334d59a977df0
2020-07-30 22:57:22 +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
Vinit Nayak 2c80b305f4 Log entire touchable region rect
Bug: 162001398
Change-Id: Icac1d81cd6d11aa47279c81db8cc2e5ff92d6b0c
2020-07-30 15:42:30 -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 1e2602cea0 Merge "Align live tile with the current task view in Overview when the users swipes up to dismiss" into ub-launcher3-master 2020-07-30 18:42:49 +00:00
Tracy Zhou bcdbf27b96 Revert "Finish the current task in live tile mode when swiping up and right to the previous task"
This is a manual revert to ag/9654924 (WindowTransformSwipeHandler has been moved)

Fixes: 143714109
Test: manual
Change-Id: I3c55e7bcacfcdc9c9343b2df5804064053169ade
2020-07-30 09:42:36 -07:00
Jason Chang b0611351e3 Refactoring to use more precise statements when calculating gesture
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
2020-07-30 23:16:09 +08:00
Hyunyoung Song 45c0918f47 Merging ub-launcher3-rvc-qpr-dev to rvc-qpr-dev
Bug: 162366734
Test: system image builds

Change-Id: I6675431b180976798afacc7a99251ae36764a50a
Merged-In: Ibff46b3ef7ff89accb459db323f31179adb4ef21
2020-07-30 00:26:39 -07:00
Sunny Goyal eaf7a95546 Changing minimum supported Launcher version to 26
Change-Id: I49fcf874430ac53c3246371e179fbd828e14e4da
2020-07-29 17:30:19 -07:00
TreeHugger Robot 0861b7cd28 Merge "Fix adjacent task offset distance" into ub-launcher3-rvc-qpr-dev am: d354443535
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12120944

Change-Id: Iaf13db7857028f98c5bcc222e319741016ff18da
2020-07-29 22:50:46 +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 c8df617ff6 Merge "Fix adjacent task offset distance" into ub-launcher3-master 2020-07-29 22:07:22 +00:00
TreeHugger Robot 89b670056f Merge "Moving all-apps predictions to Launcher model" into ub-launcher3-master 2020-07-29 22:02:59 +00:00
Jonathan Miranda 3a2298d2a4 resolve merge conflicts of 80605f9823 to ub-launcher3-master
Change-Id: I1eb6ed58b83f92105e1831c733e98ea44e0c151b
2020-07-29 20:51:30 +00:00
TreeHugger Robot 80605f9823 Merge "Revert "Fix bug where double swipe gets us stuck in Hint state while in Overview."" into ub-launcher3-rvc-qpr-dev am: a2f9ea5233
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12263482

Change-Id: Id1065385e4d16ee38cfce2db4b57bddc5c3ef229
2020-07-29 20:19:28 +00:00
Sunny Goyal 8b74cc761b Moving all-apps predictions to Launcher model
Predictions are loaded and managed by Launcher model and follow
the model lifecycle. They are then bound to the callback which
handles the UI

Bug: 160748731
Change-Id: I4a3ea0698d80fafe94afb4ce66ffa7f4a6a91c68
2020-07-29 13:07:52 -07:00
Tony Wickham 7383d4e6d2 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
2020-07-29 20:05:29 +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
Vadim Tryshev 0916cea91f Merge "Revert "Recycling already running activities"" into ub-launcher3-master 2020-07-29 16:43:38 +00:00
TreeHugger Robot c697e6d565 Merge "Removing arrow indicator from homescreen and adding a separate view for various accessibility actions" into ub-launcher3-master 2020-07-29 04:38:01 +00:00