2019-07-24 11:27:29 +00:00
.class public L androidx/customview/widget/ViewDragHelper ;
.super L java/lang/Object ;
.source "ViewDragHelper.java"
# annotations
.annotation system L dalvik/annotation/MemberClasses ;
value = {
L androidx/customview/widget/ViewDragHelper$Callback ;
}
.end annotation
# static fields
2019-12-06 03:29:40 +00:00
.field public static final BASE_SETTLE_DURATION : I = 0x100
2019-07-24 11:27:29 +00:00
.field public static final DIRECTION_ALL : I = 0x3
.field public static final DIRECTION_HORIZONTAL : I = 0x1
.field public static final DIRECTION_VERTICAL : I = 0x2
.field public static final EDGE_ALL : I = 0xf
.field public static final EDGE_BOTTOM : I = 0x8
.field public static final EDGE_LEFT : I = 0x1
.field public static final EDGE_RIGHT : I = 0x2
2019-12-06 03:29:40 +00:00
.field public static final EDGE_SIZE : I = 0x14
2019-07-24 11:27:29 +00:00
.field public static final EDGE_TOP : I = 0x4
.field public static final INVALID_POINTER : I = - 0x1
2019-12-06 03:29:40 +00:00
.field public static final MAX_SETTLE_DURATION : I = 0x258
2019-07-24 11:27:29 +00:00
.field public static final STATE_DRAGGING : I = 0x1
.field public static final STATE_IDLE : I = 0x0
.field public static final STATE_SETTLING : I = 0x2
2019-12-06 03:29:40 +00:00
.field public static final TAG : L java/lang/String ; = "ViewDragHelper"
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public static final sInterpolator : L android/view/animation/Interpolator ;
2019-07-24 11:27:29 +00:00
# instance fields
2019-12-06 03:29:40 +00:00
.field public mActivePointerId : I
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public final mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mCapturedView : L android/view/View ;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public final mDefaultEdgeSize : I
2019-10-01 14:15:45 +00:00
2019-12-06 03:29:40 +00:00
.field public mDragState : I
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mEdgeDragsInProgress : [I
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mEdgeDragsLocked : [I
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mEdgeSize : I
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mInitialEdgesTouched : [I
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mInitialMotionX : [F
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mInitialMotionY : [F
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mLastMotionX : [F
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mLastMotionY : [F
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mMaxVelocity : F
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mMinVelocity : F
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public final mParentView : L android/view/ViewGroup ;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mPointersDown : I
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mReleaseInProgress : Z
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mScroller : L android/widget/OverScroller ;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public final mSetIdleRunnable : L java/lang/Runnable ;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mTouchSlop : I
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mTrackingEdges : I
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mVelocityTracker : L android/view/VelocityTracker ;
2019-07-24 11:27:29 +00:00
# direct methods
2019-12-06 03:29:40 +00:00
.method public static constructor <clinit> ( ) V
2019-07-24 11:27:29 +00:00
.locals 1
new-instance v0 , L androidx/customview/widget/ViewDragHelper$1 ;
invoke-direct { v0 } , L androidx/customview/widget/ViewDragHelper$1 ;-> <init> ( ) V
sput-object v0 , L androidx/customview/widget/ViewDragHelper ;-> sInterpolator : L android/view/animation/Interpolator ;
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public constructor <init> ( L android/content/Context ;L android/view/ViewGroup ;L androidx/customview/widget/ViewDragHelper$Callback ;) V
2019-07-24 11:27:29 +00:00
.locals 1
2019-12-06 03:29:40 +00:00
. param p1 # Landroid/content/Context;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
. param p2 # Landroid/view/ViewGroup;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
. param p3 # Landroidx/customview/widget/ViewDragHelper$Callback;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
2019-07-24 11:27:29 +00:00
invoke-direct { p0 } , L java/lang/Object ;-> <init> ( ) V
const/4 v0 , - 0x1
iput v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mActivePointerId : I
new-instance v0 , L androidx/customview/widget/ViewDragHelper$2 ;
invoke-direct { v0 , p0 } , L androidx/customview/widget/ViewDragHelper$2 ;-> <init> ( L androidx/customview/widget/ViewDragHelper ;) V
iput-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mSetIdleRunnable : L java/lang/Runnable ;
if-eqz p2 , :cond_1
if-eqz p3 , :cond_0
iput-object p2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mParentView : L android/view/ViewGroup ;
iput-object p3 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
invoke-static { p1 } , L android/view/ViewConfiguration ;-> get ( L android/content/Context ;) L android/view/ViewConfiguration ;
move-result-object p2
invoke-virtual { p1 } , L android/content/Context ;-> getResources ( ) L android/content/res/Resources ;
move-result-object p3
invoke-virtual { p3 } , L android/content/res/Resources ;-> getDisplayMetrics ( ) L android/util/DisplayMetrics ;
move-result-object p3
iget p3 , p3 , L android/util/DisplayMetrics ;-> density : F
const/high16 v0 , 0x41a00000 # 20.0f
mul-float p3 , p3 , v0
const/high16 v0 , 0x3f000000 # 0.5f
add-float/2addr p3 , v0
float-to-int p3 , p3
2019-10-01 14:15:45 +00:00
iput p3 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mDefaultEdgeSize : I
iget p3 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mDefaultEdgeSize : I
2019-07-24 11:27:29 +00:00
iput p3 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mEdgeSize : I
invoke-virtual { p2 } , L android/view/ViewConfiguration ;-> getScaledTouchSlop ( ) I
move-result p3
iput p3 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mTouchSlop : I
invoke-virtual { p2 } , L android/view/ViewConfiguration ;-> getScaledMaximumFlingVelocity ( ) I
move-result p3
int-to-float p3 , p3
iput p3 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mMaxVelocity : F
invoke-virtual { p2 } , L android/view/ViewConfiguration ;-> getScaledMinimumFlingVelocity ( ) I
move-result p2
int-to-float p2 , p2
iput p2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mMinVelocity : F
new-instance p2 , L android/widget/OverScroller ;
sget-object p3 , L androidx/customview/widget/ViewDragHelper ;-> sInterpolator : L android/view/animation/Interpolator ;
invoke-direct { p2 , p1 , p3 } , L android/widget/OverScroller ;-> <init> ( L android/content/Context ;L android/view/animation/Interpolator ;) V
iput-object p2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mScroller : L android/widget/OverScroller ;
return-void
:cond_0
new-instance p1 , L java/lang/IllegalArgumentException ;
const-string p2 , "Callback may not be null"
invoke-direct { p1 , p2 } , L java/lang/IllegalArgumentException ;-> <init> ( L java/lang/String ;) V
throw p1
:cond_1
new-instance p1 , L java/lang/IllegalArgumentException ;
const-string p2 , "Parent view may not be null"
invoke-direct { p1 , p2 } , L java/lang/IllegalArgumentException ;-> <init> ( L java/lang/String ;) V
throw p1
.end method
.method private checkNewEdgeDrag ( FFII ) Z
.locals 3
invoke-static { p1 } , L java/lang/Math ;-> abs ( F ) F
move-result p1
invoke-static { p2 } , L java/lang/Math ;-> abs ( F ) F
move-result p2
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialEdgesTouched : [I
aget v0 , v0 , p3
and-int/2addr v0 , p4
const/4 v1 , 0x0
if-ne v0 , p4 , :cond_2
iget v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mTrackingEdges : I
and-int/2addr v0 , p4
if-eqz v0 , :cond_2
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mEdgeDragsLocked : [I
aget v0 , v0 , p3
and-int/2addr v0 , p4
if-eq v0 , p4 , :cond_2
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mEdgeDragsInProgress : [I
aget v0 , v0 , p3
and-int/2addr v0 , p4
if-eq v0 , p4 , :cond_2
iget v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mTouchSlop : I
int-to-float v2 , v0
cmpg-float v2 , p1 , v2
if-gtz v2 , :cond_0
int-to-float v0 , v0
cmpg-float v0 , p2 , v0
if-gtz v0 , :cond_0
goto :goto_0
:cond_0
const/high16 v0 , 0x3f000000 # 0.5f
mul-float p2 , p2 , v0
cmpg-float p2 , p1 , p2
if-gez p2 , :cond_1
iget-object p2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
invoke-virtual { p2 , p4 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> onEdgeLock ( I ) Z
move-result p2
if-eqz p2 , :cond_1
iget-object p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mEdgeDragsLocked : [I
aget p2 , p1 , p3
or-int/2addr p2 , p4
aput p2 , p1 , p3
return v1
:cond_1
iget-object p2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mEdgeDragsInProgress : [I
aget p2 , p2 , p3
and-int/2addr p2 , p4
if-nez p2 , :cond_2
iget p2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mTouchSlop : I
int-to-float p2 , p2
cmpl-float p1 , p1 , p2
if-lez p1 , :cond_2
2019-12-06 03:29:40 +00:00
const/4 v1 , 0x1
2019-07-24 11:27:29 +00:00
:cond_2
:goto_0
return v1
.end method
.method private checkTouchSlop ( L android/view/View ;FF ) Z
.locals 4
const/4 v0 , 0x0
if-nez p1 , :cond_0
return v0
:cond_0
iget-object v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
invoke-virtual { v1 , p1 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> getViewHorizontalDragRange ( L android/view/View ;) I
move-result v1
const/4 v2 , 0x1
if-lez v1 , :cond_1
const/4 v1 , 0x1
goto :goto_0
:cond_1
const/4 v1 , 0x0
:goto_0
iget-object v3 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
invoke-virtual { v3 , p1 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> getViewVerticalDragRange ( L android/view/View ;) I
move-result p1
if-lez p1 , :cond_2
const/4 p1 , 0x1
goto :goto_1
:cond_2
const/4 p1 , 0x0
:goto_1
if-eqz v1 , :cond_4
if-eqz p1 , :cond_4
mul-float p2 , p2 , p2
mul-float p3 , p3 , p3
2019-12-06 03:29:40 +00:00
add-float/2addr p3 , p2
2019-07-24 11:27:29 +00:00
iget p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mTouchSlop : I
mul-int p1 , p1 , p1
int-to-float p1 , p1
2019-12-06 03:29:40 +00:00
cmpl-float p1 , p3 , p1
2019-07-24 11:27:29 +00:00
if-lez p1 , :cond_3
2019-12-06 03:29:40 +00:00
const/4 v0 , 0x1
2019-07-24 11:27:29 +00:00
:cond_3
return v0
:cond_4
if-eqz v1 , :cond_6
invoke-static { p2 } , L java/lang/Math ;-> abs ( F ) F
move-result p1
iget p2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mTouchSlop : I
int-to-float p2 , p2
cmpl-float p1 , p1 , p2
if-lez p1 , :cond_5
2019-12-06 03:29:40 +00:00
const/4 v0 , 0x1
2019-07-24 11:27:29 +00:00
:cond_5
return v0
:cond_6
if-eqz p1 , :cond_7
invoke-static { p3 } , L java/lang/Math ;-> abs ( F ) F
move-result p1
iget p2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mTouchSlop : I
int-to-float p2 , p2
cmpl-float p1 , p1 , p2
if-lez p1 , :cond_7
2019-12-06 03:29:40 +00:00
const/4 v0 , 0x1
2019-07-24 11:27:29 +00:00
:cond_7
return v0
.end method
.method private clampMag ( FFF ) F
.locals 2
invoke-static { p1 } , L java/lang/Math ;-> abs ( F ) F
move-result v0
const/4 v1 , 0x0
cmpg-float p2 , v0 , p2
if-gez p2 , :cond_0
return v1
:cond_0
cmpl-float p2 , v0 , p3
if-lez p2 , :cond_2
cmpl-float p1 , p1 , v1
if-lez p1 , :cond_1
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
:cond_1
2019-12-06 03:29:40 +00:00
neg-float p3 , p3
:goto_0
return p3
2019-07-24 11:27:29 +00:00
:cond_2
return p1
.end method
.method private clampMag ( III ) I
.locals 1
invoke-static { p1 } , L java/lang/Math ;-> abs ( I ) I
move-result v0
if-ge v0 , p2 , :cond_0
const/4 p1 , 0x0
return p1
:cond_0
if-le v0 , p3 , :cond_2
if-lez p1 , :cond_1
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
:cond_1
2019-12-06 03:29:40 +00:00
neg-int p3 , p3
:goto_0
return p3
2019-07-24 11:27:29 +00:00
:cond_2
return p1
.end method
.method private clearMotionHistory ( ) V
.locals 2
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialMotionX : [F
if-nez v0 , :cond_0
return-void
:cond_0
const/4 v1 , 0x0
invoke-static { v0 , v1 } , L java/util/Arrays ;-> fill ( [FF ) V
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialMotionY : [F
invoke-static { v0 , v1 } , L java/util/Arrays ;-> fill ( [FF ) V
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mLastMotionX : [F
invoke-static { v0 , v1 } , L java/util/Arrays ;-> fill ( [FF ) V
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mLastMotionY : [F
invoke-static { v0 , v1 } , L java/util/Arrays ;-> fill ( [FF ) V
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialEdgesTouched : [I
const/4 v1 , 0x0
invoke-static { v0 , v1 } , L java/util/Arrays ;-> fill ( [II ) V
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mEdgeDragsInProgress : [I
invoke-static { v0 , v1 } , L java/util/Arrays ;-> fill ( [II ) V
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mEdgeDragsLocked : [I
invoke-static { v0 , v1 } , L java/util/Arrays ;-> fill ( [II ) V
iput v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mPointersDown : I
return-void
.end method
.method private clearMotionHistory ( I ) V
.locals 2
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialMotionX : [F
if-eqz v0 , :cond_1
invoke-virtual { p0 , p1 } , L androidx/customview/widget/ViewDragHelper ;-> isPointerDown ( I ) Z
move-result v0
if-nez v0 , :cond_0
goto :goto_0
:cond_0
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialMotionX : [F
const/4 v1 , 0x0
aput v1 , v0 , p1
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialMotionY : [F
aput v1 , v0 , p1
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mLastMotionX : [F
aput v1 , v0 , p1
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mLastMotionY : [F
aput v1 , v0 , p1
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialEdgesTouched : [I
const/4 v1 , 0x0
aput v1 , v0 , p1
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mEdgeDragsInProgress : [I
aput v1 , v0 , p1
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mEdgeDragsLocked : [I
aput v1 , v0 , p1
iget v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mPointersDown : I
const/4 v1 , 0x1
shl-int p1 , v1 , p1
2019-11-20 22:09:14 +00:00
not-int p1 , p1
2019-07-24 11:27:29 +00:00
and-int/2addr p1 , v0
iput p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mPointersDown : I
:cond_1
:goto_0
return-void
.end method
.method private computeAxisDuration ( III ) I
.locals 3
if-nez p1 , :cond_0
const/4 p1 , 0x0
return p1
:cond_0
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mParentView : L android/view/ViewGroup ;
invoke-virtual { v0 } , L android/view/ViewGroup ;-> getWidth ( ) I
move-result v0
div-int/lit8 v1 , v0 , 0x2
invoke-static { p1 } , L java/lang/Math ;-> abs ( I ) I
move-result v2
int-to-float v2 , v2
int-to-float v0 , v0
div-float/2addr v2 , v0
const/high16 v0 , 0x3f800000 # 1.0f
invoke-static { v0 , v2 } , L java/lang/Math ;-> min ( FF ) F
move-result v2
int-to-float v1 , v1
invoke-direct { p0 , v2 } , L androidx/customview/widget/ViewDragHelper ;-> distanceInfluenceForSnapDuration ( F ) F
move-result v2
mul-float v2 , v2 , v1
2019-12-06 03:29:40 +00:00
add-float/2addr v2 , v1
2019-07-24 11:27:29 +00:00
invoke-static { p2 } , L java/lang/Math ;-> abs ( I ) I
move-result p2
if-lez p2 , :cond_1
const/high16 p1 , 0x447a0000 # 1000.0f
int-to-float p2 , p2
2019-12-06 03:29:40 +00:00
div-float/2addr v2 , p2
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
invoke-static { v2 } , L java/lang/Math ;-> abs ( F ) F
2019-07-24 11:27:29 +00:00
move-result p2
mul-float p2 , p2 , p1
invoke-static { p2 } , L java/lang/Math ;-> round ( F ) I
move-result p1
mul-int/lit8 p1 , p1 , 0x4
goto :goto_0
:cond_1
invoke-static { p1 } , L java/lang/Math ;-> abs ( I ) I
move-result p1
int-to-float p1 , p1
int-to-float p2 , p3
div-float/2addr p1 , p2
add-float/2addr p1 , v0
const/high16 p2 , 0x43800000 # 256.0f
mul-float p1 , p1 , p2
float-to-int p1 , p1
:goto_0
const/16 p2 , 0x258
invoke-static { p1 , p2 } , L java/lang/Math ;-> min ( II ) I
move-result p1
return p1
.end method
.method private computeSettleDuration ( L android/view/View ;IIII ) I
.locals 6
iget v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mMinVelocity : F
float-to-int v0 , v0
iget v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mMaxVelocity : F
float-to-int v1 , v1
invoke-direct { p0 , p4 , v0 , v1 } , L androidx/customview/widget/ViewDragHelper ;-> clampMag ( III ) I
move-result p4
iget v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mMinVelocity : F
float-to-int v0 , v0
iget v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mMaxVelocity : F
float-to-int v1 , v1
invoke-direct { p0 , p5 , v0 , v1 } , L androidx/customview/widget/ViewDragHelper ;-> clampMag ( III ) I
move-result p5
invoke-static { p2 } , L java/lang/Math ;-> abs ( I ) I
move-result v0
invoke-static { p3 } , L java/lang/Math ;-> abs ( I ) I
move-result v1
invoke-static { p4 } , L java/lang/Math ;-> abs ( I ) I
move-result v2
invoke-static { p5 } , L java/lang/Math ;-> abs ( I ) I
move-result v3
add-int v4 , v2 , v3
add-int v5 , v0 , v1
if-eqz p4 , :cond_0
int-to-float v0 , v2
int-to-float v2 , v4
goto :goto_0
:cond_0
int-to-float v0 , v0
int-to-float v2 , v5
:goto_0
div-float/2addr v0 , v2
if-eqz p5 , :cond_1
int-to-float v1 , v3
int-to-float v2 , v4
goto :goto_1
:cond_1
int-to-float v1 , v1
int-to-float v2 , v5
:goto_1
div-float/2addr v1 , v2
iget-object v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
invoke-virtual { v2 , p1 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> getViewHorizontalDragRange ( L android/view/View ;) I
move-result v2
invoke-direct { p0 , p2 , p4 , v2 } , L androidx/customview/widget/ViewDragHelper ;-> computeAxisDuration ( III ) I
move-result p2
iget-object p4 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
invoke-virtual { p4 , p1 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> getViewVerticalDragRange ( L android/view/View ;) I
move-result p1
invoke-direct { p0 , p3 , p5 , p1 } , L androidx/customview/widget/ViewDragHelper ;-> computeAxisDuration ( III ) I
move-result p1
int-to-float p2 , p2
mul-float p2 , p2 , v0
int-to-float p1 , p1
mul-float p1 , p1 , v1
2019-12-06 03:29:40 +00:00
add-float/2addr p1 , p2
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
float-to-int p1 , p1
2019-07-24 11:27:29 +00:00
return p1
.end method
.method public static create ( L android/view/ViewGroup ;F L androidx/customview/widget/ViewDragHelper$Callback ;) L androidx/customview/widget/ViewDragHelper ;
.locals 1
2019-12-06 03:29:40 +00:00
. param p0 # Landroid/view/ViewGroup;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
. param p2 # Landroidx/customview/widget/ViewDragHelper$Callback;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
2019-07-24 11:27:29 +00:00
invoke-static { p0 , p2 } , L androidx/customview/widget/ViewDragHelper ;-> create ( L android/view/ViewGroup ;L androidx/customview/widget/ViewDragHelper$Callback ;) L androidx/customview/widget/ViewDragHelper ;
move-result-object p0
iget p2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mTouchSlop : I
int-to-float p2 , p2
const/high16 v0 , 0x3f800000 # 1.0f
div-float/2addr v0 , p1
2019-12-06 03:29:40 +00:00
mul-float v0 , v0 , p2
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
float-to-int p1 , v0
2019-07-24 11:27:29 +00:00
iput p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mTouchSlop : I
return-object p0
.end method
.method public static create ( L android/view/ViewGroup ;L androidx/customview/widget/ViewDragHelper$Callback ;) L androidx/customview/widget/ViewDragHelper ;
.locals 2
2019-12-06 03:29:40 +00:00
. param p0 # Landroid/view/ViewGroup;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
. param p1 # Landroidx/customview/widget/ViewDragHelper$Callback;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
2019-07-24 11:27:29 +00:00
new-instance v0 , L androidx/customview/widget/ViewDragHelper ;
invoke-virtual { p0 } , L android/view/ViewGroup ;-> getContext ( ) L android/content/Context ;
move-result-object v1
invoke-direct { v0 , v1 , p0 , p1 } , L androidx/customview/widget/ViewDragHelper ;-> <init> ( L android/content/Context ;L android/view/ViewGroup ;L androidx/customview/widget/ViewDragHelper$Callback ;) V
return-object v0
.end method
.method private dispatchViewReleased ( FF ) V
.locals 3
const/4 v0 , 0x1
iput-boolean v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mReleaseInProgress : Z
iget-object v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
iget-object v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
invoke-virtual { v1 , v2 , p1 , p2 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> onViewReleased ( L android/view/View ;FF ) V
const/4 p1 , 0x0
iput-boolean p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mReleaseInProgress : Z
iget p2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mDragState : I
if-ne p2 , v0 , :cond_0
invoke-virtual { p0 , p1 } , L androidx/customview/widget/ViewDragHelper ;-> setDragState ( I ) V
:cond_0
return-void
.end method
.method private distanceInfluenceForSnapDuration ( F ) F
.locals 2
const/high16 v0 , 0x3f000000 # 0.5f
sub-float/2addr p1 , v0
const v0 , 0x3ef1463b
mul-float p1 , p1 , v0
float-to-double v0 , p1
invoke-static { v0 , v1 } , L java/lang/Math ;-> sin ( D ) D
move-result-wide v0
double-to-float p1 , v0
return p1
.end method
.method private dragTo ( IIII ) V
.locals 10
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
invoke-virtual { v0 } , L android/view/View ;-> getLeft ( ) I
move-result v0
iget-object v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
invoke-virtual { v1 } , L android/view/View ;-> getTop ( ) I
move-result v1
if-eqz p3 , :cond_0
iget-object v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
iget-object v3 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
invoke-virtual { v2 , v3 , p1 , p3 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> clampViewPositionHorizontal ( L android/view/View ;II ) I
move-result p1
iget-object v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
sub-int v3 , p1 , v0
invoke-static { v2 , v3 } , L androidx/core/view/ViewCompat ;-> offsetLeftAndRight ( L android/view/View ;I ) V
:cond_0
move v6 , p1
if-eqz p4 , :cond_1
iget-object p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
iget-object v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
invoke-virtual { p1 , v2 , p2 , p4 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> clampViewPositionVertical ( L android/view/View ;II ) I
move-result p2
iget-object p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
sub-int v2 , p2 , v1
invoke-static { p1 , v2 } , L androidx/core/view/ViewCompat ;-> offsetTopAndBottom ( L android/view/View ;I ) V
:cond_1
move v7 , p2
if-nez p3 , :cond_2
if-eqz p4 , :cond_3
:cond_2
sub-int v8 , v6 , v0
sub-int v9 , v7 , v1
iget-object v4 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
iget-object v5 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
invoke-virtual/range { v4 . . v9 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> onViewPositionChanged ( L android/view/View ;IIII ) V
:cond_3
return-void
.end method
.method private ensureMotionHistorySizeForId ( I ) V
.locals 9
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialMotionX : [F
if-eqz v0 , :cond_0
array-length v0 , v0
if-gt v0 , p1 , :cond_2
:cond_0
add-int/lit8 p1 , p1 , 0x1
new-array v0 , p1 , [F
new-array v1 , p1 , [F
new-array v2 , p1 , [F
new-array v3 , p1 , [F
new-array v4 , p1 , [I
new-array v5 , p1 , [I
new-array p1 , p1 , [I
iget-object v6 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialMotionX : [F
if-eqz v6 , :cond_1
array-length v7 , v6
const/4 v8 , 0x0
invoke-static { v6 , v8 , v0 , v8 , v7 } , L java/lang/System ;-> arraycopy ( L java/lang/Object ;I L java/lang/Object ;II ) V
iget-object v6 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialMotionY : [F
array-length v7 , v6
invoke-static { v6 , v8 , v1 , v8 , v7 } , L java/lang/System ;-> arraycopy ( L java/lang/Object ;I L java/lang/Object ;II ) V
iget-object v6 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mLastMotionX : [F
array-length v7 , v6
invoke-static { v6 , v8 , v2 , v8 , v7 } , L java/lang/System ;-> arraycopy ( L java/lang/Object ;I L java/lang/Object ;II ) V
iget-object v6 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mLastMotionY : [F
array-length v7 , v6
invoke-static { v6 , v8 , v3 , v8 , v7 } , L java/lang/System ;-> arraycopy ( L java/lang/Object ;I L java/lang/Object ;II ) V
iget-object v6 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialEdgesTouched : [I
array-length v7 , v6
invoke-static { v6 , v8 , v4 , v8 , v7 } , L java/lang/System ;-> arraycopy ( L java/lang/Object ;I L java/lang/Object ;II ) V
iget-object v6 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mEdgeDragsInProgress : [I
array-length v7 , v6
invoke-static { v6 , v8 , v5 , v8 , v7 } , L java/lang/System ;-> arraycopy ( L java/lang/Object ;I L java/lang/Object ;II ) V
iget-object v6 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mEdgeDragsLocked : [I
array-length v7 , v6
invoke-static { v6 , v8 , p1 , v8 , v7 } , L java/lang/System ;-> arraycopy ( L java/lang/Object ;I L java/lang/Object ;II ) V
:cond_1
iput-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialMotionX : [F
iput-object v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialMotionY : [F
iput-object v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mLastMotionX : [F
iput-object v3 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mLastMotionY : [F
iput-object v4 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialEdgesTouched : [I
iput-object v5 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mEdgeDragsInProgress : [I
iput-object p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mEdgeDragsLocked : [I
:cond_2
return-void
.end method
.method private forceSettleCapturedViewAt ( IIII ) Z
.locals 10
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
invoke-virtual { v0 } , L android/view/View ;-> getLeft ( ) I
move-result v2
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
invoke-virtual { v0 } , L android/view/View ;-> getTop ( ) I
move-result v3
sub-int/2addr p1 , v2
sub-int/2addr p2 , v3
if-nez p1 , :cond_0
if-nez p2 , :cond_0
iget-object p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mScroller : L android/widget/OverScroller ;
invoke-virtual { p1 } , L android/widget/OverScroller ;-> abortAnimation ( ) V
const/4 p1 , 0x0
invoke-virtual { p0 , p1 } , L androidx/customview/widget/ViewDragHelper ;-> setDragState ( I ) V
return p1
:cond_0
iget-object v5 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
move-object v4 , p0
move v6 , p1
move v7 , p2
move v8 , p3
move v9 , p4
invoke-direct/range { v4 . . v9 } , L androidx/customview/widget/ViewDragHelper ;-> computeSettleDuration ( L android/view/View ;IIII ) I
move-result v6
iget-object v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mScroller : L android/widget/OverScroller ;
move v4 , p1
move v5 , p2
invoke-virtual/range { v1 . . v6 } , L android/widget/OverScroller ;-> startScroll ( IIIII ) V
const/4 p1 , 0x2
invoke-virtual { p0 , p1 } , L androidx/customview/widget/ViewDragHelper ;-> setDragState ( I ) V
const/4 p1 , 0x1
return p1
.end method
.method private getEdgesTouched ( II ) I
.locals 3
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mParentView : L android/view/ViewGroup ;
invoke-virtual { v0 } , L android/view/ViewGroup ;-> getLeft ( ) I
move-result v0
iget v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mEdgeSize : I
add-int/2addr v0 , v1
if-ge p1 , v0 , :cond_0
const/4 v0 , 0x1
goto :goto_0
:cond_0
const/4 v0 , 0x0
:goto_0
iget-object v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mParentView : L android/view/ViewGroup ;
invoke-virtual { v1 } , L android/view/ViewGroup ;-> getTop ( ) I
move-result v1
iget v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mEdgeSize : I
add-int/2addr v1 , v2
if-ge p2 , v1 , :cond_1
or-int/lit8 v0 , v0 , 0x4
:cond_1
iget-object v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mParentView : L android/view/ViewGroup ;
invoke-virtual { v1 } , L android/view/ViewGroup ;-> getRight ( ) I
move-result v1
iget v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mEdgeSize : I
sub-int/2addr v1 , v2
if-le p1 , v1 , :cond_2
or-int/lit8 v0 , v0 , 0x2
:cond_2
iget-object p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mParentView : L android/view/ViewGroup ;
invoke-virtual { p1 } , L android/view/ViewGroup ;-> getBottom ( ) I
move-result p1
iget v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mEdgeSize : I
sub-int/2addr p1 , v1
if-le p2 , p1 , :cond_3
or-int/lit8 v0 , v0 , 0x8
:cond_3
return v0
.end method
.method private isValidPointerForActionMove ( I ) Z
.locals 2
invoke-virtual { p0 , p1 } , L androidx/customview/widget/ViewDragHelper ;-> isPointerDown ( I ) Z
move-result v0
if-nez v0 , :cond_0
new-instance v0 , L java/lang/StringBuilder ;
2019-12-06 03:29:40 +00:00
invoke-direct { v0 } , L java/lang/StringBuilder ;-> <init> ( ) V
2019-07-24 11:27:29 +00:00
const-string v1 , "Ignoring pointerId="
2019-12-06 03:29:40 +00:00
invoke-virtual { v0 , v1 } , L java/lang/StringBuilder ;-> append ( L java/lang/String ;) L java/lang/StringBuilder ;
2019-07-24 11:27:29 +00:00
invoke-virtual { v0 , p1 } , L java/lang/StringBuilder ;-> append ( I ) L java/lang/StringBuilder ;
const-string p1 , " because ACTION_DOWN was not received for this pointer before ACTION_MOVE. It likely happened because ViewDragHelper did not receive all the events in the event stream."
invoke-virtual { v0 , p1 } , L java/lang/StringBuilder ;-> append ( L java/lang/String ;) L java/lang/StringBuilder ;
invoke-virtual { v0 } , L java/lang/StringBuilder ;-> toString ( ) L java/lang/String ;
move-result-object p1
const-string v0 , "ViewDragHelper"
invoke-static { v0 , p1 } , L android/util/Log ;-> e ( L java/lang/String ;L java/lang/String ;) I
const/4 p1 , 0x0
return p1
:cond_0
const/4 p1 , 0x1
return p1
.end method
.method private releaseViewForPointerUp ( ) V
.locals 4
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mVelocityTracker : L android/view/VelocityTracker ;
iget v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mMaxVelocity : F
const/16 v2 , 0x3e8
invoke-virtual { v0 , v2 , v1 } , L android/view/VelocityTracker ;-> computeCurrentVelocity ( IF ) V
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mVelocityTracker : L android/view/VelocityTracker ;
iget v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mActivePointerId : I
invoke-virtual { v0 , v1 } , L android/view/VelocityTracker ;-> getXVelocity ( I ) F
move-result v0
iget v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mMinVelocity : F
iget v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mMaxVelocity : F
invoke-direct { p0 , v0 , v1 , v2 } , L androidx/customview/widget/ViewDragHelper ;-> clampMag ( FFF ) F
move-result v0
iget-object v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mVelocityTracker : L android/view/VelocityTracker ;
iget v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mActivePointerId : I
invoke-virtual { v1 , v2 } , L android/view/VelocityTracker ;-> getYVelocity ( I ) F
move-result v1
iget v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mMinVelocity : F
iget v3 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mMaxVelocity : F
invoke-direct { p0 , v1 , v2 , v3 } , L androidx/customview/widget/ViewDragHelper ;-> clampMag ( FFF ) F
move-result v1
invoke-direct { p0 , v0 , v1 } , L androidx/customview/widget/ViewDragHelper ;-> dispatchViewReleased ( FF ) V
return-void
.end method
.method private reportNewEdgeDrags ( FFI ) V
.locals 2
const/4 v0 , 0x1
invoke-direct { p0 , p1 , p2 , p3 , v0 } , L androidx/customview/widget/ViewDragHelper ;-> checkNewEdgeDrag ( FFII ) Z
2019-12-06 03:29:40 +00:00
move-result v1
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
if-eqz v1 , :cond_0
goto :goto_0
:cond_0
const/4 v0 , 0x0
:goto_0
2019-07-24 11:27:29 +00:00
const/4 v1 , 0x4
invoke-direct { p0 , p2 , p1 , p3 , v1 } , L androidx/customview/widget/ViewDragHelper ;-> checkNewEdgeDrag ( FFII ) Z
move-result v1
2019-12-06 03:29:40 +00:00
if-eqz v1 , :cond_1
2019-07-24 11:27:29 +00:00
or-int/lit8 v0 , v0 , 0x4
2019-12-06 03:29:40 +00:00
:cond_1
2019-07-24 11:27:29 +00:00
const/4 v1 , 0x2
invoke-direct { p0 , p1 , p2 , p3 , v1 } , L androidx/customview/widget/ViewDragHelper ;-> checkNewEdgeDrag ( FFII ) Z
move-result v1
2019-12-06 03:29:40 +00:00
if-eqz v1 , :cond_2
2019-07-24 11:27:29 +00:00
or-int/lit8 v0 , v0 , 0x2
2019-12-06 03:29:40 +00:00
:cond_2
2019-07-24 11:27:29 +00:00
const/16 v1 , 0x8
invoke-direct { p0 , p2 , p1 , p3 , v1 } , L androidx/customview/widget/ViewDragHelper ;-> checkNewEdgeDrag ( FFII ) Z
move-result p1
2019-12-06 03:29:40 +00:00
if-eqz p1 , :cond_3
2019-07-24 11:27:29 +00:00
or-int/lit8 v0 , v0 , 0x8
2019-12-06 03:29:40 +00:00
:cond_3
if-eqz v0 , :cond_4
2019-07-24 11:27:29 +00:00
iget-object p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mEdgeDragsInProgress : [I
aget p2 , p1 , p3
or-int/2addr p2 , v0
aput p2 , p1 , p3
iget-object p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
invoke-virtual { p1 , v0 , p3 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> onEdgeDragStarted ( II ) V
2019-12-06 03:29:40 +00:00
:cond_4
2019-07-24 11:27:29 +00:00
return-void
.end method
.method private saveInitialMotion ( FFI ) V
.locals 2
invoke-direct { p0 , p3 } , L androidx/customview/widget/ViewDragHelper ;-> ensureMotionHistorySizeForId ( I ) V
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialMotionX : [F
iget-object v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mLastMotionX : [F
aput p1 , v1 , p3
aput p1 , v0 , p3
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialMotionY : [F
iget-object v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mLastMotionY : [F
aput p2 , v1 , p3
aput p2 , v0 , p3
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialEdgesTouched : [I
float-to-int p1 , p1
float-to-int p2 , p2
invoke-direct { p0 , p1 , p2 } , L androidx/customview/widget/ViewDragHelper ;-> getEdgesTouched ( II ) I
move-result p1
aput p1 , v0 , p3
iget p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mPointersDown : I
const/4 p2 , 0x1
shl-int/2addr p2 , p3
or-int/2addr p1 , p2
iput p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mPointersDown : I
return-void
.end method
.method private saveLastMotion ( L android/view/MotionEvent ;) V
.locals 6
invoke-virtual { p1 } , L android/view/MotionEvent ;-> getPointerCount ( ) I
move-result v0
const/4 v1 , 0x0
:goto_0
if-ge v1 , v0 , :cond_1
invoke-virtual { p1 , v1 } , L android/view/MotionEvent ;-> getPointerId ( I ) I
move-result v2
invoke-direct { p0 , v2 } , L androidx/customview/widget/ViewDragHelper ;-> isValidPointerForActionMove ( I ) Z
move-result v3
2019-12-06 03:29:40 +00:00
if-nez v3 , :cond_0
goto :goto_1
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
:cond_0
2019-07-24 11:27:29 +00:00
invoke-virtual { p1 , v1 } , L android/view/MotionEvent ;-> getX ( I ) F
move-result v3
invoke-virtual { p1 , v1 } , L android/view/MotionEvent ;-> getY ( I ) F
move-result v4
iget-object v5 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mLastMotionX : [F
aput v3 , v5 , v2
iget-object v3 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mLastMotionY : [F
aput v4 , v3 , v2
2019-12-06 03:29:40 +00:00
:goto_1
2019-07-24 11:27:29 +00:00
add-int/lit8 v1 , v1 , 0x1
goto :goto_0
:cond_1
return-void
.end method
# virtual methods
.method public abort ( ) V
.locals 9
invoke-virtual { p0 } , L androidx/customview/widget/ViewDragHelper ;-> cancel ( ) V
iget v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mDragState : I
const/4 v1 , 0x2
if-ne v0 , v1 , :cond_0
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mScroller : L android/widget/OverScroller ;
invoke-virtual { v0 } , L android/widget/OverScroller ;-> getCurrX ( ) I
move-result v0
iget-object v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mScroller : L android/widget/OverScroller ;
invoke-virtual { v1 } , L android/widget/OverScroller ;-> getCurrY ( ) I
move-result v1
iget-object v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mScroller : L android/widget/OverScroller ;
invoke-virtual { v2 } , L android/widget/OverScroller ;-> abortAnimation ( ) V
iget-object v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mScroller : L android/widget/OverScroller ;
invoke-virtual { v2 } , L android/widget/OverScroller ;-> getCurrX ( ) I
move-result v5
iget-object v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mScroller : L android/widget/OverScroller ;
invoke-virtual { v2 } , L android/widget/OverScroller ;-> getCurrY ( ) I
move-result v6
iget-object v3 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
iget-object v4 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
sub-int v7 , v5 , v0
sub-int v8 , v6 , v1
invoke-virtual/range { v3 . . v8 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> onViewPositionChanged ( L android/view/View ;IIII ) V
:cond_0
const/4 v0 , 0x0
invoke-virtual { p0 , v0 } , L androidx/customview/widget/ViewDragHelper ;-> setDragState ( I ) V
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public canScroll ( L android/view/View ;ZIIII ) Z
2019-07-24 11:27:29 +00:00
.locals 13
2019-12-06 03:29:40 +00:00
. param p1 # Landroid/view/View;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
2019-07-24 11:27:29 +00:00
move-object v0 , p1
instance-of v1 , v0 , L android/view/ViewGroup ;
const/4 v2 , 0x1
if-eqz v1 , :cond_1
move-object v1 , v0
check-cast v1 , L android/view/ViewGroup ;
invoke-virtual { p1 } , L android/view/View ;-> getScrollX ( ) I
move-result v3
invoke-virtual { p1 } , L android/view/View ;-> getScrollY ( ) I
move-result v4
invoke-virtual { v1 } , L android/view/ViewGroup ;-> getChildCount ( ) I
move-result v5
sub-int/2addr v5 , v2
:goto_0
if-ltz v5 , :cond_1
invoke-virtual { v1 , v5 } , L android/view/ViewGroup ;-> getChildAt ( I ) L android/view/View ;
move-result-object v7
add-int v6 , p5 , v3
invoke-virtual { v7 } , L android/view/View ;-> getLeft ( ) I
move-result v8
if-lt v6 , v8 , :cond_0
invoke-virtual { v7 } , L android/view/View ;-> getRight ( ) I
move-result v8
if-ge v6 , v8 , :cond_0
add-int v8 , p6 , v4
invoke-virtual { v7 } , L android/view/View ;-> getTop ( ) I
move-result v9
if-lt v8 , v9 , :cond_0
invoke-virtual { v7 } , L android/view/View ;-> getBottom ( ) I
move-result v9
if-ge v8 , v9 , :cond_0
const/4 v9 , 0x1
invoke-virtual { v7 } , L android/view/View ;-> getLeft ( ) I
move-result v10
sub-int v11 , v6 , v10
invoke-virtual { v7 } , L android/view/View ;-> getTop ( ) I
move-result v6
sub-int v12 , v8 , v6
move-object v6 , p0
move v8 , v9
move/from16 v9 , p3
move/from16 v10 , p4
invoke-virtual/range { v6 . . v12 } , L androidx/customview/widget/ViewDragHelper ;-> canScroll ( L android/view/View ;ZIIII ) Z
move-result v6
if-eqz v6 , :cond_0
return v2
:cond_0
add-int/lit8 v5 , v5 , - 0x1
goto :goto_0
:cond_1
2019-12-06 03:29:40 +00:00
if-eqz p2 , :cond_2
2019-07-24 11:27:29 +00:00
move/from16 v1 , p3
neg-int v1 , v1
invoke-virtual { p1 , v1 } , L android/view/View ;-> canScrollHorizontally ( I ) Z
move-result v1
2019-12-06 03:29:40 +00:00
if-nez v1 , :cond_3
2019-07-24 11:27:29 +00:00
move/from16 v1 , p4
neg-int v1 , v1
invoke-virtual { p1 , v1 } , L android/view/View ;-> canScrollVertically ( I ) Z
move-result v0
2019-12-06 03:29:40 +00:00
if-eqz v0 , :cond_2
goto :goto_1
2019-07-24 11:27:29 +00:00
:cond_2
2019-12-06 03:29:40 +00:00
const/4 v2 , 0x0
2019-07-24 11:27:29 +00:00
:cond_3
2019-12-06 03:29:40 +00:00
:goto_1
return v2
2019-07-24 11:27:29 +00:00
.end method
.method public cancel ( ) V
.locals 1
const/4 v0 , - 0x1
iput v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mActivePointerId : I
invoke-direct { p0 } , L androidx/customview/widget/ViewDragHelper ;-> clearMotionHistory ( ) V
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mVelocityTracker : L android/view/VelocityTracker ;
if-eqz v0 , :cond_0
invoke-virtual { v0 } , L android/view/VelocityTracker ;-> recycle ( ) V
const/4 v0 , 0x0
iput-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mVelocityTracker : L android/view/VelocityTracker ;
:cond_0
return-void
.end method
.method public captureChildView ( L android/view/View ;I ) V
.locals 2
2019-12-06 03:29:40 +00:00
. param p1 # Landroid/view/View;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
2019-07-24 11:27:29 +00:00
invoke-virtual { p1 } , L android/view/View ;-> getParent ( ) L android/view/ViewParent ;
move-result-object v0
iget-object v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mParentView : L android/view/ViewGroup ;
if-ne v0 , v1 , :cond_0
iput-object p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
iput p2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mActivePointerId : I
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
invoke-virtual { v0 , p1 , p2 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> onViewCaptured ( L android/view/View ;I ) V
const/4 p1 , 0x1
invoke-virtual { p0 , p1 } , L androidx/customview/widget/ViewDragHelper ;-> setDragState ( I ) V
return-void
:cond_0
new-instance p1 , L java/lang/IllegalArgumentException ;
2019-12-06 03:29:40 +00:00
const-string p2 , "captureChildView: parameter must be a descendant of the ViewDragHelper\'s tracked parent view ("
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
invoke-static { p2 } , L e/e/b/a/a ;-> a ( L java/lang/String ;) L java/lang/StringBuilder ;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
move-result-object p2
2019-07-24 11:27:29 +00:00
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mParentView : L android/view/ViewGroup ;
invoke-virtual { p2 , v0 } , L java/lang/StringBuilder ;-> append ( L java/lang/Object ;) L java/lang/StringBuilder ;
const-string v0 , ")"
invoke-virtual { p2 , v0 } , L java/lang/StringBuilder ;-> append ( L java/lang/String ;) L java/lang/StringBuilder ;
invoke-virtual { p2 } , L java/lang/StringBuilder ;-> toString ( ) L java/lang/String ;
move-result-object p2
invoke-direct { p1 , p2 } , L java/lang/IllegalArgumentException ;-> <init> ( L java/lang/String ;) V
throw p1
.end method
.method public checkTouchSlop ( I ) Z
.locals 4
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialMotionX : [F
array-length v0 , v0
const/4 v1 , 0x0
const/4 v2 , 0x0
:goto_0
if-ge v2 , v0 , :cond_1
invoke-virtual { p0 , p1 , v2 } , L androidx/customview/widget/ViewDragHelper ;-> checkTouchSlop ( II ) Z
move-result v3
if-eqz v3 , :cond_0
const/4 p1 , 0x1
return p1
:cond_0
add-int/lit8 v2 , v2 , 0x1
goto :goto_0
:cond_1
return v1
.end method
.method public checkTouchSlop ( II ) Z
.locals 6
invoke-virtual { p0 , p2 } , L androidx/customview/widget/ViewDragHelper ;-> isPointerDown ( I ) Z
move-result v0
const/4 v1 , 0x0
if-nez v0 , :cond_0
return v1
:cond_0
and-int/lit8 v0 , p1 , 0x1
const/4 v2 , 0x1
if-ne v0 , v2 , :cond_1
const/4 v0 , 0x1
goto :goto_0
:cond_1
const/4 v0 , 0x0
:goto_0
const/4 v3 , 0x2
and-int/2addr p1 , v3
if-ne p1 , v3 , :cond_2
const/4 p1 , 0x1
goto :goto_1
:cond_2
const/4 p1 , 0x0
:goto_1
iget-object v3 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mLastMotionX : [F
aget v3 , v3 , p2
iget-object v4 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialMotionX : [F
aget v4 , v4 , p2
sub-float/2addr v3 , v4
iget-object v4 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mLastMotionY : [F
aget v4 , v4 , p2
iget-object v5 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialMotionY : [F
aget p2 , v5 , p2
sub-float/2addr v4 , p2
if-eqz v0 , :cond_4
if-eqz p1 , :cond_4
mul-float v3 , v3 , v3
mul-float v4 , v4 , v4
2019-12-06 03:29:40 +00:00
add-float/2addr v4 , v3
2019-07-24 11:27:29 +00:00
iget p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mTouchSlop : I
mul-int p1 , p1 , p1
int-to-float p1 , p1
2019-12-06 03:29:40 +00:00
cmpl-float p1 , v4 , p1
2019-07-24 11:27:29 +00:00
if-lez p1 , :cond_3
2019-12-06 03:29:40 +00:00
const/4 v1 , 0x1
2019-07-24 11:27:29 +00:00
:cond_3
return v1
:cond_4
if-eqz v0 , :cond_6
invoke-static { v3 } , L java/lang/Math ;-> abs ( F ) F
move-result p1
iget p2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mTouchSlop : I
int-to-float p2 , p2
cmpl-float p1 , p1 , p2
if-lez p1 , :cond_5
2019-12-06 03:29:40 +00:00
const/4 v1 , 0x1
2019-07-24 11:27:29 +00:00
:cond_5
return v1
:cond_6
if-eqz p1 , :cond_7
invoke-static { v4 } , L java/lang/Math ;-> abs ( F ) F
move-result p1
iget p2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mTouchSlop : I
int-to-float p2 , p2
cmpl-float p1 , p1 , p2
if-lez p1 , :cond_7
2019-12-06 03:29:40 +00:00
const/4 v1 , 0x1
2019-07-24 11:27:29 +00:00
:cond_7
return v1
.end method
.method public continueSettling ( Z ) Z
.locals 11
iget v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mDragState : I
const/4 v1 , 0x2
const/4 v2 , 0x0
if-ne v0 , v1 , :cond_6
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mScroller : L android/widget/OverScroller ;
invoke-virtual { v0 } , L android/widget/OverScroller ;-> computeScrollOffset ( ) Z
move-result v0
iget-object v3 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mScroller : L android/widget/OverScroller ;
invoke-virtual { v3 } , L android/widget/OverScroller ;-> getCurrX ( ) I
move-result v3
iget-object v4 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mScroller : L android/widget/OverScroller ;
invoke-virtual { v4 } , L android/widget/OverScroller ;-> getCurrY ( ) I
move-result v10
iget-object v4 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
invoke-virtual { v4 } , L android/view/View ;-> getLeft ( ) I
move-result v4
sub-int v8 , v3 , v4
iget-object v4 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
invoke-virtual { v4 } , L android/view/View ;-> getTop ( ) I
move-result v4
sub-int v9 , v10 , v4
if-eqz v8 , :cond_0
iget-object v4 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
invoke-static { v4 , v8 } , L androidx/core/view/ViewCompat ;-> offsetLeftAndRight ( L android/view/View ;I ) V
:cond_0
if-eqz v9 , :cond_1
iget-object v4 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
invoke-static { v4 , v9 } , L androidx/core/view/ViewCompat ;-> offsetTopAndBottom ( L android/view/View ;I ) V
:cond_1
if-nez v8 , :cond_2
if-eqz v9 , :cond_3
:cond_2
iget-object v4 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
iget-object v5 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
move v6 , v3
move v7 , v10
invoke-virtual/range { v4 . . v9 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> onViewPositionChanged ( L android/view/View ;IIII ) V
:cond_3
if-eqz v0 , :cond_4
iget-object v4 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mScroller : L android/widget/OverScroller ;
invoke-virtual { v4 } , L android/widget/OverScroller ;-> getFinalX ( ) I
move-result v4
if-ne v3 , v4 , :cond_4
iget-object v3 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mScroller : L android/widget/OverScroller ;
invoke-virtual { v3 } , L android/widget/OverScroller ;-> getFinalY ( ) I
move-result v3
if-ne v10 , v3 , :cond_4
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mScroller : L android/widget/OverScroller ;
invoke-virtual { v0 } , L android/widget/OverScroller ;-> abortAnimation ( ) V
const/4 v0 , 0x0
:cond_4
if-nez v0 , :cond_6
if-eqz p1 , :cond_5
iget-object p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mParentView : L android/view/ViewGroup ;
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mSetIdleRunnable : L java/lang/Runnable ;
invoke-virtual { p1 , v0 } , L android/view/ViewGroup ;-> post ( L java/lang/Runnable ;) Z
goto :goto_0
:cond_5
invoke-virtual { p0 , v2 } , L androidx/customview/widget/ViewDragHelper ;-> setDragState ( I ) V
:cond_6
:goto_0
iget p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mDragState : I
if-ne p1 , v1 , :cond_7
2019-12-06 03:29:40 +00:00
const/4 v2 , 0x1
2019-07-24 11:27:29 +00:00
:cond_7
return v2
.end method
.method public findTopChildUnder ( II ) L android/view/View ;
.locals 3
2019-12-06 03:29:40 +00:00
.annotation build L androidx/annotation/Nullable ;
.end annotation
2019-07-24 11:27:29 +00:00
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mParentView : L android/view/ViewGroup ;
invoke-virtual { v0 } , L android/view/ViewGroup ;-> getChildCount ( ) I
move-result v0
add-int/lit8 v0 , v0 , - 0x1
:goto_0
if-ltz v0 , :cond_1
iget-object v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mParentView : L android/view/ViewGroup ;
iget-object v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
invoke-virtual { v2 , v0 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> getOrderedChildIndex ( I ) I
move-result v2
invoke-virtual { v1 , v2 } , L android/view/ViewGroup ;-> getChildAt ( I ) L android/view/View ;
move-result-object v1
invoke-virtual { v1 } , L android/view/View ;-> getLeft ( ) I
move-result v2
if-lt p1 , v2 , :cond_0
invoke-virtual { v1 } , L android/view/View ;-> getRight ( ) I
move-result v2
if-ge p1 , v2 , :cond_0
invoke-virtual { v1 } , L android/view/View ;-> getTop ( ) I
move-result v2
if-lt p2 , v2 , :cond_0
invoke-virtual { v1 } , L android/view/View ;-> getBottom ( ) I
move-result v2
if-ge p2 , v2 , :cond_0
return-object v1
:cond_0
add-int/lit8 v0 , v0 , - 0x1
goto :goto_0
:cond_1
const/4 p1 , 0x0
return-object p1
.end method
.method public flingCapturedView ( IIII ) V
.locals 10
iget-boolean v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mReleaseInProgress : Z
if-eqz v0 , :cond_0
iget-object v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mScroller : L android/widget/OverScroller ;
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
invoke-virtual { v0 } , L android/view/View ;-> getLeft ( ) I
move-result v2
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
invoke-virtual { v0 } , L android/view/View ;-> getTop ( ) I
move-result v3
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mVelocityTracker : L android/view/VelocityTracker ;
iget v4 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mActivePointerId : I
invoke-virtual { v0 , v4 } , L android/view/VelocityTracker ;-> getXVelocity ( I ) F
move-result v0
float-to-int v4 , v0
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mVelocityTracker : L android/view/VelocityTracker ;
iget v5 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mActivePointerId : I
invoke-virtual { v0 , v5 } , L android/view/VelocityTracker ;-> getYVelocity ( I ) F
move-result v0
float-to-int v5 , v0
move v6 , p1
move v7 , p3
move v8 , p2
move v9 , p4
invoke-virtual/range { v1 . . v9 } , L android/widget/OverScroller ;-> fling ( IIIIIIII ) V
const/4 p1 , 0x2
invoke-virtual { p0 , p1 } , L androidx/customview/widget/ViewDragHelper ;-> setDragState ( I ) V
return-void
:cond_0
new-instance p1 , L java/lang/IllegalStateException ;
const-string p2 , "Cannot flingCapturedView outside of a call to Callback#onViewReleased"
invoke-direct { p1 , p2 } , L java/lang/IllegalStateException ;-> <init> ( L java/lang/String ;) V
throw p1
.end method
.method public getActivePointerId ( ) I
.locals 1
iget v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mActivePointerId : I
return v0
.end method
.method public getCapturedView ( ) L android/view/View ;
.locals 1
2019-12-06 03:29:40 +00:00
.annotation build L androidx/annotation/Nullable ;
.end annotation
2019-07-24 11:27:29 +00:00
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
return-object v0
.end method
2019-10-01 14:15:45 +00:00
.method public getDefaultEdgeSize ( ) I
.locals 1
2019-12-06 03:29:40 +00:00
.annotation build L androidx/annotation/Px ;
.end annotation
.annotation build L androidx/annotation/RestrictTo ;
value = {
.enum L androidx/annotation/RestrictTo$Scope ;-> LIBRARY_GROUP_PREFIX : L androidx/annotation/RestrictTo$Scope ;
}
.end annotation
2019-10-01 14:15:45 +00:00
iget v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mDefaultEdgeSize : I
return v0
.end method
2019-07-24 11:27:29 +00:00
.method public getEdgeSize ( ) I
.locals 1
2019-12-06 03:29:40 +00:00
.annotation build L androidx/annotation/Px ;
.end annotation
2019-07-24 11:27:29 +00:00
iget v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mEdgeSize : I
return v0
.end method
.method public getMinVelocity ( ) F
.locals 1
iget v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mMinVelocity : F
return v0
.end method
.method public getTouchSlop ( ) I
.locals 1
2019-12-06 03:29:40 +00:00
.annotation build L androidx/annotation/Px ;
.end annotation
2019-07-24 11:27:29 +00:00
iget v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mTouchSlop : I
return v0
.end method
.method public getViewDragState ( ) I
.locals 1
iget v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mDragState : I
return v0
.end method
.method public isCapturedViewUnder ( II ) Z
.locals 1
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
invoke-virtual { p0 , v0 , p1 , p2 } , L androidx/customview/widget/ViewDragHelper ;-> isViewUnder ( L android/view/View ;II ) Z
move-result p1
return p1
.end method
.method public isEdgeTouched ( I ) Z
.locals 4
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialEdgesTouched : [I
array-length v0 , v0
const/4 v1 , 0x0
const/4 v2 , 0x0
:goto_0
if-ge v2 , v0 , :cond_1
invoke-virtual { p0 , p1 , v2 } , L androidx/customview/widget/ViewDragHelper ;-> isEdgeTouched ( II ) Z
move-result v3
if-eqz v3 , :cond_0
const/4 p1 , 0x1
return p1
:cond_0
add-int/lit8 v2 , v2 , 0x1
goto :goto_0
:cond_1
return v1
.end method
.method public isEdgeTouched ( II ) Z
.locals 1
invoke-virtual { p0 , p2 } , L androidx/customview/widget/ViewDragHelper ;-> isPointerDown ( I ) Z
move-result v0
if-eqz v0 , :cond_0
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialEdgesTouched : [I
aget p2 , v0 , p2
and-int/2addr p1 , p2
if-eqz p1 , :cond_0
const/4 p1 , 0x1
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
:cond_0
const/4 p1 , 0x0
2019-12-06 03:29:40 +00:00
:goto_0
2019-07-24 11:27:29 +00:00
return p1
.end method
.method public isPointerDown ( I ) Z
.locals 2
iget v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mPointersDown : I
const/4 v1 , 0x1
shl-int p1 , v1 , p1
and-int/2addr p1 , v0
if-eqz p1 , :cond_0
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
:cond_0
2019-12-06 03:29:40 +00:00
const/4 v1 , 0x0
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
:goto_0
return v1
2019-07-24 11:27:29 +00:00
.end method
.method public isViewUnder ( L android/view/View ;II ) Z
.locals 2
2019-12-06 03:29:40 +00:00
. param p1 # Landroid/view/View;
.annotation build L androidx/annotation/Nullable ;
.end annotation
. end param
2019-07-24 11:27:29 +00:00
const/4 v0 , 0x0
if-nez p1 , :cond_0
return v0
:cond_0
invoke-virtual { p1 } , L android/view/View ;-> getLeft ( ) I
move-result v1
if-lt p2 , v1 , :cond_1
invoke-virtual { p1 } , L android/view/View ;-> getRight ( ) I
move-result v1
if-ge p2 , v1 , :cond_1
invoke-virtual { p1 } , L android/view/View ;-> getTop ( ) I
move-result p2
if-lt p3 , p2 , :cond_1
invoke-virtual { p1 } , L android/view/View ;-> getBottom ( ) I
move-result p1
if-ge p3 , p1 , :cond_1
2019-12-06 03:29:40 +00:00
const/4 v0 , 0x1
2019-07-24 11:27:29 +00:00
:cond_1
return v0
.end method
.method public processTouchEvent ( L android/view/MotionEvent ;) V
.locals 9
2019-12-06 03:29:40 +00:00
. param p1 # Landroid/view/MotionEvent;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
2019-07-24 11:27:29 +00:00
invoke-virtual { p1 } , L android/view/MotionEvent ;-> getActionMasked ( ) I
move-result v0
invoke-virtual { p1 } , L android/view/MotionEvent ;-> getActionIndex ( ) I
move-result v1
if-nez v0 , :cond_0
invoke-virtual { p0 } , L androidx/customview/widget/ViewDragHelper ;-> cancel ( ) V
:cond_0
iget-object v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mVelocityTracker : L android/view/VelocityTracker ;
if-nez v2 , :cond_1
invoke-static { } , L android/view/VelocityTracker ;-> obtain ( ) L android/view/VelocityTracker ;
move-result-object v2
iput-object v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mVelocityTracker : L android/view/VelocityTracker ;
:cond_1
iget-object v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mVelocityTracker : L android/view/VelocityTracker ;
invoke-virtual { v2 , p1 } , L android/view/VelocityTracker ;-> addMovement ( L android/view/MotionEvent ;) V
const/4 v2 , 0x0
2019-12-06 03:29:40 +00:00
if-eqz v0 , :cond_14
2019-07-24 11:27:29 +00:00
const/4 v3 , 0x1
2019-12-06 03:29:40 +00:00
if-eq v0 , v3 , :cond_12
2019-07-24 11:27:29 +00:00
const/4 v4 , 0x2
if-eq v0 , v4 , :cond_b
const/4 v4 , 0x3
if-eq v0 , v4 , :cond_9
const/4 v4 , 0x5
2019-12-06 03:29:40 +00:00
if-eq v0 , v4 , :cond_7
2019-07-24 11:27:29 +00:00
const/4 v4 , 0x6
if-eq v0 , v4 , :cond_2
2019-12-06 03:29:40 +00:00
goto/16 :goto_6
2019-07-24 11:27:29 +00:00
:cond_2
invoke-virtual { p1 , v1 } , L android/view/MotionEvent ;-> getPointerId ( I ) I
move-result v0
iget v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mDragState : I
2019-12-06 03:29:40 +00:00
if-ne v1 , v3 , :cond_6
2019-07-24 11:27:29 +00:00
iget v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mActivePointerId : I
2019-12-06 03:29:40 +00:00
if-ne v0 , v1 , :cond_6
2019-07-24 11:27:29 +00:00
invoke-virtual { p1 } , L android/view/MotionEvent ;-> getPointerCount ( ) I
move-result v1
:goto_0
const/4 v3 , - 0x1
2019-12-06 03:29:40 +00:00
if-ge v2 , v1 , :cond_5
2019-07-24 11:27:29 +00:00
invoke-virtual { p1 , v2 } , L android/view/MotionEvent ;-> getPointerId ( I ) I
move-result v4
iget v5 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mActivePointerId : I
2019-12-06 03:29:40 +00:00
if-ne v4 , v5 , :cond_3
goto :goto_1
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
:cond_3
2019-07-24 11:27:29 +00:00
invoke-virtual { p1 , v2 } , L android/view/MotionEvent ;-> getX ( I ) F
move-result v5
invoke-virtual { p1 , v2 } , L android/view/MotionEvent ;-> getY ( I ) F
move-result v6
float-to-int v5 , v5
float-to-int v6 , v6
invoke-virtual { p0 , v5 , v6 } , L androidx/customview/widget/ViewDragHelper ;-> findTopChildUnder ( II ) L android/view/View ;
move-result-object v5
iget-object v6 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
2019-12-06 03:29:40 +00:00
if-ne v5 , v6 , :cond_4
2019-07-24 11:27:29 +00:00
invoke-virtual { p0 , v6 , v4 } , L androidx/customview/widget/ViewDragHelper ;-> tryCaptureViewForDrag ( L android/view/View ;I ) Z
move-result v4
2019-12-06 03:29:40 +00:00
if-eqz v4 , :cond_4
2019-07-24 11:27:29 +00:00
iget p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mActivePointerId : I
2019-12-06 03:29:40 +00:00
goto :goto_2
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
:cond_4
:goto_1
2019-07-24 11:27:29 +00:00
add-int/lit8 v2 , v2 , 0x1
goto :goto_0
2019-12-06 03:29:40 +00:00
:cond_5
2019-07-24 11:27:29 +00:00
const/4 p1 , - 0x1
2019-12-06 03:29:40 +00:00
:goto_2
if-ne p1 , v3 , :cond_6
2019-07-24 11:27:29 +00:00
invoke-direct { p0 } , L androidx/customview/widget/ViewDragHelper ;-> releaseViewForPointerUp ( ) V
2019-12-06 03:29:40 +00:00
:cond_6
2019-07-24 11:27:29 +00:00
invoke-direct { p0 , v0 } , L androidx/customview/widget/ViewDragHelper ;-> clearMotionHistory ( I ) V
2019-12-06 03:29:40 +00:00
goto/16 :goto_6
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
:cond_7
2019-07-24 11:27:29 +00:00
invoke-virtual { p1 , v1 } , L android/view/MotionEvent ;-> getPointerId ( I ) I
move-result v0
invoke-virtual { p1 , v1 } , L android/view/MotionEvent ;-> getX ( I ) F
move-result v2
invoke-virtual { p1 , v1 } , L android/view/MotionEvent ;-> getY ( I ) F
move-result p1
invoke-direct { p0 , v2 , p1 , v0 } , L androidx/customview/widget/ViewDragHelper ;-> saveInitialMotion ( FFI ) V
iget v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mDragState : I
if-nez v1 , :cond_8
float-to-int v1 , v2
float-to-int p1 , p1
invoke-virtual { p0 , v1 , p1 } , L androidx/customview/widget/ViewDragHelper ;-> findTopChildUnder ( II ) L android/view/View ;
move-result-object p1
invoke-virtual { p0 , p1 , v0 } , L androidx/customview/widget/ViewDragHelper ;-> tryCaptureViewForDrag ( L android/view/View ;I ) Z
iget-object p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialEdgesTouched : [I
aget p1 , p1 , v0
iget v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mTrackingEdges : I
and-int v2 , p1 , v1
2019-12-06 03:29:40 +00:00
if-eqz v2 , :cond_15
2019-07-24 11:27:29 +00:00
iget-object v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
and-int/2addr p1 , v1
invoke-virtual { v2 , p1 , v0 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> onEdgeTouched ( II ) V
2019-12-06 03:29:40 +00:00
goto/16 :goto_6
2019-07-24 11:27:29 +00:00
:cond_8
float-to-int v1 , v2
float-to-int p1 , p1
invoke-virtual { p0 , v1 , p1 } , L androidx/customview/widget/ViewDragHelper ;-> isCapturedViewUnder ( II ) Z
move-result p1
2019-12-06 03:29:40 +00:00
if-eqz p1 , :cond_15
2019-07-24 11:27:29 +00:00
iget-object p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
invoke-virtual { p0 , p1 , v0 } , L androidx/customview/widget/ViewDragHelper ;-> tryCaptureViewForDrag ( L android/view/View ;I ) Z
2019-12-06 03:29:40 +00:00
goto/16 :goto_6
2019-07-24 11:27:29 +00:00
:cond_9
iget p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mDragState : I
if-ne p1 , v3 , :cond_a
const/4 p1 , 0x0
invoke-direct { p0 , p1 , p1 } , L androidx/customview/widget/ViewDragHelper ;-> dispatchViewReleased ( FF ) V
:cond_a
invoke-virtual { p0 } , L androidx/customview/widget/ViewDragHelper ;-> cancel ( ) V
2019-12-06 03:29:40 +00:00
goto/16 :goto_6
2019-07-24 11:27:29 +00:00
:cond_b
iget v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mDragState : I
2019-12-06 03:29:40 +00:00
if-ne v0 , v3 , :cond_d
2019-07-24 11:27:29 +00:00
iget v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mActivePointerId : I
invoke-direct { p0 , v0 } , L androidx/customview/widget/ViewDragHelper ;-> isValidPointerForActionMove ( I ) Z
move-result v0
2019-12-06 03:29:40 +00:00
if-nez v0 , :cond_c
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
goto/16 :goto_6
:cond_c
2019-07-24 11:27:29 +00:00
iget v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mActivePointerId : I
invoke-virtual { p1 , v0 } , L android/view/MotionEvent ;-> findPointerIndex ( I ) I
move-result v0
invoke-virtual { p1 , v0 } , L android/view/MotionEvent ;-> getX ( I ) F
move-result v1
invoke-virtual { p1 , v0 } , L android/view/MotionEvent ;-> getY ( I ) F
move-result v0
iget-object v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mLastMotionX : [F
iget v3 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mActivePointerId : I
aget v2 , v2 , v3
sub-float/2addr v1 , v2
float-to-int v1 , v1
iget-object v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mLastMotionY : [F
aget v2 , v2 , v3
sub-float/2addr v0 , v2
float-to-int v0 , v0
iget-object v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
invoke-virtual { v2 } , L android/view/View ;-> getLeft ( ) I
move-result v2
add-int/2addr v2 , v1
iget-object v3 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
invoke-virtual { v3 } , L android/view/View ;-> getTop ( ) I
move-result v3
add-int/2addr v3 , v0
invoke-direct { p0 , v2 , v3 , v1 , v0 } , L androidx/customview/widget/ViewDragHelper ;-> dragTo ( IIII ) V
invoke-direct { p0 , p1 } , L androidx/customview/widget/ViewDragHelper ;-> saveLastMotion ( L android/view/MotionEvent ;) V
2019-12-06 03:29:40 +00:00
goto/16 :goto_6
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
:cond_d
2019-07-24 11:27:29 +00:00
invoke-virtual { p1 } , L android/view/MotionEvent ;-> getPointerCount ( ) I
move-result v0
2019-12-06 03:29:40 +00:00
:goto_3
if-ge v2 , v0 , :cond_11
2019-07-24 11:27:29 +00:00
invoke-virtual { p1 , v2 } , L android/view/MotionEvent ;-> getPointerId ( I ) I
move-result v1
invoke-direct { p0 , v1 } , L androidx/customview/widget/ViewDragHelper ;-> isValidPointerForActionMove ( I ) Z
move-result v4
2019-12-06 03:29:40 +00:00
if-nez v4 , :cond_e
goto :goto_4
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
:cond_e
2019-07-24 11:27:29 +00:00
invoke-virtual { p1 , v2 } , L android/view/MotionEvent ;-> getX ( I ) F
move-result v4
invoke-virtual { p1 , v2 } , L android/view/MotionEvent ;-> getY ( I ) F
move-result v5
iget-object v6 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialMotionX : [F
aget v6 , v6 , v1
sub-float v6 , v4 , v6
iget-object v7 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialMotionY : [F
aget v7 , v7 , v1
sub-float v7 , v5 , v7
invoke-direct { p0 , v6 , v7 , v1 } , L androidx/customview/widget/ViewDragHelper ;-> reportNewEdgeDrags ( FFI ) V
iget v8 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mDragState : I
2019-12-06 03:29:40 +00:00
if-ne v8 , v3 , :cond_f
goto :goto_5
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
:cond_f
2019-07-24 11:27:29 +00:00
float-to-int v4 , v4
float-to-int v5 , v5
invoke-virtual { p0 , v4 , v5 } , L androidx/customview/widget/ViewDragHelper ;-> findTopChildUnder ( II ) L android/view/View ;
move-result-object v4
invoke-direct { p0 , v4 , v6 , v7 } , L androidx/customview/widget/ViewDragHelper ;-> checkTouchSlop ( L android/view/View ;FF ) Z
move-result v5
2019-12-06 03:29:40 +00:00
if-eqz v5 , :cond_10
2019-07-24 11:27:29 +00:00
invoke-virtual { p0 , v4 , v1 } , L androidx/customview/widget/ViewDragHelper ;-> tryCaptureViewForDrag ( L android/view/View ;I ) Z
move-result v1
2019-12-06 03:29:40 +00:00
if-eqz v1 , :cond_10
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
goto :goto_5
:cond_10
:goto_4
2019-07-24 11:27:29 +00:00
add-int/lit8 v2 , v2 , 0x1
2019-12-06 03:29:40 +00:00
goto :goto_3
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
:cond_11
:goto_5
2019-07-24 11:27:29 +00:00
invoke-direct { p0 , p1 } , L androidx/customview/widget/ViewDragHelper ;-> saveLastMotion ( L android/view/MotionEvent ;) V
2019-12-06 03:29:40 +00:00
goto :goto_6
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
:cond_12
2019-07-24 11:27:29 +00:00
iget p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mDragState : I
2019-12-06 03:29:40 +00:00
if-ne p1 , v3 , :cond_13
2019-07-24 11:27:29 +00:00
invoke-direct { p0 } , L androidx/customview/widget/ViewDragHelper ;-> releaseViewForPointerUp ( ) V
2019-12-06 03:29:40 +00:00
:cond_13
2019-07-24 11:27:29 +00:00
invoke-virtual { p0 } , L androidx/customview/widget/ViewDragHelper ;-> cancel ( ) V
2019-12-06 03:29:40 +00:00
goto :goto_6
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
:cond_14
2019-07-24 11:27:29 +00:00
invoke-virtual { p1 } , L android/view/MotionEvent ;-> getX ( ) F
move-result v0
invoke-virtual { p1 } , L android/view/MotionEvent ;-> getY ( ) F
move-result v1
invoke-virtual { p1 , v2 } , L android/view/MotionEvent ;-> getPointerId ( I ) I
move-result p1
float-to-int v2 , v0
float-to-int v3 , v1
invoke-virtual { p0 , v2 , v3 } , L androidx/customview/widget/ViewDragHelper ;-> findTopChildUnder ( II ) L android/view/View ;
move-result-object v2
invoke-direct { p0 , v0 , v1 , p1 } , L androidx/customview/widget/ViewDragHelper ;-> saveInitialMotion ( FFI ) V
invoke-virtual { p0 , v2 , p1 } , L androidx/customview/widget/ViewDragHelper ;-> tryCaptureViewForDrag ( L android/view/View ;I ) Z
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialEdgesTouched : [I
aget v0 , v0 , p1
iget v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mTrackingEdges : I
and-int v2 , v0 , v1
2019-12-06 03:29:40 +00:00
if-eqz v2 , :cond_15
2019-07-24 11:27:29 +00:00
iget-object v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
and-int/2addr v0 , v1
invoke-virtual { v2 , v0 , p1 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> onEdgeTouched ( II ) V
2019-12-06 03:29:40 +00:00
:cond_15
:goto_6
2019-07-24 11:27:29 +00:00
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public setDragState ( I ) V
2019-07-24 11:27:29 +00:00
.locals 2
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mParentView : L android/view/ViewGroup ;
iget-object v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mSetIdleRunnable : L java/lang/Runnable ;
invoke-virtual { v0 , v1 } , L android/view/ViewGroup ;-> removeCallbacks ( L java/lang/Runnable ;) Z
iget v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mDragState : I
if-eq v0 , p1 , :cond_0
iput p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mDragState : I
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
invoke-virtual { v0 , p1 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> onViewDragStateChanged ( I ) V
iget p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mDragState : I
if-nez p1 , :cond_0
const/4 p1 , 0x0
iput-object p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
:cond_0
return-void
.end method
2019-10-01 14:15:45 +00:00
.method public setEdgeSize ( I ) V
.locals 0
2019-12-06 03:29:40 +00:00
. param p1 # I
.annotation build L androidx/annotation/IntRange ;
from = 0x0 L
.end annotation
.annotation build L androidx/annotation/Px ;
.end annotation
. end param
.annotation build L androidx/annotation/RestrictTo ;
value = {
.enum L androidx/annotation/RestrictTo$Scope ;-> LIBRARY_GROUP_PREFIX : L androidx/annotation/RestrictTo$Scope ;
}
.end annotation
2019-10-01 14:15:45 +00:00
iput p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mEdgeSize : I
return-void
.end method
2019-07-24 11:27:29 +00:00
.method public setEdgeTrackingEnabled ( I ) V
.locals 0
iput p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mTrackingEdges : I
return-void
.end method
.method public setMinVelocity ( F ) V
.locals 0
iput p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mMinVelocity : F
return-void
.end method
.method public settleCapturedViewAt ( II ) Z
.locals 3
iget-boolean v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mReleaseInProgress : Z
if-eqz v0 , :cond_0
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mVelocityTracker : L android/view/VelocityTracker ;
iget v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mActivePointerId : I
invoke-virtual { v0 , v1 } , L android/view/VelocityTracker ;-> getXVelocity ( I ) F
move-result v0
float-to-int v0 , v0
iget-object v1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mVelocityTracker : L android/view/VelocityTracker ;
iget v2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mActivePointerId : I
invoke-virtual { v1 , v2 } , L android/view/VelocityTracker ;-> getYVelocity ( I ) F
move-result v1
float-to-int v1 , v1
invoke-direct { p0 , p1 , p2 , v0 , v1 } , L androidx/customview/widget/ViewDragHelper ;-> forceSettleCapturedViewAt ( IIII ) Z
move-result p1
return p1
:cond_0
new-instance p1 , L java/lang/IllegalStateException ;
const-string p2 , "Cannot settleCapturedViewAt outside of a call to Callback#onViewReleased"
invoke-direct { p1 , p2 } , L java/lang/IllegalStateException ;-> <init> ( L java/lang/String ;) V
throw p1
.end method
.method public shouldInterceptTouchEvent ( L android/view/MotionEvent ;) Z
.locals 16
2019-12-06 03:29:40 +00:00
. param p1 # Landroid/view/MotionEvent;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
2019-07-24 11:27:29 +00:00
move-object/from16 v0 , p0
move-object/from16 v1 , p1
invoke-virtual/range { p1 . . p1 } , L android/view/MotionEvent ;-> getActionMasked ( ) I
move-result v2
invoke-virtual/range { p1 . . p1 } , L android/view/MotionEvent ;-> getActionIndex ( ) I
move-result v3
if-nez v2 , :cond_0
invoke-virtual/range { p0 . . p0 } , L androidx/customview/widget/ViewDragHelper ;-> cancel ( ) V
:cond_0
iget-object v4 , v0 , L androidx/customview/widget/ViewDragHelper ;-> mVelocityTracker : L android/view/VelocityTracker ;
if-nez v4 , :cond_1
invoke-static { } , L android/view/VelocityTracker ;-> obtain ( ) L android/view/VelocityTracker ;
move-result-object v4
iput-object v4 , v0 , L androidx/customview/widget/ViewDragHelper ;-> mVelocityTracker : L android/view/VelocityTracker ;
:cond_1
iget-object v4 , v0 , L androidx/customview/widget/ViewDragHelper ;-> mVelocityTracker : L android/view/VelocityTracker ;
invoke-virtual { v4 , v1 } , L android/view/VelocityTracker ;-> addMovement ( L android/view/MotionEvent ;) V
const/4 v4 , 0x2
const/4 v6 , 0x1
2019-12-06 03:29:40 +00:00
if-eqz v2 , :cond_10
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
if-eq v2 , v6 , :cond_f
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
if-eq v2 , v4 , :cond_6
2019-07-24 11:27:29 +00:00
const/4 v7 , 0x3
2019-12-06 03:29:40 +00:00
if-eq v2 , v7 , :cond_f
2019-07-24 11:27:29 +00:00
const/4 v7 , 0x5
2019-12-06 03:29:40 +00:00
if-eq v2 , v7 , :cond_4
2019-07-24 11:27:29 +00:00
const/4 v4 , 0x6
2019-12-06 03:29:40 +00:00
if-eq v2 , v4 , :cond_3
2019-07-24 11:27:29 +00:00
:cond_2
2019-12-06 03:29:40 +00:00
:goto_0
const/4 v5 , 0x0
goto/16 :goto_5
:cond_3
2019-07-24 11:27:29 +00:00
invoke-virtual { v1 , v3 } , L android/view/MotionEvent ;-> getPointerId ( I ) I
move-result v1
invoke-direct { v0 , v1 } , L androidx/customview/widget/ViewDragHelper ;-> clearMotionHistory ( I ) V
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
:cond_4
2019-07-24 11:27:29 +00:00
invoke-virtual { v1 , v3 } , L android/view/MotionEvent ;-> getPointerId ( I ) I
move-result v2
invoke-virtual { v1 , v3 } , L android/view/MotionEvent ;-> getX ( I ) F
move-result v7
invoke-virtual { v1 , v3 } , L android/view/MotionEvent ;-> getY ( I ) F
move-result v1
invoke-direct { v0 , v7 , v1 , v2 } , L androidx/customview/widget/ViewDragHelper ;-> saveInitialMotion ( FFI ) V
iget v3 , v0 , L androidx/customview/widget/ViewDragHelper ;-> mDragState : I
2019-12-06 03:29:40 +00:00
if-nez v3 , :cond_5
2019-07-24 11:27:29 +00:00
iget-object v1 , v0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialEdgesTouched : [I
aget v1 , v1 , v2
iget v3 , v0 , L androidx/customview/widget/ViewDragHelper ;-> mTrackingEdges : I
and-int v4 , v1 , v3
2019-12-06 03:29:40 +00:00
if-eqz v4 , :cond_2
2019-07-24 11:27:29 +00:00
iget-object v4 , v0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
and-int/2addr v1 , v3
invoke-virtual { v4 , v1 , v2 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> onEdgeTouched ( II ) V
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
:cond_5
if-ne v3 , v4 , :cond_2
2019-07-24 11:27:29 +00:00
float-to-int v3 , v7
float-to-int v1 , v1
invoke-virtual { v0 , v3 , v1 } , L androidx/customview/widget/ViewDragHelper ;-> findTopChildUnder ( II ) L android/view/View ;
move-result-object v1
iget-object v3 , v0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
2019-12-06 03:29:40 +00:00
if-ne v1 , v3 , :cond_2
2019-07-24 11:27:29 +00:00
invoke-virtual { v0 , v1 , v2 } , L androidx/customview/widget/ViewDragHelper ;-> tryCaptureViewForDrag ( L android/view/View ;I ) Z
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
:cond_6
2019-07-24 11:27:29 +00:00
iget-object v2 , v0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialMotionX : [F
2019-12-06 03:29:40 +00:00
if-eqz v2 , :cond_2
2019-07-24 11:27:29 +00:00
iget-object v2 , v0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialMotionY : [F
2019-12-06 03:29:40 +00:00
if-nez v2 , :cond_7
goto :goto_0
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
:cond_7
2019-07-24 11:27:29 +00:00
invoke-virtual/range { p1 . . p1 } , L android/view/MotionEvent ;-> getPointerCount ( ) I
move-result v2
const/4 v3 , 0x0
2019-12-06 03:29:40 +00:00
:goto_1
if-ge v3 , v2 , :cond_e
2019-07-24 11:27:29 +00:00
invoke-virtual { v1 , v3 } , L android/view/MotionEvent ;-> getPointerId ( I ) I
move-result v4
invoke-direct { v0 , v4 } , L androidx/customview/widget/ViewDragHelper ;-> isValidPointerForActionMove ( I ) Z
move-result v7
2019-12-06 03:29:40 +00:00
if-nez v7 , :cond_8
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
goto/16 :goto_3
:cond_8
2019-07-24 11:27:29 +00:00
invoke-virtual { v1 , v3 } , L android/view/MotionEvent ;-> getX ( I ) F
move-result v7
invoke-virtual { v1 , v3 } , L android/view/MotionEvent ;-> getY ( I ) F
move-result v8
iget-object v9 , v0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialMotionX : [F
aget v9 , v9 , v4
sub-float v9 , v7 , v9
iget-object v10 , v0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialMotionY : [F
aget v10 , v10 , v4
sub-float v10 , v8 , v10
float-to-int v7 , v7
float-to-int v8 , v8
invoke-virtual { v0 , v7 , v8 } , L androidx/customview/widget/ViewDragHelper ;-> findTopChildUnder ( II ) L android/view/View ;
move-result-object v7
2019-12-06 03:29:40 +00:00
if-eqz v7 , :cond_9
2019-07-24 11:27:29 +00:00
invoke-direct { v0 , v7 , v9 , v10 } , L androidx/customview/widget/ViewDragHelper ;-> checkTouchSlop ( L android/view/View ;FF ) Z
move-result v8
2019-12-06 03:29:40 +00:00
if-eqz v8 , :cond_9
2019-07-24 11:27:29 +00:00
const/4 v8 , 0x1
2019-12-06 03:29:40 +00:00
goto :goto_2
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
:cond_9
2019-07-24 11:27:29 +00:00
const/4 v8 , 0x0
2019-12-06 03:29:40 +00:00
:goto_2
if-eqz v8 , :cond_b
2019-07-24 11:27:29 +00:00
invoke-virtual { v7 } , L android/view/View ;-> getLeft ( ) I
move-result v11
float-to-int v12 , v9
add-int v13 , v11 , v12
iget-object v14 , v0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
invoke-virtual { v14 , v7 , v13 , v12 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> clampViewPositionHorizontal ( L android/view/View ;II ) I
move-result v12
invoke-virtual { v7 } , L android/view/View ;-> getTop ( ) I
move-result v13
float-to-int v14 , v10
add-int v15 , v13 , v14
iget-object v5 , v0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
invoke-virtual { v5 , v7 , v15 , v14 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> clampViewPositionVertical ( L android/view/View ;II ) I
move-result v5
iget-object v14 , v0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
invoke-virtual { v14 , v7 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> getViewHorizontalDragRange ( L android/view/View ;) I
move-result v14
iget-object v15 , v0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
invoke-virtual { v15 , v7 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> getViewVerticalDragRange ( L android/view/View ;) I
move-result v15
2019-12-06 03:29:40 +00:00
if-eqz v14 , :cond_a
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
if-lez v14 , :cond_b
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
if-ne v12 , v11 , :cond_b
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
:cond_a
if-eqz v15 , :cond_e
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
if-lez v15 , :cond_b
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
if-ne v5 , v13 , :cond_b
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
goto :goto_4
:cond_b
2019-07-24 11:27:29 +00:00
invoke-direct { v0 , v9 , v10 , v4 } , L androidx/customview/widget/ViewDragHelper ;-> reportNewEdgeDrags ( FFI ) V
iget v5 , v0 , L androidx/customview/widget/ViewDragHelper ;-> mDragState : I
2019-12-06 03:29:40 +00:00
if-ne v5 , v6 , :cond_c
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
goto :goto_4
:cond_c
if-eqz v8 , :cond_d
2019-07-24 11:27:29 +00:00
invoke-virtual { v0 , v7 , v4 } , L androidx/customview/widget/ViewDragHelper ;-> tryCaptureViewForDrag ( L android/view/View ;I ) Z
move-result v4
2019-12-06 03:29:40 +00:00
if-eqz v4 , :cond_d
goto :goto_4
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
:cond_d
:goto_3
2019-07-24 11:27:29 +00:00
add-int/lit8 v3 , v3 , 0x1
2019-12-06 03:29:40 +00:00
goto :goto_1
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
:cond_e
:goto_4
2019-07-24 11:27:29 +00:00
invoke-direct/range { p0 . . p1 } , L androidx/customview/widget/ViewDragHelper ;-> saveLastMotion ( L android/view/MotionEvent ;) V
2019-12-06 03:29:40 +00:00
goto/16 :goto_0
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
:cond_f
2019-07-24 11:27:29 +00:00
invoke-virtual/range { p0 . . p0 } , L androidx/customview/widget/ViewDragHelper ;-> cancel ( ) V
2019-12-06 03:29:40 +00:00
goto/16 :goto_0
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
:cond_10
2019-07-24 11:27:29 +00:00
invoke-virtual/range { p1 . . p1 } , L android/view/MotionEvent ;-> getX ( ) F
move-result v2
invoke-virtual/range { p1 . . p1 } , L android/view/MotionEvent ;-> getY ( ) F
move-result v3
const/4 v5 , 0x0
invoke-virtual { v1 , v5 } , L android/view/MotionEvent ;-> getPointerId ( I ) I
move-result v1
invoke-direct { v0 , v2 , v3 , v1 } , L androidx/customview/widget/ViewDragHelper ;-> saveInitialMotion ( FFI ) V
float-to-int v2 , v2
float-to-int v3 , v3
invoke-virtual { v0 , v2 , v3 } , L androidx/customview/widget/ViewDragHelper ;-> findTopChildUnder ( II ) L android/view/View ;
move-result-object v2
iget-object v3 , v0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
2019-12-06 03:29:40 +00:00
if-ne v2 , v3 , :cond_11
2019-07-24 11:27:29 +00:00
iget v3 , v0 , L androidx/customview/widget/ViewDragHelper ;-> mDragState : I
2019-12-06 03:29:40 +00:00
if-ne v3 , v4 , :cond_11
2019-07-24 11:27:29 +00:00
invoke-virtual { v0 , v2 , v1 } , L androidx/customview/widget/ViewDragHelper ;-> tryCaptureViewForDrag ( L android/view/View ;I ) Z
2019-12-06 03:29:40 +00:00
:cond_11
2019-07-24 11:27:29 +00:00
iget-object v2 , v0 , L androidx/customview/widget/ViewDragHelper ;-> mInitialEdgesTouched : [I
aget v2 , v2 , v1
iget v3 , v0 , L androidx/customview/widget/ViewDragHelper ;-> mTrackingEdges : I
and-int v4 , v2 , v3
2019-12-06 03:29:40 +00:00
if-eqz v4 , :cond_12
2019-07-24 11:27:29 +00:00
iget-object v4 , v0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
and-int/2addr v2 , v3
invoke-virtual { v4 , v2 , v1 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> onEdgeTouched ( II ) V
2019-12-06 03:29:40 +00:00
:cond_12
:goto_5
2019-07-24 11:27:29 +00:00
iget v1 , v0 , L androidx/customview/widget/ViewDragHelper ;-> mDragState : I
2019-12-06 03:29:40 +00:00
if-ne v1 , v6 , :cond_13
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
const/4 v5 , 0x1
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
:cond_13
return v5
2019-07-24 11:27:29 +00:00
.end method
.method public smoothSlideViewTo ( L android/view/View ;II ) Z
.locals 0
2019-12-06 03:29:40 +00:00
. param p1 # Landroid/view/View;
.annotation build L androidx/annotation/NonNull ;
.end annotation
. end param
2019-07-24 11:27:29 +00:00
iput-object p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
const/4 p1 , - 0x1
iput p1 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mActivePointerId : I
const/4 p1 , 0x0
invoke-direct { p0 , p2 , p3 , p1 , p1 } , L androidx/customview/widget/ViewDragHelper ;-> forceSettleCapturedViewAt ( IIII ) Z
move-result p1
if-nez p1 , :cond_0
iget p2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mDragState : I
if-nez p2 , :cond_0
iget-object p2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
if-eqz p2 , :cond_0
const/4 p2 , 0x0
iput-object p2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
:cond_0
return p1
.end method
2019-12-06 03:29:40 +00:00
.method public tryCaptureViewForDrag ( L android/view/View ;I ) Z
2019-07-24 11:27:29 +00:00
.locals 2
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCapturedView : L android/view/View ;
const/4 v1 , 0x1
if-ne p1 , v0 , :cond_0
iget v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mActivePointerId : I
if-ne v0 , p2 , :cond_0
return v1
:cond_0
if-eqz p1 , :cond_1
iget-object v0 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mCallback : L androidx/customview/widget/ViewDragHelper$Callback ;
invoke-virtual { v0 , p1 , p2 } , L androidx/customview/widget/ViewDragHelper$Callback ;-> tryCaptureView ( L android/view/View ;I ) Z
move-result v0
if-eqz v0 , :cond_1
iput p2 , p0 , L androidx/customview/widget/ViewDragHelper ;-> mActivePointerId : I
invoke-virtual { p0 , p1 , p2 } , L androidx/customview/widget/ViewDragHelper ;-> captureChildView ( L android/view/View ;I ) V
return v1
:cond_1
const/4 p1 , 0x0
return p1
.end method