CountDownTimer.smali

.class public abstract Lio/rong/common/CountDownTimer;
.super Ljava/lang/Object;
.source "CountDownTimer.java"


# static fields
.field private static final MSG:I = 0x1


# instance fields
.field private isStart:Z

.field private mCancelled:Z

.field private final mCountdownInterval:J

.field private mHandler:Landroid/os/Handler;

.field private final mMillisInFuture:J

.field private mStopTimeInFuture:J


# direct methods
.method public constructor <init>(JJ)V
    .registers 6

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

    const/4 v0, 0x0

    .line 2
    iput-boolean v0, p0, Lio/rong/common/CountDownTimer;->mCancelled:Z

    .line 3
    new-instance v0, Lio/rong/common/CountDownTimer$1;

    invoke-direct {v0, p0}, Lio/rong/common/CountDownTimer$1;-><init>(Lio/rong/common/CountDownTimer;)V

    iput-object v0, p0, Lio/rong/common/CountDownTimer;->mHandler:Landroid/os/Handler;

    .line 4
    iput-wide p1, p0, Lio/rong/common/CountDownTimer;->mMillisInFuture:J

    .line 5
    iput-wide p3, p0, Lio/rong/common/CountDownTimer;->mCountdownInterval:J

    return-void
.end method

.method static synthetic access$000(Lio/rong/common/CountDownTimer;)Z
    .registers 1

    .line 1
    iget-boolean p0, p0, Lio/rong/common/CountDownTimer;->mCancelled:Z

    return p0
.end method

.method static synthetic access$100(Lio/rong/common/CountDownTimer;)J
    .registers 3

    .line 1
    iget-wide v0, p0, Lio/rong/common/CountDownTimer;->mStopTimeInFuture:J

    return-wide v0
.end method

.method static synthetic access$200(Lio/rong/common/CountDownTimer;)J
    .registers 3

    .line 1
    iget-wide v0, p0, Lio/rong/common/CountDownTimer;->mCountdownInterval:J

    return-wide v0
.end method


# virtual methods
.method public final declared-synchronized cancel()V
    .registers 3

    monitor-enter p0

    const/4 v0, 0x1

    .line 1
    :try_start_2
    iput-boolean v0, p0, Lio/rong/common/CountDownTimer;->mCancelled:Z

    const/4 v1, 0x0

    .line 2
    iput-boolean v1, p0, Lio/rong/common/CountDownTimer;->isStart:Z

    .line 3
    iget-object v1, p0, Lio/rong/common/CountDownTimer;->mHandler:Landroid/os/Handler;

    invoke-virtual {v1, v0}, Landroid/os/Handler;->removeMessages(I)V
    :try_end_c
    .catchall {:try_start_2 .. :try_end_c} :catchall_e

    .line 4
    monitor-exit p0

    return-void

    :catchall_e
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public isStart()Z
    .registers 2

    .line 1
    iget-boolean v0, p0, Lio/rong/common/CountDownTimer;->isStart:Z

    return v0
.end method

.method public abstract onFinish()V
.end method

.method public abstract onTick(J)V
.end method

.method public final declared-synchronized start()Lio/rong/common/CountDownTimer;
    .registers 7

    monitor-enter p0

    const/4 v0, 0x0

    .line 1
    :try_start_2
    iput-boolean v0, p0, Lio/rong/common/CountDownTimer;->mCancelled:Z

    const/4 v0, 0x1

    .line 2
    iput-boolean v0, p0, Lio/rong/common/CountDownTimer;->isStart:Z

    .line 3
    iget-wide v1, p0, Lio/rong/common/CountDownTimer;->mMillisInFuture:J

    const-wide/16 v3, 0x0

    cmp-long v5, v1, v3

    if-gtz v5, :cond_14

    .line 4
    invoke-virtual {p0}, Lio/rong/common/CountDownTimer;->onFinish()V
    :try_end_12
    .catchall {:try_start_2 .. :try_end_12} :catchall_2a

    .line 5
    monitor-exit p0

    return-object p0

    .line 6
    :cond_14
    :try_start_14
    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v1

    iget-wide v3, p0, Lio/rong/common/CountDownTimer;->mMillisInFuture:J

    add-long/2addr v1, v3

    iput-wide v1, p0, Lio/rong/common/CountDownTimer;->mStopTimeInFuture:J

    .line 7
    iget-object v1, p0, Lio/rong/common/CountDownTimer;->mHandler:Landroid/os/Handler;

    iget-object v2, p0, Lio/rong/common/CountDownTimer;->mHandler:Landroid/os/Handler;

    invoke-virtual {v2, v0}, Landroid/os/Handler;->obtainMessage(I)Landroid/os/Message;

    move-result-object v0

    invoke-virtual {v1, v0}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z
    :try_end_28
    .catchall {:try_start_14 .. :try_end_28} :catchall_2a

    .line 8
    monitor-exit p0

    return-object p0

    :catchall_2a
    move-exception v0

    monitor-exit p0

    throw v0
.end method