Loading packages/SystemUI/src/com/android/systemui/SwipeHelper.java +12 −4 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; import android.animation.ValueAnimator; import android.animation.ValueAnimator.AnimatorUpdateListener; import android.annotation.NonNull; import android.content.Context; import android.content.res.Resources; import android.graphics.RectF; Loading Loading @@ -316,10 +317,12 @@ public class SwipeHelper implements Gefingerpoken { float deltaPerpendicular = perpendicularPos - mPerpendicularInitialTouchPos; if (Math.abs(delta) > mPagingTouchSlop && Math.abs(delta) > Math.abs(deltaPerpendicular)) { if (mCallback.canChildBeDragged(mCurrView)) { mCallback.onBeginDrag(mCurrView); mDragging = true; mInitialTouchPos = getPos(ev); mTranslation = getTranslation(mCurrView); } cancelLongPress(); } } Loading Loading @@ -722,5 +725,10 @@ public class SwipeHelper implements Gefingerpoken { * @return The factor the falsing threshold should be multiplied with */ float getFalsingThresholdFactor(); /** * @return If true, the given view is draggable. */ default boolean canChildBeDragged(@NonNull View animView) { return true; } } } Loading
packages/SystemUI/src/com/android/systemui/SwipeHelper.java +12 −4 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; import android.animation.ValueAnimator; import android.animation.ValueAnimator.AnimatorUpdateListener; import android.annotation.NonNull; import android.content.Context; import android.content.res.Resources; import android.graphics.RectF; Loading Loading @@ -316,10 +317,12 @@ public class SwipeHelper implements Gefingerpoken { float deltaPerpendicular = perpendicularPos - mPerpendicularInitialTouchPos; if (Math.abs(delta) > mPagingTouchSlop && Math.abs(delta) > Math.abs(deltaPerpendicular)) { if (mCallback.canChildBeDragged(mCurrView)) { mCallback.onBeginDrag(mCurrView); mDragging = true; mInitialTouchPos = getPos(ev); mTranslation = getTranslation(mCurrView); } cancelLongPress(); } } Loading Loading @@ -722,5 +725,10 @@ public class SwipeHelper implements Gefingerpoken { * @return The factor the falsing threshold should be multiplied with */ float getFalsingThresholdFactor(); /** * @return If true, the given view is draggable. */ default boolean canChildBeDragged(@NonNull View animView) { return true; } } }