apkfuckery/com.discord/smali/androidx/recyclerview/widget/ItemTouchHelper$2.smali

431 lines
15 KiB
Smali
Raw Normal View History

2020-05-17 12:40:10 +00:00
.class public Landroidx/recyclerview/widget/ItemTouchHelper$2;
.super Ljava/lang/Object;
.source "ItemTouchHelper.java"
# interfaces
.implements Landroidx/recyclerview/widget/RecyclerView$OnItemTouchListener;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/recyclerview/widget/ItemTouchHelper;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
# direct methods
.method public constructor <init>(Landroidx/recyclerview/widget/ItemTouchHelper;)V
.locals 0
iput-object p1, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public onInterceptTouchEvent(Landroidx/recyclerview/widget/RecyclerView;Landroid/view/MotionEvent;)Z
.locals 5
.param p1 # Landroidx/recyclerview/widget/RecyclerView;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Landroid/view/MotionEvent;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
iget-object p1, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
iget-object p1, p1, Landroidx/recyclerview/widget/ItemTouchHelper;->mGestureDetector:Landroidx/core/view/GestureDetectorCompat;
invoke-virtual {p1, p2}, Landroidx/core/view/GestureDetectorCompat;->onTouchEvent(Landroid/view/MotionEvent;)Z
invoke-virtual {p2}, Landroid/view/MotionEvent;->getActionMasked()I
move-result p1
const/4 v0, 0x1
const/4 v1, 0x0
if-nez p1, :cond_1
iget-object p1, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
invoke-virtual {p2, v1}, Landroid/view/MotionEvent;->getPointerId(I)I
move-result v2
iput v2, p1, Landroidx/recyclerview/widget/ItemTouchHelper;->mActivePointerId:I
iget-object p1, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
invoke-virtual {p2}, Landroid/view/MotionEvent;->getX()F
move-result v2
iput v2, p1, Landroidx/recyclerview/widget/ItemTouchHelper;->mInitialTouchX:F
iget-object p1, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
invoke-virtual {p2}, Landroid/view/MotionEvent;->getY()F
move-result v2
iput v2, p1, Landroidx/recyclerview/widget/ItemTouchHelper;->mInitialTouchY:F
iget-object p1, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
invoke-virtual {p1}, Landroidx/recyclerview/widget/ItemTouchHelper;->obtainVelocityTracker()V
iget-object p1, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
iget-object v2, p1, Landroidx/recyclerview/widget/ItemTouchHelper;->mSelected:Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
if-nez v2, :cond_4
invoke-virtual {p1, p2}, Landroidx/recyclerview/widget/ItemTouchHelper;->findAnimation(Landroid/view/MotionEvent;)Landroidx/recyclerview/widget/ItemTouchHelper$RecoverAnimation;
move-result-object p1
if-eqz p1, :cond_4
iget-object v2, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
iget v3, v2, Landroidx/recyclerview/widget/ItemTouchHelper;->mInitialTouchX:F
iget v4, p1, Landroidx/recyclerview/widget/ItemTouchHelper$RecoverAnimation;->mX:F
sub-float/2addr v3, v4
iput v3, v2, Landroidx/recyclerview/widget/ItemTouchHelper;->mInitialTouchX:F
iget v3, v2, Landroidx/recyclerview/widget/ItemTouchHelper;->mInitialTouchY:F
iget v4, p1, Landroidx/recyclerview/widget/ItemTouchHelper$RecoverAnimation;->mY:F
sub-float/2addr v3, v4
iput v3, v2, Landroidx/recyclerview/widget/ItemTouchHelper;->mInitialTouchY:F
iget-object v3, p1, Landroidx/recyclerview/widget/ItemTouchHelper$RecoverAnimation;->mViewHolder:Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
invoke-virtual {v2, v3, v0}, Landroidx/recyclerview/widget/ItemTouchHelper;->endRecoverAnimation(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;Z)V
iget-object v2, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
iget-object v2, v2, Landroidx/recyclerview/widget/ItemTouchHelper;->mPendingCleanup:Ljava/util/List;
iget-object v3, p1, Landroidx/recyclerview/widget/ItemTouchHelper$RecoverAnimation;->mViewHolder:Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
iget-object v3, v3, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
invoke-interface {v2, v3}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_0
iget-object v2, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
iget-object v3, v2, Landroidx/recyclerview/widget/ItemTouchHelper;->mCallback:Landroidx/recyclerview/widget/ItemTouchHelper$Callback;
iget-object v2, v2, Landroidx/recyclerview/widget/ItemTouchHelper;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
iget-object v4, p1, Landroidx/recyclerview/widget/ItemTouchHelper$RecoverAnimation;->mViewHolder:Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
invoke-virtual {v3, v2, v4}, Landroidx/recyclerview/widget/ItemTouchHelper$Callback;->clearView(Landroidx/recyclerview/widget/RecyclerView;Landroidx/recyclerview/widget/RecyclerView$ViewHolder;)V
:cond_0
iget-object v2, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
iget-object v3, p1, Landroidx/recyclerview/widget/ItemTouchHelper$RecoverAnimation;->mViewHolder:Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
iget p1, p1, Landroidx/recyclerview/widget/ItemTouchHelper$RecoverAnimation;->mActionState:I
invoke-virtual {v2, v3, p1}, Landroidx/recyclerview/widget/ItemTouchHelper;->select(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)V
iget-object p1, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
iget v2, p1, Landroidx/recyclerview/widget/ItemTouchHelper;->mSelectedFlags:I
invoke-virtual {p1, p2, v2, v1}, Landroidx/recyclerview/widget/ItemTouchHelper;->updateDxDy(Landroid/view/MotionEvent;II)V
goto :goto_1
:cond_1
const/4 v2, 0x3
const/4 v3, -0x1
if-eq p1, v2, :cond_3
if-ne p1, v0, :cond_2
goto :goto_0
:cond_2
iget-object v2, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
iget v2, v2, Landroidx/recyclerview/widget/ItemTouchHelper;->mActivePointerId:I
if-eq v2, v3, :cond_4
invoke-virtual {p2, v2}, Landroid/view/MotionEvent;->findPointerIndex(I)I
move-result v2
if-ltz v2, :cond_4
iget-object v3, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
invoke-virtual {v3, p1, p2, v2}, Landroidx/recyclerview/widget/ItemTouchHelper;->checkSelectForSwipe(ILandroid/view/MotionEvent;I)V
goto :goto_1
:cond_3
:goto_0
iget-object p1, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
iput v3, p1, Landroidx/recyclerview/widget/ItemTouchHelper;->mActivePointerId:I
const/4 v2, 0x0
invoke-virtual {p1, v2, v1}, Landroidx/recyclerview/widget/ItemTouchHelper;->select(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)V
:cond_4
:goto_1
iget-object p1, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
iget-object p1, p1, Landroidx/recyclerview/widget/ItemTouchHelper;->mVelocityTracker:Landroid/view/VelocityTracker;
if-eqz p1, :cond_5
invoke-virtual {p1, p2}, Landroid/view/VelocityTracker;->addMovement(Landroid/view/MotionEvent;)V
:cond_5
iget-object p1, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
iget-object p1, p1, Landroidx/recyclerview/widget/ItemTouchHelper;->mSelected:Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
if-eqz p1, :cond_6
goto :goto_2
:cond_6
const/4 v0, 0x0
:goto_2
return v0
.end method
.method public onRequestDisallowInterceptTouchEvent(Z)V
.locals 2
if-nez p1, :cond_0
return-void
:cond_0
iget-object p1, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
const/4 v0, 0x0
const/4 v1, 0x0
invoke-virtual {p1, v0, v1}, Landroidx/recyclerview/widget/ItemTouchHelper;->select(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)V
return-void
.end method
.method public onTouchEvent(Landroidx/recyclerview/widget/RecyclerView;Landroid/view/MotionEvent;)V
.locals 7
.param p1 # Landroidx/recyclerview/widget/RecyclerView;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p2 # Landroid/view/MotionEvent;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
iget-object p1, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
iget-object p1, p1, Landroidx/recyclerview/widget/ItemTouchHelper;->mGestureDetector:Landroidx/core/view/GestureDetectorCompat;
invoke-virtual {p1, p2}, Landroidx/core/view/GestureDetectorCompat;->onTouchEvent(Landroid/view/MotionEvent;)Z
iget-object p1, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
iget-object p1, p1, Landroidx/recyclerview/widget/ItemTouchHelper;->mVelocityTracker:Landroid/view/VelocityTracker;
if-eqz p1, :cond_0
invoke-virtual {p1, p2}, Landroid/view/VelocityTracker;->addMovement(Landroid/view/MotionEvent;)V
:cond_0
iget-object p1, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
iget p1, p1, Landroidx/recyclerview/widget/ItemTouchHelper;->mActivePointerId:I
const/4 v0, -0x1
if-ne p1, v0, :cond_1
return-void
:cond_1
invoke-virtual {p2}, Landroid/view/MotionEvent;->getActionMasked()I
move-result p1
iget-object v1, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
iget v1, v1, Landroidx/recyclerview/widget/ItemTouchHelper;->mActivePointerId:I
invoke-virtual {p2, v1}, Landroid/view/MotionEvent;->findPointerIndex(I)I
move-result v1
if-ltz v1, :cond_2
iget-object v2, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
invoke-virtual {v2, p1, p2, v1}, Landroidx/recyclerview/widget/ItemTouchHelper;->checkSelectForSwipe(ILandroid/view/MotionEvent;I)V
:cond_2
iget-object v2, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
iget-object v3, v2, Landroidx/recyclerview/widget/ItemTouchHelper;->mSelected:Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
if-nez v3, :cond_3
return-void
:cond_3
const/4 v4, 0x0
const/4 v5, 0x1
if-eq p1, v5, :cond_8
const/4 v6, 0x2
if-eq p1, v6, :cond_7
const/4 v1, 0x3
if-eq p1, v1, :cond_6
const/4 v0, 0x6
if-eq p1, v0, :cond_4
goto :goto_1
:cond_4
invoke-virtual {p2}, Landroid/view/MotionEvent;->getActionIndex()I
move-result p1
invoke-virtual {p2, p1}, Landroid/view/MotionEvent;->getPointerId(I)I
move-result v0
iget-object v1, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
iget v1, v1, Landroidx/recyclerview/widget/ItemTouchHelper;->mActivePointerId:I
if-ne v0, v1, :cond_9
if-nez p1, :cond_5
const/4 v4, 0x1
:cond_5
iget-object v0, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
invoke-virtual {p2, v4}, Landroid/view/MotionEvent;->getPointerId(I)I
move-result v1
iput v1, v0, Landroidx/recyclerview/widget/ItemTouchHelper;->mActivePointerId:I
iget-object v0, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
iget v1, v0, Landroidx/recyclerview/widget/ItemTouchHelper;->mSelectedFlags:I
invoke-virtual {v0, p2, v1, p1}, Landroidx/recyclerview/widget/ItemTouchHelper;->updateDxDy(Landroid/view/MotionEvent;II)V
goto :goto_1
:cond_6
iget-object p1, v2, Landroidx/recyclerview/widget/ItemTouchHelper;->mVelocityTracker:Landroid/view/VelocityTracker;
if-eqz p1, :cond_8
invoke-virtual {p1}, Landroid/view/VelocityTracker;->clear()V
goto :goto_0
:cond_7
if-ltz v1, :cond_9
iget p1, v2, Landroidx/recyclerview/widget/ItemTouchHelper;->mSelectedFlags:I
invoke-virtual {v2, p2, p1, v1}, Landroidx/recyclerview/widget/ItemTouchHelper;->updateDxDy(Landroid/view/MotionEvent;II)V
iget-object p1, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
invoke-virtual {p1, v3}, Landroidx/recyclerview/widget/ItemTouchHelper;->moveIfNecessary(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;)V
iget-object p1, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
iget-object p2, p1, Landroidx/recyclerview/widget/ItemTouchHelper;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
iget-object p1, p1, Landroidx/recyclerview/widget/ItemTouchHelper;->mScrollRunnable:Ljava/lang/Runnable;
invoke-virtual {p2, p1}, Landroid/view/ViewGroup;->removeCallbacks(Ljava/lang/Runnable;)Z
iget-object p1, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
iget-object p1, p1, Landroidx/recyclerview/widget/ItemTouchHelper;->mScrollRunnable:Ljava/lang/Runnable;
invoke-interface {p1}, Ljava/lang/Runnable;->run()V
iget-object p1, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
iget-object p1, p1, Landroidx/recyclerview/widget/ItemTouchHelper;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
invoke-virtual {p1}, Landroid/view/ViewGroup;->invalidate()V
goto :goto_1
:cond_8
:goto_0
iget-object p1, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
const/4 p2, 0x0
invoke-virtual {p1, p2, v4}, Landroidx/recyclerview/widget/ItemTouchHelper;->select(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)V
iget-object p1, p0, Landroidx/recyclerview/widget/ItemTouchHelper$2;->this$0:Landroidx/recyclerview/widget/ItemTouchHelper;
iput v0, p1, Landroidx/recyclerview/widget/ItemTouchHelper;->mActivePointerId:I
:cond_9
:goto_1
return-void
.end method