From f58cf5e337796091047304c61932cf0b23ef42cf Mon Sep 17 00:00:00 2001 From: Hyunyoung Song Date: Wed, 19 Sep 2018 16:06:16 -0700 Subject: [PATCH] Disable scrolling noti shade on abstract floating view with swipe down interactions already doing something else. Bug: 116143342 Change-Id: If3716de0eb1f7b508c3b74dbe2593ba62fffcf74 --- .../launcher3/uioverrides/StatusBarTouchController.java | 5 ++++- src/com/android/launcher3/AbstractFloatingView.java | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/uioverrides/StatusBarTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/StatusBarTouchController.java index d5f6b940ff..4d567865e6 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/StatusBarTouchController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/StatusBarTouchController.java @@ -23,6 +23,7 @@ import android.util.Log; import android.view.MotionEvent; import android.view.ViewConfiguration; +import com.android.launcher3.AbstractFloatingView; import com.android.launcher3.DeviceProfile; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState; @@ -100,7 +101,9 @@ public class StatusBarTouchController implements TouchController { } private boolean canInterceptTouch(MotionEvent ev) { - if (!mLauncher.isInState(LauncherState.NORMAL)) { + if (!mLauncher.isInState(LauncherState.NORMAL) || + AbstractFloatingView.getTopOpenViewWithType(mLauncher, + AbstractFloatingView.TYPE_STATUS_BAR_SWIPE_DOWN_DISALLOW) != null) { return false; } else { // For NORMAL state, only listen if the event originated above the navbar height diff --git a/src/com/android/launcher3/AbstractFloatingView.java b/src/com/android/launcher3/AbstractFloatingView.java index 4fe60991cf..45751328a8 100644 --- a/src/com/android/launcher3/AbstractFloatingView.java +++ b/src/com/android/launcher3/AbstractFloatingView.java @@ -91,6 +91,11 @@ public abstract class AbstractFloatingView extends LinearLayout implements Touch public static final int TYPE_ACCESSIBLE = TYPE_ALL & ~TYPE_DISCOVERY_BOUNCE & ~TYPE_QUICKSTEP_PREVIEW; + // These view all have particular operation associated with swipe down interaction. + public static final int TYPE_STATUS_BAR_SWIPE_DOWN_DISALLOW = TYPE_WIDGETS_BOTTOM_SHEET | + TYPE_WIDGETS_FULL_SHEET | TYPE_WIDGET_RESIZE_FRAME | TYPE_ON_BOARD_POPUP | + TYPE_DISCOVERY_BOUNCE | TYPE_TASK_MENU ; + protected boolean mIsOpen; public AbstractFloatingView(Context context, AttributeSet attrs) {