diff options
author | Winson Chung <winsonc@google.com> | 2018-06-08 15:52:53 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2018-07-03 21:51:06 +0000 |
commit | ce368154cebf4ab5da9976aa4897317abc55ab1d (patch) | |
tree | bf69023eaaf612130c21e052d64b49b4cad7c41e | |
parent | d0e360a8586f17268d57eb6c4dc01d21f1883f32 (diff) | |
download | android_packages_apps_Trebuchet-ce368154cebf4ab5da9976aa4897317abc55ab1d.tar.gz android_packages_apps_Trebuchet-ce368154cebf4ab5da9976aa4897317abc55ab1d.tar.bz2 android_packages_apps_Trebuchet-ce368154cebf4ab5da9976aa4897317abc55ab1d.zip |
Prevent extra call to set activity orientation.
- We can request the locked orientation for quickscrub only when we
start quickscrub
Bug: 80500702
Change-Id: I2e83ff916f92959fccf79f1d6b987806338512f5
-rw-r--r-- | quickstep/src/com/android/quickstep/ActivityControlHelper.java | 5 | ||||
-rw-r--r-- | quickstep/src/com/android/quickstep/views/LauncherLayoutListener.java | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/quickstep/src/com/android/quickstep/ActivityControlHelper.java b/quickstep/src/com/android/quickstep/ActivityControlHelper.java index 275075f27..8fa6c4909 100644 --- a/quickstep/src/com/android/quickstep/ActivityControlHelper.java +++ b/quickstep/src/com/android/quickstep/ActivityControlHelper.java @@ -23,6 +23,7 @@ import static com.android.launcher3.LauncherState.FAST_OVERVIEW; import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.launcher3.allapps.AllAppsTransitionController.ALL_APPS_PROGRESS; import static com.android.launcher3.anim.Interpolators.LINEAR; +import static com.android.launcher3.states.RotationHelper.REQUEST_LOCK; import static com.android.quickstep.TouchConsumer.INTERACTION_NORMAL; import static com.android.quickstep.TouchConsumer.INTERACTION_QUICK_SCRUB; import static com.android.quickstep.views.RecentsView.CONTENT_ALPHA; @@ -156,6 +157,10 @@ public interface ActivityControlHelper<T extends BaseDraggingActivity> { QuickScrubController controller = activity.<RecentsView>getOverviewPanel() .getQuickScrubController(); controller.onQuickScrubStart(activityVisible && !fromState.overviewUi, this); + + // For the duration of the gesture, lock the screen orientation to ensure that we do not + // rotate mid-quickscrub + activity.getRotationHelper().setStateHandlerRequest(REQUEST_LOCK); } @Override diff --git a/quickstep/src/com/android/quickstep/views/LauncherLayoutListener.java b/quickstep/src/com/android/quickstep/views/LauncherLayoutListener.java index c149de54f..61740d729 100644 --- a/quickstep/src/com/android/quickstep/views/LauncherLayoutListener.java +++ b/quickstep/src/com/android/quickstep/views/LauncherLayoutListener.java @@ -40,10 +40,6 @@ public class LauncherLayoutListener extends AbstractFloatingView super(launcher, null); mLauncher = launcher; setVisibility(INVISIBLE); - - // For the duration of the gesture, lock the screen orientation to ensure that we do not - // rotate mid-quickscrub - launcher.getRotationHelper().setStateHandlerRequest(REQUEST_LOCK); } @Override |