Allowing ListenerView intercept events in system areas

See the discussion in thje bug

Bug: 156044202
Change-Id: I68b3826602250ef163b96be95d80b98691456443
This commit is contained in:
vadimt
2020-06-04 13:38:17 -07:00
parent ad6a4dceea
commit 34cc5f45d0
3 changed files with 15 additions and 5 deletions

View File

@@ -186,11 +186,12 @@ public abstract class BaseDragLayer<T extends Context & ActivityContext>
+ ", isEventInLauncher=" + isEventInLauncher(ev)
+ ", topOpenView=" + AbstractFloatingView.getTopOpenView(mActivity));
}
if (isEventInLauncher(ev)) {
AbstractFloatingView topView = AbstractFloatingView.getTopOpenView(mActivity);
if (topView != null && topView.onControllerInterceptTouchEvent(ev)) {
return topView;
}
AbstractFloatingView topView = AbstractFloatingView.getTopOpenView(mActivity);
if (topView != null
&& (isEventInLauncher(ev) || topView.canInterceptEventsInSystemGestureRegion())
&& topView.onControllerInterceptTouchEvent(ev)) {
return topView;
}
for (TouchController controller : mControllers) {