Dispatch newDisplayLayout in updateDisplayLayout() directly
Empty DisplayLayout do not contain navigation bar height Bug : Cold boot and set 3 Button NavBar Mode, observe one handed mode can not trigger Recovery step : Rotate once and the gesture become activate Fixes: 183951120 Test: create forest and flash ROM, set NavBar 3 Button Mode. Test: atest WMShellUnitTests Change-Id: I930216719f77d0e15d46790e02b788ce9cd80e98
This commit is contained in:
@@ -403,9 +403,9 @@ public class OneHandedController implements RemoteCallable<OneHandedController>
|
||||
}
|
||||
|
||||
private void updateDisplayLayout(int displayId) {
|
||||
mDisplayAreaOrganizer.setDisplayLayout(
|
||||
mDisplayController.getDisplayLayout(displayId));
|
||||
mGestureHandler.onDisplayChanged(mDisplayAreaOrganizer.getDisplayLayout());
|
||||
final DisplayLayout newDisplayLayout = mDisplayController.getDisplayLayout(displayId);
|
||||
mDisplayAreaOrganizer.setDisplayLayout(newDisplayLayout);
|
||||
mGestureHandler.onDisplayChanged(newDisplayLayout);
|
||||
}
|
||||
|
||||
private ContentObserver getObserver(Runnable onChangeRunnable) {
|
||||
|
||||
@@ -63,7 +63,7 @@ public class OneHandedGestureHandler implements OneHandedTransitionCallback {
|
||||
private boolean mIsEnabled;
|
||||
private int mNavGestureHeight;
|
||||
private boolean mIsThreeButtonModeEnabled;
|
||||
private int mRotation;
|
||||
private int mRotation = Surface.ROTATION_0;
|
||||
|
||||
@VisibleForTesting
|
||||
InputMonitor mInputMonitor;
|
||||
|
||||
Reference in New Issue
Block a user