From 2b74e3c290067139c9012b25f2a874bf7c8353d9 Mon Sep 17 00:00:00 2001 From: Bill Lin Date: Mon, 25 Oct 2021 14:40:51 +0800 Subject: [PATCH] Allow One-handed gesture when densityDpi > 600 This logic was aim to prevent tablet device enable One-handed gesture so added displayInfo.densityDpi < DisplayMetrics.DENSITY_600 before. However, it seems this densityDpi=600 does not able to represent to tablet device, instead we already have system property "ro.support_one_handed_mode" which provides feasibility to config false on tablet project, as the reason we can safe to remove this condition. Bug: 203936659 Test: adb shell wm density 600 , and observe OHM gesture is available Test: atest WMShellUnitTests Change-Id: Ic7ae10e8a47d26b9bb39ab80e22d591d74f89ae5 Merged-In: Ic7ae10e8a47d26b9bb39ab80e22d591d74f89ae5 --- .../com/android/quickstep/RecentsAnimationDeviceState.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java b/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java index 444d77a612..fde6902381 100644 --- a/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java +++ b/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java @@ -58,8 +58,6 @@ import android.os.SystemProperties; import android.os.UserManager; import android.provider.Settings; import android.text.TextUtils; -import android.util.DisplayMetrics; -import android.util.Log; import android.view.MotionEvent; import android.view.Surface; @@ -67,7 +65,6 @@ import androidx.annotation.BinderThread; import com.android.launcher3.R; import com.android.launcher3.Utilities; -import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.util.DisplayController; import com.android.launcher3.util.DisplayController.DisplayInfoChangeListener; import com.android.launcher3.util.DisplayController.Info; @@ -591,8 +588,7 @@ public class RecentsAnimationDeviceState implements final Info displayInfo = mDisplayController.getInfo(); return (mRotationTouchHelper.touchInOneHandedModeRegion(ev) && displayInfo.rotation != Surface.ROTATION_90 - && displayInfo.rotation != Surface.ROTATION_270 - && displayInfo.densityDpi < DisplayMetrics.DENSITY_600); + && displayInfo.rotation != Surface.ROTATION_270); } return false; }