a$g.smali

.class public final Lcom/scwang/smart/refresh/layout/a$g;
.super Ljava/lang/Object;
.source "SourceFile"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/scwang/smart/refresh/layout/a;->k(IZLjava/lang/Boolean;)Lcom/scwang/smart/refresh/layout/api/f;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x1
    name = null
.end annotation


# instance fields
.field public a:I

.field public final synthetic b:I

.field public final synthetic c:Ljava/lang/Boolean;

.field public final synthetic d:Z

.field public final synthetic e:Lcom/scwang/smart/refresh/layout/a;


# direct methods
.method public constructor <init>(Lcom/scwang/smart/refresh/layout/a;ILjava/lang/Boolean;Z)V
    .registers 5

    .line 1
    iput-object p1, p0, Lcom/scwang/smart/refresh/layout/a$g;->e:Lcom/scwang/smart/refresh/layout/a;

    iput p2, p0, Lcom/scwang/smart/refresh/layout/a$g;->b:I

    iput-object p3, p0, Lcom/scwang/smart/refresh/layout/a$g;->c:Ljava/lang/Boolean;

    iput-boolean p4, p0, Lcom/scwang/smart/refresh/layout/a$g;->d:Z

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 p1, 0x0

    .line 2
    iput p1, p0, Lcom/scwang/smart/refresh/layout/a$g;->a:I

    return-void
.end method


# virtual methods
.method public final run()V
    .registers 21

    move-object/from16 v0, p0

    invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;

    move-result-object v1

    invoke-static {}, Landroid/os/Looper;->myLooper()Landroid/os/Looper;

    move-result-object v2

    const/4 v3, 0x0

    const/4 v4, 0x1

    if-ne v1, v2, :cond_10

    const/4 v1, 0x1

    goto :goto_11

    :cond_10
    const/4 v1, 0x0

    :goto_11
    const-string v2, "runnable"

    const-string v5, "com/scwang/smart/refresh/layout/SmartRefreshLayout$6"

    const-string v6, "run"

    if-eqz v1, :cond_1c

    invoke-static {v6, v5, v2}, Lcom/shopee/monitor/trace/c;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 1
    :cond_1c
    iget v7, v0, Lcom/scwang/smart/refresh/layout/a$g;->a:I

    const/4 v8, 0x0

    if-nez v7, :cond_9e

    .line 2
    iget-object v9, v0, Lcom/scwang/smart/refresh/layout/a$g;->e:Lcom/scwang/smart/refresh/layout/a;

    iget-object v10, v9, Lcom/scwang/smart/refresh/layout/a;->H0:Lcom/scwang/smart/refresh/layout/constant/b;

    sget-object v11, Lcom/scwang/smart/refresh/layout/constant/b;->None:Lcom/scwang/smart/refresh/layout/constant/b;

    if-ne v10, v11, :cond_32

    iget-object v12, v9, Lcom/scwang/smart/refresh/layout/a;->I0:Lcom/scwang/smart/refresh/layout/constant/b;

    sget-object v13, Lcom/scwang/smart/refresh/layout/constant/b;->Refreshing:Lcom/scwang/smart/refresh/layout/constant/b;

    if-ne v12, v13, :cond_32

    .line 3
    iput-object v11, v9, Lcom/scwang/smart/refresh/layout/a;->I0:Lcom/scwang/smart/refresh/layout/constant/b;

    goto :goto_91

    .line 4
    :cond_32
    iget-object v12, v9, Lcom/scwang/smart/refresh/layout/a;->R0:Landroid/animation/ValueAnimator;

    if-eqz v12, :cond_68

    iget-boolean v13, v10, Lcom/scwang/smart/refresh/layout/constant/b;->isHeader:Z

    if-eqz v13, :cond_68

    iget-boolean v13, v10, Lcom/scwang/smart/refresh/layout/constant/b;->isDragging:Z

    if-nez v13, :cond_42

    sget-object v13, Lcom/scwang/smart/refresh/layout/constant/b;->RefreshReleased:Lcom/scwang/smart/refresh/layout/constant/b;

    if-ne v10, v13, :cond_68

    :cond_42
    const-wide/16 v9, 0x0

    .line 5
    invoke-virtual {v12, v9, v10}, Landroid/animation/ValueAnimator;->setDuration(J)Landroid/animation/ValueAnimator;

    .line 6
    iget-object v7, v0, Lcom/scwang/smart/refresh/layout/a$g;->e:Lcom/scwang/smart/refresh/layout/a;

    iget-object v7, v7, Lcom/scwang/smart/refresh/layout/a;->R0:Landroid/animation/ValueAnimator;

    invoke-virtual {v7}, Landroid/animation/ValueAnimator;->cancel()V

    .line 7
    iget-object v7, v0, Lcom/scwang/smart/refresh/layout/a$g;->e:Lcom/scwang/smart/refresh/layout/a;

    iput-object v8, v7, Lcom/scwang/smart/refresh/layout/a;->R0:Landroid/animation/ValueAnimator;

    .line 8
    iget-object v7, v7, Lcom/scwang/smart/refresh/layout/a;->G0:Lcom/scwang/smart/refresh/layout/a$k;

    invoke-virtual {v7, v3}, Lcom/scwang/smart/refresh/layout/a$k;->a(I)Landroid/animation/ValueAnimator;

    move-result-object v3

    if-nez v3, :cond_60

    .line 9
    iget-object v3, v0, Lcom/scwang/smart/refresh/layout/a$g;->e:Lcom/scwang/smart/refresh/layout/a;

    invoke-virtual {v3, v11}, Lcom/scwang/smart/refresh/layout/a;->p(Lcom/scwang/smart/refresh/layout/constant/b;)V

    goto :goto_91

    .line 10
    :cond_60
    iget-object v3, v0, Lcom/scwang/smart/refresh/layout/a$g;->e:Lcom/scwang/smart/refresh/layout/a;

    sget-object v7, Lcom/scwang/smart/refresh/layout/constant/b;->PullDownCanceled:Lcom/scwang/smart/refresh/layout/constant/b;

    invoke-virtual {v3, v7}, Lcom/scwang/smart/refresh/layout/a;->p(Lcom/scwang/smart/refresh/layout/constant/b;)V

    goto :goto_91

    .line 11
    :cond_68
    sget-object v8, Lcom/scwang/smart/refresh/layout/constant/b;->Refreshing:Lcom/scwang/smart/refresh/layout/constant/b;

    if-ne v10, v8, :cond_91

    iget-object v8, v9, Lcom/scwang/smart/refresh/layout/a;->B0:Lcom/scwang/smart/refresh/layout/api/d;

    if-eqz v8, :cond_91

    iget-object v8, v9, Lcom/scwang/smart/refresh/layout/a;->D0:Lcom/scwang/smart/refresh/layout/wrapper/a;

    if-eqz v8, :cond_91

    add-int/2addr v7, v4

    .line 12
    iput v7, v0, Lcom/scwang/smart/refresh/layout/a$g;->a:I

    .line 13
    iget-object v7, v9, Lcom/scwang/smart/refresh/layout/a;->F0:Landroid/os/Handler;

    iget v8, v0, Lcom/scwang/smart/refresh/layout/a$g;->b:I

    int-to-long v8, v8

    invoke-virtual {v7, v0, v8, v9}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 14
    iget-object v7, v0, Lcom/scwang/smart/refresh/layout/a$g;->e:Lcom/scwang/smart/refresh/layout/a;

    sget-object v8, Lcom/scwang/smart/refresh/layout/constant/b;->RefreshFinish:Lcom/scwang/smart/refresh/layout/constant/b;

    invoke-virtual {v7, v8}, Lcom/scwang/smart/refresh/layout/a;->p(Lcom/scwang/smart/refresh/layout/constant/b;)V

    .line 15
    iget-object v7, v0, Lcom/scwang/smart/refresh/layout/a$g;->c:Ljava/lang/Boolean;

    sget-object v8, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean;

    if-ne v7, v8, :cond_91

    .line 16
    iget-object v7, v0, Lcom/scwang/smart/refresh/layout/a$g;->e:Lcom/scwang/smart/refresh/layout/a;

    invoke-virtual {v7, v3}, Lcom/scwang/smart/refresh/layout/a;->s(Z)Lcom/scwang/smart/refresh/layout/api/f;

    .line 17
    :cond_91
    :goto_91
    iget-object v3, v0, Lcom/scwang/smart/refresh/layout/a$g;->c:Ljava/lang/Boolean;

    sget-object v7, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;

    if-ne v3, v7, :cond_15e

    .line 18
    iget-object v3, v0, Lcom/scwang/smart/refresh/layout/a$g;->e:Lcom/scwang/smart/refresh/layout/a;

    invoke-virtual {v3, v4}, Lcom/scwang/smart/refresh/layout/a;->s(Z)Lcom/scwang/smart/refresh/layout/api/f;

    goto/16 :goto_15e

    .line 19
    :cond_9e
    iget-object v4, v0, Lcom/scwang/smart/refresh/layout/a$g;->e:Lcom/scwang/smart/refresh/layout/a;

    iget-object v7, v4, Lcom/scwang/smart/refresh/layout/a;->B0:Lcom/scwang/smart/refresh/layout/api/d;

    iget-boolean v9, v0, Lcom/scwang/smart/refresh/layout/a$g;->d:Z

    invoke-interface {v7, v4, v9}, Lcom/scwang/smart/refresh/layout/api/a;->g(Lcom/scwang/smart/refresh/layout/api/f;Z)I

    move-result v4

    .line 20
    iget-object v7, v0, Lcom/scwang/smart/refresh/layout/a$g;->e:Lcom/scwang/smart/refresh/layout/a;

    invoke-static {v7}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    const v7, 0x7fffffff

    if-ge v4, v7, :cond_15e

    .line 21
    iget-object v7, v0, Lcom/scwang/smart/refresh/layout/a$g;->e:Lcom/scwang/smart/refresh/layout/a;

    iget-boolean v9, v7, Lcom/scwang/smart/refresh/layout/a;->n:Z

    if-nez v9, :cond_bc

    iget-boolean v7, v7, Lcom/scwang/smart/refresh/layout/a;->n0:Z

    if-eqz v7, :cond_122

    .line 22
    :cond_bc
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v17

    .line 23
    iget-object v7, v0, Lcom/scwang/smart/refresh/layout/a$g;->e:Lcom/scwang/smart/refresh/layout/a;

    iget-boolean v9, v7, Lcom/scwang/smart/refresh/layout/a;->n:Z

    if-eqz v9, :cond_102

    .line 24
    iget v9, v7, Lcom/scwang/smart/refresh/layout/a;->k:F

    iput v9, v7, Lcom/scwang/smart/refresh/layout/a;->i:F

    .line 25
    iput v3, v7, Lcom/scwang/smart/refresh/layout/a;->d:I

    .line 26
    iput-boolean v3, v7, Lcom/scwang/smart/refresh/layout/a;->n:Z

    const/4 v13, 0x0

    .line 27
    iget v14, v7, Lcom/scwang/smart/refresh/layout/a;->j:F

    iget v10, v7, Lcom/scwang/smart/refresh/layout/a;->b:I

    int-to-float v10, v10

    add-float/2addr v9, v10

    iget v10, v7, Lcom/scwang/smart/refresh/layout/a;->a:I

    mul-int/lit8 v10, v10, 0x2

    int-to-float v10, v10

    sub-float v15, v9, v10

    const/16 v19, 0x0

    const/16 v16, 0x0

    move-wide/from16 v9, v17

    move-wide/from16 v11, v17

    invoke-static/range {v9 .. v16}, Landroid/view/MotionEvent;->obtain(JJIFFI)Landroid/view/MotionEvent;

    move-result-object v9

    invoke-static {v7, v9}, Lcom/scwang/smart/refresh/layout/a;->a(Lcom/scwang/smart/refresh/layout/a;Landroid/view/MotionEvent;)Z

    .line 28
    iget-object v7, v0, Lcom/scwang/smart/refresh/layout/a$g;->e:Lcom/scwang/smart/refresh/layout/a;

    const/4 v13, 0x2

    iget v14, v7, Lcom/scwang/smart/refresh/layout/a;->j:F

    iget v9, v7, Lcom/scwang/smart/refresh/layout/a;->k:F

    iget v10, v7, Lcom/scwang/smart/refresh/layout/a;->b:I

    int-to-float v10, v10

    add-float v15, v9, v10

    move-wide/from16 v9, v17

    move/from16 v16, v19

    invoke-static/range {v9 .. v16}, Landroid/view/MotionEvent;->obtain(JJIFFI)Landroid/view/MotionEvent;

    move-result-object v9

    invoke-static {v7, v9}, Lcom/scwang/smart/refresh/layout/a;->b(Lcom/scwang/smart/refresh/layout/a;Landroid/view/MotionEvent;)Z

    .line 29
    :cond_102
    iget-object v7, v0, Lcom/scwang/smart/refresh/layout/a$g;->e:Lcom/scwang/smart/refresh/layout/a;

    iget-boolean v9, v7, Lcom/scwang/smart/refresh/layout/a;->n0:Z

    if-eqz v9, :cond_122

    .line 30
    iput v3, v7, Lcom/scwang/smart/refresh/layout/a;->m0:I

    const/4 v13, 0x1

    .line 31
    iget v14, v7, Lcom/scwang/smart/refresh/layout/a;->j:F

    iget v15, v7, Lcom/scwang/smart/refresh/layout/a;->k:F

    const/16 v16, 0x0

    move-wide/from16 v9, v17

    move-wide/from16 v11, v17

    invoke-static/range {v9 .. v16}, Landroid/view/MotionEvent;->obtain(JJIFFI)Landroid/view/MotionEvent;

    move-result-object v9

    invoke-static {v7, v9}, Lcom/scwang/smart/refresh/layout/a;->c(Lcom/scwang/smart/refresh/layout/a;Landroid/view/MotionEvent;)Z

    .line 32
    iget-object v7, v0, Lcom/scwang/smart/refresh/layout/a$g;->e:Lcom/scwang/smart/refresh/layout/a;

    iput-boolean v3, v7, Lcom/scwang/smart/refresh/layout/a;->n0:Z

    .line 33
    iput v3, v7, Lcom/scwang/smart/refresh/layout/a;->d:I

    .line 34
    :cond_122
    iget-object v7, v0, Lcom/scwang/smart/refresh/layout/a$g;->e:Lcom/scwang/smart/refresh/layout/a;

    iget v9, v7, Lcom/scwang/smart/refresh/layout/a;->b:I

    if-lez v9, :cond_146

    .line 35
    iget-object v9, v7, Lcom/scwang/smart/refresh/layout/a;->z:Lcom/scwang/smart/refresh/layout/util/b;

    iget v10, v7, Lcom/scwang/smart/refresh/layout/a;->f:I

    invoke-virtual {v7, v3, v4, v9, v10}, Lcom/scwang/smart/refresh/layout/a;->g(IILandroid/view/animation/Interpolator;I)Landroid/animation/ValueAnimator;

    move-result-object v3

    .line 36
    iget-object v4, v0, Lcom/scwang/smart/refresh/layout/a$g;->e:Lcom/scwang/smart/refresh/layout/a;

    iget-boolean v7, v4, Lcom/scwang/smart/refresh/layout/a;->W:Z

    if-eqz v7, :cond_13e

    .line 37
    iget-object v7, v4, Lcom/scwang/smart/refresh/layout/a;->D0:Lcom/scwang/smart/refresh/layout/wrapper/a;

    iget v4, v4, Lcom/scwang/smart/refresh/layout/a;->b:I

    invoke-interface {v7, v4}, Lcom/scwang/smart/refresh/layout/api/b;->a(I)Landroid/animation/ValueAnimator$AnimatorUpdateListener;

    move-result-object v8

    :cond_13e
    if-eqz v3, :cond_15e

    if-eqz v8, :cond_15e

    .line 38
    invoke-virtual {v3, v8}, Landroid/animation/ValueAnimator;->addUpdateListener(Landroid/animation/ValueAnimator$AnimatorUpdateListener;)V

    goto :goto_15e

    :cond_146
    if-gez v9, :cond_150

    .line 39
    iget-object v8, v7, Lcom/scwang/smart/refresh/layout/a;->z:Lcom/scwang/smart/refresh/layout/util/b;

    iget v9, v7, Lcom/scwang/smart/refresh/layout/a;->f:I

    invoke-virtual {v7, v3, v4, v8, v9}, Lcom/scwang/smart/refresh/layout/a;->g(IILandroid/view/animation/Interpolator;I)Landroid/animation/ValueAnimator;

    goto :goto_15e

    .line 40
    :cond_150
    iget-object v4, v7, Lcom/scwang/smart/refresh/layout/a;->G0:Lcom/scwang/smart/refresh/layout/a$k;

    invoke-virtual {v4, v3, v3}, Lcom/scwang/smart/refresh/layout/a$k;->b(IZ)Lcom/scwang/smart/refresh/layout/api/e;

    .line 41
    iget-object v3, v0, Lcom/scwang/smart/refresh/layout/a$g;->e:Lcom/scwang/smart/refresh/layout/a;

    iget-object v3, v3, Lcom/scwang/smart/refresh/layout/a;->G0:Lcom/scwang/smart/refresh/layout/a$k;

    sget-object v4, Lcom/scwang/smart/refresh/layout/constant/b;->None:Lcom/scwang/smart/refresh/layout/constant/b;

    invoke-virtual {v3, v4}, Lcom/scwang/smart/refresh/layout/a$k;->c(Lcom/scwang/smart/refresh/layout/constant/b;)V

    :cond_15e
    :goto_15e
    if-eqz v1, :cond_163

    .line 42
    invoke-static {v6, v5, v2}, Lcom/shopee/monitor/trace/c;->b(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    :cond_163
    return-void
.end method