Commit Graph

18291 Commits

Author SHA1 Message Date
Kevin 969e7a6c57 Rename task input controller.
The TaskInputController class doesn't need to be tightly coupled with
the actual input method, so we should rename it and the methods to
correspond to the actual logic. For example, both tapping a task and
pressing the overview button on recents should launch a task and should
both use this logic.

Bug: 114136250
Test: Launch tasks, clear tasks, clear all
Change-Id: If4f7f1d6ee9b05ffaf65cb13df633679cc8efcbe
2019-03-21 18:00:44 -07:00
TreeHugger Robot 1bfb0c1c51 Merge "Add clear all button to Recents Go" into ub-launcher3-master 2019-03-21 22:36:23 +00:00
TreeHugger Robot 9cb820f63b Merge "Reconcile difference btw master and ub-launcher3-master" into ub-launcher3-master 2019-03-21 22:10:57 +00:00
Kevin fefe8b6d0e Add clear all button to Recents Go
Add a button to clear all tasks to the recents Go layout and hook it up
to the model.

Bug: 114136250
Test: Open recents, hit clear all
Change-Id: Id67310ce88053528d372e4dc21e2b011ed957646
2019-03-21 15:04:21 -07:00
Hyunyoung Song 896a715a1c Reconcile difference btw master and ub-launcher3-master
Change-Id: I33dcd6a062b754edbe2da9c7fcf2a8ccfb41b661
2019-03-21 14:06:02 -07:00
Vadim Tryshev 156775e053 Merge "Initial implementation for TAPL support for gestural navigation" into ub-launcher3-master 2019-03-21 19:46:13 +00:00
vadimt 8bba01874a Initial implementation for TAPL support for gestural navigation
It cuts some corners, flaky and has magic constants, which will be
addressed later.

Change-Id: I0acc75338a3c6d0ead3afda01e25ba43eb095913
2019-03-21 12:01:23 -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
TreeHugger Robot 16675c566a Merge "Hide keyboard while the home button get pressed" into ub-launcher3-master 2019-03-21 02:17:49 +00:00
TreeHugger Robot d6585350d0 Merge "Add recents launch animation to Recents Go" into ub-launcher3-master 2019-03-20 21:57:49 +00:00
Kevin 72114efef6 Add recents launch animation to Recents Go
We use the basic clip reveal animation to animate from the task
thumbnail view to the opening app.

Bug: 114136250
Test: Tap task from recents
Change-Id: Id582385fc022c75ee322beebdc6cf7a0f209e720
2019-03-20 14:47:32 -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
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
Tony Wickham df4df46054 Merge "Fix SpringObjectAnimator not sending onAnimationEnd()" into ub-launcher3-master 2019-03-20 20:07:40 +00: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 7ca132b595 Merge "Finding icon in All Apps makes sure the icon is not covered by navbar" into ub-launcher3-master 2019-03-20 18:15:25 +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
vadimt 6f647c7e6b Finding icon in All Apps makes sure the icon is not covered by navbar
Change-Id: I24f8bd9871f7cf8f1313f7eb7a11f1b3f71a099b
2019-03-20 10:50:44 -07:00
Tony cded01bea9 Fix SpringObjectAnimator not sending onAnimationEnd()
We only send onAnimationEnd() if both object animator and spring animator have
ended. However, we also initialized mSpringEnded = false to begin with, which
meant we would never send onAnimationEnd() if the spring animator was never
started. Now we treat the animators as ended until they are started.

Example test:
0: Enable SWIPE_HOME and QUICKSTEP_SPRINGS flags
1: Swipe up and hold on home to go to overview
2: Tap outside overview to go home
3. Swipe up to all apps
4. Swipe down

Expected: animates to home, not overview. Before this change, however, it went
to overview because the state manager never got onAnimationEnd() and therefore
never set the last stable state to NORMAL instead of OVERVIEW.

Change-Id: I7add42eedbc15b3a6a08ac69570da4edd57b5417
2019-03-20 12:45:54 -05:00
Chilun 272ff626cb Hide keyboard while the home button get pressed
For multi-client IME, launcher need to call hideSoftInputFromWindow() by
using the InputMethodManager instance that mapped the presented display
while its home button get pressed.

Launcher 3 has already handled this part, but the secondary launcher
has not yet.

Bug: 120114697
Test: Manual verified that multi-client IME can be closed correctly.
Change-Id: I8959c3a470580452bfb95dbd4b4ce9268589000f
2019-03-20 08:32:45 +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
TreeHugger Robot 2692dccdf2 Merge "Do not show Style & Wallpaper if the corresponding apk does not exist." into ub-launcher3-master 2019-03-19 23:44:38 +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
TreeHugger Robot bc2b330528 Merge "Move overlay monitoring logic out of config monitor Bug: 126417894" into ub-launcher3-master 2019-03-19 23:32:30 +00:00
Hyunyoung Song e11eb47c4e Move overlay monitoring logic out of config monitor
Bug: 126417894

Change-Id: I5b474a2a41bbd951fa0a99673fa8bf4342adade5
2019-03-19 15:46:09 -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 0825e414f0 Merge "Add app to overview anim for Recents Go." into ub-launcher3-master 2019-03-19 00:32:40 +00:00
Kevin 502847f7eb Add app to overview anim for Recents Go.
This CL adds the first iteration of window animation to go from
the app back to recents provided that the view is ready to be
visible to the user.

Bug: 114136250
Test: Go to recents, launch app, press overview to go back to recents
Change-Id: Ic0567e7c87fa964bdad25d07eca61b78407a9ff5
2019-03-18 17:15:15 -07: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
Hyunyoung Song 9e54c29821 Do not show Style & Wallpaper if the corresponding apk does not exist.
Bug: 128681467
Change-Id: Iff2b1dc5618dda61356203f0b33b4d6efcaaebfb
2019-03-18 14:43:47 -07:00
TreeHugger Robot 0cc2cbffc0 Merge "Using startActivityForResult to open DWB properties" into ub-launcher3-master 2019-03-18 19:07:02 +00:00
vadimt 2ec9f290bf Hopefully reducing flakes by waiting for SysUI objects
Looks like when orientation change is involved, it takes some time for
SysUI object to reappear.

Change-Id: Id08d385ea1a535d8bcd87b123f0373cd28d90a92
2019-03-15 19:54:51 -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 Wickham 9893578356 Merge "Don't close popup container if touch came from nav bar" into ub-launcher3-master 2019-03-15 22:36:33 +00:00
TreeHugger Robot 9b4c82cbf9 Merge "Add activity interface to Recents Go view" into ub-launcher3-master 2019-03-15 22:19:21 +00:00
Kevin 5163b58d52 Add activity interface to Recents Go view
Add an interface for recents to activity logic that can be set on the Go
recents view. This CL includes a method for the logic that should occur
when leaving recents due to having no tasks remaining.

As the view has no knowledge of the containing activity (could be
Launcher or could be a separate activity), this interface must be set
externally.

Bug: 114136250
Test: Remove all tasks, see that it goes to home when l3goIconRecents is
the default launcher
Change-Id: I110abab49c22e245b98a1f9b91b0b0f052886098
2019-03-15 15:09:38 -07: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
Kevin ddb9fe1177 Follow frameworks_intermediates change in gradle
Change directory of framework intermediates prebuilts based off recent
change in location.

Test: Build from IDE
Change-Id: Icda11ca1526a12cc72be65052c5b1ce8c342c059
2019-03-15 13:39:00 -07: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 f1d72926dc Merge "Make QSB_ON_FIRST_SCREEN a boolean." into ub-launcher3-master 2019-03-15 16:22:21 +00:00
Jon Miranda 7143ba6fec Make QSB_ON_FIRST_SCREEN a boolean.
Bug: 118140522
Change-Id: Ic8e47e71f538b0b0caff6f630566665d05a65522
2019-03-15 09:11:54 -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