use of com.android.launcher3.AbstractFloatingView.getTopOpenViewWithType in project Neo-Launcher by NeoApplications.
the class PortraitStatesTouchController method canInterceptTouch.
@Override
protected boolean canInterceptTouch(MotionEvent ev) {
mStartedFromHotseat = isTouchOverHotseat(mLauncher, ev);
mGoToOverview = false;
if (mCurrentAnimation != null) {
if (mFinishFastOnSecondTouch) {
// TODO: Animate to finish instead.
mCurrentAnimation.skipToEnd();
}
AllAppsTransitionController allAppsController = mLauncher.getAllAppsController();
if (ev.getY() >= allAppsController.getShiftRange() * allAppsController.getProgress()) {
// the touch is below the current all apps progress (to allow for double swipe).
return true;
}
// recents, dismiss a task, etc.
if (mAtomicAnim != null) {
mAtomicAnim.end();
}
return false;
}
if (mLauncher.isInState(ALL_APPS)) {
// In all-apps only listen if the container cannot scroll itself
if (!mLauncher.getAppsView().shouldContainerScroll(ev)) {
return false;
}
} else if (mLauncher.isInState(OVERVIEW)) {
if (!mOverviewPortraitStateTouchHelper.canInterceptTouch(ev)) {
return false;
}
} else {
if ((ev.getEdgeFlags() & EDGE_NAV_BAR) != 0) {
mGoToOverview = true;
}
// If we are swiping to all apps instead of overview, allow it from anywhere.
// boolean interceptAnywhere = mLauncher.isInState(NORMAL) && !mAllowDragToOverview;
boolean interceptAnywhere = mLauncher.isInState(NORMAL);
// For all other states, only listen if the event originated below the hotseat height
if (!interceptAnywhere && !isTouchOverHotseat(mLauncher, ev)) {
return false;
}
}
if (AbstractFloatingView.getTopOpenViewWithType(mLauncher, TYPE_ACCESSIBLE) != null) {
return false;
}
return true;
}
Aggregations