Loading packages/SystemUI/src/com/android/systemui/SwipeHelper.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -453,7 +453,8 @@ public class SwipeHelper implements Gefingerpoken { && !mTouchAboveFalsingThreshold; && !mTouchAboveFalsingThreshold; boolean dismissChild = mCallback.canChildBeDismissed(mCurrView) boolean dismissChild = mCallback.canChildBeDismissed(mCurrView) && !falsingDetected && (childSwipedFastEnough || childSwipedFarEnough); && !falsingDetected && (childSwipedFastEnough || childSwipedFarEnough) && ev.getActionMasked() == MotionEvent.ACTION_UP; if (dismissChild) { if (dismissChild) { // flingadingy // flingadingy Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +6 −4 Original line number Original line Diff line number Diff line Loading @@ -523,7 +523,8 @@ public class NotificationPanelView extends PanelView implements case MotionEvent.ACTION_UP: case MotionEvent.ACTION_UP: trackMovement(event); trackMovement(event); if (mQsTracking) { if (mQsTracking) { flingQsWithCurrentVelocity(); flingQsWithCurrentVelocity( event.getActionMasked() == MotionEvent.ACTION_CANCEL); mQsTracking = false; mQsTracking = false; } } mIntercepting = false; mIntercepting = false; Loading Loading @@ -558,9 +559,9 @@ public class NotificationPanelView extends PanelView implements super.requestDisallowInterceptTouchEvent(disallowIntercept); super.requestDisallowInterceptTouchEvent(disallowIntercept); } } private void flingQsWithCurrentVelocity() { private void flingQsWithCurrentVelocity(boolean isCancelMotionEvent) { float vel = getCurrentVelocity(); float vel = getCurrentVelocity(); flingSettings(vel, flingExpandsQs(vel)); flingSettings(vel, flingExpandsQs(vel) && !isCancelMotionEvent); } } private boolean flingExpandsQs(float vel) { private boolean flingExpandsQs(float vel) { Loading Loading @@ -729,7 +730,8 @@ public class NotificationPanelView extends PanelView implements float fraction = getQsExpansionFraction(); float fraction = getQsExpansionFraction(); if ((fraction != 0f || y >= mInitialTouchY) if ((fraction != 0f || y >= mInitialTouchY) && (fraction != 1f || y <= mInitialTouchY)) { && (fraction != 1f || y <= mInitialTouchY)) { flingQsWithCurrentVelocity(); flingQsWithCurrentVelocity( event.getActionMasked() == MotionEvent.ACTION_CANCEL); } else { } else { mScrollYOverride = -1; mScrollYOverride = -1; } } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -330,7 +330,8 @@ public abstract class PanelView extends FrameLayout { vectorVel = (float) Math.hypot( vectorVel = (float) Math.hypot( mVelocityTracker.getXVelocity(), mVelocityTracker.getYVelocity()); mVelocityTracker.getXVelocity(), mVelocityTracker.getYVelocity()); } } boolean expand = flingExpands(vel, vectorVel); boolean expand = flingExpands(vel, vectorVel) || event.getActionMasked() == MotionEvent.ACTION_CANCEL; onTrackingStopped(expand); onTrackingStopped(expand); DozeLog.traceFling(expand, mTouchAboveFalsingThreshold, DozeLog.traceFling(expand, mTouchAboveFalsingThreshold, mStatusBar.isFalsingThresholdNeeded(), mStatusBar.isFalsingThresholdNeeded(), Loading Loading
packages/SystemUI/src/com/android/systemui/SwipeHelper.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -453,7 +453,8 @@ public class SwipeHelper implements Gefingerpoken { && !mTouchAboveFalsingThreshold; && !mTouchAboveFalsingThreshold; boolean dismissChild = mCallback.canChildBeDismissed(mCurrView) boolean dismissChild = mCallback.canChildBeDismissed(mCurrView) && !falsingDetected && (childSwipedFastEnough || childSwipedFarEnough); && !falsingDetected && (childSwipedFastEnough || childSwipedFarEnough) && ev.getActionMasked() == MotionEvent.ACTION_UP; if (dismissChild) { if (dismissChild) { // flingadingy // flingadingy Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +6 −4 Original line number Original line Diff line number Diff line Loading @@ -523,7 +523,8 @@ public class NotificationPanelView extends PanelView implements case MotionEvent.ACTION_UP: case MotionEvent.ACTION_UP: trackMovement(event); trackMovement(event); if (mQsTracking) { if (mQsTracking) { flingQsWithCurrentVelocity(); flingQsWithCurrentVelocity( event.getActionMasked() == MotionEvent.ACTION_CANCEL); mQsTracking = false; mQsTracking = false; } } mIntercepting = false; mIntercepting = false; Loading Loading @@ -558,9 +559,9 @@ public class NotificationPanelView extends PanelView implements super.requestDisallowInterceptTouchEvent(disallowIntercept); super.requestDisallowInterceptTouchEvent(disallowIntercept); } } private void flingQsWithCurrentVelocity() { private void flingQsWithCurrentVelocity(boolean isCancelMotionEvent) { float vel = getCurrentVelocity(); float vel = getCurrentVelocity(); flingSettings(vel, flingExpandsQs(vel)); flingSettings(vel, flingExpandsQs(vel) && !isCancelMotionEvent); } } private boolean flingExpandsQs(float vel) { private boolean flingExpandsQs(float vel) { Loading Loading @@ -729,7 +730,8 @@ public class NotificationPanelView extends PanelView implements float fraction = getQsExpansionFraction(); float fraction = getQsExpansionFraction(); if ((fraction != 0f || y >= mInitialTouchY) if ((fraction != 0f || y >= mInitialTouchY) && (fraction != 1f || y <= mInitialTouchY)) { && (fraction != 1f || y <= mInitialTouchY)) { flingQsWithCurrentVelocity(); flingQsWithCurrentVelocity( event.getActionMasked() == MotionEvent.ACTION_CANCEL); } else { } else { mScrollYOverride = -1; mScrollYOverride = -1; } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -330,7 +330,8 @@ public abstract class PanelView extends FrameLayout { vectorVel = (float) Math.hypot( vectorVel = (float) Math.hypot( mVelocityTracker.getXVelocity(), mVelocityTracker.getYVelocity()); mVelocityTracker.getXVelocity(), mVelocityTracker.getYVelocity()); } } boolean expand = flingExpands(vel, vectorVel); boolean expand = flingExpands(vel, vectorVel) || event.getActionMasked() == MotionEvent.ACTION_CANCEL; onTrackingStopped(expand); onTrackingStopped(expand); DozeLog.traceFling(expand, mTouchAboveFalsingThreshold, DozeLog.traceFling(expand, mTouchAboveFalsingThreshold, mStatusBar.isFalsingThresholdNeeded(), mStatusBar.isFalsingThresholdNeeded(), Loading