Commit Graph

6 Commits

Author SHA1 Message Date
Bill Lin
70b5ca2505 Update state and touch region after one handed overlay changed
The matrix for overall modes x state changes:
-----------------------------------------------------
   Mode     |      State changed     | *Before|*After
-----------------------------------------------------
  OneHanded |  Portrait->Landscape   |  80dp  |  32dp
  OneHanded |  Landscape->Portrait   |  32dp  |  80dp
-----------------------------------------------------
  OneHanded |  Disable->Enable       |  32dp  |  32dp
 (Landscape)|  Enable->Disable       |  32dp  |  32dp
-----------------------------------------------------
  OneHanded |  Disable->Enable       |  32dp  |  80dp
 (Portrait) |  Enable->Disable       |  80dp  |  32dp
-----------------------------------------------------
  NO_BUTTON |  Portrait->Landscape   |  32dp  |  32dp
  NO_BUTTON |  Landscape->Portrait   |  32dp  |  32dp
  2 BUTTON  |  Portrait->Landscape   |  48dp  |  48dp
  2 BUTTON  |  Landscape->Portrait   |  48dp  |  48dp
  3 BUTTON  |  Portrait->Landscape   |  48dp  |  48dp
  3 BUTTON  |  Landscape->Portrait   |  48dp  |  48dp
-----------------------------------------------------
* dimen : navigation_bar_gesture_height

Test: adb bugrepot | grep mOneHandedModeRegion
Test: manually triger one handed
Test: atest WindowInsetsBehaviorTests
Test: atest com.android.launcher3.memory.MemoryTests
Test: flake -once
Test: rnlot -t com.android.launcher3.memory.MemoryTests
Bug: 157958539
Bug: 159183864
Change-Id: I19755938c3c93eb59a9f621af5722f5679c1da14
2020-06-19 10:23:43 +08:00
Vinit Nayak
1901939be7 Modify input points to register in correct swipe touch regions
While the recents task list is frozen, launcher
will continue to listen for touch regions in
all orientations of apps it has seen while frozen.
Ex. Start w/ portrait app, then quick switch to
90-deg landscape app, touches in the navbars of both
those orientations will be treated as valid.
Once the task list unfreezes, only the orientation
that is currently displayed will have a valid navbar
touch region

fixes: 140116135
Test: tested manually in all 4 orientations with
quickswitch, swipe to recents and swipe to home
Attempted to write unit tests, but only basic ones
since there are some limitations on the MotionEvent
API for mocking

Change-Id: I8d3751571a939497b44e0dd249a0248299ba5ceb
2020-03-02 15:28:38 -08:00
vadimt
f0c80528ab Starting swipe-to-all-apps outside of areas triggering long-press
I suspect that some tests using TAPL run under pressure (mem or CPU,
created either intentionally or as a result of a leak somewhere)
where test process may generate a pause between DOWN and MOVE events
enough to be recognized as a long tap, which opens a context menu
instead of swiping.

While the clean solution is b/140252325, this is a workaround.

Bug: 144853809
Change-Id: I135eaee608270b7e60bb072cb360632763cbe5c5
2019-12-12 16:27:25 -08:00
Sunny Goyal
f5d02b069a Reading navigation_bar_gesture_height for bottom swipe region
Bug: 132917885
Change-Id: I39d266fc34a69c3ba50246b5a66350942a85becb
2019-05-23 10:42:24 -07:00
Sunny Goyal
1b40b731b2 Using different resource size for touch region in landscape
Bug: 132917885
Change-Id: Ib702fd17fecff980db2e1d00f05cd055bcc3185a
2019-05-20 10:09:26 -07:00
vadimt
1b383af652 Not using magic constants for navbar height
Change-Id: I6783b8a2ebb059ce35748d8c3e818cbe732ff40d
2019-05-08 17:20:34 -07:00