Commit Graph

1357 Commits

Author SHA1 Message Date
TreeHugger Robot
3d6e96d526 Merge "Adding support for custom callback when starting ProxyActivity" into ub-launcher3-qt-dev 2019-06-12 23:16:59 +00:00
Tony Wickham
964d164709 Merge "Gracefully handle failed task launches during quick switch" into ub-launcher3-qt-dev 2019-06-12 22:59:35 +00:00
Sunny Goyal
16284b956c Fading out the home surface if home and recents are shown in separate surface
Bug: 134725160
Change-Id: Ia4c5e0eefc4d8b869840645f403d943831c471f1
2019-06-12 15:28:23 -07:00
Tony Wickham
e8836dc082 Gracefully handle failed task launches during quick switch
When quick switching from home or overview, go to OverviewState if the
task launch failed. Otherwise we get stuck in BackgroundAppState.

Bug: 135038270
Change-Id: I42785c261cef0df95666bc106ec5ca6ef0553cc7
2019-06-12 15:24:58 -07:00
Sunny Goyal
a0f9110e52 Adding support for custom callback when starting ProxyActivity
Bug: 133443741
Change-Id: Ifd6a289b7f49d52efe0767b600cecc2b460a87fc
2019-06-12 00:20:07 -07:00
Tony Wickham
fa37c529e1 Translate recents when attaching to app window instead of fading
When attaching recents, translate it offscreen and use a spring to pull it
into position. When detaching, use the same spring to pull it back offscreen.

Bug: 129985827
Change-Id: I05339e2ec0932070365023bfafc83cbf2a4e178e
2019-06-10 15:15:40 -07:00
Sunny Goyal
0b1cb75ee8 Disable seamless rotation for 3 and 2 button mode
Bug: 134095068
Change-Id: I8603e49a85b5524a02c9085485a180b022e3f91e
2019-06-06 15:35:45 -07:00
Jon Miranda
88dd84254c Reduce alpha delay 25ms to reduce flashy feeling of appearing large.
Bug: 123900446
Change-Id: Ia8ff74eb6b65affbf5c6c1599f4d168b459f324e
2019-06-05 11:07:17 -07:00
Tony Wickham
a04e746e84 Fix getting stuck in BackgroundAppState for 2-button mode
When ending in recents, we reapply the state - therefore, it's important
to make sure we are in OverviewState before onSwipeUpComplete(). This is
done by mLauncherTransitionController, which sets OverviewState on end.
We already force mLauncherTransitionController to end before calling
onSwipeUpComplete(), but in this case we were calling cancel() and
setting mLauncherTransitionController = null, which meant we could never
call end() on it. Instead, we should always call end() if we set it to
null.

Also ensure mLauncherTransitionController is created even if the gesture
is completed, if an existing controller isn't already running. This can
happen if you swipe up quickly enough that we get onGestureEnd before
launcher is drawn, and in that case we still want the launcher component
to animate once its ready. This is even more important for 2-button
mode, because again, we rely on mLauncherTransitionController to set the
state to OverviewState before we reapply it.

Finally, clarified some methods by renaming "swipeUp" to
"swipeUpToRecents".

Bug: 132757019
Change-Id: Ieb24a4f36a39780e5d64d7bc312791608db474d1
2019-05-31 16:11:40 -07:00
Jon Miranda
b3c9077c76 Tuning app open/close animation.
* Mostly value changes.
* Added a way to round the corners during swipe up to home animation.

Bug: 123900446
Change-Id: Id61d241d919ba51ced0633585e36b7d93efe30b0
2019-05-30 18:43:22 -07:00
TreeHugger Robot
fafe347533 Merge "Animate workspace upwards when opening an app." into ub-launcher3-qt-dev 2019-05-29 21:53:32 +00:00
Jon Miranda
119a586245 Animate workspace upwards when opening an app.
Bug: 123900446
Change-Id: I3d08985f8362038f50728e91e2fedf1c97e326ff
2019-05-29 14:39:01 -07:00
Jon Miranda
c69d1ffd92 Add staggered springs animation when swiping up to home.
Bug: 123900446
Change-Id: I275e34c6dca5b026f272ab216b18651c0df27bc4
2019-05-29 14:32:49 -07:00
Winson Chung
293d964024 Merge "Support individual lock task features" into ub-launcher3-qt-dev 2019-05-29 00:10:02 +00:00
Tony
bef6a44e7b Continue scaling down recents past final position in 0 button mode
- Previously, we clamped the progress to 1 when reaching mTransitionDragLength.
  Now, we allow dragging all the way to the top of the screen, and store this
  new top progress in mDragLengthFactor (> 1f).
- Because the launcher animation controller is inherently bound to a progress
  between 0 and 1, we have to do a bit of trickery involving interpolators.
  Specifically, we normalize the progress to 0 to 1 by dividing by
  mDragLengthFactor, but then we set the interpolators to multiply their
  progress by mDragLengthFactor. The result is that the animation progress
  appears to go from 0 to mDragLengthFactor, just like the window progress.
- To avoid scaling too small, we start interpolating the progress at a certain
  point, ending at a specified max progress when reaching the top of the screen.

Bug: 131741395
Change-Id: Ie8b4b56d37249cd1456f93c110c26c78fe052dc0
2019-05-28 21:41:43 +00:00
vadimt
2d6cd80bc9 Launcher reports whe 0-button swipe-up gesture pause is detected.
This eliminates an unreliable timeout.

Also removing an unnecessary check for harness that is done by the
called method.

Change-Id: If954580060415cbb2952532c16ea0ae4dc7b9469
2019-05-24 19:28:40 -07:00
Winson Chung
dd71ca0437 Support individual lock task features
- If screen pinning is enabled, disable gestures and wrap with input
  consumer to break out of screen pinning (existing logic)
- If Home & Overview are both disabled, disable gestures completely
- If only Home is disabled, then always launch the user into fallback
  recents (to simplify logic around breaking out of overview into Home)
- If only Overview is disabled, then prevent swiping from going into
  overview or from triggering overview from home
- Switch to using screen pinning flag check instead of binder call

Bug: 133113732
Bug: 131698989

Change-Id: Ie6f447520d4cc3fa1eaaf8427ee014851688bf37
2019-05-23 14:33:05 -07:00
Sunny Goyal
ab3963ddcf Moving TestInformationProvider to Launcher3 so that it can be used for
testing Launcher3 without quickstep

Also keeping the provider as disabled until needed

Change-Id: Ib5f459e02ae551724b390f3b74f43d601568d749
2019-05-23 14:02:33 -07:00
TreeHugger Robot
a338daa261 Merge "Adding a utility class to cache views at an activity level" into ub-launcher3-qt-dev 2019-05-22 23:35:03 +00:00
Sunny Goyal
5686333117 Adding a utility class to cache views at an activity level
Bug: 122345781
Change-Id: I9a939e0b19c06c1089c1ceb515f8b97fb5dbb49e
2019-05-22 14:23:12 -07:00
vadimt
3ab80bb734 Enable debug tracing for a lab-only non-starting app from all apps
Bug: 132900132
Change-Id: I9c5bb51e49f865ea1e1d3d2209a8dfb149f66e87
2019-05-22 12:58:35 -07:00
vadimt
e17d1feb79 Adding tracing for a lab-only flake
We had a resolved case in the past where an app's context menu didn't
open on a long click (thanks to app updates), now the menu opens, but
the drag gesture doesn't drag the icon.

Bug: 133009122
Change-Id: I45d104a92fab6556ecd937aef76f0a8147e67f56
2019-05-21 17:19:23 -07:00
Sunny Goyal
dedda05568 Using a proxy activity for startActivityForResult
This ensures that the home task is never blocked by a different task

Bug: 74500048
Change-Id: I01fd26f1d6242e39b2d8fabac5e064b748aebe62
2019-05-15 16:33:06 -07:00
Jon Miranda
ffaca2e162 Fix landscape app open/close animations.
Bug: 123900446
Bug: 124510042
Change-Id: I3db80d6f8064ce26f97cdede63c0d25499416e98
2019-05-15 10:46:33 -07:00
Winson Chung
3658d9fa0c Merge "Preemptively clear the thumbnail cache as tasks are removed" into ub-launcher3-qt-dev 2019-05-14 20:48:47 +00:00
Hyunyoung Song
e751d90c44 Implement 3 shades of folder icon/container fill color
Bug: 130451254

Change-Id: I36d885a2b0247f1bb84cb98073459853ae723331
2019-05-14 10:15:11 -07:00
Winson Chung
cb554473c7 Preemptively clear the thumbnail cache as tasks are removed
- Also reset the task thumbnail as the task views are recycled

Bug: 132309376

Change-Id: Ic2cc846e451b6b59ae76326930cb4b85627e95c4
2019-05-13 16:22:10 -07:00
Tony
8312866779 Use device profile width instead of drag layer width for overview translation
This fixes the issue where overview doesn't come in from offscreen
the first time you enter overview from home.

Test:
- Force stop launcher, quick switch from home
- Force stop launcher, swipe up and hold

Change-Id: Ia4dbd36267008bc199cff088833979606238d3eb
2019-05-13 14:11:51 -05:00
Jonathan Miranda
57730ed095 Merge "Initial app open/close polish using tuned values." into ub-launcher3-qt-dev 2019-05-10 17:30:46 +00:00
Jon Miranda
2da1da3076 Initial app open/close polish using tuned values.
* Rect and radius now match the app window size.

Bug: 124510042
Bug: 122843905
Change-Id: Ibc85bfe1d75d01cefe00b6bf32557e04a0ee4716
2019-05-10 10:11:35 -07:00
Tony
918863083b Add ScreenPinnedInputConsumer
When screen pinning is active, swipe up and hold to stop it.

Bug: 130828539
Change-Id: I343050d2a224ac723143cd3be4f78bc321f1a026
2019-05-09 18:10:10 -05:00
Kevin
141ab952e7 Ensure Recents Go layout finishes before remote anim begins
We would like to assume a correct up-to-date layout for Go recents
before the remote animation begins to ensure correctness of the app to
overview transition and allow for animating all the newly laid out task
views in sync.

We do this by checking if recents is the remote target we are animating
to and if so, checking if the view is ready.  If it is not, then we
delay the remote animation until the layout is finished and everything
is attached.

Bug: 132112131
Fix: 132108983
Test: Run Recents Go, have no tasks in recents, open app, press
overview to go to recents
Test: Test on AOSP and NexusLauncher that animations to Launcher work as
before (both to recents and to home)
Change-Id: Id74d90cffc9fe5db1dbb5fe63b8819c7436fef21
2019-05-07 15:05:39 -07:00
Sunny Goyal
ae6e318711 Initial changes to creating a fake landscape Launcher UI
Workspace and hotseat are drawn in rotated UI giving the impression that the
device is in Portrait, even though it is in landscape

Bug: 131360075
Change-Id: I29c4068af25fd4dcf7039b9a45886e864a137977
2019-05-02 10:59:28 -07:00
vadimt
8649cf29e4 Remove tracing for fixed bugs
Bug: 129434166
Bug: 131170582
Change-Id: Ia9b356594001d96c69ffbb7f8b767b2f54ed5feb
2019-05-01 16:10:56 -07:00
Jon Miranda
063211f620 Fix app open animation in landscape.
Bug: 130828765
Change-Id: Ic447d05a8fe2097a6afd0bfec73039a62bbf5a4b
2019-04-30 12:03:39 -07:00
Sunny Goyal
0382dd76e8 Releasing SurfaceControl when they are no longer needed
Bug: 123874711
Change-Id: I9c06723a3e5d4a23b8a6c60352806bb12daba598
2019-04-29 12:04:11 -07:00
Matthew Ng
06e0d80d15 Added back code removed earlier from OverviewInterationState
Change: ag/7199900

Test: manual
Fixes: 129497226
Change-Id: Ibf0b1d4ade8ef5a2f0ceb545df505e9de419ec50
(cherry picked from commit cad531248e)
2019-04-26 18:00:12 +00:00
Tony Wickham
0cc53e7f6a Merge "Decouple recents view from window while swiping up" into ub-launcher3-qt-dev 2019-04-26 00:10:34 +00:00
Matthew Ng
b60dce7268 Remove interaction flag code replaced by QuickStepContract (1/2)
Test: manual
Bug: 112934365
Fixes: 129497226
Change-Id: Id128eee4eaa620f0b9c461ef5adf0a16e9ea9a2c
2019-04-25 23:01:12 +00:00
Hyunyoung Song
efe8475093 Merge "Add important dump logging Bug: 130851537 Bug: 119992316" into ub-launcher3-qt-dev 2019-04-25 22:33:31 +00:00
Hyunyoung Song
a310a80c7b Add important dump logging
Bug: 130851537
Bug: 119992316

Change-Id: I3de7c1d910d1aecd80b47a85284565c79fe0e2cc
2019-04-25 15:14:44 -07:00
Tony Wickham
4f24370f72 Pass correct value to updatePaused() in setDisallowPause()
Change-Id: Iabc3a3aac85bcf426ab18437e006cc95fa89fbc0
2019-04-24 18:20:23 -07:00
Tony
5c13972e11 Decouple recents view from window while swiping up
Add setRecentsAttachedToWindow(boolean attached, boolean animate) with
the following conditions:

Conditions for attached
- Motion is paused and shelf is peeking
- xDisplacement > yDisplacement (to ensure seamless quick switch)
- We are continuing the previous quick switch gesture
- Gesture has ended and endTarget is RECENTS or NEW_TASK

Conditions for animate
- Recents is visible. Since the running task is invisible, this is
  true if either an adjacent TaskView is visible, or if we’re
  continuing the previous gesture

Currently the attach/detatch animation is just fading recents in/out.

Test:
- Swipe up to go home does not show the recents list at all. Instead,
  all the visuals/motion focus on the app window animating into the
  home screen.
- Recents appears when swiping and holding, to indicate that letting
  go will land in recents. The shelf also appears with haptic feedback
  in this case to reinforce this.
- The next task is immediately visible when quick switching (swiping
  left to right on the nav bar).

Bug: 129985827
Change-Id: Ib0c16f583bfd5b02d2f9f68c9688edc980a39d75
2019-04-24 17:36:42 -07:00
Tony Wickham
d0d39f1769 Merge "Move logic that overrides MotionPauseDetector to callers" into ub-launcher3-qt-dev 2019-04-25 00:34:47 +00:00
Hyunyoung Song
bf44bc342f Fix NPE / add downX,Y location for all swipes/ add extra debugging info
Bug: 122700646
Bug: 127840207

Change-Id: I5862c8950565df172a933114e1fb2f9c4575593e
2019-04-24 16:16:51 -07:00
Tony
bbea105be0 Move logic that overrides MotionPauseDetector to callers
There are 2 conditions that we force the MotionPauseDetector to treat
the motion as not paused:
1. If we haven't passed a small displacement (48dp before, 36dp now)
2. If we have moved mostly orthogonally

These existed soley for the OtherActivityInputConsumer case, because
1. We only need the displacement requirement to make room for the
   peeking shelf, which doesn't exist in other cases (it's already there on
   home for example)
2. We can only move orthogonally for quick switch, which again doesn't
   exist for other users of MotionPauseDetector.

So now instead of checking min displacement and orthogonal distance
inside MotionPauseDetector, we let callers setDisallowPause()
before adding positions to their MotionPauseDetector.

The only user visible change is that you no longer have to swipe up 48dp
before we allow pause to overview from home. This also paves the way to
using the same logic that determines to disallowPause to also detach
recents from the window while swiping up from an app.

Bug: 129985827
Change-Id: Ie690aa314da3260aff2209341a29638604f9501c
2019-04-24 16:10:40 -07:00
TreeHugger Robot
b31b38c942 Merge "Adding support for showing predicted apps as a floating row in all-apps and overview" into ub-launcher3-qt-dev 2019-04-23 21:47:38 +00:00
Sunny Goyal
77b3419ad5 Adding support for showing predicted apps as a floating row in all-apps
and overview

Bug: 130053407
Change-Id: Idb93a0ba6cfea8406f75ab86d9e0acde2fc04b3a
2019-04-23 14:26:44 -07:00
Tony Wickham
12e8a34ef6 Move system gesture exclusion rect to LauncherRootView
We translate DragLayer when going to -1, so the exclusion rect was off
screen when you went back from there.

Bug: 129297464
Change-Id: Ie079b2dadaca07886408ee9c1d130d7ac351a61d
2019-04-23 11:52:50 -07:00
Sunny Goyal
8b0cb4113f Listening only for "android" package for overlay changes
Bug: 130917995
Change-Id: I37160a886a0afdc02dca8f7da6e8aa54c795882d
2019-04-22 09:02:08 -07:00