diff options
author | Winson Chung <winsonc@google.com> | 2018-02-15 11:33:53 -0800 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2018-02-15 11:35:37 -0800 |
commit | 9004912eaa0d9cfddb520a8131bf6e5291e79cc0 (patch) | |
tree | d5b26c42a02fbae7d371b82195de12aa1b425590 /src | |
parent | c36d6eefaef62290312fb5e1f6f53ec163551d82 (diff) | |
download | android_packages_apps_Trebuchet-9004912eaa0d9cfddb520a8131bf6e5291e79cc0.tar.gz android_packages_apps_Trebuchet-9004912eaa0d9cfddb520a8131bf6e5291e79cc0.tar.bz2 android_packages_apps_Trebuchet-9004912eaa0d9cfddb520a8131bf6e5291e79cc0.zip |
Prevent rotation during quickscrub gesture.
Bug: 73486148
Change-Id: Ia435608484e49daf93ff4aa675da11ea4f0fd421
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 7905ed0cf..0ed5de165 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -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(); @@ -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); |