From 05fbc5381720f3ef3a6ac8c37d689beb367f77ed Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Mon, 10 Sep 2018 16:50:48 -0700 Subject: [PATCH] Do not ask for rotation lock when controlling quickscrub from launcher activtiy When controlling from launcher activtiy, there is no activity focus change, and rotation lock is not required. Bug: 114074832 Change-Id: Ia976f9daa9b0f87d3493138d12cb37a490b8b1bd --- .../src/com/android/quickstep/ActivityControlHelper.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/quickstep/src/com/android/quickstep/ActivityControlHelper.java b/quickstep/src/com/android/quickstep/ActivityControlHelper.java index 63fc6cdb3b..ebb9b1699e 100644 --- a/quickstep/src/com/android/quickstep/ActivityControlHelper.java +++ b/quickstep/src/com/android/quickstep/ActivityControlHelper.java @@ -161,9 +161,11 @@ public interface ActivityControlHelper { .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); + if (!activityVisible) { + // 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