Commit Graph

11 Commits

Author SHA1 Message Date
Bill Lin
945bb34b5e 1/ Provides feasibility to adjust touch slop in TouchController
There is a case when one handed mode triggered(Activated), all apps
drawer is very easy to trigger while user swipe up around NavBar
region to exit one handed mode. Since System Gesture monitor regsion
is small on screen bottom, swipe-up gesture usually cross over NavBar
monitor region and invoke launcher touch controller intercept touch
event and introduce unexpectedly trigger all apps drawer.

Adding onOneHandedModeStateChanged(boolean activated) for controller
be able to adjust the touch slop by multiplier, we can set a larger
multiplier when the visible window size translate become smaller
and make swipe gesture not too sensitive.

Test: manual swipe up to swich "home <-> all apps" and monitor
      minDisplacement of SingleAxisSwipeDetector
Test: Trigger one handed mode and swipe up to exit one handed mode
      check the minDisplacement of SingleAxisSwipeDetector
Bug: 186235522
Change-Id: I9729cd408d85b2b22582bf800e28d1471fc06980
2021-06-04 01:44:50 +08:00
Tony Wickham
79ec120b3f Merge "Fix TaskViewTouchController crash in seascape" 2020-12-15 18:45:15 +00:00
vadimt
c610f26404 Removing unused tracing
Test: presubmit
Bug: 139891609
Change-Id: I30b432d329d6606b3d955409c167bddbacce8a37
2020-12-11 19:43:49 -08:00
Tony Wickham
e3386502cf Fix TaskViewTouchController crash in seascape
Previously, we were using scroll direction POSITIVE as a catch all
to mean "up" but in seascape, we actually want NEGATIVE. Added
getUpDirection() to capture that. Tried to clarify the code a bit
by putting all the methods used solely by TaskViewTouchController
together with documentation. It's still pretty confusing and feels
redundant, but couldn't think of an obvious way to simplify.

Test: Swipe up and down on a task in all permutations of:
- 3 button mode
- Gesture navigation
- Portrait
- Landscape
- Seascape
- LTR
- RTL
- Home rotation allowed
- Home rotation disallowed

Fixes: 174009771
Fixes: 173567204
Change-Id: Id0f8d6f4365d888eb46182d8544d18206795dfb8
2020-12-11 17:30:41 -08:00
vadimt
d5cb9a7a18 Even more logging for pause non-detection
Bug: 156044202
Change-Id: I31fead73a6a64617aea67e66b01c365841229b92
2020-05-11 15:56:54 -07:00
vadimt
7b7e62e5eb Additional logging for pause non-detection
Bug: 156044202
Change-Id: I6d7dcdcf73722e66fcbd180c9e309c518766b9b8
2020-05-11 10:10:53 -07:00
vadimt
ad87034d1f More logging for pause non-detection
Bug: 156044202
Change-Id: I1c995b6c28f7108b96ff74aa8c3c71f70f8b3fb6
2020-05-08 15:09:37 -07: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
Tony Wickham
fd239cafbe Translate recents slightly while dragging after pausing
There's a lot of resistance, but feels better than nothing
responding to your movement.

Bug: 143361609
Change-Id: I9d7e06279ebdbaa0317909ce96d6f001dbe9699a
2020-01-28 18:31:14 -08:00
Tony Wickham
7af5033e49 Add BothAxesSwipeDetector
This reports both x and y displacement, and both velocities onDragEnd().

Bug: 126596417
Change-Id: I1c62074b99fe21bc9eedf615e3c9a0a0a400bf81
2019-10-25 16:54:41 -07:00
Tony Wickham
eed585b0c3 Refactor SwipeDetector to track both axes
Existing clients now use the SingleAxisSwipeDetector subclass. A
followup CL will add BothAxesSwipeDetector, whose first client will be
the quick switch from home controller.

Bug: 126596417
Change-Id: I54c71088cfe99ff28cdc719a1eb7a7d06ac95d2d
Merged-In: I54c71088cfe99ff28cdc719a1eb7a7d06ac95d2d
2019-10-24 18:56:44 +00:00