d.smali
.class public final Lcom/bytedance/sdk/a/b/a/a/d;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Ljava/io/Closeable;
.implements Ljava/io/Flushable;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/bytedance/sdk/a/b/a/a/d$b;,
Lcom/bytedance/sdk/a/b/a/a/d$a;
}
.end annotation
# static fields
.field static final a:Ljava/util/regex/Pattern;
.field static final synthetic j:Z
# instance fields
.field final b:Lcom/bytedance/sdk/a/b/a/f/a;
.field final c:I
.field d:Lcom/bytedance/sdk/a/a/d;
.field final e:Ljava/util/LinkedHashMap;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/LinkedHashMap<",
"Ljava/lang/String;",
"Lcom/bytedance/sdk/a/b/a/a/d$b;",
">;"
}
.end annotation
.end field
.field f:I
.field g:Z
.field h:Z
.field i:Z
.field private k:J
.field private l:J
.field private final m:Ljava/util/concurrent/Executor;
.field private final n:Ljava/lang/Runnable;
# direct methods
.method static constructor <clinit>()V
.registers 1
.line 85
const-class v0, Lcom/bytedance/sdk/a/b/a/a/d;
invoke-virtual {v0}, Ljava/lang/Class;->desiredAssertionStatus()Z
move-result v0
xor-int/lit8 v0, v0, 0x1
sput-boolean v0, Lcom/bytedance/sdk/a/b/a/a/d;->j:Z
const-string v0, "[a-z0-9_-]{1,120}"
.line 92
invoke-static {v0}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;
move-result-object v0
sput-object v0, Lcom/bytedance/sdk/a/b/a/a/d;->a:Ljava/util/regex/Pattern;
return-void
.end method
.method private declared-synchronized a(Lcom/bytedance/sdk/a/b/a/a/d$a;)V
.registers 6
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
.line 538
:try_start_1
iget-object v0, p1, Lcom/bytedance/sdk/a/b/a/a/d$a;->a:Lcom/bytedance/sdk/a/b/a/a/d$b;
.line 539
iget-object v1, v0, Lcom/bytedance/sdk/a/b/a/a/d$b;->f:Lcom/bytedance/sdk/a/b/a/a/d$a;
if-ne v1, p1, :cond_84
const/4 p1, 0x0
const/4 v1, 0x0
.line 557
:goto_9
iget v2, p0, Lcom/bytedance/sdk/a/b/a/a/d;->c:I
if-ge v1, v2, :cond_19
.line 558
iget-object v2, v0, Lcom/bytedance/sdk/a/b/a/a/d$b;->d:[Ljava/io/File;
aget-object v2, v2, v1
.line 569
iget-object v3, p0, Lcom/bytedance/sdk/a/b/a/a/d;->b:Lcom/bytedance/sdk/a/b/a/f/a;
invoke-interface {v3, v2}, Lcom/bytedance/sdk/a/b/a/f/a;->a(Ljava/io/File;)V
add-int/lit8 v1, v1, 0x1
goto :goto_9
.line 573
:cond_19
iget v1, p0, Lcom/bytedance/sdk/a/b/a/a/d;->f:I
const/4 v2, 0x1
add-int/2addr v1, v2
iput v1, p0, Lcom/bytedance/sdk/a/b/a/a/d;->f:I
const/4 v1, 0x0
.line 574
iput-object v1, v0, Lcom/bytedance/sdk/a/b/a/a/d$b;->f:Lcom/bytedance/sdk/a/b/a/a/d$a;
.line 575
iget-boolean v1, v0, Lcom/bytedance/sdk/a/b/a/a/d$b;->e:Z
or-int/2addr p1, v1
const/16 v1, 0xa
const/16 v3, 0x20
if-eqz p1, :cond_4a
.line 576
iput-boolean v2, v0, Lcom/bytedance/sdk/a/b/a/a/d$b;->e:Z
.line 577
iget-object p1, p0, Lcom/bytedance/sdk/a/b/a/a/d;->d:Lcom/bytedance/sdk/a/a/d;
const-string v2, "CLEAN"
invoke-interface {p1, v2}, Lcom/bytedance/sdk/a/a/d;->b(Ljava/lang/String;)Lcom/bytedance/sdk/a/a/d;
move-result-object p1
invoke-interface {p1, v3}, Lcom/bytedance/sdk/a/a/d;->h(I)Lcom/bytedance/sdk/a/a/d;
.line 578
iget-object p1, p0, Lcom/bytedance/sdk/a/b/a/a/d;->d:Lcom/bytedance/sdk/a/a/d;
iget-object v2, v0, Lcom/bytedance/sdk/a/b/a/a/d$b;->a:Ljava/lang/String;
invoke-interface {p1, v2}, Lcom/bytedance/sdk/a/a/d;->b(Ljava/lang/String;)Lcom/bytedance/sdk/a/a/d;
.line 579
iget-object p1, p0, Lcom/bytedance/sdk/a/b/a/a/d;->d:Lcom/bytedance/sdk/a/a/d;
invoke-virtual {v0, p1}, Lcom/bytedance/sdk/a/b/a/a/d$b;->a(Lcom/bytedance/sdk/a/a/d;)V
.line 580
iget-object p1, p0, Lcom/bytedance/sdk/a/b/a/a/d;->d:Lcom/bytedance/sdk/a/a/d;
invoke-interface {p1, v1}, Lcom/bytedance/sdk/a/a/d;->h(I)Lcom/bytedance/sdk/a/a/d;
goto :goto_68
.line 585
:cond_4a
iget-object p1, p0, Lcom/bytedance/sdk/a/b/a/a/d;->e:Ljava/util/LinkedHashMap;
iget-object v2, v0, Lcom/bytedance/sdk/a/b/a/a/d$b;->a:Ljava/lang/String;
invoke-virtual {p1, v2}, Ljava/util/LinkedHashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
.line 586
iget-object p1, p0, Lcom/bytedance/sdk/a/b/a/a/d;->d:Lcom/bytedance/sdk/a/a/d;
const-string v2, "REMOVE"
invoke-interface {p1, v2}, Lcom/bytedance/sdk/a/a/d;->b(Ljava/lang/String;)Lcom/bytedance/sdk/a/a/d;
move-result-object p1
invoke-interface {p1, v3}, Lcom/bytedance/sdk/a/a/d;->h(I)Lcom/bytedance/sdk/a/a/d;
.line 587
iget-object p1, p0, Lcom/bytedance/sdk/a/b/a/a/d;->d:Lcom/bytedance/sdk/a/a/d;
iget-object v0, v0, Lcom/bytedance/sdk/a/b/a/a/d$b;->a:Ljava/lang/String;
invoke-interface {p1, v0}, Lcom/bytedance/sdk/a/a/d;->b(Ljava/lang/String;)Lcom/bytedance/sdk/a/a/d;
.line 588
iget-object p1, p0, Lcom/bytedance/sdk/a/b/a/a/d;->d:Lcom/bytedance/sdk/a/a/d;
invoke-interface {p1, v1}, Lcom/bytedance/sdk/a/a/d;->h(I)Lcom/bytedance/sdk/a/a/d;
.line 590
:goto_68
iget-object p1, p0, Lcom/bytedance/sdk/a/b/a/a/d;->d:Lcom/bytedance/sdk/a/a/d;
invoke-interface {p1}, Lcom/bytedance/sdk/a/a/d;->flush()V
.line 592
iget-wide v0, p0, Lcom/bytedance/sdk/a/b/a/a/d;->l:J
iget-wide v2, p0, Lcom/bytedance/sdk/a/b/a/a/d;->k:J
cmp-long p1, v0, v2
if-gtz p1, :cond_7b
invoke-direct {p0}, Lcom/bytedance/sdk/a/b/a/a/d;->a()Z
move-result p1
if-eqz p1, :cond_82
.line 593
:cond_7b
iget-object p1, p0, Lcom/bytedance/sdk/a/b/a/a/d;->m:Ljava/util/concurrent/Executor;
iget-object v0, p0, Lcom/bytedance/sdk/a/b/a/a/d;->n:Ljava/lang/Runnable;
invoke-interface {p1, v0}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
:try_end_82
.catchall {:try_start_1 .. :try_end_82} :catchall_8a
.line 595
:cond_82
monitor-exit p0
return-void
.line 540
:cond_84
:try_start_84
new-instance p1, Ljava/lang/IllegalStateException;
invoke-direct {p1}, Ljava/lang/IllegalStateException;-><init>()V
throw p1
:try_end_8a
.catchall {:try_start_84 .. :try_end_8a} :catchall_8a
:catchall_8a
move-exception p1
monitor-exit p0
goto :goto_8e
:goto_8d
throw p1
:goto_8e
goto :goto_8d
.end method
.method private a()Z
.registers 3
.line 603
iget v0, p0, Lcom/bytedance/sdk/a/b/a/a/d;->f:I
const/16 v1, 0x7d0
if-lt v0, v1, :cond_10
iget-object v1, p0, Lcom/bytedance/sdk/a/b/a/a/d;->e:Ljava/util/LinkedHashMap;
.line 604
invoke-virtual {v1}, Ljava/util/LinkedHashMap;->size()I
move-result v1
if-lt v0, v1, :cond_10
const/4 v0, 0x1
return v0
:cond_10
const/4 v0, 0x0
return v0
.end method
.method private a(Lcom/bytedance/sdk/a/b/a/a/d$b;)Z
.registers 8
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 626
iget-object v0, p1, Lcom/bytedance/sdk/a/b/a/a/d$b;->f:Lcom/bytedance/sdk/a/b/a/a/d$a;
const/4 v1, 0x0
if-eqz v0, :cond_29
.line 627
iget-object v0, p1, Lcom/bytedance/sdk/a/b/a/a/d$b;->f:Lcom/bytedance/sdk/a/b/a/a/d$a;
.line 1871
iget-object v2, v0, Lcom/bytedance/sdk/a/b/a/a/d$a;->a:Lcom/bytedance/sdk/a/b/a/a/d$b;
iget-object v2, v2, Lcom/bytedance/sdk/a/b/a/a/d$b;->f:Lcom/bytedance/sdk/a/b/a/a/d$a;
if-ne v2, v0, :cond_29
const/4 v2, 0x0
.line 1872
:goto_e
iget-object v3, v0, Lcom/bytedance/sdk/a/b/a/a/d$a;->c:Lcom/bytedance/sdk/a/b/a/a/d;
iget v3, v3, Lcom/bytedance/sdk/a/b/a/a/d;->c:I
if-ge v2, v3, :cond_24
.line 1874
:try_start_14
iget-object v3, v0, Lcom/bytedance/sdk/a/b/a/a/d$a;->c:Lcom/bytedance/sdk/a/b/a/a/d;
iget-object v3, v3, Lcom/bytedance/sdk/a/b/a/a/d;->b:Lcom/bytedance/sdk/a/b/a/f/a;
iget-object v4, v0, Lcom/bytedance/sdk/a/b/a/a/d$a;->a:Lcom/bytedance/sdk/a/b/a/a/d$b;
iget-object v4, v4, Lcom/bytedance/sdk/a/b/a/a/d$b;->d:[Ljava/io/File;
aget-object v4, v4, v2
invoke-interface {v3, v4}, Lcom/bytedance/sdk/a/b/a/f/a;->a(Ljava/io/File;)V
:try_end_21
.catch Ljava/io/IOException; {:try_start_14 .. :try_end_21} :catch_21
:catch_21
add-int/lit8 v2, v2, 0x1
goto :goto_e
.line 1879
:cond_24
iget-object v0, v0, Lcom/bytedance/sdk/a/b/a/a/d$a;->a:Lcom/bytedance/sdk/a/b/a/a/d$b;
const/4 v2, 0x0
iput-object v2, v0, Lcom/bytedance/sdk/a/b/a/a/d$b;->f:Lcom/bytedance/sdk/a/b/a/a/d$a;
.line 630
:cond_29
:goto_29
iget v0, p0, Lcom/bytedance/sdk/a/b/a/a/d;->c:I
if-ge v1, v0, :cond_48
.line 631
iget-object v0, p0, Lcom/bytedance/sdk/a/b/a/a/d;->b:Lcom/bytedance/sdk/a/b/a/f/a;
iget-object v2, p1, Lcom/bytedance/sdk/a/b/a/a/d$b;->c:[Ljava/io/File;
aget-object v2, v2, v1
invoke-interface {v0, v2}, Lcom/bytedance/sdk/a/b/a/f/a;->a(Ljava/io/File;)V
.line 632
iget-wide v2, p0, Lcom/bytedance/sdk/a/b/a/a/d;->l:J
iget-object v0, p1, Lcom/bytedance/sdk/a/b/a/a/d$b;->b:[J
aget-wide v4, v0, v1
sub-long/2addr v2, v4
iput-wide v2, p0, Lcom/bytedance/sdk/a/b/a/a/d;->l:J
.line 633
iget-object v0, p1, Lcom/bytedance/sdk/a/b/a/a/d$b;->b:[J
const-wide/16 v2, 0x0
aput-wide v2, v0, v1
add-int/lit8 v1, v1, 0x1
goto :goto_29
.line 636
:cond_48
iget v0, p0, Lcom/bytedance/sdk/a/b/a/a/d;->f:I
const/4 v1, 0x1
add-int/2addr v0, v1
iput v0, p0, Lcom/bytedance/sdk/a/b/a/a/d;->f:I
.line 637
iget-object v0, p0, Lcom/bytedance/sdk/a/b/a/a/d;->d:Lcom/bytedance/sdk/a/a/d;
const-string v2, "REMOVE"
invoke-interface {v0, v2}, Lcom/bytedance/sdk/a/a/d;->b(Ljava/lang/String;)Lcom/bytedance/sdk/a/a/d;
move-result-object v0
const/16 v2, 0x20
invoke-interface {v0, v2}, Lcom/bytedance/sdk/a/a/d;->h(I)Lcom/bytedance/sdk/a/a/d;
move-result-object v0
iget-object v2, p1, Lcom/bytedance/sdk/a/b/a/a/d$b;->a:Ljava/lang/String;
invoke-interface {v0, v2}, Lcom/bytedance/sdk/a/a/d;->b(Ljava/lang/String;)Lcom/bytedance/sdk/a/a/d;
move-result-object v0
const/16 v2, 0xa
invoke-interface {v0, v2}, Lcom/bytedance/sdk/a/a/d;->h(I)Lcom/bytedance/sdk/a/a/d;
.line 638
iget-object v0, p0, Lcom/bytedance/sdk/a/b/a/a/d;->e:Ljava/util/LinkedHashMap;
iget-object p1, p1, Lcom/bytedance/sdk/a/b/a/a/d$b;->a:Ljava/lang/String;
invoke-virtual {v0, p1}, Ljava/util/LinkedHashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
.line 640
invoke-direct {p0}, Lcom/bytedance/sdk/a/b/a/a/d;->a()Z
move-result p1
if-eqz p1, :cond_7b
.line 641
iget-object p1, p0, Lcom/bytedance/sdk/a/b/a/a/d;->m:Ljava/util/concurrent/Executor;
iget-object v0, p0, Lcom/bytedance/sdk/a/b/a/a/d;->n:Ljava/lang/Runnable;
invoke-interface {p1, v0}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
:cond_7b
return v1
.end method
.method private declared-synchronized b()Z
.registers 2
monitor-enter p0
.line 651
:try_start_1
iget-boolean v0, p0, Lcom/bytedance/sdk/a/b/a/a/d;->h:Z
:try_end_3
.catchall {:try_start_1 .. :try_end_3} :catchall_5
monitor-exit p0
return v0
:catchall_5
move-exception v0
monitor-exit p0
throw v0
.end method
.method private declared-synchronized c()V
.registers 3
monitor-enter p0
.line 655
:try_start_1
invoke-direct {p0}, Lcom/bytedance/sdk/a/b/a/a/d;->b()Z
move-result v0
:try_end_5
.catchall {:try_start_1 .. :try_end_5} :catchall_11
if-nez v0, :cond_9
.line 658
monitor-exit p0
return-void
.line 656
:cond_9
:try_start_9
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "cache is closed"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:try_end_11
.catchall {:try_start_9 .. :try_end_11} :catchall_11
:catchall_11
move-exception v0
monitor-exit p0
throw v0
.end method
.method private d()V
.registers 6
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 694
:goto_0
iget-wide v0, p0, Lcom/bytedance/sdk/a/b/a/a/d;->l:J
iget-wide v2, p0, Lcom/bytedance/sdk/a/b/a/a/d;->k:J
cmp-long v4, v0, v2
if-lez v4, :cond_1c
.line 695
iget-object v0, p0, Lcom/bytedance/sdk/a/b/a/a/d;->e:Ljava/util/LinkedHashMap;
invoke-virtual {v0}, Ljava/util/LinkedHashMap;->values()Ljava/util/Collection;
move-result-object v0
invoke-interface {v0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
move-result-object v0
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/bytedance/sdk/a/b/a/a/d$b;
.line 696
invoke-direct {p0, v0}, Lcom/bytedance/sdk/a/b/a/a/d;->a(Lcom/bytedance/sdk/a/b/a/a/d$b;)Z
goto :goto_0
:cond_1c
const/4 v0, 0x0
.line 698
iput-boolean v0, p0, Lcom/bytedance/sdk/a/b/a/a/d;->i:Z
return-void
.end method
# virtual methods
.method public final declared-synchronized close()V
.registers 8
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
.line 677
:try_start_1
iget-boolean v0, p0, Lcom/bytedance/sdk/a/b/a/a/d;->g:Z
const/4 v1, 0x1
if-eqz v0, :cond_5c
iget-boolean v0, p0, Lcom/bytedance/sdk/a/b/a/a/d;->h:Z
if-eqz v0, :cond_b
goto :goto_5c
.line 682
:cond_b
iget-object v0, p0, Lcom/bytedance/sdk/a/b/a/a/d;->e:Ljava/util/LinkedHashMap;
invoke-virtual {v0}, Ljava/util/LinkedHashMap;->values()Ljava/util/Collection;
move-result-object v0
iget-object v2, p0, Lcom/bytedance/sdk/a/b/a/a/d;->e:Ljava/util/LinkedHashMap;
invoke-virtual {v2}, Ljava/util/LinkedHashMap;->size()I
move-result v2
new-array v2, v2, [Lcom/bytedance/sdk/a/b/a/a/d$b;
invoke-interface {v0, v2}, Ljava/util/Collection;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
move-result-object v0
check-cast v0, [Lcom/bytedance/sdk/a/b/a/a/d$b;
array-length v2, v0
const/4 v3, 0x0
:goto_21
if-ge v3, v2, :cond_4d
aget-object v4, v0, v3
.line 683
iget-object v5, v4, Lcom/bytedance/sdk/a/b/a/a/d$b;->f:Lcom/bytedance/sdk/a/b/a/a/d$a;
if-eqz v5, :cond_4a
.line 684
iget-object v4, v4, Lcom/bytedance/sdk/a/b/a/a/d$b;->f:Lcom/bytedance/sdk/a/b/a/a/d$a;
.line 1958
iget-object v5, v4, Lcom/bytedance/sdk/a/b/a/a/d$a;->c:Lcom/bytedance/sdk/a/b/a/a/d;
monitor-enter v5
:try_end_2e
.catchall {:try_start_1 .. :try_end_2e} :catchall_60
.line 1959
:try_start_2e
iget-boolean v6, v4, Lcom/bytedance/sdk/a/b/a/a/d$a;->b:Z
if-nez v6, :cond_41
.line 1962
iget-object v6, v4, Lcom/bytedance/sdk/a/b/a/a/d$a;->a:Lcom/bytedance/sdk/a/b/a/a/d$b;
iget-object v6, v6, Lcom/bytedance/sdk/a/b/a/a/d$b;->f:Lcom/bytedance/sdk/a/b/a/a/d$a;
if-ne v6, v4, :cond_3d
.line 1963
iget-object v6, v4, Lcom/bytedance/sdk/a/b/a/a/d$a;->c:Lcom/bytedance/sdk/a/b/a/a/d;
invoke-direct {v6, v4}, Lcom/bytedance/sdk/a/b/a/a/d;->a(Lcom/bytedance/sdk/a/b/a/a/d$a;)V
.line 1965
:cond_3d
iput-boolean v1, v4, Lcom/bytedance/sdk/a/b/a/a/d$a;->b:Z
.line 1966
monitor-exit v5
goto :goto_4a
.line 1960
:cond_41
new-instance v0, Ljava/lang/IllegalStateException;
invoke-direct {v0}, Ljava/lang/IllegalStateException;-><init>()V
throw v0
:catchall_47
move-exception v0
.line 1966
monitor-exit v5
:try_end_49
.catchall {:try_start_2e .. :try_end_49} :catchall_47
:try_start_49
throw v0
:cond_4a
:goto_4a
add-int/lit8 v3, v3, 0x1
goto :goto_21
.line 687
:cond_4d
invoke-direct {p0}, Lcom/bytedance/sdk/a/b/a/a/d;->d()V
.line 688
iget-object v0, p0, Lcom/bytedance/sdk/a/b/a/a/d;->d:Lcom/bytedance/sdk/a/a/d;
invoke-interface {v0}, Lcom/bytedance/sdk/a/a/d;->close()V
const/4 v0, 0x0
.line 689
iput-object v0, p0, Lcom/bytedance/sdk/a/b/a/a/d;->d:Lcom/bytedance/sdk/a/a/d;
.line 690
iput-boolean v1, p0, Lcom/bytedance/sdk/a/b/a/a/d;->h:Z
:try_end_5a
.catchall {:try_start_49 .. :try_end_5a} :catchall_60
.line 691
monitor-exit p0
return-void
.line 678
:cond_5c
:goto_5c
:try_start_5c
iput-boolean v1, p0, Lcom/bytedance/sdk/a/b/a/a/d;->h:Z
:try_end_5e
.catchall {:try_start_5c .. :try_end_5e} :catchall_60
.line 679
monitor-exit p0
return-void
:catchall_60
move-exception v0
monitor-exit p0
goto :goto_64
:goto_63
throw v0
:goto_64
goto :goto_63
.end method
.method public final declared-synchronized flush()V
.registers 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
.line 665
:try_start_1
iget-boolean v0, p0, Lcom/bytedance/sdk/a/b/a/a/d;->g:Z
:try_end_3
.catchall {:try_start_1 .. :try_end_3} :catchall_14
if-nez v0, :cond_7
monitor-exit p0
return-void
.line 667
:cond_7
:try_start_7
invoke-direct {p0}, Lcom/bytedance/sdk/a/b/a/a/d;->c()V
.line 668
invoke-direct {p0}, Lcom/bytedance/sdk/a/b/a/a/d;->d()V
.line 669
iget-object v0, p0, Lcom/bytedance/sdk/a/b/a/a/d;->d:Lcom/bytedance/sdk/a/a/d;
invoke-interface {v0}, Lcom/bytedance/sdk/a/a/d;->flush()V
:try_end_12
.catchall {:try_start_7 .. :try_end_12} :catchall_14
.line 670
monitor-exit p0
return-void
:catchall_14
move-exception v0
monitor-exit p0
throw v0
.end method