From ae4d2193d98d874a30a38cdea534129d778978f6 Mon Sep 17 00:00:00 2001 From: Jason Chang Date: Sun, 27 Mar 2022 17:00:15 +0800 Subject: [PATCH] Fix One-handed mode tutorial broken on large screen device Change the orientation judgement by checking display info's width & height Bug: 223486060 Test: manual Change-Id: I94947ad635146dcb656e5074577b297617326c8d --- .../com/android/quickstep/RecentsAnimationDeviceState.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java b/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java index f1ace49161..7ad60bb0bc 100644 --- a/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java +++ b/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java @@ -63,7 +63,6 @@ import android.os.UserManager; import android.provider.Settings; import android.text.TextUtils; import android.view.MotionEvent; -import android.view.Surface; import androidx.annotation.BinderThread; @@ -557,8 +556,7 @@ public class RecentsAnimationDeviceState implements DisplayInfoChangeListener { if (mIsOneHandedModeEnabled) { final Info displayInfo = mDisplayController.getInfo(); return (mRotationTouchHelper.touchInOneHandedModeRegion(ev) - && displayInfo.rotation != Surface.ROTATION_90 - && displayInfo.rotation != Surface.ROTATION_270); + && (displayInfo.currentSize.x < displayInfo.currentSize.y)); } return false; }