@Override public boolean onInterceptTouchEvent(MotionEvent ev) { boolean intercept = false; if (mDoubleTapToSleepEnabled) { if (mService.getBarState() == StatusBarState.SHADE && ev.getY() < mStatusBarHeaderHeight) { if (DEBUG) Log.w(TAG, "logging double tap gesture"); mDoubleTapGesture.onTouchEvent(ev); } } final int h = getMeasuredHeight(); if (mDoubleTapToSleepLockScreen && mService.getBarState() == StatusBarState.KEYGUARD && (ev.getY() < (h / 3) || ev.getY() > (h - mStatusBarHeaderHeight))) { if (DEBUG) Log.w(TAG, "logging lock screen double tap gesture"); mDoubleTapGesture.onTouchEvent(ev); } if (mNotificationPanel.isFullyExpanded() && mStackScrollLayout.getVisibility() == View.VISIBLE && mService.getBarState() == StatusBarState.KEYGUARD && !mService.isBouncerShowing()) { intercept = mDragDownHelper.onInterceptTouchEvent(ev); // wake up on a touch down event, if dozing if (ev.getActionMasked() == MotionEvent.ACTION_DOWN) { mService.wakeUpIfDozing(ev.getEventTime(), ev); } } if (!intercept) { super.onInterceptTouchEvent(ev); } if (intercept) { MotionEvent cancellation = MotionEvent.obtain(ev); cancellation.setAction(MotionEvent.ACTION_CANCEL); mStackScrollLayout.onInterceptTouchEvent(cancellation); mNotificationPanel.onInterceptTouchEvent(cancellation); cancellation.recycle(); } return intercept; }
public void cancelExpandHelper() { if (mStackScrollLayout != null) { mStackScrollLayout.cancelExpandHelper(); } }