Migrate trigger logic to fullfill new UI changes for
One-handed mode settings.

According to new key visual changes for One-handed mode,
modify the trigger condition to reflect the changes.

Bug: 175851783

Test: manual
Test: atest WMShellUnitTests
Change-Id: I4d734b31cafd5ce884010642b5e613c3deadfb20
diff --git a/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java b/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java
index e821e06..fa37901 100644
--- a/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java
+++ b/quickstep/src/com/android/quickstep/RecentsAnimationDeviceState.java
@@ -561,7 +561,7 @@
             return false;
         }
 
-        if (mIsOneHandedModeEnabled || mIsSwipeToNotificationEnabled) {
+        if (mIsOneHandedModeEnabled) {
             final Info displayInfo = mDisplayController.getInfo();
             return (mRotationTouchHelper.touchInOneHandedModeRegion(ev)
                 && displayInfo.rotation != Surface.ROTATION_90
diff --git a/quickstep/src/com/android/quickstep/inputconsumers/OneHandedModeInputConsumer.java b/quickstep/src/com/android/quickstep/inputconsumers/OneHandedModeInputConsumer.java
index 8d9c524..bc20902 100644
--- a/quickstep/src/com/android/quickstep/inputconsumers/OneHandedModeInputConsumer.java
+++ b/quickstep/src/com/android/quickstep/inputconsumers/OneHandedModeInputConsumer.java
@@ -147,12 +147,10 @@
     }
 
     private void onStartGestureDetected() {
-        if (mDeviceState.isOneHandedModeEnabled()) {
-            if (!mDeviceState.isOneHandedModeActive()) {
-                SystemUiProxy.INSTANCE.get(mContext).startOneHandedMode();
-            }
-        } else if (mDeviceState.isSwipeToNotificationEnabled()) {
+        if (mDeviceState.isSwipeToNotificationEnabled()) {
             SystemUiProxy.INSTANCE.get(mContext).expandNotificationPanel();
+        } else if (!mDeviceState.isOneHandedModeActive()) {
+            SystemUiProxy.INSTANCE.get(mContext).startOneHandedMode();
         }
     }