Commit Graph

116 Commits

Author SHA1 Message Date
Samuel Fufa
a421143dd7 Enable support for same page hotseat migration
Bug: 142753423
Test: Manual
Change-Id: Ib53a64629a595c412e30ca5ff46077efc73a3f3e
2020-02-27 13:47:03 -08:00
Andy Wickham
63b7f36338 Renames BackGestureTutorialActivity to GestureSandboxActivity.
Bug: 148542211
Change-Id: Iaac537380b02f1c52f967748c30fe49ac36bb91e
2020-02-19 21:12:11 +00:00
Andy Wickham
3b0c1f3aca Allows multiple gesture blocking activities to be specified.
Bug: 148542211
Change-Id: Ie299359eb2df60f5f08d156dc6882fa133fab27c
2020-02-19 18:12:41 +00:00
Samuel Fufa
b641ac2a62 Log Hotseat onboarding user actions
+ Resolve notifiaciton dot scale issue

Bug: 147336566
Bug: 148232056
Change-Id: I0120dc183a876fda38f4682425697378c7be20f3
2020-02-12 10:02:53 -08:00
Samuel Fufa
68c57419c0 Log App Predictions from AiAi
+ Update edu screen strings

Bug:142753423
Test:Manual
Change-Id: If2424d134a5f9d2cafa248949a249ee2c7296276
2020-01-23 16:42:31 -08:00
TreeHugger Robot
0e7a81ea0a Merge "Change hotseat edu strings" into ub-launcher3-master 2020-01-10 17:29:39 +00:00
TreeHugger Robot
c85ab32e88 Merge "Use same content description for Recent apps" into ub-launcher3-master 2020-01-10 17:08:54 +00:00
Samuel Fufa
3db240a134 Change hotseat edu strings
Bug: 142753423
Change-Id: I0de86073b75eb1866d827d9e3fc35236accc67a0
2020-01-10 08:34:49 -08:00
Samuel Fufa
aed008de90 Hybrid hotseat user edu
Starts by showing a notification, which will open a dialog
with options for users to keep their hotseat layout or fully
migrate to hybrid hotseat

Bug:142753423
Test:Manual
Change-Id: I178de612837ec8551f6776fa7c6fb6111bc7431d
2020-01-07 12:02:26 -08:00
Pinyao Ting
72f9375ada Tips Gesture Navigation Tutorial [Part 2]
include actual implementation of gesture tutorial.

Bug: 146173041
Test: adb shell am start -a \
"com.android.quickstep.action.BACK_GESTURE_TUTORIAL"
Change-Id: Ic166f0a10d8efc22d9684f089142de164ca24c90
2020-01-06 16:33:55 -08:00
Pinyao Ting
993aef828a Tips Gesture Navigation Tutorial [Part 1]
import various resources from tips gesture tutorial

Bug: 146173041
Test: build and verify it passes
Change-Id: Iacea7ba1f2d15452e7442f2976633da7012fab35
2020-01-02 16:17:52 -08:00
James O'Leary
027cb32a96 Merge "Compose overscroll gesture updates" into ub-launcher3-master 2019-12-26 17:27:24 +00:00
James O'Leary
a9156a05c4 Compose overscroll gesture updates
Two changes for the latest Compose prototype:
1. Pass the identity of the underlying app to the Overscroll plugin.
2. Enable the Compose gesture over an app when there's a Recents extra
card plugin active (otherwise the current app won't count as the
rightmost one).

Some changes to the gesture:
- Angle decreased from 35° to 25° to remove overlap with
Assistant gesture
- Distance increased from 8 to 110 dp. 110 dp is 2x the Assistant
gesture and roughly the same as scrubbing into an app from Home.
- Fling detection added; uses same distance threshold, 110 dp.
- If a touch was recognized as another gesture, the touch will not be
reinterpreted as a Compose gesture, no matter what touch movement occurs
- Fixes issue where Assistant + Compose could both be triggered
- Fixes issue where scrubbing apps to the left, then back to the right,
would bring in Compose. i.e. if a touch down + touch movement starts
bringing in Assistant UI elements, then, the user moves their touch
below the Assistant angle, the Compose gesture will not start
being recognized
- Gesture length required for fling lowered from 110 dp to 40 dp, per
tuning with PM.

Bug: b/146508473
Change-Id: I414573d1a92684d1d992837a5f1df522346ec211
2019-12-23 10:59:30 -05:00
Zak Cohen
1e58d99531 Overview actions - Add controller for actions.
Add the actions to the task overlay to simplify code sharing.

Test: added unit tests for controller

Change-Id: Ie497a717b189903cc1834685f4b7d0cb926a7f52
2019-12-19 15:24:10 -08:00
Tony Wickham
b31467f3ec Use same content description for Recent apps
There were two descriptions before, one saying Overview and the
other saying Recent apps. Now we always use Recent apps.

Bug: 145181858
Change-Id: I0d33fdccb30ad3eb56ebfb3d533ea01c2e7866c1
2019-12-16 16:49:19 -08:00
Zak Cohen
e895869f47 Overview actions - adds feature flag and base class for Overview Actions.
Adds ENABLE_OVERVIEW_ACTIONS feature flag and base factory. Requires an
implementation in overlay to show any actions.

Test: run locally with flag on and off.
Bug: 145628186

Change-Id: I1c36330464cc01e1e987ebfea1a9f451067598a5
2019-12-09 16:43:54 -08:00
Zak Cohen
b053371672 Make it possible to set a bottom margin on the task thumbnail view.
Test: manual test

Change-Id: Idb18efeb5e2ee46f789488529513874e028532db
2019-12-02 15:56:57 -08:00
Pinyao Ting
2cf2871392 include predicted_rank in app launch logging
Test:
1. . build/envsetup.sh && tapas NexusLauncher
2. ccdebug && cclogcat
3. launch from workspace any app that is also in predicted apps
4. verify in terminal it has correct predicted_rank

Bug: 143855018
Change-Id: I07a62f07057537a6c09384cf944bbc5aa5888d22
2019-11-12 16:40:34 -08:00
Sunny Goyal
3a1eadd37b Adding support for remote app action provider.
> Connect to a predefined content provider to get package specific action
> Add that action to shortcut menu and task menu

Change-Id: Ide5c09d04112e86c8e19c2f9e66c88c15b3fd04e
2019-10-23 17:51:13 -07:00
Sunny Goyal
b1d7de25f8 Adding support for overlay and corresponding plugin to Launcher
Updating various task callbacks to handle overlays

Change-Id: I80077508ad35c31269c873f51f0105302a9e6a5d
2019-09-10 08:08:28 -07:00
Miranda Kephart
96b355c994 Add distance threshold for assistant gesture fling
It was possible to invoke the assistant accidentally. This change
adds a minimum distance threshold before we register a fling (the
same distance as used for drag, 55dp).

Bug: 137106918
Test: manual; tested that accidental flings were much more difficult,
but intentional invocations were still easy to register

Change-Id: I40c8bd43c1a28c7b161467804a1e44746b8e92ef
2019-08-08 15:23:24 +00:00
Adam Cohen
daf2036a82 Make it a bit harder to break out of Overview once triggered
Change-Id: I8814f1d7e219ba11a3abb191bf55192e3811f191
2019-06-28 14:57:09 -07:00
Sunny Goyal
e9f1f093c7 Increasing assistant touch region based on the corner radius
Bug: 135687556
Change-Id: I86f0cf3b0e6f3cd6608eab55be6ebf56bfdddf1c
2019-06-21 15:08:49 -07:00
Tony Wickham
59c6901823 Some improvements to home to overview transition for 0 button mode
- Peek in overview further, and with more overshoot
- Fade out and scale down workspace faster while swiping up
- Scale and translate workspace slower when letting go to enter
  overview (so it doesn't zoom out at warp speed)
- Fade in all apps shelf sooner

Bug: 132455160
Change-Id: Ieafad0ccf9bb587889bc35d536627661db10e358
2019-06-19 14:48:57 -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
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
Sunny Goyal
69300227c4 Adding support for blocking gesture nav on a particular activity
Bug: 129796627
Change-Id: I939598f62924fb113e913e0309247d8a2088bf8a
2019-05-02 13:02:22 -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
Adam Cohen
9bc1431f37 Additional Assistant gesture tuning
=> Using the drag slop (currently 10dp), which is the appropriate slop when comparing to the other gestures. Touch slop (which was being used for the Assistant) is only being used for gestures starting from the back button. This means that the delegate was getting triggered much too often (unfair slop competition). This prevents that.

=> Fixed additional bugs with the consumer delegate / sharedState; the shared state notion really only applies to the OtherActivityInputConumer, and it wasn't being propagated from the AssistantConsumer.In addition, the isActive() method is only being used as a proxy for whether or not to use the shared state, so clarified the naming. This fixes another case where touch could become completely stuck and you could no longer swipe up.

=> Modified the effective angle to be 90 degrees down to 20 above the horizontal.

=> Reduced the drag threshold to 55 dps.

=> Known issue: the time threshold requires motion events to be triggered. In practice, this works because the finger doesn't stay completely still, but we should add a timer to update the progress smoothly.

=> Removed pause detector.

Change-Id: Ie23e836c6d778914594774b830c3cd2e7b94eca4
2019-04-24 16:46:03 -04: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
Adam Cohen
b117707d31 Tune Assistant Gesture
=> bumping detectable region to 48 dp horizontal + vertical within corner
=> centering detectable angle;  total 70 degrees (ie. btw 10 off the vertical and 10 off the horizontal)
=> pilfering touch events when slop is passed and assistant gesture is engaged
=> Fixing issue where we were incorrectly using “sharedState” causing incorrect handling of gestures subsequent to AssistantTouchConsumer being invoked (it was forgetting to clear it’s input state and hence reporting “active” when it wasn’t). The symptom was that gestures after the AssistantTouchConsumer would never actually move the active window even though state was being updated; you’d feel the Overview haptic.
=> Devices with large corner radii are still somewhat problematic as the initial touch down often lands high on the display (ie. above the 48 dp region).

Change-Id: I3d5761112f4cb8b7b1eee987de5afe9aee260304
2019-04-18 12:54:28 -07:00
Hyunyoung Song
052624d897 TaskCornerRadius should not use dialogCornerRadius on devices not supporting rounded corners
Bug: 123985787

Change-Id: I4ffe06362256d4cc83bbe34c139d71ea1f6ca92e
2019-04-10 14:29:36 -07:00
Tony Wickham
5e29395eba Merge "Swipe up on nav bar to go home from -1 and widgets" into ub-launcher3-qt-dev 2019-04-09 18:14:15 +00:00
Tony Wickham
9791bd1555 Swipe up on nav bar to go home from -1 and widgets
More specifically, any window (e.g. qsb search) or AbstractFloatingView.

NavBarToHomeTouchController now implements TouchController directly instead
of AbstractStateChangeTouchController, as it not only dealing with
launcher states. This makes it easier to override intercept logic to
handle cases like not having window focus, for example.

AbstractFloatingViews can createHintCloseAnim() to play an animation
hinting that it is about to be closed by swiping up. Widgets sheets use
this to pull back similar to the all apps transition to home.

Bug: 129976669
Change-Id: Ie157b978d9f1ee36d5fd32cea72ec02ce40878c0
2019-04-09 10:53:24 -07:00
Hyunyoung Song
2aec9c42f5 Change task view / all apps/ widgets / folder radius to dialogCornerRadius
Bug: 123985787
Change-Id: Iaa8088beb51d37dba90d57ad065f9eac0dd46270
2019-04-09 00:27:07 +00: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
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
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
Tony Wickham
7550c1227e Merge "Fix some issues with MotionPauseDetector" into ub-launcher3-master 2019-03-05 22:00:24 +00:00
Matthew Ng
077c29e091 Added assistant gesture swipe up right side region on nav bar
Bug: 112934365
Test: manual
Change-Id: I467e71f13da4afba3a556fafb0bfdf01650ab4bf
2019-03-01 13:53:13 -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
TreeHugger Robot
80748ae6f4 Merge "Increasing char limit for string, per localization request." into ub-launcher3-master 2019-01-30 21:28:19 +00:00
TreeHugger Robot
5b1cd9cecb Merge "time_left_for_app: increasing limit" into ub-launcher3-master 2019-01-30 21:28:17 +00:00
vadimt
5c749392bd time_left_for_app: increasing limit
Bug: 123638440
Change-Id: I20a444edfdad737206fcbcb9ab5c2b7c1d1973da
Tests: emulated a string with this size
2019-01-30 13:17:36 -08:00
vadimt
21550b4673 Increasing char limit for string, per localization request.
Bug: 123638453
Change-Id: I40aea84f88cb91e4cd123fa0181894867c0e02f7
Tests: none
2019-01-30 13:04:07 -08:00
Tony Wickham
023f404a12 Make quick switch ("hook") more reliable
- Add max orthogonal displacement to MotionPauseDetector to avoid
  pausing when swiping left or right
- When gesture in ambiguous between swipe up for home or swipe over
  for the new task, base the decision on the faster velocity component
- Disable recents freescroll mode when dispatching motion from the nav
  bar. This way recents handles it naturally and we don't need custom
  logic to snap to the next page at the end of the gesture.
- Fix a bug where you couldn't hook to start a new task when SWIPE_HOME
  was disabled

Bug: 111926330
Change-Id: If63aa2bb32b57c3f401c5df8b3f6f4efec97b1fa
2019-01-29 17:11:12 -08:00
Tony Wickham
18759647f0 Swipe up to go home, swipe and hold to go to overview
- Pause (swipe and hold) detection based on velocity and acceleration,
  so it feels immediately responsive
- Don't show shelf during swipe; peek when swipe pauses
- Disallow long swipe
- If swiping to go home (we didn't detect a pause), animate window and
  launcher together (not final animation, but mechanism is in place)
- Guarded by SWIPE_HOME flag

Bug: 111926330
Change-Id: Ie4af04517c6688e3d649c2971a1aad197837cb3b
2019-01-28 11:37:33 -08:00
TreeHugger Robot
90048de773 Merge "Disable window corner rounding on some devices" into ub-launcher3-master 2019-01-25 00:31:52 +00:00
Lucas Dupin
a2074857dc Disable window corner rounding on some devices
Bug: 122347746
Test: visual; on taimen, marlin and walleye
Change-Id: If6ac1c75297dd25ad40d3ec61537e8793bceceb7
2019-01-24 16:19:49 -08:00
TreeHugger Robot
f81da5f4ee Merge "Removing querying whether DWB time limit is for a group" into ub-launcher3-master 2019-01-24 23:07:48 +00:00