Commit Graph

20478 Commits

Author SHA1 Message Date
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
Sunny Goyal 1e6641fc74 Merge "Removing fade animation on swipe up" into ub-launcher3-master 2019-03-13 22:05:27 +00:00
TreeHugger Robot da60846197 Merge "Revert "Temporarily make TouchInteractionService direct boot unaware"" into ub-launcher3-master 2019-03-13 20:28:46 +00:00
Tony Wickham 1ccc31379e Revert "Temporarily make TouchInteractionService direct boot unaware"
This reverts commit 3a4f503e5d.

Reason for revert: SystemUI now expects our service to be direct boot aware

Change-Id: I6f7906046e79f83848cb46f5cce63c827d9fbf4d
2019-03-13 20:19:08 +00:00
Tracy Zhou 6f064f9d3f Fix NPE caught in FallbackRecentsTest
Change-Id: Ia586bebd9a24e5bbfcbed50c7c260134911e073b
Fixes: 128464669
Test: N/A
2019-03-12 22:37:33 -07:00
Tracy Zhou ec2713e153 Merge "Log back key events from Overview in live tile mode." into ub-launcher3-master 2019-03-13 05:22:54 +00:00
Tracy Zhou e8edaff41a Log back key events from Overview in live tile mode.
Change-Id: If633df84fc46f8b2c80785f983ac5b77a5553747
Fixes: 127837913
Test: N/A
2019-03-12 16:27:05 -07: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
TreeHugger Robot a086df0047 Merge "Stress test for starting Launcher via gestures" into ub-launcher3-master 2019-03-12 22:34:01 +00: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
Tracy Zhou 0bef2bf84c Merge "App icon transitions with app window in overview" into ub-launcher3-master 2019-03-11 22:15:22 +00:00
Tony Wickham adbd4d6c1d Merge "Send onGestureStarted() when continuing a quick switch gesture" into ub-launcher3-master 2019-03-11 20:47:09 +00:00
vadimt c1f88db00a Stress test for starting Launcher via gestures
Ideally, we should have a race condition tests, but with the new
single-threaded model, this requires more work. This is a temporary
measure.

Change-Id: Ie180883f4b186e4c4087dc77fed1e4d946402465
2019-03-11 13:38:46 -07:00
vadimt 7d7979df1e Not using reflection for app-usage API
Bug: 118319143
Test: Manual
Change-Id: I304c2d92f2cddccb6f187436cfd5465d06a14867
2019-03-11 20:19:56 +00:00
Tony Wickham 28d43c580a Send onGestureStarted() when continuing a quick switch gesture
When continuing the gesture, we set mPassedTouchSlop = true in order to
make the second gesture responsive/fluid. However, we only call
notifyGestureStarted() when passing that slop, meaning we don't call it
in this case. Now we call it immediately on touch down when continuing
the previous gesture.

This cleans up a lot of inconsistent state issues, such as not creating
the launcher animation controller as part of the second quick switch
gesture.

Bug: 111926330
Change-Id: I03c3ed9a8d364fbfdc2d04bafb58a63bf61e2f63
2019-03-11 10:28:48 -07:00
Tony Wickham 0aa0e2737e Merge "Quickly fade in QSB when swiping up when SWIPE_HOME = false" into ub-launcher3-master 2019-03-11 17:21:54 +00:00
Tony Wickham 836602e313 Quickly fade in QSB when swiping up when SWIPE_HOME = false
Now that the "hook" gesture is supported for old quickstep to switch
apps, we need to fade out the QSB so it doesn't overlap the TaskView we
are switching to.

Bug: 111926330
Change-Id: Ie04c7909f6b96d12c810b438db89eedf8ea5bdeb
2019-03-11 08:46:49 -07:00
TreeHugger Robot 652b9ab5c9 Merge "Revert "Revert "Temporarily make TouchInteractionService direct boot unaware""" into ub-launcher3-master 2019-03-08 16:47:02 +00:00
Tony Wickham 74fc2abc59 Merging ub-launcher3-master, build 5358885
Test: Manual

Bug: 112934365
Bug: 123900446

Change-Id: I79335da22c872a59bf0238d478943eb6a5a04a23
2019-03-07 13:25:35 -08:00
vadimt 7977961f73 Logging switching Quickstep on and off for tests
Change-Id: I9ff70850a86542715b5ef88c1f2a492bd3797ab1
2019-03-06 17:08:13 -08:00
Tony Wickham 1c22a2c7a2 Revert "Revert "Temporarily make TouchInteractionService direct boot unaware""
This reverts commit 84062d4b5d.

Reason for revert: We want TouchInteractionService to be direct boot unaware until engineers can flash to a build where sysui expects it to be direct boot aware (sorry for the churn...).

Change-Id: I27c00257819751af52df40467d5a63dc106e1917
2019-03-07 00:34:01 +00:00
Sunny Goyal 826405d095 Merge "Using the new contract for some systemUI constants" into ub-launcher3-master 2019-03-06 21:40:12 +00:00
TreeHugger Robot 5ac7eb1e37 Merge "Updates to app to icon animation, and turns on ADAPTIVE_ICON_WINDOW_ANIM flag." into ub-launcher3-master 2019-03-06 21:34:44 +00:00
Jon Miranda 4334874f1f Updates to app to icon animation, and turns on ADAPTIVE_ICON_WINDOW_ANIM flag.
- getFirstMatchForAppClose now only looks at the current page, since switching
  pages is disruptive and the animation for app closing to an icon on a
  different page is unclear.
- Searches for package name and user id (in case of work profile app)
  instead of component name to handle shortcuts and trampoline activities.

- Adaptive icon background drawable is now always centered

- Fix crash that occurs when ADAPTIVE_ICON_WINDOW_ANIM is off. We were trying
  to set FolderAdaptiveIcon as the background drawable. Simplest solution is
  to not use folder as a search criteria when the flag is off.

- Similar to DragView, FloatingIconView now uses BubbleTextView icon when
  adaptive icon support is not available. This handles legacy-treated apps.

Bug: 123900446
Change-Id: Idaf292bb39d78db511cf2ee04a16b191454846b3
2019-03-06 13:25:22 -08:00
Sunny Goyal b7dafa6a04 Using the new contract for some systemUI constants
Change-Id: I1a0351bc9b1ac5b8fe866a92c1bda93126189543
2019-03-06 12:32:24 -08:00
Tracy Zhou 202014db2f App icon transitions with app window in overview
Fixes: 123641382
Test: Swipe up and hold from app when SWIPE_HOME is enabled or swipe up from app when it's not
Change-Id: I1bd35b1b96d66a3996f9b24c9a7e896535fa1ca0
2019-03-06 11:55:01 -08:00
Matthew Ng 04d58e841f Do not consume motion events when there is no assistant available
Bug: 112934365
Test: manual
Change-Id: If9254d974a34772357ce32d5ba2734db5a173f6b
2019-03-06 19:43:29 +00:00
Tony Wickham b980947c8a Merging ub-launcher3-master, build 5356125
Test: Manual

Bug: 112934365
Bug: 114136250
Bug: 118441555
Bug: 123900446
Bug: 123904290
Bug: 123906429
Bug: 124288578
Bug: 124620962
Bug: 124730625
Bug: 125364936
Bug: 125551024
Bug: 126045978
Bug: 126229665
Bug: 126289691
Bug: 126327184
Bug: 126336729
Bug: 126416861
Bug: 126767319
Bug: 127282292
Bug: 127345257
Bug: 127532177
Change-Id: I6f56221b8a7009d1f14ba47a0c63822d3f3ba06a
2019-03-06 10:26:28 -08:00
Tony Wickham 40e0693234 Merge "Revert "Temporarily make TouchInteractionService direct boot unaware"" into ub-launcher3-master 2019-03-06 17:43:15 +00:00
Tony Wickham 84062d4b5d Revert "Temporarily make TouchInteractionService direct boot unaware"
This reverts commit 3a4f503e5d.

Reason for revert: need TouchInteractionService to be direct boot aware for the merge

Change-Id: I5b3c651df77f8df1d5f07245b062f2384cd760a0
2019-03-06 17:31:40 +00:00
Tracy Zhou 74130d2cea Merge "Make task launching interpolators consistent" into ub-launcher3-master 2019-03-06 01:42:40 +00:00
Tracy Zhou 797210acad Make task launching interpolators consistent
Fixes: 127532177
Test: Manual

Change-Id: I36aba881cc34c3d99af1dc1dd095c6082e2ea815
2019-03-05 16:38:12 -08:00
Tony Wickham 7550c1227e Merge "Fix some issues with MotionPauseDetector" into ub-launcher3-master 2019-03-05 22:00:24 +00:00
Tony Wickham eb6cb3b943 Merge "Don't allow swipe up for all apps above shelf" into ub-launcher3-master 2019-03-05 21:59:14 +00:00