Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +8 −0 Original line number Diff line number Diff line Loading @@ -536,6 +536,14 @@ public class NotificationPanelView extends PanelView implements } } @Override protected boolean isInContentBounds(float x, float y) { float yTransformed = y - mNotificationStackScroller.getY(); float stackScrollerX = mNotificationStackScroller.getX(); return mNotificationStackScroller.isInContentBounds(yTransformed) && stackScrollerX < x && x < stackScrollerX + mNotificationStackScroller.getWidth(); } private void resetDownStates(MotionEvent event) { if (event.getActionMasked() == MotionEvent.ACTION_DOWN) { mOnlyAffordanceInThisMotion = false; Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +8 −1 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ public abstract class PanelView extends FrameLayout { private boolean mOverExpandedBeforeFling; private boolean mTouchAboveFalsingThreshold; private int mUnlockFalsingThreshold; private boolean mTouchStartedInEmptyArea; private ValueAnimator mHeightAnimator; private ObjectAnimator mPeekAnimator; Loading Loading @@ -409,6 +410,7 @@ public abstract class PanelView extends FrameLayout { } mInitialTouchY = y; mInitialTouchX = x; mTouchStartedInEmptyArea = !isInContentBounds(x, y); mTouchSlopExceeded = false; mJustPeeked = false; mPanelClosedOnDown = mExpandedHeight == 0.0f; Loading @@ -432,7 +434,7 @@ public abstract class PanelView extends FrameLayout { case MotionEvent.ACTION_MOVE: final float h = y - mInitialTouchY; trackMovement(event); if (scrolledToBottom) { if (scrolledToBottom || mTouchStartedInEmptyArea) { if (h < -mTouchSlop && h < -Math.abs(x - mInitialTouchX)) { cancelHeightAnimator(); mInitialOffsetOnTouch = mExpandedHeight; Loading @@ -452,6 +454,11 @@ public abstract class PanelView extends FrameLayout { return false; } /** * @return Whether a pair of coordinates are inside the visible view content bounds. */ protected abstract boolean isInContentBounds(float x, float y); private void cancelHeightAnimator() { if (mHeightAnimator != null) { mHeightAnimator.cancel(); Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +8 −1 Original line number Diff line number Diff line Loading @@ -1918,7 +1918,14 @@ public class NotificationStackScrollLayout extends ViewGroup * @return Whether the specified motion event is actually happening over the content. */ private boolean isInContentBounds(MotionEvent event) { return event.getY() < getHeight() - getEmptyBottomMargin(); return isInContentBounds(event.getY()); } /** * @return Whether a y coordinate is inside the content. */ public boolean isInContentBounds(float y) { return y < getHeight() - getEmptyBottomMargin(); } private void setIsBeingDragged(boolean isDragged) { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +8 −0 Original line number Diff line number Diff line Loading @@ -536,6 +536,14 @@ public class NotificationPanelView extends PanelView implements } } @Override protected boolean isInContentBounds(float x, float y) { float yTransformed = y - mNotificationStackScroller.getY(); float stackScrollerX = mNotificationStackScroller.getX(); return mNotificationStackScroller.isInContentBounds(yTransformed) && stackScrollerX < x && x < stackScrollerX + mNotificationStackScroller.getWidth(); } private void resetDownStates(MotionEvent event) { if (event.getActionMasked() == MotionEvent.ACTION_DOWN) { mOnlyAffordanceInThisMotion = false; Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +8 −1 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ public abstract class PanelView extends FrameLayout { private boolean mOverExpandedBeforeFling; private boolean mTouchAboveFalsingThreshold; private int mUnlockFalsingThreshold; private boolean mTouchStartedInEmptyArea; private ValueAnimator mHeightAnimator; private ObjectAnimator mPeekAnimator; Loading Loading @@ -409,6 +410,7 @@ public abstract class PanelView extends FrameLayout { } mInitialTouchY = y; mInitialTouchX = x; mTouchStartedInEmptyArea = !isInContentBounds(x, y); mTouchSlopExceeded = false; mJustPeeked = false; mPanelClosedOnDown = mExpandedHeight == 0.0f; Loading @@ -432,7 +434,7 @@ public abstract class PanelView extends FrameLayout { case MotionEvent.ACTION_MOVE: final float h = y - mInitialTouchY; trackMovement(event); if (scrolledToBottom) { if (scrolledToBottom || mTouchStartedInEmptyArea) { if (h < -mTouchSlop && h < -Math.abs(x - mInitialTouchX)) { cancelHeightAnimator(); mInitialOffsetOnTouch = mExpandedHeight; Loading @@ -452,6 +454,11 @@ public abstract class PanelView extends FrameLayout { return false; } /** * @return Whether a pair of coordinates are inside the visible view content bounds. */ protected abstract boolean isInContentBounds(float x, float y); private void cancelHeightAnimator() { if (mHeightAnimator != null) { mHeightAnimator.cancel(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +8 −1 Original line number Diff line number Diff line Loading @@ -1918,7 +1918,14 @@ public class NotificationStackScrollLayout extends ViewGroup * @return Whether the specified motion event is actually happening over the content. */ private boolean isInContentBounds(MotionEvent event) { return event.getY() < getHeight() - getEmptyBottomMargin(); return isInContentBounds(event.getY()); } /** * @return Whether a y coordinate is inside the content. */ public boolean isInContentBounds(float y) { return y < getHeight() - getEmptyBottomMargin(); } private void setIsBeingDragged(boolean isDragged) { Loading