Commit Graph

1292 Commits

Author SHA1 Message Date
Jon Miranda
bba6451b5f Refactor app open animation so that FloatingIconView tracks window.
Before, the window used to track the FloatingIconView. With this refactor,
both app open and app close use the same update method.

With the refactor, we can now use adaptive icons to morph the icon into the
size of the window.

Movement/interpolators are still the same as the original except for the
alpha and the clip animation. To ensure a perfect tradeoff, we wait for the
icon to match the size and shape of the window before crossfading.
Currently it is set up so that the tradeoff happens when the animation is
15% done, but this can be tuned later.

Bug: 122843905

Change-Id: I7d3edbefffb15fe26958a62ab33cf23dc1203908
2019-04-01 13:19:28 -07:00
Hyunyoung Song
1ac6c84bda Add the config constant to SysUINavigationMode class
Bug: 128348746

Change-Id: I369e70bbd038ff0f75def83cadd98efce3f39385
2019-03-29 14:33:29 -07:00
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
5996842fa3 Merge "Removing unused instant apps methods" into ub-launcher3-master 2019-03-29 17:25:10 +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
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
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
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
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
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
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
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
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
Sunny Goyal
58ddac1d09 Removing fade animation on swipe up
Fade animation is no longer required as the transform is also handled on
the main thread. So we will get the RecentsAnimaiton always after Launcher
has drawn

Change-Id: Ieb05406c9a5b9132b0518155bdbda16c1f73a6ec
2019-03-12 16:24:05 -07:00
Jon Miranda
a014ffa3ec Set window corner radius to 0 for app tranition anims in multi-window mode.
Otherwise we see a jump from corner radius to 0 corner radius when the
animation completes.

Change-Id: I46a65342d4ea531dc16c866aee305478067959d3
2019-03-11 15:27:10 -07:00
Sunny Goyal
b7dafa6a04 Using the new contract for some systemUI constants
Change-Id: I1a0351bc9b1ac5b8fe866a92c1bda93126189543
2019-03-06 12:32:24 -08:00
Tony Wickham
7550c1227e Merge "Fix some issues with MotionPauseDetector" into ub-launcher3-master 2019-03-05 22:00:24 +00:00
TreeHugger Robot
a4c3d066dd Merge "Switching to setting QS on and off via writing settings." into ub-launcher3-master 2019-03-05 01:26:51 +00:00
Vadim Tryshev
8675deee02 Switching to setting QS on and off via writing settings.
We can do this now because we hav all 6 devices in the lab.

Change-Id: I5d5fcd89086a3f945ed3fc204461cacbdde61a8a
2019-03-04 16:49:50 -08:00
Jon Miranda
1a49fb5733 Transform closing window to icon on workspace using adaptive icons.
With adaptive icons, we can have FloatingIconView match the shape
and size of the closing window, regardless of the icon shape.

FloatingIconView starts off as a rounded rect (same corners as task view)
and then morphs into the icon shape using FolderShape#createRevealAnimator
in reverse.

Decided to add FeatureFlag.ADAPTIVE_ICON_WINDOW_ANIM since there are still
some issues with folders, badges, and a visible jump when swapping the
FloatingIconView with the original icon.

Bug: 123900446

Change-Id: I94969eea6d5f4b932a84a11eb403611276042b46
2019-03-01 12:48:25 -08:00
Jonathan Miranda
67e0019907 Merge "Revert "Add remote animation for unlocking device."" into ub-launcher3-master 2019-03-01 20:03:45 +00:00
Kevin
5a3f7ae764 Load app content descriptions for Go recents.
Recents Go with icons will use the app's title description as the app
label, so we need this to actually load when we load the task's content
even if accessibility is disabled. This CL puts this behind a static
flag only set to true in recents Go code.

Bug: 114136250
Test: Log that titles/labels are appropriately fetched
Change-Id: I4fe7d8758b3141695a82c0677cec97686c977934
2019-03-01 10:43:00 -08:00
Jon Miranda
69e03dd082 Revert "Add remote animation for unlocking device."
This reverts commit 55a32272be.

Reverting until we can revisit this animation.

Bug: 123906429
Change-Id: Ic2d6e5a8198900fb15abd60dd140091681f828dd
2019-02-28 20:37:03 -08:00
Tony Wickham
ac60d91cec Fix some issues with MotionPauseDetector
- Orthogonal displacement now checks angle instead of fixed amount
- Only allow timeout when passed min primary displacement and not
  orthogonal displacement
- Don't set timeout for !SWIPE_HOME, which should never detect pause

Change-Id: I3d810831316affff138968dfc62b921b20c752c5
2019-02-27 16:40:59 -08:00
Kevin
ccbb4f3bf3 Fix RecentTasksList change id incrementing
The change id in RecentTasksList would never actually increment as we
never register it as a TaskStackListener. As a result, we always execute
the result callback immediately when getting a task and the task list is
always valid.

In addition, when the list IS up to date, we still fetch the list again
in the background when we should instead just return early.

This CL addresses both of these issues.

Test: Added logs to see that task loading wasn't happening when lists
are the same

Change-Id: I228f8d7cd3cb22ef88d71e1bee40708c2bcf26d6
2019-02-27 12:16:37 -08:00
Sunny Goyal
327e01d98c Fixing task snapshots not getting updated in recents view
Bug: 124620962
Change-Id: I7c6b9d1183faa01a0836194e42a9cd8517c8b61a
2019-02-26 13:05:57 -08:00
Kevin
576d203a91 Remove several files from Recents Go src
As Go will not be using RecentsView, there are several files that are
unneeded in the recents Go source. This moves these files to
recents_ui_overrides where they will be used for non-Go builds.

Bug: 114136250
Test: Build NexusLauncher, aospWithQuickstep, l3GoWithQuickstep
Change-Id: I9d0154a75f4f2c71b865d414448e262b3019b2b9
2019-02-25 14:53:04 -08:00
TreeHugger Robot
6873fe517b Merge "Stub out most of TouchInteractionService for Go" into ub-launcher3-master 2019-02-25 22:02:10 +00:00
Kevin
eee12ee4cf Stub out most of TouchInteractionService for Go
Most of TouchInteractionService is not used in Go since we don't support
a lot of the gestures, so this code swaps the file and stubs out
everything except the atomic overview commands for Go only.

Bug: 114136250
Test: Manual test NexusLauncher, l3GoIconRecents
Change-Id: I449746d01d3bbf619663399deb9600f0e4ecc000
2019-02-25 13:39:42 -08:00
Kevin
f96d74017e Remove unused variable.
Remove an unused variable from FallbackActivityControllerHelper.

Test: Build NexusLauncher, l3GoIconRecents
Change-Id: I77b5ae40b9e6aee47f23e6c3b4f718e744987200
2019-02-22 16:50:40 -08:00
TreeHugger Robot
517163e0ae Merge "Split FallbackActivityControllerHelper for Go" into ub-launcher3-master 2019-02-22 23:27:31 +00:00
TreeHugger Robot
4b88b357a7 Merge "Split TaskUtils for Go recents" into ub-launcher3-master 2019-02-22 23:27:30 +00:00
Kevin
6fb2b78320 Split FallbackActivityControllerHelper for Go
This splits FallbackActivityControllerHelper for Go and non-Go depending
on the underlying recents implementation. We also introduce a
GoActivityControllerHelper implementation as a base class to share the
stubbed methods for the Go ActivityControlHelper implementations.

Bug: 114136250
Test: Manual test NexusLauncher, l3GoWithIconRecents
Change-Id: I8a061bb83a851dd1d9988af17194f3e4aed24bb0
2019-02-22 14:41:27 -08:00
Kevin
295954ba78 Split TaskUtils for Go recents
This CL splits the static methods in TaskUtils based off which ones
assume a RecentsView recents implementation. The new TaskViewUtils
is then only used by non-Go recents whereas the generic TaskUtils which
only deals with Task logic is shared.

Bug: 114136250
Test: Build NexusLauncher, l3GoIconRecents
Change-Id: If33d19dbdb421ae805767387a991769166e865c5
2019-02-22 14:01:33 -08:00
Kevin
ef8a17b1d0 Split OverviewCommandHelper for Go recents.
This splits OverviewCommandHelper between a Go and non-Go version with
functionality differing depending on the underlying recents
implementation.

Bug: 114136250
Test: Build NexusLauncher, l3goWithQuickstep, l3goIconRecents
Change-Id: I7c78d7699e5599002de64b289b0c3a47c8c418f7
2019-02-22 11:26:32 -08:00
TreeHugger Robot
9ad094c626 Merge "Split AppToOverviewAnimation for Go" into ub-launcher3-master 2019-02-22 19:07:06 +00:00
TreeHugger Robot
d3cb4c39e8 Merge "Fixing DWB toast sometimes being shown for badged apps" into ub-launcher3-master 2019-02-22 06:19:54 +00:00
Sunny Goyal
dc67a77ac0 Merge "Using cachedEventDispatcher when swiping up on homescreen" into ub-launcher3-master 2019-02-22 06:04:55 +00:00
vadimt
70d5c728c6 Fixing DWB toast sometimes being shown for badged apps
Bug: 124741358
Test: Manual
Change-Id: I7e2be19fda031c7c445d1a0e4ecd245935e54838
2019-02-21 17:33:53 -08:00