Disable seamless rotation for 3 and 2 button mode
Bug: 134095068
Change-Id: I8603e49a85b5524a02c9085485a180b022e3f91e
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 855535b..1afbe00 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1063,7 +1063,7 @@
// Setup the drag layer
mDragLayer.setup(mDragController, mWorkspace);
- mCancelTouchController = UiFactory.enableLiveTouchControllerChanges(mDragLayer);
+ mCancelTouchController = UiFactory.enableLiveUIChanges(this);
mWorkspace.setup(mDragController);
// Until the workspace is bound, ensure that we keep the wallpaper offset locked to the
diff --git a/src/com/android/launcher3/states/RotationHelper.java b/src/com/android/launcher3/states/RotationHelper.java
index cd96d6e..abf90e2 100644
--- a/src/com/android/launcher3/states/RotationHelper.java
+++ b/src/com/android/launcher3/states/RotationHelper.java
@@ -73,7 +73,8 @@
// This is used to defer setting rotation flags until the activity is being created
private boolean mInitialized;
- public boolean mDestroyed;
+ private boolean mDestroyed;
+ private boolean mRotationHasDifferentUI;
private int mLastActivityFlags = -1;
@@ -92,8 +93,12 @@
}
}
+ public void setRotationHadDifferentUI(boolean rotationHasDifferentUI) {
+ mRotationHasDifferentUI = rotationHasDifferentUI;
+ }
+
public boolean homeScreenCanRotate() {
- return mIgnoreAutoRotateSettings || mAutoRotateEnabled
+ return mRotationHasDifferentUI || mIgnoreAutoRotateSettings || mAutoRotateEnabled
|| mStateHandlerRequest != REQUEST_NONE
|| mLauncher.getDeviceProfile().isMultiWindowMode;
}