Commit Graph

1776 Commits

Author SHA1 Message Date
TreeHugger Robot 7f5083b7af Merge "Making navigation mode listener a singleton so that the change is dispatched everywhere synchronously." into ub-launcher3-master 2019-03-29 18:05:24 +00:00
TreeHugger Robot f74882d988 Merge "Fix TaskView scale being 0" into ub-launcher3-master 2019-03-29 18:05:04 +00:00
TreeHugger Robot 5996842fa3 Merge "Removing unused instant apps methods" into ub-launcher3-master 2019-03-29 17:25:10 +00:00
Tony 85c8c46736 Fix TaskView scale being 0
Before, we reset zoom scale to 1 but didn't reset curve scale. Thus,
if curve scale had never been set (i.e. we hadn't yet scrolled recents),
the task view scale would be 0.

Example problem:
1. Open Calculator or other app
2. Force stop launcher
3. Swipe up
The recents-scale-down animation was incorrect because the computed scale
was 0, and thus recents didn't scale down at all throughout the swipe.

Change-Id: I8dd3c73a231033fa633e8df2df3bf9a1c0a67263
2019-03-29 16:44:52 +00:00
Sunny Goyal 5743f8635b Making navigation mode listener a singleton so that the change is dispatched
everywhere synchronously.

Change-Id: Iee8c5957d78dfad3fb03e814de0367adcaa0c98b
2019-03-29 09:36:45 -07:00
vadimt 9b4671f806 Temporarily ignoring flaky test checking mDevice.pressRecentApps()
Change-Id: I60fba4425e10fca5b06dd72f4d98aedc1b9a578e
2019-03-28 18:41:20 -07:00
Vadim Tryshev 09b9144746 Merge "Preparing QuickstepOnOff for running in 3 navigation modes" into ub-launcher3-master 2019-03-28 23:50:25 +00:00
vadimt c5b06f4cf6 Preparing QuickstepOnOff for running in 3 navigation modes
Change-Id: I7855e756c9886a21bfc2584cf42e7921147fb256
2019-03-28 16:02:47 -07:00
Tony e4c2e2b86c Add QuickSwitchTouchController on home
- Added QuickSwitchState, which we animate to when swiping right
  on the nav bar from NORMAL state
- Task launches when the state transition to QuickSwitchState ends

Bug: 126596417
Change-Id: Id66650401d817703fc6d044fb26a25cccbc07e11
2019-03-28 15:09:25 -05:00
Tony 101807d8e7 Fix SwipeDetector positive vs negative for HORIZONTAL direction
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
2019-03-27 19:45:04 -05:00
Tony e06fef45a4 Move some classes to packages
Added states/ and touchcontrollers/ packages

Change-Id: I8d59c47770c24c9edd1b7ce879e6a80ca8b88c71
2019-03-27 19:45:04 -05:00
Tony 1787ee9596 Peek overview on motion pause, then animate fully on touch up
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
2019-03-27 19:45:04 -05:00
Sunny Goyal ee89e5da7d Removing unused instant apps methods
Change-Id: I82bf86a8604cdb64853e7d0d6f4cbca275f5fa7a
2019-03-27 15:39:00 -07:00
TreeHugger Robot 75949941b9 Merge changes I5e65dde3,I497c0292 into ub-launcher3-master
* changes:
  Add translationX to overview state
  Add FLAG_DONT_ANIMATE_OVERVIEW to AnimatorSetBuilder
2019-03-27 20:56:58 +00:00
Tony bc23440d73 Add translationX to overview state
States return ScaleAndTranslation instead of float[].

Also separate overview translate interpolator from overview scale interpolator.

Change-Id: I5e65dde3f436055ff5e7f5736f1a4b712377b9cb
2019-03-27 14:36:48 -05:00
Tony 9244f518f2 Add FLAG_DONT_ANIMATE_OVERVIEW to AnimatorSetBuilder
This allows us to specify when a second animation will handle the overview
animation, so it doesn't conflict with existing state transitions.

Bug: 125362112
Change-Id: I497c02924862bfba558c107bee3c88a9f40ec0f1
2019-03-27 14:21:06 -05:00
TreeHugger Robot f86a776602 Merge "Import translations. DO NOT MERGE" into ub-launcher3-master 2019-03-27 07:31:51 +00:00
Bill Yi 3092a21532 Import translations. DO NOT MERGE
Change-Id: I3bfe6c1b97612ecc829e361fc70d98b9318da417
Auto-generated-cl: translation import
2019-03-26 22:14:07 -07:00
Winson Chung a5354e02a2 Use system recent tasks stabilization
Bug: 111926330
Test: Swipe to last task, ensure it resets task list on timeout or interaction

Change-Id: Id09215a4cfdea63a4be6fb69fced163ad3bc10bd
2019-03-26 16:56:04 -07:00
Winson Chung f25461c337 Updating to nav bar mode
Bug: 127366543
Test: Manual
Change-Id: I602539e5d6161c5bf6056bb60679b7ef1f168e3e
(cherry picked from commit 18841823ed)
2019-03-26 14:52:10 -07:00
Bill Yi 56635d4f85 Import translations. DO NOT MERGE
Change-Id: Ibed07a95d0eb703afc04a19e9c0018944ffaf9f7
Auto-generated-cl: translation import
2019-03-23 08:05:19 -07:00
TreeHugger Robot c8d33f8b61 Merge "Removing graying apps in Overview" into ub-launcher3-master 2019-03-22 21:38:30 +00:00
vadimt 0ed1797fad Removing graying apps in Overview
The reason is that there is no API that reports that an app is grayed.
Not showing DWB toast for apps that ran over their limit because they
shouldn't be in Overview.

Bug: 129067053
Change-Id: Ia04e17aa85ca015b7932496ad5e730fe61b4be69
2019-03-22 12:17:48 -07:00
Tracy Zhou e790b217e1 Properly clean up screenshot of recents animation upon cancelation
Bug: 122593881
Test: Manual
Change-Id: Ia9ce1ede08309a0898c622bcd07a9e076443d98a
(cherry picked from commit 2bd3a0225b)
2019-03-21 18:06:36 +00:00
Tony Wickham 8cfe0fe091 Merge changes If11fea2d,Ia7e1eebe,Iafa89db1 into ub-launcher3-master
* changes:
  Remove redundant resumeLastTaskForQuickstep() and use resumeLastTask() directly
  Fix some state issues with home and quick switch gestures
  Apply spring forces to animate to the final position for swipe home
2019-03-20 21:37:07 +00:00
TreeHugger Robot 5d6b7f4517 Merge "Replace translationYFactor with just translationY" into ub-launcher3-master 2019-03-20 20:46:26 +00:00
Tony bfc9dde03e Replace translationYFactor with just translationY
Now that we don't have quick scrub, the only state that has a non-zero translation is all apps,
which just uses that to have a slight parallax. This is much simpler to define in terms of pixels
like other states do.

Change-Id: I108c8505d85591399256b3475f7566ff51e2c5ad
2019-03-20 15:36:31 -05:00
Vadim Tryshev e8d2ef6cd0 Merge "Revert "Using startActivityForResult to open DWB properties"" into ub-launcher3-master 2019-03-20 18:27:31 +00:00
Vadim Tryshev e73b0ec69d Revert "Using startActivityForResult to open DWB properties"
This reverts commit b480fe45ce.

Reason for revert: Conflicts with gestural navigation

Change-Id: I109fb855829b68d265458f9b3833482df2b59095
2019-03-20 18:07:11 +00:00
TreeHugger Robot a761a0d585 Merge "Stop using magic constant 0.1 for switching from home to all apps" into ub-launcher3-master 2019-03-20 02:55:52 +00:00
vadimt 174a330d5d Stop using magic constant 0.1 for switching from home to all apps
Bug: 123904290
Change-Id: Ide4561adb2bb59c805cd9fd48f25440e68d91c7b
2019-03-19 19:17:40 -07:00
TreeHugger Robot 7b43eba730 Merge "Recycle motion event after cancel delegate from assistant input consumer" into ub-launcher3-master 2019-03-20 00:22:20 +00:00
Matthew Ng 0954d8ad49 Recycle motion event after cancel delegate from assistant input consumer
Related: ag/6737054

Test: manual
Bug: 112934365
Change-Id: I7bf439fc58c986fa9972911a02a4035cfd867c34
2019-03-19 16:32:32 -07:00
vadimt 6fe4e93d4a Stop using magic constant 0.6 for returning from all apps to overview
Bug: 123904290
Change-Id: If1b6caf562484649ee107532ffe21d25deff4b97
2019-03-19 12:16:39 -07:00
Tony 096edde056 Remove redundant resumeLastTaskForQuickstep() and use resumeLastTask() directly
Also remove STATE_SCALED_CONTROLLER_LAST_TASK, which is redundant with
STATE_RESUME_LAST_TASK. Basically this removes a path of unnecessary
indirection now that everything is on the UI thread.

Change-Id: If11fea2d6064ba909a439b9b88d7c80fb1ad9d73
2019-03-19 11:08:54 -05:00
Tony 687ff6afe1 Fix some state issues with home and quick switch gestures
Handle the fact that LAUNCHER_STARTED can come 25ms+ later than LAUNCHER_PRESENT
- Don't call prepareRecentsUi() if we already completed the gesture to go home
  - Previously it was possible to get LAUNCHER_PRESENT -> GESTURE_STARTED ->
    GESTURE_COMPLETED -> LAUNCHER_STARTED. Because we go to BACKGROUND_APP state in
    LAUNCHER_STARTED, this sequence ended up there instead of home (b/124338231)
- Call setupRecentsViewUi() in LAUNCHER_PRESENT instead of LAUNCHER_START
  - Because setupRecentsViewUi() sets RecentsView to show the running task, it was
    interferring with quick switches that had the state sequence above

Other quick switch fixes
- Set canBeContinued = true for LAST_TASK gesture target. This handles cases like:
  switch from task 0 to task 1, intercept and go back to 0 (LAST_TASK), intercept
  again to go to 1
- Ignore deferred touch down target if we're continuing the previous gesture
- Set STATE_HANDLER_INVALIDATED as soon as we start finishing recents animation
  instead of waiting until the new task is launched. This is what we do when
  re-launching the last task, and it allows us to start a new gesture sooner.

One race condition still exists with consecutive quick switches: if you switch to
a new task, the next gesture might get stuck if it starts after finishing the
recents animation but before the task is fully launched/launcher is stopped.

Bug: 124338231
Bug: 111926330
Change-Id: Ia7e1eebe6e81e2f10bb42a10b2f46fd720da0dc1
2019-03-19 10:55:27 -05:00
TreeHugger Robot e498e99fe2 Merge "Moved assistant gesture to corners" into ub-launcher3-master 2019-03-18 22:12:46 +00:00
Matthew Ng a3b03418c1 Moved assistant gesture to corners
The corners will be separated with quick switch by detecting at the slop
of the angle from touch down to that position. If over 30 deg then
assistant will be tracked otherwise quick switch while swipe up will not
be tracked at all.

Test: manual
Bug: 112934365
Change-Id: I6a3aeb1509d9706696a30ef1fba3ce7e3e5ec07c
2019-03-18 14:53:11 -07:00
vadimt b480fe45ce Using startActivityForResult to open DWB properties
This will let the callee to figure out who has activated it.

Bug: 118319143
Change-Id: Ica31ecb15df6cc01038000b051712716da5519de
2019-03-15 17:32:00 -07:00
Tony 0d447c88b8 Apply spring forces to animate to the final position for swipe home
Now instead of an incorrect hack that simulated accelerating to the target,
we actually apply spring forces to make it feel realistic and work no matter
where the target is.

Added two helper classes for this:
- FlingSpringAnim handles the fling, applying friction until reaching the target,
  then a spring to pull towards the final position (also applies if fling wasn't
  in the right direction or strong enough to reach the target).
- RectFSpringAnim uses 2 FlingSpringAnims (x + y) to animate from a starting rect
  to a target rect. It also has an animation to scale from the start rect to the
  target rect, sending progress update callbacks to the caller.

Bug: 123900446
Change-Id: Iafa89db1d55c42816acfa9f1bb84a7519b69ff12
2019-03-15 17:38:41 -05:00
Tony d5a3df7b83 Don't close popup container if touch came from nav bar
Moved EDGE_NAV_BAR from quickstep package to launcher3

Bug: 127917144
Change-Id: Ic619ea49896ca8e49a9a539b7dc7d682291241b7
2019-03-15 17:08:51 -05:00
TreeHugger Robot d082129ef8 Merge "Switching swipe-up to overview to using test info provider" into ub-launcher3-master 2019-03-15 18:52:25 +00:00
vadimt d64b4f44da Switching swipe-up to overview to using test info provider
Also moving test provider to Quickstep to have access to the new info;
and now Launcher3 doesn't have it.

Bug: 123904290
Change-Id: I653376610e83839d102beb9c0604950dd314e8ba
2019-03-15 11:42:06 -07:00
TreeHugger Robot 1235b0ee1e Merge "Number of DEBUG_STATES was 1 less than necessary" into ub-launcher3-master 2019-03-15 01:24:49 +00:00
TreeHugger Robot 72ac60d551 Merge "Remove f/b based jars out of the Android.mk" into ub-launcher3-master 2019-03-15 01:24:00 +00:00
Jonathan Miranda fb53843dc6 Merge "Set window corner radius to 0 for app tranition anims in multi-window mode." into ub-launcher3-master 2019-03-14 23:16:41 +00:00
Tony 40f1d863f6 Number of DEBUG_STATES was 1 less than necessary
Change-Id: I0a9289f9bcf99df0d9a466ad3ff00996192921f2
2019-03-14 18:03:55 -05:00
Hyunyoung Song 319b5a6ace Remove f/b based jars out of the Android.mk
Benefit! we would not get merge conflict when one of these jars update
and we need to do code merge.

Change-Id: Ia6a4a632474a7b19aaede1d20d1373902da1400c
2019-03-14 13:44:14 -07:00
TreeHugger Robot 44ba75fd0b Merge "Adding logging for showing DWB toast" into ub-launcher3-master 2019-03-14 20:24:06 +00:00
vadimt c28aa1a197 Adding logging for showing DWB toast
We generate an event upon every invocation of Overview with at least one
DWB toast.

Bug: 123892673
Change-Id: Ia24f4be8e9f0f6ab6d31095b8367b73fb6c8cd7f
2019-03-14 12:22:29 -07:00