Updating Launcher rotation logic
When auto-rotate is on, launcher allways allows rotation. This allows uses to use
locked rotation feature is available on the device
When auto-rotate is off, workspace does not allow rotation, but overview in quickstep
will allow rotation
Bug: 73872056
Change-Id: Ie12365c268fd5e4958634ed97b5a33dcadc691e2
diff --git a/src/com/android/launcher3/LauncherState.java b/src/com/android/launcher3/LauncherState.java
index 54df1da..4e6bcdc 100644
--- a/src/com/android/launcher3/LauncherState.java
+++ b/src/com/android/launcher3/LauncherState.java
@@ -20,12 +20,13 @@
import static android.view.accessibility.AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED;
import static com.android.launcher3.anim.Interpolators.ACCEL_2;
+import static com.android.launcher3.states.RotationHelper.REQUEST_NONE;
import android.view.View;
import android.view.animation.Interpolator;
-import com.android.launcher3.uioverrides.AllAppsState;
import com.android.launcher3.states.SpringLoadedState;
+import com.android.launcher3.uioverrides.AllAppsState;
import com.android.launcher3.uioverrides.FastOverviewState;
import com.android.launcher3.uioverrides.OverviewState;
import com.android.launcher3.uioverrides.UiFactory;
@@ -211,6 +212,8 @@
public void onStateTransitionEnd(Launcher launcher) {
if (this == NORMAL) {
UiFactory.resetOverview(launcher);
+ // Clear any rotation locks when going to normal state
+ launcher.getRotationHelper().setCurrentStateRequest(REQUEST_NONE);
}
}