p.smali

.class public Lcom/fulishe/fs/newvideo/cache/p;
.super Ljava/lang/Object;
.source ""


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/fulishe/fs/newvideo/cache/p$b;,
        Lcom/fulishe/fs/newvideo/cache/p$a;
    }
.end annotation


# instance fields
.field public final d:Lcom/fulishe/fs/newvideo/cache/s;

.field public final e:Lcom/fulishe/fs/newvideo/cache/c;

.field public final f:Ljava/lang/Object;

.field public final g:Ljava/lang/Object;

.field public final h:Ljava/util/concurrent/atomic/AtomicInteger;

.field public i:Lcom/fulishe/fs/newvideo/cache/r;

.field public volatile j:Ljava/lang/Thread;

.field public volatile k:Z

.field public volatile l:I

.field public m:Lcom/fulishe/fs/newvideo/cache/p$a;


# direct methods
.method public constructor <init>(Lcom/fulishe/fs/newvideo/cache/s;Lcom/fulishe/fs/newvideo/cache/c;)V
    .registers 4

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

    new-instance v0, Ljava/lang/Object;

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

    iput-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->f:Ljava/lang/Object;

    new-instance v0, Ljava/lang/Object;

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

    iput-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->g:Ljava/lang/Object;

    const/4 v0, -0x1

    iput v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->l:I

    invoke-static {p1}, Lcom/fulishe/fs/newvideo/cache/o;->a(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/fulishe/fs/newvideo/cache/s;

    iput-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->d:Lcom/fulishe/fs/newvideo/cache/s;

    invoke-static {p2}, Lcom/fulishe/fs/newvideo/cache/o;->a(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/fulishe/fs/newvideo/cache/c;

    iput-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->e:Lcom/fulishe/fs/newvideo/cache/c;

    new-instance v0, Ljava/util/concurrent/atomic/AtomicInteger;

    invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicInteger;-><init>()V

    iput-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->h:Ljava/util/concurrent/atomic/AtomicInteger;

    return-void
.end method

.method public static a(Lcom/fulishe/fs/newvideo/cache/p;)V
    .registers 1

    invoke-direct {p0}, Lcom/fulishe/fs/newvideo/cache/p;->e()V

    return-void
.end method

.method private b()V
    .registers 5

    iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->h:Ljava/util/concurrent/atomic/AtomicInteger;

    invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I

    move-result v0

    const/4 v1, 0x1

    if-ge v0, v1, :cond_a

    return-void

    :cond_a
    iget-object v1, p0, Lcom/fulishe/fs/newvideo/cache/p;->h:Ljava/util/concurrent/atomic/AtomicInteger;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Ljava/util/concurrent/atomic/AtomicInteger;->set(I)V

    new-instance v1, Lcom/fulishe/fs/newvideo/cache/m;

    new-instance v2, Ljava/lang/StringBuilder;

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

    const-string v3, "Error reading source "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v2, " times"

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Lcom/fulishe/fs/newvideo/cache/m;-><init>(Ljava/lang/String;)V

    throw v1
.end method

.method private b(JJ)V
    .registers 8

    invoke-virtual {p0, p1, p2, p3, p4}, Lcom/fulishe/fs/newvideo/cache/p;->a(JJ)V

    iget-object v1, p0, Lcom/fulishe/fs/newvideo/cache/p;->f:Ljava/lang/Object;

    monitor-enter v1

    :try_start_6
    iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->f:Ljava/lang/Object;

    invoke-virtual {v0}, Ljava/lang/Object;->notifyAll()V

    monitor-exit v1

    return-void

    :catchall_d
    move-exception v0

    monitor-exit v1
    :try_end_f
    .catchall {:try_start_6 .. :try_end_f} :catchall_d

    throw v0
.end method

.method private declared-synchronized c()V
    .registers 5

    monitor-enter p0

    :try_start_1
    iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->j:Ljava/lang/Thread;

    if-eqz v0, :cond_46

    iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->j:Ljava/lang/Thread;

    invoke-virtual {v0}, Ljava/lang/Thread;->getState()Ljava/lang/Thread$State;

    move-result-object v0

    sget-object v1, Ljava/lang/Thread$State;->TERMINATED:Ljava/lang/Thread$State;

    if-eq v0, v1, :cond_46

    const/4 v0, 0x1

    :goto_10
    iget-boolean v1, p0, Lcom/fulishe/fs/newvideo/cache/p;->k:Z

    if-nez v1, :cond_44

    iget-object v1, p0, Lcom/fulishe/fs/newvideo/cache/p;->e:Lcom/fulishe/fs/newvideo/cache/c;

    invoke-interface {v1}, Lcom/fulishe/fs/newvideo/cache/c;->d()Z

    move-result v1

    if-nez v1, :cond_44

    if-nez v0, :cond_44

    new-instance v0, Ljava/lang/Thread;

    new-instance v1, Lcom/fulishe/fs/newvideo/cache/p$b;

    invoke-direct {v1, p0}, Lcom/fulishe/fs/newvideo/cache/p$b;-><init>(Lcom/fulishe/fs/newvideo/cache/p;)V

    new-instance v2, Ljava/lang/StringBuilder;

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

    const-string v3, "Source reader for "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget-object v3, p0, Lcom/fulishe/fs/newvideo/cache/p;->d:Lcom/fulishe/fs/newvideo/cache/s;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v0, v1, v2}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;Ljava/lang/String;)V

    iput-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->j:Ljava/lang/Thread;

    iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->j:Ljava/lang/Thread;

    invoke-virtual {v0}, Ljava/lang/Thread;->start()V
    :try_end_44
    .catchall {:try_start_1 .. :try_end_44} :catchall_48

    :cond_44
    monitor-exit p0

    return-void

    :cond_46
    const/4 v0, 0x0

    goto :goto_10

    :catchall_48
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method private d()V
    .registers 5

    iget-object v1, p0, Lcom/fulishe/fs/newvideo/cache/p;->f:Ljava/lang/Object;

    monitor-enter v1

    :try_start_3
    iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->f:Ljava/lang/Object;

    const-wide/16 v2, 0x3e8

    invoke-virtual {v0, v2, v3}, Ljava/lang/Object;->wait(J)V
    :try_end_a
    .catch Ljava/lang/InterruptedException; {:try_start_3 .. :try_end_a} :catch_c
    .catchall {:try_start_3 .. :try_end_a} :catchall_15

    :try_start_a
    monitor-exit v1

    return-void

    :catch_c
    move-exception v0

    new-instance v2, Lcom/fulishe/fs/newvideo/cache/m;

    const-string v3, "Waiting source data is interrupted!"

    invoke-direct {v2, v3, v0}, Lcom/fulishe/fs/newvideo/cache/m;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V

    throw v2

    :catchall_15
    move-exception v0

    monitor-exit v1
    :try_end_17
    .catchall {:try_start_a .. :try_end_17} :catchall_15

    throw v0
.end method

.method private e()V
    .registers 14

    const-wide/16 v2, 0x0

    :try_start_2
    iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->e:Lcom/fulishe/fs/newvideo/cache/c;

    invoke-interface {v0}, Lcom/fulishe/fs/newvideo/cache/c;->a()J
    :try_end_7
    .catchall {:try_start_2 .. :try_end_7} :catchall_121

    move-result-wide v4

    :try_start_8
    iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->d:Lcom/fulishe/fs/newvideo/cache/s;

    invoke-interface {v0, v4, v5}, Lcom/fulishe/fs/newvideo/cache/s;->a(J)V

    iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->d:Lcom/fulishe/fs/newvideo/cache/s;

    invoke-interface {v0}, Lcom/fulishe/fs/newvideo/cache/s;->a()J

    move-result-wide v2

    const/16 v0, 0x2000

    new-array v6, v0, [B
    :try_end_17
    .catchall {:try_start_8 .. :try_end_17} :catchall_125

    move-wide v0, v4

    :goto_18
    :try_start_18
    iget-object v4, p0, Lcom/fulishe/fs/newvideo/cache/p;->d:Lcom/fulishe/fs/newvideo/cache/s;

    invoke-interface {v4, v6}, Lcom/fulishe/fs/newvideo/cache/s;->a([B)I

    move-result v4

    const/4 v5, -0x1

    if-eq v4, v5, :cond_f7

    iget-object v5, p0, Lcom/fulishe/fs/newvideo/cache/p;->g:Ljava/lang/Object;

    monitor-enter v5
    :try_end_24
    .catchall {:try_start_18 .. :try_end_24} :catchall_b9

    :try_start_24
    invoke-direct {p0}, Lcom/fulishe/fs/newvideo/cache/p;->h()Z

    move-result v7

    if-eqz v7, :cond_32

    monitor-exit v5
    :try_end_2b
    .catchall {:try_start_24 .. :try_end_2b} :catchall_b6

    invoke-direct {p0}, Lcom/fulishe/fs/newvideo/cache/p;->i()V

    invoke-direct {p0, v0, v1, v2, v3}, Lcom/fulishe/fs/newvideo/cache/p;->b(JJ)V

    :goto_31
    return-void

    :cond_32
    :try_start_32
    iget-object v7, p0, Lcom/fulishe/fs/newvideo/cache/p;->e:Lcom/fulishe/fs/newvideo/cache/c;

    invoke-interface {v7, v6, v4}, Lcom/fulishe/fs/newvideo/cache/c;->a([BI)V
    :try_end_37
    .catchall {:try_start_32 .. :try_end_37} :catchall_b6

    const-string v7, "ProxyCache"

    :try_start_39
    new-instance v8, Ljava/lang/StringBuilder;

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

    const-string v9, "cache.available()="

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    iget-object v9, p0, Lcom/fulishe/fs/newvideo/cache/p;->e:Lcom/fulishe/fs/newvideo/cache/c;

    invoke-interface {v9}, Lcom/fulishe/fs/newvideo/cache/c;->a()J

    move-result-wide v10

    invoke-virtual {v8, v10, v11}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, ",preloadSize="

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    iget-object v9, p0, Lcom/fulishe/fs/newvideo/cache/p;->d:Lcom/fulishe/fs/newvideo/cache/s;

    invoke-interface {v9}, Lcom/fulishe/fs/newvideo/cache/s;->c()I

    move-result v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, ",isPreload="

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    iget-object v9, p0, Lcom/fulishe/fs/newvideo/cache/p;->d:Lcom/fulishe/fs/newvideo/cache/s;

    invoke-interface {v9}, Lcom/fulishe/fs/newvideo/cache/s;->d()Z

    move-result v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v7, v8}, Lcom/fulishe/shadow/base/p;->a(Ljava/lang/String;Ljava/lang/String;)V

    iget-object v7, p0, Lcom/fulishe/fs/newvideo/cache/p;->e:Lcom/fulishe/fs/newvideo/cache/c;

    invoke-interface {v7}, Lcom/fulishe/fs/newvideo/cache/c;->a()J

    move-result-wide v8

    iget-object v7, p0, Lcom/fulishe/fs/newvideo/cache/p;->d:Lcom/fulishe/fs/newvideo/cache/s;

    invoke-interface {v7}, Lcom/fulishe/fs/newvideo/cache/s;->c()I

    move-result v7

    int-to-long v10, v7

    cmp-long v7, v8, v10

    if-lez v7, :cond_ad

    iget-object v7, p0, Lcom/fulishe/fs/newvideo/cache/p;->d:Lcom/fulishe/fs/newvideo/cache/s;

    invoke-interface {v7}, Lcom/fulishe/fs/newvideo/cache/s;->d()Z

    move-result v7

    if-eqz v7, :cond_ad

    iget-object v7, p0, Lcom/fulishe/fs/newvideo/cache/p;->m:Lcom/fulishe/fs/newvideo/cache/p$a;

    if-eqz v7, :cond_aa

    const-string v7, "ProxyCache"

    const-string v8, "preLoadCompleteListener \u88ab\u56de\u8c03\u4e86...."

    invoke-static {v7, v8}, Lcom/fulishe/shadow/base/p;->a(Ljava/lang/String;Ljava/lang/String;)V

    iget-object v7, p0, Lcom/fulishe/fs/newvideo/cache/p;->m:Lcom/fulishe/fs/newvideo/cache/p$a;

    iget-object v8, p0, Lcom/fulishe/fs/newvideo/cache/p;->d:Lcom/fulishe/fs/newvideo/cache/s;

    invoke-interface {v8}, Lcom/fulishe/fs/newvideo/cache/s;->f()Ljava/lang/String;

    move-result-object v8

    iget-object v9, p0, Lcom/fulishe/fs/newvideo/cache/p;->e:Lcom/fulishe/fs/newvideo/cache/c;

    invoke-interface {v9}, Lcom/fulishe/fs/newvideo/cache/c;->a()J

    move-result-wide v10

    invoke-interface {v7, v8, v10, v11}, Lcom/fulishe/fs/newvideo/cache/p$a;->a(Ljava/lang/String;J)V

    :cond_aa
    const/4 v7, 0x1

    iput-boolean v7, p0, Lcom/fulishe/fs/newvideo/cache/p;->k:Z

    :cond_ad
    monitor-exit v5
    :try_end_ae
    .catchall {:try_start_39 .. :try_end_ae} :catchall_b6

    int-to-long v4, v4

    add-long/2addr v4, v0

    :try_start_b0
    invoke-direct {p0, v4, v5, v2, v3}, Lcom/fulishe/fs/newvideo/cache/p;->b(JJ)V
    :try_end_b3
    .catchall {:try_start_b0 .. :try_end_b3} :catchall_125

    move-wide v0, v4

    goto/16 :goto_18

    :catchall_b6
    move-exception v4

    :try_start_b7
    monitor-exit v5
    :try_end_b8
    .catchall {:try_start_b7 .. :try_end_b8} :catchall_b6

    :try_start_b8
    throw v4
    :try_end_b9
    .catchall {:try_start_b8 .. :try_end_b9} :catchall_b9

    :catchall_b9
    move-exception v4

    :goto_ba
    :try_start_ba
    invoke-static {}, Lcom/fulishe/shadow/base/p;->b()Z

    move-result v5

    if-eqz v5, :cond_c3

    invoke-virtual {v4}, Ljava/lang/Throwable;->printStackTrace()V
    :try_end_c3
    .catchall {:try_start_ba .. :try_end_c3} :catchall_11f

    :cond_c3
    const-string v5, "ProxyCache"

    :try_start_c5
    new-instance v6, Ljava/lang/StringBuilder;

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

    const-string v7, "e="

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v4}, Ljava/lang/Throwable;->getStackTrace()[Ljava/lang/StackTraceElement;

    move-result-object v7

    invoke-static {v7}, Ljava/util/Arrays;->toString([Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v5, v6}, Lcom/fulishe/shadow/base/p;->a(Ljava/lang/String;Ljava/lang/String;)V

    iget-object v5, p0, Lcom/fulishe/fs/newvideo/cache/p;->h:Ljava/util/concurrent/atomic/AtomicInteger;

    invoke-virtual {v5}, Ljava/util/concurrent/atomic/AtomicInteger;->incrementAndGet()I

    invoke-virtual {p0, v4}, Lcom/fulishe/fs/newvideo/cache/p;->a(Ljava/lang/Throwable;)V

    iget-object v4, p0, Lcom/fulishe/fs/newvideo/cache/p;->m:Lcom/fulishe/fs/newvideo/cache/p$a;
    :try_end_ed
    .catchall {:try_start_c5 .. :try_end_ed} :catchall_11f

    if-nez v4, :cond_106

    :cond_ef
    :goto_ef
    invoke-direct {p0}, Lcom/fulishe/fs/newvideo/cache/p;->i()V

    invoke-direct {p0, v0, v1, v2, v3}, Lcom/fulishe/fs/newvideo/cache/p;->b(JJ)V

    goto/16 :goto_31

    :cond_f7
    :try_start_f7
    iget-object v4, p0, Lcom/fulishe/fs/newvideo/cache/p;->d:Lcom/fulishe/fs/newvideo/cache/s;

    invoke-interface {v4}, Lcom/fulishe/fs/newvideo/cache/s;->d()Z

    move-result v4

    if-nez v4, :cond_ef

    invoke-direct {p0}, Lcom/fulishe/fs/newvideo/cache/p;->g()V

    invoke-direct {p0}, Lcom/fulishe/fs/newvideo/cache/p;->f()V
    :try_end_105
    .catchall {:try_start_f7 .. :try_end_105} :catchall_b9

    goto :goto_ef

    :cond_106
    :try_start_106
    const-string v4, "onCacheAvailables"

    const-string v5, "\u5931\u8d25\u4e5f\u5f97\u56de\u8c03\uff0c\u65b9\u4fbf\u5916\u90e8\u5220\u9664\u76f8\u5173\u8d44\u6e90"

    invoke-static {v4, v5}, Lcom/fulishe/shadow/base/p;->a(Ljava/lang/String;Ljava/lang/String;)V

    iget-object v4, p0, Lcom/fulishe/fs/newvideo/cache/p;->m:Lcom/fulishe/fs/newvideo/cache/p$a;

    iget-object v5, p0, Lcom/fulishe/fs/newvideo/cache/p;->d:Lcom/fulishe/fs/newvideo/cache/s;

    invoke-interface {v5}, Lcom/fulishe/fs/newvideo/cache/s;->f()Ljava/lang/String;

    move-result-object v5

    iget-object v6, p0, Lcom/fulishe/fs/newvideo/cache/p;->e:Lcom/fulishe/fs/newvideo/cache/c;

    invoke-interface {v6}, Lcom/fulishe/fs/newvideo/cache/c;->a()J

    move-result-wide v6

    invoke-interface {v4, v5, v6, v7}, Lcom/fulishe/fs/newvideo/cache/p$a;->a(Ljava/lang/String;J)V
    :try_end_11e
    .catchall {:try_start_106 .. :try_end_11e} :catchall_11f

    goto :goto_ef

    :catchall_11f
    move-exception v4

    goto :goto_ef

    :catchall_121
    move-exception v0

    move-object v4, v0

    move-wide v0, v2

    goto :goto_ba

    :catchall_125
    move-exception v0

    move-object v12, v0

    move-wide v0, v4

    move-object v4, v12

    goto :goto_ba
.end method

.method private f()V
    .registers 2

    const/16 v0, 0x64

    iput v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->l:I

    iget v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->l:I

    invoke-virtual {p0, v0}, Lcom/fulishe/fs/newvideo/cache/p;->a(I)V

    return-void
.end method

.method private g()V
    .registers 7

    iget-object v1, p0, Lcom/fulishe/fs/newvideo/cache/p;->g:Ljava/lang/Object;

    monitor-enter v1

    :try_start_3
    invoke-direct {p0}, Lcom/fulishe/fs/newvideo/cache/p;->h()Z

    move-result v0

    if-nez v0, :cond_1e

    iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->e:Lcom/fulishe/fs/newvideo/cache/c;

    invoke-interface {v0}, Lcom/fulishe/fs/newvideo/cache/c;->a()J

    move-result-wide v2

    iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->d:Lcom/fulishe/fs/newvideo/cache/s;

    invoke-interface {v0}, Lcom/fulishe/fs/newvideo/cache/s;->a()J

    move-result-wide v4

    cmp-long v0, v2, v4

    if-nez v0, :cond_1e

    iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->e:Lcom/fulishe/fs/newvideo/cache/c;

    invoke-interface {v0}, Lcom/fulishe/fs/newvideo/cache/c;->c()V

    :cond_1e
    monitor-exit v1

    return-void

    :catchall_20
    move-exception v0

    monitor-exit v1
    :try_end_22
    .catchall {:try_start_3 .. :try_end_22} :catchall_20

    throw v0
.end method

.method private h()Z
    .registers 2

    invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Thread;->isInterrupted()Z

    move-result v0

    if-nez v0, :cond_e

    iget-boolean v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->k:Z

    if-eqz v0, :cond_10

    :cond_e
    const/4 v0, 0x1

    :goto_f
    return v0

    :cond_10
    const/4 v0, 0x0

    goto :goto_f
.end method

.method private i()V
    .registers 5

    :try_start_0
    iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->d:Lcom/fulishe/fs/newvideo/cache/s;

    invoke-interface {v0}, Lcom/fulishe/fs/newvideo/cache/s;->b()V
    :try_end_5
    .catch Lcom/fulishe/fs/newvideo/cache/m; {:try_start_0 .. :try_end_5} :catch_6

    :goto_5
    return-void

    :catch_6
    move-exception v0

    new-instance v1, Lcom/fulishe/fs/newvideo/cache/m;

    new-instance v2, Ljava/lang/StringBuilder;

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

    const-string v3, "Error closing source "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget-object v3, p0, Lcom/fulishe/fs/newvideo/cache/p;->d:Lcom/fulishe/fs/newvideo/cache/s;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2, v0}, Lcom/fulishe/fs/newvideo/cache/m;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V

    invoke-virtual {p0, v1}, Lcom/fulishe/fs/newvideo/cache/p;->a(Ljava/lang/Throwable;)V

    goto :goto_5
.end method


# virtual methods
.method public a([BJI)I
    .registers 11

    const/16 v4, 0x64

    invoke-static {p1, p2, p3, p4}, Lcom/fulishe/fs/newvideo/cache/q;->a([BJI)V

    :goto_5
    iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->e:Lcom/fulishe/fs/newvideo/cache/c;

    invoke-interface {v0}, Lcom/fulishe/fs/newvideo/cache/c;->d()Z

    move-result v0

    if-nez v0, :cond_42

    iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->e:Lcom/fulishe/fs/newvideo/cache/c;

    invoke-interface {v0}, Lcom/fulishe/fs/newvideo/cache/c;->a()J

    move-result-wide v0

    int-to-long v2, p4

    add-long/2addr v2, p2

    cmp-long v0, v0, v2

    if-gez v0, :cond_42

    iget-boolean v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->k:Z

    if-nez v0, :cond_42

    iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->e:Lcom/fulishe/fs/newvideo/cache/c;

    invoke-interface {v0}, Lcom/fulishe/fs/newvideo/cache/c;->a()J

    move-result-wide v0

    iget-object v2, p0, Lcom/fulishe/fs/newvideo/cache/p;->d:Lcom/fulishe/fs/newvideo/cache/s;

    invoke-interface {v2}, Lcom/fulishe/fs/newvideo/cache/s;->c()I

    move-result v2

    int-to-long v2, v2

    cmp-long v0, v0, v2

    if-lez v0, :cond_38

    iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->d:Lcom/fulishe/fs/newvideo/cache/s;

    invoke-interface {v0}, Lcom/fulishe/fs/newvideo/cache/s;->d()Z

    move-result v0

    if-eqz v0, :cond_38

    const/4 v0, -0x1

    :cond_37
    :goto_37
    return v0

    :cond_38
    invoke-direct {p0}, Lcom/fulishe/fs/newvideo/cache/p;->c()V

    invoke-direct {p0}, Lcom/fulishe/fs/newvideo/cache/p;->d()V

    invoke-direct {p0}, Lcom/fulishe/fs/newvideo/cache/p;->b()V

    goto :goto_5

    :cond_42
    iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->e:Lcom/fulishe/fs/newvideo/cache/c;

    invoke-interface {v0, p1, p2, p3, p4}, Lcom/fulishe/fs/newvideo/cache/c;->a([BJI)I

    move-result v0

    iget-object v1, p0, Lcom/fulishe/fs/newvideo/cache/p;->e:Lcom/fulishe/fs/newvideo/cache/c;

    invoke-interface {v1}, Lcom/fulishe/fs/newvideo/cache/c;->d()Z

    move-result v1

    if-eqz v1, :cond_37

    iget v1, p0, Lcom/fulishe/fs/newvideo/cache/p;->l:I

    if-eq v1, v4, :cond_37

    iput v4, p0, Lcom/fulishe/fs/newvideo/cache/p;->l:I

    invoke-virtual {p0, v4}, Lcom/fulishe/fs/newvideo/cache/p;->a(I)V

    goto :goto_37
.end method

.method public a()V
    .registers 5

    iget-object v1, p0, Lcom/fulishe/fs/newvideo/cache/p;->g:Ljava/lang/Object;

    monitor-enter v1

    const-string v0, "ProxyCache"

    :try_start_5
    new-instance v2, Ljava/lang/StringBuilder;

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

    const-string v3, "Shutdown proxy for "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget-object v3, p0, Lcom/fulishe/fs/newvideo/cache/p;->d:Lcom/fulishe/fs/newvideo/cache/s;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v0, v2}, Lcom/fulishe/shadow/base/p;->a(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_1d
    .catchall {:try_start_5 .. :try_end_1d} :catchall_3b

    const/4 v0, 0x1

    :try_start_1e
    iput-boolean v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->k:Z

    iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->j:Ljava/lang/Thread;

    if-eqz v0, :cond_29

    iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->j:Ljava/lang/Thread;

    invoke-virtual {v0}, Ljava/lang/Thread;->interrupt()V

    :cond_29
    iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->e:Lcom/fulishe/fs/newvideo/cache/c;

    invoke-interface {v0}, Lcom/fulishe/fs/newvideo/cache/c;->b()V

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->m:Lcom/fulishe/fs/newvideo/cache/p$a;

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->i:Lcom/fulishe/fs/newvideo/cache/r;
    :try_end_34
    .catch Lcom/fulishe/fs/newvideo/cache/m; {:try_start_1e .. :try_end_34} :catch_36
    .catchall {:try_start_1e .. :try_end_34} :catchall_3b

    :goto_34
    :try_start_34
    monitor-exit v1

    return-void

    :catch_36
    move-exception v0

    invoke-virtual {p0, v0}, Lcom/fulishe/fs/newvideo/cache/p;->a(Ljava/lang/Throwable;)V

    goto :goto_34

    :catchall_3b
    move-exception v0

    monitor-exit v1
    :try_end_3d
    .catchall {:try_start_34 .. :try_end_3d} :catchall_3b

    throw v0
.end method

.method public a(I)V
    .registers 2

    return-void
.end method

.method public a(JJ)V
    .registers 12

    const/4 v1, 0x1

    const/4 v2, 0x0

    const-wide/16 v4, 0x0

    cmp-long v4, p3, v4

    if-nez v4, :cond_1e

    move v0, v1

    :goto_9
    if-eqz v0, :cond_20

    const/16 v0, 0x64

    :goto_d
    iget v3, p0, Lcom/fulishe/fs/newvideo/cache/p;->l:I

    if-eq v0, v3, :cond_28

    move v3, v1

    :goto_12
    if-ltz v4, :cond_2a

    :goto_14
    if-eqz v1, :cond_1b

    if-eqz v3, :cond_1b

    invoke-virtual {p0, v0}, Lcom/fulishe/fs/newvideo/cache/p;->a(I)V

    :cond_1b
    iput v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->l:I

    return-void

    :cond_1e
    move v0, v2

    goto :goto_9

    :cond_20
    long-to-float v0, p1

    long-to-float v3, p3

    div-float/2addr v0, v3

    const/high16 v3, 0x42c80000    # 100.0f

    mul-float/2addr v0, v3

    float-to-int v0, v0

    goto :goto_d

    :cond_28
    move v3, v2

    goto :goto_12

    :cond_2a
    move v1, v2

    goto :goto_14
.end method

.method public a(Lcom/fulishe/fs/newvideo/cache/p$a;)V
    .registers 4

    new-instance v0, Ljava/lang/StringBuilder;

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

    const-string v1, "proxyCache---setPreLoadCompleteListener--++isPreloadRequest="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lcom/fulishe/fs/newvideo/cache/p;->d:Lcom/fulishe/fs/newvideo/cache/s;

    invoke-interface {v1}, Lcom/fulishe/fs/newvideo/cache/s;->d()Z

    move-result v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v1, "ProxyCache"

    invoke-static {v1, v0}, Lcom/fulishe/shadow/base/p;->a(Ljava/lang/String;Ljava/lang/String;)V

    iget-object v0, p0, Lcom/fulishe/fs/newvideo/cache/p;->d:Lcom/fulishe/fs/newvideo/cache/s;

    invoke-interface {v0}, Lcom/fulishe/fs/newvideo/cache/s;->d()Z

    move-result v0

    if-eqz v0, :cond_28

    iput-object p1, p0, Lcom/fulishe/fs/newvideo/cache/p;->m:Lcom/fulishe/fs/newvideo/cache/p$a;

    :cond_28
    return-void
.end method

.method public a(Lcom/fulishe/fs/newvideo/cache/r;)V
    .registers 4

    const-string v0, "ProxyCache"

    const-string v1, "setRetryPlayerListener \u8bbe\u7f6e\u56de\u8c03\u76d1\u542c"

    invoke-static {v0, v1}, Lcom/fulishe/shadow/base/p;->a(Ljava/lang/String;Ljava/lang/String;)V

    iput-object p1, p0, Lcom/fulishe/fs/newvideo/cache/p;->i:Lcom/fulishe/fs/newvideo/cache/r;

    return-void
.end method

.method public final a(Ljava/lang/Throwable;)V
    .registers 4

    instance-of v0, p1, Lcom/fulishe/fs/newvideo/cache/i;

    if-eqz v0, :cond_c

    const-string v0, "ProxyCache"

    const-string v1, "ProxyCache is interrupted"

    invoke-static {v0, v1}, Lcom/fulishe/shadow/base/p;->a(Ljava/lang/String;Ljava/lang/String;)V

    :goto_b
    return-void

    :cond_c
    const-string v0, "ProxyCache"

    const-string v1, "ProxyCache error"

    invoke-static {v0, v1, p1}, Lcom/fulishe/shadow/base/p;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V

    goto :goto_b
.end method