From 823ff4d99930c33994456f0e453bc741493d34a4 Mon Sep 17 00:00:00 2001 From: Bill Yi Date: Tue, 16 May 2023 14:38:50 -0700 Subject: [PATCH 1/2] Import translations. DO NOT MERGE ANYWHERE Auto-generated-cl: translation import Change-Id: I57f080d634442740a7acaaedf8e32a122819c70c --- res/values-eu/strings.xml | 3 +-- res/values-mr/strings.xml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/res/values-eu/strings.xml b/res/values-eu/strings.xml index 1b211f1e47..4d617c5bb7 100644 --- a/res/values-eu/strings.xml +++ b/res/values-eu/strings.xml @@ -50,8 +50,7 @@ "Pertsonalak" "Lanekoak" "Elkarrizketak" - - + "Oharrak idazteko" "Informazio erabilgarria beti eskura" "Aplikaziorik ireki beharrik gabe informazioa zuzenean jasotzeko, gehitu widgetak hasierako pantailan" "Sakatu hau widgeten ezarpenak aldatzeko" diff --git a/res/values-mr/strings.xml b/res/values-mr/strings.xml index 1d4b989a53..b4515a09b8 100644 --- a/res/values-mr/strings.xml +++ b/res/values-mr/strings.xml @@ -91,7 +91,7 @@ "{count,plural, =1{{app_name} संबंधित # सूचना आहे}other{{app_name} संबंधित # सूचना आहेत}}" "%2$d पैकी %1$d पेज" "%2$d पैकी %1$d मुख्य स्क्रीन" - "नवीन मुख्य स्क्रीन पेज" + "नवीन होम स्क्रीन पेज" "फोल्डर उघडले, %1$d बाय %2$d" "फोल्डर बंद करण्यासाठी टॅप करा" "पुनर्नामित करणे सेव्ह करण्यासाठी टॅप करा" From d7c00cb8b4b69b47e0d392086711d255e19caf04 Mon Sep 17 00:00:00 2001 From: Tracy Zhou Date: Wed, 17 May 2023 15:45:35 -0700 Subject: [PATCH 2/2] Disallow two finger gesture nav behaviors when the cursor is in the zones - This change addresses swipe up and quick switch from the nav bar area using two fingers - Separate changes will be implemented in SysUI to disable two finger swipe down from the status bar area and two finger swipe edge swipe for back Bug: 283112069 Test: manual Change-Id: I67c7ba31e759d5693d89112fd8f37f3d2a9eaa41 --- .../com/android/quickstep/RotationTouchHelper.java | 11 +++++++---- .../android/quickstep/TouchInteractionService.java | 3 +-- .../inputconsumers/AccessibilityInputConsumer.java | 3 +-- .../inputconsumers/DeviceLockedInputConsumer.java | 3 +-- .../inputconsumers/OtherActivityInputConsumer.java | 3 +-- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/quickstep/src/com/android/quickstep/RotationTouchHelper.java b/quickstep/src/com/android/quickstep/RotationTouchHelper.java index 8626c40ae0..2d47097671 100644 --- a/quickstep/src/com/android/quickstep/RotationTouchHelper.java +++ b/quickstep/src/com/android/quickstep/RotationTouchHelper.java @@ -19,6 +19,7 @@ import static android.view.Display.DEFAULT_DISPLAY; import static android.view.Surface.ROTATION_0; import static com.android.launcher3.MotionEventsUtils.isTrackpadMultiFingerSwipe; +import static com.android.launcher3.MotionEventsUtils.isTrackpadScroll; import static com.android.launcher3.util.DisplayController.CHANGE_ACTIVE_SCREEN; import static com.android.launcher3.util.DisplayController.CHANGE_ALL; import static com.android.launcher3.util.DisplayController.CHANGE_NAVIGATION_MODE; @@ -232,16 +233,18 @@ public class RotationTouchHelper implements DisplayInfoChangeListener { /** * @return whether the coordinates of the {@param event} is in the swipe up gesture region. */ - public boolean isInSwipeUpTouchRegion(MotionEvent event, BaseActivityInterface activity) { - return isInSwipeUpTouchRegion(event, 0, activity); + public boolean isInSwipeUpTouchRegion(MotionEvent event) { + return isInSwipeUpTouchRegion(event, 0); } /** * @return whether the coordinates of the {@param event} with the given {@param pointerIndex} * is in the swipe up gesture region. */ - public boolean isInSwipeUpTouchRegion(MotionEvent event, int pointerIndex, - BaseActivityInterface activity) { + public boolean isInSwipeUpTouchRegion(MotionEvent event, int pointerIndex) { + if (isTrackpadScroll(event)) { + return false; + } if (isTrackpadMultiFingerSwipe(event)) { return true; } diff --git a/quickstep/src/com/android/quickstep/TouchInteractionService.java b/quickstep/src/com/android/quickstep/TouchInteractionService.java index 1fbfbe63bb..edaee8c74a 100644 --- a/quickstep/src/com/android/quickstep/TouchInteractionService.java +++ b/quickstep/src/com/android/quickstep/TouchInteractionService.java @@ -661,8 +661,7 @@ public class TouchInteractionService extends Service mRotationTouchHelper.setOrientationTransformIfNeeded(event); if ((!mDeviceState.isOneHandedModeActive() - && mRotationTouchHelper.isInSwipeUpTouchRegion(event, - mOverviewComponentObserver.getActivityInterface())) + && mRotationTouchHelper.isInSwipeUpTouchRegion(event)) || isHoverActionWithoutConsumer) { // Clone the previous gesture state since onConsumerAboutToBeSwitched might trigger // onConsumerInactive and wipe the previous gesture state diff --git a/quickstep/src/com/android/quickstep/inputconsumers/AccessibilityInputConsumer.java b/quickstep/src/com/android/quickstep/inputconsumers/AccessibilityInputConsumer.java index 6a36d9fd64..2abc7babe7 100644 --- a/quickstep/src/com/android/quickstep/inputconsumers/AccessibilityInputConsumer.java +++ b/quickstep/src/com/android/quickstep/inputconsumers/AccessibilityInputConsumer.java @@ -103,8 +103,7 @@ public class AccessibilityInputConsumer extends DelegateInputConsumer { if (mState == STATE_INACTIVE) { int pointerIndex = ev.getActionIndex(); if (mDeviceState.getRotationTouchHelper().isInSwipeUpTouchRegion(ev, - pointerIndex, mGestureState.getActivityInterface()) - && mDelegate.allowInterceptByParent()) { + pointerIndex) && mDelegate.allowInterceptByParent()) { setActive(ev); mActivePointerId = ev.getPointerId(pointerIndex); diff --git a/quickstep/src/com/android/quickstep/inputconsumers/DeviceLockedInputConsumer.java b/quickstep/src/com/android/quickstep/inputconsumers/DeviceLockedInputConsumer.java index 59a9582c1f..a5536483df 100644 --- a/quickstep/src/com/android/quickstep/inputconsumers/DeviceLockedInputConsumer.java +++ b/quickstep/src/com/android/quickstep/inputconsumers/DeviceLockedInputConsumer.java @@ -153,8 +153,7 @@ public class DeviceLockedInputConsumer implements InputConsumer, if (!mThresholdCrossed) { // Cancel interaction in case of multi-touch interaction int ptrIdx = ev.getActionIndex(); - if (!mDeviceState.getRotationTouchHelper().isInSwipeUpTouchRegion(ev, ptrIdx, - mGestureState.getActivityInterface())) { + if (!mDeviceState.getRotationTouchHelper().isInSwipeUpTouchRegion(ev, ptrIdx)) { int action = ev.getAction(); ev.setAction(ACTION_CANCEL); finishTouchTracking(ev); diff --git a/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java b/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java index f9cd4ee1cd..7d0937fc8c 100644 --- a/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java +++ b/quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java @@ -248,8 +248,7 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC if (!mPassedPilferInputSlop) { // Cancel interaction in case of multi-touch interaction int ptrIdx = ev.getActionIndex(); - if (!mRotationTouchHelper.isInSwipeUpTouchRegion(ev, ptrIdx, - mActivityInterface)) { + if (!mRotationTouchHelper.isInSwipeUpTouchRegion(ev, ptrIdx)) { forceCancelGesture(ev); } }