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
(cherry picked from commit 70b5ca2505)
This commit is contained in:
1 parent
1c1f5d9aef
commit
fc6c42107d
6 files changed
+132
-27
No files matched your search
@@ -226,7 +226,8 @@ public class RotationTouchHelper implements
|
||||
mDefaultDisplay.addChangeListener(this);
|
||||
onDisplayInfoChanged(mDefaultDisplay.getInfo(), CHANGE_ALL);
|
||||
|
||||
mOrientationTouchTransformer.setNavigationMode(newMode, mDefaultDisplay.getInfo());
|
||||
mOrientationTouchTransformer.setNavigationMode(newMode, mDefaultDisplay.getInfo(),
|
||||
mContext.getResources());
|
||||
if (!mMode.hasGestures && newMode.hasGestures) {
|
||||
setupOrientationSwipeHandler();
|
||||
} else if (mMode.hasGestures && !newMode.hasGestures){
|
||||
@@ -270,6 +271,14 @@ public class RotationTouchHelper implements
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the gestural height.
|
||||
*/
|
||||
void setGesturalHeight(int newGesturalHeight) {
|
||||
mOrientationTouchTransformer.setGesturalHeight(newGesturalHeight, mDefaultDisplay.getInfo(),
|
||||
mContext.getResources());
|
||||
}
|
||||
|
||||
/**
|
||||
* *May* apply a transform on the motion event if it lies in the nav bar region for another
|
||||
* orientation that is currently being tracked as a part of quickstep
|
||||
|
||||
Reference in new issue
Block a user