apkfuckery/com.discord/smali/androidx/recyclerview/widget/SnapHelper$2.smali
2019-12-06 04:29:40 +01:00

100 lines
2.9 KiB
Smali

.class public Landroidx/recyclerview/widget/SnapHelper$2;
.super Landroidx/recyclerview/widget/LinearSmoothScroller;
.source "SnapHelper.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Landroidx/recyclerview/widget/SnapHelper;->createSnapScroller(Landroidx/recyclerview/widget/RecyclerView$LayoutManager;)Landroidx/recyclerview/widget/LinearSmoothScroller;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic this$0:Landroidx/recyclerview/widget/SnapHelper;
# direct methods
.method public constructor <init>(Landroidx/recyclerview/widget/SnapHelper;Landroid/content/Context;)V
.locals 0
iput-object p1, p0, Landroidx/recyclerview/widget/SnapHelper$2;->this$0:Landroidx/recyclerview/widget/SnapHelper;
invoke-direct {p0, p2}, Landroidx/recyclerview/widget/LinearSmoothScroller;-><init>(Landroid/content/Context;)V
return-void
.end method
# virtual methods
.method public calculateSpeedPerPixel(Landroid/util/DisplayMetrics;)F
.locals 1
iget p1, p1, Landroid/util/DisplayMetrics;->densityDpi:I
int-to-float p1, p1
const/high16 v0, 0x42c80000 # 100.0f
div-float/2addr v0, p1
return v0
.end method
.method public onTargetFound(Landroid/view/View;Landroidx/recyclerview/widget/RecyclerView$State;Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;)V
.locals 2
iget-object p2, p0, Landroidx/recyclerview/widget/SnapHelper$2;->this$0:Landroidx/recyclerview/widget/SnapHelper;
iget-object v0, p2, Landroidx/recyclerview/widget/SnapHelper;->mRecyclerView:Landroidx/recyclerview/widget/RecyclerView;
if-nez v0, :cond_0
return-void
:cond_0
invoke-virtual {v0}, Landroidx/recyclerview/widget/RecyclerView;->getLayoutManager()Landroidx/recyclerview/widget/RecyclerView$LayoutManager;
move-result-object v0
invoke-virtual {p2, v0, p1}, Landroidx/recyclerview/widget/SnapHelper;->calculateDistanceToFinalSnap(Landroidx/recyclerview/widget/RecyclerView$LayoutManager;Landroid/view/View;)[I
move-result-object p1
const/4 p2, 0x0
aget p2, p1, p2
const/4 v0, 0x1
aget p1, p1, v0
invoke-static {p2}, Ljava/lang/Math;->abs(I)I
move-result v0
invoke-static {p1}, Ljava/lang/Math;->abs(I)I
move-result v1
invoke-static {v0, v1}, Ljava/lang/Math;->max(II)I
move-result v0
invoke-virtual {p0, v0}, Landroidx/recyclerview/widget/LinearSmoothScroller;->calculateTimeForDeceleration(I)I
move-result v0
if-lez v0, :cond_1
iget-object v1, p0, Landroidx/recyclerview/widget/LinearSmoothScroller;->mDecelerateInterpolator:Landroid/view/animation/DecelerateInterpolator;
invoke-virtual {p3, p2, p1, v0, v1}, Landroidx/recyclerview/widget/RecyclerView$SmoothScroller$Action;->update(IIILandroid/view/animation/Interpolator;)V
:cond_1
return-void
.end method