From fb442a70f8d1bbaa54054023558892ef01aaf7a1 Mon Sep 17 00:00:00 2001 From: Vinit Nayak Date: Mon, 1 Jun 2020 18:30:15 -0700 Subject: [PATCH] Set mLastRectRotation to valid rotation mLastRectRotation's value is used after swipe gestures are complete to reset the layout for overview (after swiping to home animation is complete), so we need to set it to a valid value instead of -1. OverviewActions visibility depends on it being rotation 0 for it to be visible, otherwise it won't show up. Bug: 155844780 Test: Swipe up to home from an app, Swipe up to overview, observe overview actions show in portrait. Swipe up and back down from landscape app, hit back. Open portrait app, ensure back gesture still works. Change-Id: Ia923a54e68af567b4470841783328528fffebe6a --- .../com/android/quickstep/OrientationTouchTransformer.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/quickstep/src/com/android/quickstep/OrientationTouchTransformer.java b/quickstep/src/com/android/quickstep/OrientationTouchTransformer.java index d06393ac3c..a976126202 100644 --- a/quickstep/src/com/android/quickstep/OrientationTouchTransformer.java +++ b/quickstep/src/com/android/quickstep/OrientationTouchTransformer.java @@ -157,8 +157,9 @@ class OrientationTouchTransformer { mMode != SysUINavigationMode.Mode.TWO_BUTTONS; if (mEnableMultipleRegions) { mQuickStepStartingRotation = info.rotation; - } else if (!enableMultipleRegions) { - mLastRectRotation = mQuickStepStartingRotation = QUICKSTEP_ROTATION_UNINITIALIZED; + } else { + mLastRectRotation = 0; + mQuickStepStartingRotation = QUICKSTEP_ROTATION_UNINITIALIZED; } resetSwipeRegions(info); } @@ -293,6 +294,7 @@ class OrientationTouchTransformer { mLastRectTouched = rect; mLastRectRotation = rect.mRotation; if (mEnableMultipleRegions && mCurrentDisplayRotation == mLastRectRotation) { + // TODO(b/154580671) might make this block unnecessary // Start a touch session for the default nav region for the display mQuickStepStartingRotation = mLastRectTouched.mRotation; resetSwipeRegions();