Loading quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java +8 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import android.animation.RectEvaluator; import android.annotation.TargetApi; import android.app.ActivityManager.RunningTaskInfo; import android.content.Context; import android.content.pm.ActivityInfo; import android.content.res.Resources; import android.graphics.Matrix; import android.graphics.Point; Loading Loading @@ -280,6 +281,10 @@ public class WindowTransformSwipeHandler extends BaseSwipeInteractionHandler { mWasLauncherAlreadyVisible = alreadyOnHome; mLauncher = launcher; // For the duration of the gesture, set the screen orientation to BEHIND to ensure that we // do not rotate mid-quickscrub mLauncher.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_BEHIND); LauncherState startState = mLauncher.getStateManager().getState(); if (startState.disableRestore) { startState = mLauncher.getStateManager().getRestState(); Loading Loading @@ -616,6 +621,9 @@ public class WindowTransformSwipeHandler extends BaseSwipeInteractionHandler { mLauncherTransitionController = null; mLauncherLayoutListener.setHandler(null); mLauncherLayoutListener.close(false); // Restore the requested orientation to the user preference after the gesture has ended mLauncher.updateRequestedOrientation(); } public void layoutListenerClosed() { Loading src/com/android/launcher3/Launcher.java +8 −5 Original line number Diff line number Diff line Loading @@ -371,11 +371,7 @@ public class Launcher extends BaseActivity // For handling default keys setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL); // On large interfaces, or on devices that a user has specifically enabled screen rotation, // we want the screen to auto-rotate based on the current orientation setRequestedOrientation(mRotationEnabled ? SCREEN_ORIENTATION_UNSPECIFIED : SCREEN_ORIENTATION_NOSENSOR); updateRequestedOrientation(); setContentView(mLauncherView); getRootView().dispatchInsets(); Loading @@ -398,6 +394,13 @@ public class Launcher extends BaseActivity TraceHelper.endSection("Launcher-onCreate"); } public void updateRequestedOrientation() { // On large interfaces, or on devices that a user has specifically enabled screen rotation, // we want the screen to auto-rotate based on the current orientation setRequestedOrientation(mRotationEnabled ? SCREEN_ORIENTATION_UNSPECIFIED : SCREEN_ORIENTATION_NOSENSOR); } @Override public void onConfigurationChanged(Configuration newConfig) { int diff = newConfig.diff(mOldConfig); Loading Loading
quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java +8 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import android.animation.RectEvaluator; import android.annotation.TargetApi; import android.app.ActivityManager.RunningTaskInfo; import android.content.Context; import android.content.pm.ActivityInfo; import android.content.res.Resources; import android.graphics.Matrix; import android.graphics.Point; Loading Loading @@ -280,6 +281,10 @@ public class WindowTransformSwipeHandler extends BaseSwipeInteractionHandler { mWasLauncherAlreadyVisible = alreadyOnHome; mLauncher = launcher; // For the duration of the gesture, set the screen orientation to BEHIND to ensure that we // do not rotate mid-quickscrub mLauncher.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_BEHIND); LauncherState startState = mLauncher.getStateManager().getState(); if (startState.disableRestore) { startState = mLauncher.getStateManager().getRestState(); Loading Loading @@ -616,6 +621,9 @@ public class WindowTransformSwipeHandler extends BaseSwipeInteractionHandler { mLauncherTransitionController = null; mLauncherLayoutListener.setHandler(null); mLauncherLayoutListener.close(false); // Restore the requested orientation to the user preference after the gesture has ended mLauncher.updateRequestedOrientation(); } public void layoutListenerClosed() { Loading
src/com/android/launcher3/Launcher.java +8 −5 Original line number Diff line number Diff line Loading @@ -371,11 +371,7 @@ public class Launcher extends BaseActivity // For handling default keys setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL); // On large interfaces, or on devices that a user has specifically enabled screen rotation, // we want the screen to auto-rotate based on the current orientation setRequestedOrientation(mRotationEnabled ? SCREEN_ORIENTATION_UNSPECIFIED : SCREEN_ORIENTATION_NOSENSOR); updateRequestedOrientation(); setContentView(mLauncherView); getRootView().dispatchInsets(); Loading @@ -398,6 +394,13 @@ public class Launcher extends BaseActivity TraceHelper.endSection("Launcher-onCreate"); } public void updateRequestedOrientation() { // On large interfaces, or on devices that a user has specifically enabled screen rotation, // we want the screen to auto-rotate based on the current orientation setRequestedOrientation(mRotationEnabled ? SCREEN_ORIENTATION_UNSPECIFIED : SCREEN_ORIENTATION_NOSENSOR); } @Override public void onConfigurationChanged(Configuration newConfig) { int diff = newConfig.diff(mOldConfig); Loading