Commit Graph

237 Commits

Author SHA1 Message Date
TreeHugger Robot
0f0a53a35f Merge "Enable support for same page hotseat migration" into ub-launcher3-master 2020-03-04 00:26:20 +00:00
Vinit Nayak
a406f727ad Add vertical layout support for Overview in portrait
WM is making changes which allows apps to maintain
their orientation independent of the orientation of
the foreground app. This allows recents to always start
in portrait even when the app currently running is in
landscape. This means we have to give the illusion of
a landscape oriented overview when user swipes up in
gesterual nav when launcher is started in portrait
configuration.

PagedOrientationHandler abstracts all coordinate specific
logic from Paged/RecentsView primarily, but also all
other dynamic calculations throughout launcher.
PagedViewOrientationState is the single point of exposure
to other classes that depend on those changes. The goal
is to also minimize holding state to allow for default
implementations of PagedOrientationHandler for all the
3p/Fallback classes. PagedViewOrientationState also
holds other data around rotation that isn't
specifically tied to view logic.

The fake landscape overview can be toggled with:
adb shell settings put global forced_rotation [0/1]

Fixes: 146176182
Change-Id: I65d8d4e9f92b93931cbe0053ccaf0cda8d2ffd6c
2020-03-02 18:02:35 -08:00
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
Sunny Goyal
9c2b96090b Adding SecondaryDisplayLauncher in Launcher using common listener
Bug: 141596722
Change-Id: I480bfadf592f7d0309f17c33a3fe14bb77fb5586
2020-01-30 08:27:27 +00: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
Bill Yi
22065f290c Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I249348f471abce9332ca65e07ebb9bde8c5b1d7b
2019-07-15 15:37:48 -07: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
TreeHugger Robot
924a96651d Merge "Import translations. DO NOT MERGE" into ub-launcher3-qt-dev 2019-06-14 00:33:36 +00:00
Sunny Goyal
5b636ebfd4 Optimizing some layouts in taskview
> Recycling DigitalWellBeingToast so that the view is not inflated everytime
> Simplifying DigitalWellBeingToast to use a single text view
> Adding support for footers in taskView without creating additional layout

Bug: 122345781
Change-Id: Ia889819b93eb8644532ea95c6767554874d5e2d1
2019-06-13 10:39:46 -07:00
Bill Yi
94c22cb4d6 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: I0d9465551d819e650a05175aea087bb9e3423c96
2019-06-13 08:55:36 -07:00
Zak Cohen
f1128d9f5e Task footer - use temporary motion for show and hide.
Bug: 125844074
Test: manual

Change-Id: I9a26760f4bd976d0c3475db1322ee0da639d8209
2019-06-06 14:37:19 -07:00
Zak Cohen
560fe07448 Chips container - Don't hard code the height of the chips container.
When the container was present, but empty, it was showing it's background.

Bug: 133783088
Change-Id: I97b65435d66e9ced7f5487dc50a00665794f8fcd
Tested: manual
2019-05-28 14:53:41 -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
Zak Cohen
418b9bc5fc Adapt the task footer container to be a named container.
Bug: 126744445
Test: manual
Change-Id: Id00ffac4581bbbe5dfd73a63b05c4512394745c1
2019-05-20 10:44:20 -07:00
Zak Cohen
1159c9c18a Moves proactive hints and wellness toast into a linear layout.
This ensures that they do not fight for the space. This is intended to
be iterated upon as we find solutions to some of the technical
challenges in the current POR.

Change-Id: I831e8797b16f28fe2cd742c96e9b7c916abf77a5
2019-05-15 15:47:58 -07:00
Perumaal S
64941fd9c6 Add proactive hints container
This replaces all other chips containers and causes minimal
layout overhead: It is strictly within the task itself and
causes zero jank or space issues.

Screenshots:
https://drive.google.com/corp/drive/folders/1-3ZNCJtWc9_cgmP1nNd8U1yvpCr6GGoq
Test: manual
Change-Id: I5e22a34c4dc1ac3e73c4d5c913befc2360cb388e
2019-05-12 14:56:25 -07:00
TreeHugger Robot
0f07b87420 Merge "Import translations. DO NOT MERGE" into ub-launcher3-qt-dev 2019-05-10 07:34:58 +00:00
Bill Yi
229ecc4224 Import translations. DO NOT MERGE
Auto-generated-cl: translation import

Bug: 64712476
Change-Id: Iee3e02b60f19e7230c327b7bfe324ba72195de01
2019-05-09 23:30:10 -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
a19584d820 Change default icons for launcher [3/3]
Bug: 126738409
Bug: 129955150
Change-Id: I9daf5bd253dc72c99ab3a466766a4d30a95d0952
2019-04-13 00:51:33 -07:00
Hyunyoung Song
7924a3c97a Change default icons for launcher [2/3]
Bug: 126738409
Bug: 129955150
Change-Id: Ia140c5d16b74e4719131aa5035313b7b27028ad1
2019-04-12 16:19:53 -07:00
vadimt
c6d9ddfddb Removing hourglass_bottom
Now that we don't show DWB toast for negative remaining time

Bug: 127689526
Change-Id: I3ced3ec0da9bd7b09df9b66b4ef608e87339573f
(cherry picked from commit e921bacfb8)
2019-04-12 19:27:17 +00: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