[Overview Actions] Disable touching on the empty area when recent is modal.
Originally touching on the empty space would bring user back to homescreen. We will disable this for select mode.
Test: local
Bug: 154531538
Change-Id: Iee3780755fc2c32682ea0fa039ca5822a95fce2c
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
index 955cf5a..fae0df0 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java
@@ -638,7 +638,7 @@
case MotionEvent.ACTION_DOWN:
// Touch down anywhere but the deadzone around the visible clear all button and
// between the task views will start home on touch up
- if (!isHandlingTouch()) {
+ if (!isHandlingTouch() && !isModal()) {
if (mShowEmptyMessage) {
mTouchDownToStartHome = true;
} else {
@@ -666,7 +666,7 @@
@Override
protected void determineScrollingStart(MotionEvent ev, float touchSlopScale) {
// Enables swiping to the left or right only if the task overlay is not modal.
- if (mTaskModalness == 0f) {
+ if (!isModal()) {
super.determineScrollingStart(ev, touchSlopScale);
}
}
@@ -737,6 +737,10 @@
updateEnabledOverlays();
}
+ private boolean isModal() {
+ return mTaskModalness > 0;
+ }
+
private void removeTasksViewsAndClearAllButton() {
for (int i = getTaskViewCount() - 1; i >= 0; i--) {
removeView(getTaskViewAt(i));