a.smali
.class public final Lcom/bumptech/glide/disklrucache/a;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Ljava/io/Closeable;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/bumptech/glide/disklrucache/a$b;,
Lcom/bumptech/glide/disklrucache/a$d;,
Lcom/bumptech/glide/disklrucache/a$c;,
Lcom/bumptech/glide/disklrucache/a$e;
}
.end annotation
# instance fields
.field public final a:Ljava/io/File;
.field public final b:Ljava/io/File;
.field public final c:Ljava/io/File;
.field public final d:Ljava/io/File;
.field public final e:I
.field public f:J
.field public final g:I
.field public h:J
.field public i:Ljava/io/BufferedWriter;
.field public final j:Ljava/util/LinkedHashMap;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/LinkedHashMap<",
"Ljava/lang/String;",
"Lcom/bumptech/glide/disklrucache/a$d;",
">;"
}
.end annotation
.end field
.field public k:I
.field public l:J
.field public final m:Ljava/util/concurrent/ThreadPoolExecutor;
.field public final n:Lcom/bumptech/glide/disklrucache/a$a;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/Callable<",
"Ljava/lang/Void;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Ljava/io/File;J)V
.registers 20
move-object/from16 v0, p0
move-object/from16 v1, p1
.line 1
invoke-direct/range {p0 .. p0}, Ljava/lang/Object;-><init>()V
const-wide/16 v2, 0x0
.line 2
iput-wide v2, v0, Lcom/bumptech/glide/disklrucache/a;->h:J
.line 3
new-instance v4, Ljava/util/LinkedHashMap;
const/4 v5, 0x0
const/high16 v6, 0x3f400000 # 0.75f
const/4 v7, 0x1
invoke-direct {v4, v5, v6, v7}, Ljava/util/LinkedHashMap;-><init>(IFZ)V
iput-object v4, v0, Lcom/bumptech/glide/disklrucache/a;->j:Ljava/util/LinkedHashMap;
.line 4
iput-wide v2, v0, Lcom/bumptech/glide/disklrucache/a;->l:J
.line 5
sget-object v12, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
new-instance v13, Ljava/util/concurrent/LinkedBlockingQueue;
invoke-direct {v13}, Ljava/util/concurrent/LinkedBlockingQueue;-><init>()V
new-instance v14, Lcom/bumptech/glide/disklrucache/a$b;
invoke-direct {v14}, Lcom/bumptech/glide/disklrucache/a$b;-><init>()V
const/4 v8, 0x0
const/4 v9, 0x1
const-wide/16 v10, 0x3c
const-string v15, "com/bumptech/glide/disklrucache/DiskLruCache"
invoke-static/range {v8 .. v15}, Lcom/garena/android/appkit/logging/a;->R(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;Ljava/lang/String;)Ljava/util/concurrent/ThreadPoolExecutor;
move-result-object v2
iput-object v2, v0, Lcom/bumptech/glide/disklrucache/a;->m:Ljava/util/concurrent/ThreadPoolExecutor;
.line 6
new-instance v2, Lcom/bumptech/glide/disklrucache/a$a;
invoke-direct {v2, v0}, Lcom/bumptech/glide/disklrucache/a$a;-><init>(Lcom/bumptech/glide/disklrucache/a;)V
iput-object v2, v0, Lcom/bumptech/glide/disklrucache/a;->n:Lcom/bumptech/glide/disklrucache/a$a;
.line 7
iput-object v1, v0, Lcom/bumptech/glide/disklrucache/a;->a:Ljava/io/File;
.line 8
iput v7, v0, Lcom/bumptech/glide/disklrucache/a;->e:I
.line 9
new-instance v2, Ljava/io/File;
const-string v3, "journal"
invoke-direct {v2, v1, v3}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
iput-object v2, v0, Lcom/bumptech/glide/disklrucache/a;->b:Ljava/io/File;
.line 10
new-instance v2, Ljava/io/File;
const-string v3, "journal.tmp"
invoke-direct {v2, v1, v3}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
iput-object v2, v0, Lcom/bumptech/glide/disklrucache/a;->c:Ljava/io/File;
.line 11
new-instance v2, Ljava/io/File;
const-string v3, "journal.bkp"
invoke-direct {v2, v1, v3}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
iput-object v2, v0, Lcom/bumptech/glide/disklrucache/a;->d:Ljava/io/File;
.line 12
iput v7, v0, Lcom/bumptech/glide/disklrucache/a;->g:I
move-wide/from16 v1, p2
.line 13
iput-wide v1, v0, Lcom/bumptech/glide/disklrucache/a;->f:J
return-void
.end method
.method public static F(Ljava/io/File;J)Lcom/bumptech/glide/disklrucache/a;
.registers 8
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const-wide/16 v0, 0x0
cmp-long v2, p1, v0
if-lez v2, :cond_78
.line 1
new-instance v0, Ljava/io/File;
const-string v1, "journal.bkp"
invoke-direct {v0, p0, v1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 2
invoke-virtual {v0}, Ljava/io/File;->exists()Z
move-result v1
if-eqz v1, :cond_28
.line 3
new-instance v1, Ljava/io/File;
const-string v2, "journal"
invoke-direct {v1, p0, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 4
invoke-virtual {v1}, Ljava/io/File;->exists()Z
move-result v2
if-eqz v2, :cond_24
.line 5
invoke-virtual {v0}, Ljava/io/File;->delete()Z
goto :goto_28
:cond_24
const/4 v2, 0x0
.line 6
invoke-static {v0, v1, v2}, Lcom/bumptech/glide/disklrucache/a;->R(Ljava/io/File;Ljava/io/File;Z)V
.line 7
:cond_28
:goto_28
new-instance v0, Lcom/bumptech/glide/disklrucache/a;
invoke-direct {v0, p0, p1, p2}, Lcom/bumptech/glide/disklrucache/a;-><init>(Ljava/io/File;J)V
.line 8
iget-object v1, v0, Lcom/bumptech/glide/disklrucache/a;->b:Ljava/io/File;
invoke-virtual {v1}, Ljava/io/File;->exists()Z
move-result v1
if-eqz v1, :cond_6c
.line 9
:try_start_35
invoke-virtual {v0}, Lcom/bumptech/glide/disklrucache/a;->J()V
.line 10
invoke-virtual {v0}, Lcom/bumptech/glide/disklrucache/a;->H()V
:try_end_3b
.catch Ljava/io/IOException; {:try_start_35 .. :try_end_3b} :catch_3c
return-object v0
:catch_3c
move-exception v1
.line 11
sget-object v2, Ljava/lang/System;->out:Ljava/io/PrintStream;
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "DiskLruCache "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v4, " is corrupt: "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 12
invoke-virtual {v1}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;
move-result-object v1
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v1, ", removing"
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
.line 13
invoke-virtual {v2, v1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
.line 14
invoke-virtual {v0}, Lcom/bumptech/glide/disklrucache/a;->close()V
.line 15
iget-object v0, v0, Lcom/bumptech/glide/disklrucache/a;->a:Ljava/io/File;
invoke-static {v0}, Lcom/bumptech/glide/disklrucache/c;->a(Ljava/io/File;)V
.line 16
:cond_6c
invoke-virtual {p0}, Ljava/io/File;->mkdirs()Z
.line 17
new-instance v0, Lcom/bumptech/glide/disklrucache/a;
invoke-direct {v0, p0, p1, p2}, Lcom/bumptech/glide/disklrucache/a;-><init>(Ljava/io/File;J)V
.line 18
invoke-virtual {v0}, Lcom/bumptech/glide/disklrucache/a;->P()V
return-object v0
.line 19
:cond_78
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "maxSize <= 0"
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static R(Ljava/io/File;Ljava/io/File;Z)V
.registers 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
if-eqz p2, :cond_5
.line 1
invoke-static {p1}, Lcom/bumptech/glide/disklrucache/a;->o(Ljava/io/File;)V
.line 2
:cond_5
invoke-virtual {p0, p1}, Ljava/io/File;->renameTo(Ljava/io/File;)Z
move-result p0
if-eqz p0, :cond_c
return-void
.line 3
:cond_c
new-instance p0, Ljava/io/IOException;
invoke-direct {p0}, Ljava/io/IOException;-><init>()V
throw p0
.end method
.method public static a(Ljava/util/concurrent/ThreadPoolExecutor;Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;
.registers 3
.line 1
invoke-static {p1, p0}, Lcom/shopee/app/asm/anr/threadpool/a;->a(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_d
.line 2
sget-object p0, Lcom/shopee/app/asm/fix/threadpool/global/i;->e:Lcom/shopee/app/asm/fix/threadpool/global/j;
.line 3
invoke-virtual {p0, p1}, Ljava/util/concurrent/AbstractExecutorService;->submit(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;
move-result-object p0
return-object p0
.line 4
:cond_d
invoke-virtual {p0, p1}, Ljava/util/concurrent/AbstractExecutorService;->submit(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;
move-result-object p0
return-object p0
.end method
.method public static h(Lcom/bumptech/glide/disklrucache/a;Lcom/bumptech/glide/disklrucache/a$c;Z)V
.registers 12
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
monitor-enter p0
.line 2
:try_start_1
iget-object v0, p1, Lcom/bumptech/glide/disklrucache/a$c;->a:Lcom/bumptech/glide/disklrucache/a$d;
.line 3
iget-object v1, v0, Lcom/bumptech/glide/disklrucache/a$d;->f:Lcom/bumptech/glide/disklrucache/a$c;
if-ne v1, p1, :cond_f2
const/4 v1, 0x0
if-eqz p2, :cond_46
.line 4
iget-boolean v2, v0, Lcom/bumptech/glide/disklrucache/a$d;->e:Z
if-nez v2, :cond_46
const/4 v2, 0x0
.line 5
:goto_f
iget v3, p0, Lcom/bumptech/glide/disklrucache/a;->g:I
if-ge v2, v3, :cond_46
.line 6
iget-object v3, p1, Lcom/bumptech/glide/disklrucache/a$c;->b:[Z
.line 7
aget-boolean v3, v3, v2
if-eqz v3, :cond_2c
.line 8
iget-object v3, v0, Lcom/bumptech/glide/disklrucache/a$d;->d:[Ljava/io/File;
aget-object v3, v3, v2
.line 9
invoke-virtual {v3}, Ljava/io/File;->exists()Z
move-result v3
if-nez v3, :cond_29
.line 10
invoke-virtual {p1}, Lcom/bumptech/glide/disklrucache/a$c;->a()V
:try_end_26
.catchall {:try_start_1 .. :try_end_26} :catchall_f8
.line 11
monitor-exit p0
goto/16 :goto_f1
:cond_29
add-int/lit8 v2, v2, 0x1
goto :goto_f
.line 12
:cond_2c
:try_start_2c
invoke-virtual {p1}, Lcom/bumptech/glide/disklrucache/a$c;->a()V
.line 13
new-instance p1, Ljava/lang/IllegalStateException;
new-instance p2, Ljava/lang/StringBuilder;
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
const-string v0, "Newly created entry didn\'t create value for index "
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p2, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.line 14
:cond_46
:goto_46
iget p1, p0, Lcom/bumptech/glide/disklrucache/a;->g:I
if-ge v1, p1, :cond_76
.line 15
iget-object p1, v0, Lcom/bumptech/glide/disklrucache/a$d;->d:[Ljava/io/File;
aget-object p1, p1, v1
if-eqz p2, :cond_70
.line 16
invoke-virtual {p1}, Ljava/io/File;->exists()Z
move-result v2
if-eqz v2, :cond_73
.line 17
iget-object v2, v0, Lcom/bumptech/glide/disklrucache/a$d;->c:[Ljava/io/File;
aget-object v2, v2, v1
.line 18
invoke-virtual {p1, v2}, Ljava/io/File;->renameTo(Ljava/io/File;)Z
.line 19
iget-object p1, v0, Lcom/bumptech/glide/disklrucache/a$d;->b:[J
.line 20
aget-wide v3, p1, v1
.line 21
invoke-virtual {v2}, Ljava/io/File;->length()J
move-result-wide v5
.line 22
iget-object p1, v0, Lcom/bumptech/glide/disklrucache/a$d;->b:[J
.line 23
aput-wide v5, p1, v1
.line 24
iget-wide v7, p0, Lcom/bumptech/glide/disklrucache/a;->h:J
sub-long/2addr v7, v3
add-long/2addr v7, v5
iput-wide v7, p0, Lcom/bumptech/glide/disklrucache/a;->h:J
goto :goto_73
.line 25
:cond_70
invoke-static {p1}, Lcom/bumptech/glide/disklrucache/a;->o(Ljava/io/File;)V
:cond_73
:goto_73
add-int/lit8 v1, v1, 0x1
goto :goto_46
.line 26
:cond_76
iget p1, p0, Lcom/bumptech/glide/disklrucache/a;->k:I
const/4 v1, 0x1
add-int/2addr p1, v1
iput p1, p0, Lcom/bumptech/glide/disklrucache/a;->k:I
const/4 p1, 0x0
.line 27
iput-object p1, v0, Lcom/bumptech/glide/disklrucache/a$d;->f:Lcom/bumptech/glide/disklrucache/a$c;
.line 28
iget-boolean p1, v0, Lcom/bumptech/glide/disklrucache/a$d;->e:Z
or-int/2addr p1, p2
const/16 v2, 0xa
const/16 v3, 0x20
if-eqz p1, :cond_b7
.line 29
iput-boolean v1, v0, Lcom/bumptech/glide/disklrucache/a$d;->e:Z
.line 30
iget-object p1, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
const-string v1, "CLEAN"
invoke-virtual {p1, v1}, Ljava/io/Writer;->append(Ljava/lang/CharSequence;)Ljava/io/Writer;
.line 31
iget-object p1, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
invoke-virtual {p1, v3}, Ljava/io/Writer;->append(C)Ljava/io/Writer;
.line 32
iget-object p1, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
.line 33
iget-object v1, v0, Lcom/bumptech/glide/disklrucache/a$d;->a:Ljava/lang/String;
.line 34
invoke-virtual {p1, v1}, Ljava/io/Writer;->append(Ljava/lang/CharSequence;)Ljava/io/Writer;
.line 35
iget-object p1, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
invoke-virtual {v0}, Lcom/bumptech/glide/disklrucache/a$d;->a()Ljava/lang/String;
move-result-object v1
invoke-virtual {p1, v1}, Ljava/io/Writer;->append(Ljava/lang/CharSequence;)Ljava/io/Writer;
.line 36
iget-object p1, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
invoke-virtual {p1, v2}, Ljava/io/Writer;->append(C)Ljava/io/Writer;
if-eqz p2, :cond_d6
.line 37
iget-wide p1, p0, Lcom/bumptech/glide/disklrucache/a;->l:J
const-wide/16 v1, 0x1
add-long/2addr v1, p1
iput-wide v1, p0, Lcom/bumptech/glide/disklrucache/a;->l:J
.line 38
iput-wide p1, v0, Lcom/bumptech/glide/disklrucache/a$d;->g:J
goto :goto_d6
.line 39
:cond_b7
iget-object p1, p0, Lcom/bumptech/glide/disklrucache/a;->j:Ljava/util/LinkedHashMap;
.line 40
iget-object p2, v0, Lcom/bumptech/glide/disklrucache/a$d;->a:Ljava/lang/String;
.line 41
invoke-virtual {p1, p2}, Ljava/util/AbstractMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
.line 42
iget-object p1, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
const-string p2, "REMOVE"
invoke-virtual {p1, p2}, Ljava/io/Writer;->append(Ljava/lang/CharSequence;)Ljava/io/Writer;
.line 43
iget-object p1, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
invoke-virtual {p1, v3}, Ljava/io/Writer;->append(C)Ljava/io/Writer;
.line 44
iget-object p1, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
.line 45
iget-object p2, v0, Lcom/bumptech/glide/disklrucache/a$d;->a:Ljava/lang/String;
.line 46
invoke-virtual {p1, p2}, Ljava/io/Writer;->append(Ljava/lang/CharSequence;)Ljava/io/Writer;
.line 47
iget-object p1, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
invoke-virtual {p1, v2}, Ljava/io/Writer;->append(C)Ljava/io/Writer;
.line 48
:cond_d6
:goto_d6
iget-object p1, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
invoke-static {p1}, Lcom/bumptech/glide/disklrucache/a;->x(Ljava/io/Writer;)V
.line 49
iget-wide p1, p0, Lcom/bumptech/glide/disklrucache/a;->h:J
iget-wide v0, p0, Lcom/bumptech/glide/disklrucache/a;->f:J
cmp-long v2, p1, v0
if-gtz v2, :cond_e9
invoke-virtual {p0}, Lcom/bumptech/glide/disklrucache/a;->D()Z
move-result p1
if-eqz p1, :cond_f0
.line 50
:cond_e9
iget-object p1, p0, Lcom/bumptech/glide/disklrucache/a;->m:Ljava/util/concurrent/ThreadPoolExecutor;
iget-object p2, p0, Lcom/bumptech/glide/disklrucache/a;->n:Lcom/bumptech/glide/disklrucache/a$a;
invoke-static {p1, p2}, Lcom/bumptech/glide/disklrucache/a;->a(Ljava/util/concurrent/ThreadPoolExecutor;Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;
:try_end_f0
.catchall {:try_start_2c .. :try_end_f0} :catchall_f8
.line 51
:cond_f0
monitor-exit p0
:goto_f1
return-void
.line 52
:cond_f2
:try_start_f2
new-instance p1, Ljava/lang/IllegalStateException;
invoke-direct {p1}, Ljava/lang/IllegalStateException;-><init>()V
throw p1
:try_end_f8
.catchall {:try_start_f2 .. :try_end_f8} :catchall_f8
:catchall_f8
move-exception p1
monitor-exit p0
throw p1
.end method
.method public static n(Ljava/io/Writer;)V
.registers 3
.annotation build Landroid/annotation/TargetApi;
value = 0x1a
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1a
if-ge v0, v1, :cond_a
.line 2
invoke-virtual {p0}, Ljava/io/Writer;->close()V
return-void
.line 3
:cond_a
invoke-static {}, Landroid/os/StrictMode;->getThreadPolicy()Landroid/os/StrictMode$ThreadPolicy;
move-result-object v0
.line 4
new-instance v1, Landroid/os/StrictMode$ThreadPolicy$Builder;
invoke-direct {v1, v0}, Landroid/os/StrictMode$ThreadPolicy$Builder;-><init>(Landroid/os/StrictMode$ThreadPolicy;)V
.line 5
invoke-virtual {v1}, Landroid/os/StrictMode$ThreadPolicy$Builder;->permitUnbufferedIo()Landroid/os/StrictMode$ThreadPolicy$Builder;
move-result-object v1
invoke-virtual {v1}, Landroid/os/StrictMode$ThreadPolicy$Builder;->build()Landroid/os/StrictMode$ThreadPolicy;
move-result-object v1
.line 6
invoke-static {v1}, Landroid/os/StrictMode;->setThreadPolicy(Landroid/os/StrictMode$ThreadPolicy;)V
.line 7
:try_start_1e
invoke-virtual {p0}, Ljava/io/Writer;->close()V
:try_end_21
.catchall {:try_start_1e .. :try_end_21} :catchall_25
.line 8
invoke-static {v0}, Landroid/os/StrictMode;->setThreadPolicy(Landroid/os/StrictMode$ThreadPolicy;)V
return-void
:catchall_25
move-exception p0
invoke-static {v0}, Landroid/os/StrictMode;->setThreadPolicy(Landroid/os/StrictMode$ThreadPolicy;)V
.line 9
throw p0
.end method
.method public static o(Ljava/io/File;)V
.registers 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
invoke-virtual {p0}, Ljava/io/File;->exists()Z
move-result v0
if-eqz v0, :cond_13
invoke-virtual {p0}, Ljava/io/File;->delete()Z
move-result p0
if-eqz p0, :cond_d
goto :goto_13
.line 2
:cond_d
new-instance p0, Ljava/io/IOException;
invoke-direct {p0}, Ljava/io/IOException;-><init>()V
throw p0
:cond_13
:goto_13
return-void
.end method
.method public static x(Ljava/io/Writer;)V
.registers 3
.annotation build Landroid/annotation/TargetApi;
value = 0x1a
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x1a
if-ge v0, v1, :cond_a
.line 2
invoke-virtual {p0}, Ljava/io/Writer;->flush()V
return-void
.line 3
:cond_a
invoke-static {}, Landroid/os/StrictMode;->getThreadPolicy()Landroid/os/StrictMode$ThreadPolicy;
move-result-object v0
.line 4
new-instance v1, Landroid/os/StrictMode$ThreadPolicy$Builder;
invoke-direct {v1, v0}, Landroid/os/StrictMode$ThreadPolicy$Builder;-><init>(Landroid/os/StrictMode$ThreadPolicy;)V
.line 5
invoke-virtual {v1}, Landroid/os/StrictMode$ThreadPolicy$Builder;->permitUnbufferedIo()Landroid/os/StrictMode$ThreadPolicy$Builder;
move-result-object v1
invoke-virtual {v1}, Landroid/os/StrictMode$ThreadPolicy$Builder;->build()Landroid/os/StrictMode$ThreadPolicy;
move-result-object v1
.line 6
invoke-static {v1}, Landroid/os/StrictMode;->setThreadPolicy(Landroid/os/StrictMode$ThreadPolicy;)V
.line 7
:try_start_1e
invoke-virtual {p0}, Ljava/io/Writer;->flush()V
:try_end_21
.catchall {:try_start_1e .. :try_end_21} :catchall_25
.line 8
invoke-static {v0}, Landroid/os/StrictMode;->setThreadPolicy(Landroid/os/StrictMode$ThreadPolicy;)V
return-void
:catchall_25
move-exception p0
invoke-static {v0}, Landroid/os/StrictMode;->setThreadPolicy(Landroid/os/StrictMode$ThreadPolicy;)V
.line 9
throw p0
.end method
# virtual methods
.method public final declared-synchronized C(Ljava/lang/String;)Lcom/bumptech/glide/disklrucache/a$e;
.registers 8
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
.line 1
:try_start_1
invoke-virtual {p0}, Lcom/bumptech/glide/disklrucache/a;->l()V
.line 2
iget-object v0, p0, Lcom/bumptech/glide/disklrucache/a;->j:Ljava/util/LinkedHashMap;
invoke-virtual {v0, p1}, Ljava/util/LinkedHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/bumptech/glide/disklrucache/a$d;
:try_end_c
.catchall {:try_start_1 .. :try_end_c} :catchall_60
const/4 v1, 0x0
if-nez v0, :cond_11
.line 3
monitor-exit p0
return-object v1
.line 4
:cond_11
:try_start_11
iget-boolean v2, v0, Lcom/bumptech/glide/disklrucache/a$d;->e:Z
:try_end_13
.catchall {:try_start_11 .. :try_end_13} :catchall_60
if-nez v2, :cond_17
.line 5
monitor-exit p0
return-object v1
.line 6
:cond_17
:try_start_17
iget-object v2, v0, Lcom/bumptech/glide/disklrucache/a$d;->c:[Ljava/io/File;
array-length v3, v2
const/4 v4, 0x0
:goto_1b
if-ge v4, v3, :cond_2a
aget-object v5, v2, v4
.line 7
invoke-virtual {v5}, Ljava/io/File;->exists()Z
move-result v5
:try_end_23
.catchall {:try_start_17 .. :try_end_23} :catchall_60
if-nez v5, :cond_27
.line 8
monitor-exit p0
return-object v1
:cond_27
add-int/lit8 v4, v4, 0x1
goto :goto_1b
.line 9
:cond_2a
:try_start_2a
iget v1, p0, Lcom/bumptech/glide/disklrucache/a;->k:I
add-int/lit8 v1, v1, 0x1
iput v1, p0, Lcom/bumptech/glide/disklrucache/a;->k:I
.line 10
iget-object v1, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
const-string v2, "READ"
invoke-virtual {v1, v2}, Ljava/io/Writer;->append(Ljava/lang/CharSequence;)Ljava/io/Writer;
.line 11
iget-object v1, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
const/16 v2, 0x20
invoke-virtual {v1, v2}, Ljava/io/Writer;->append(C)Ljava/io/Writer;
.line 12
iget-object v1, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
invoke-virtual {v1, p1}, Ljava/io/Writer;->append(Ljava/lang/CharSequence;)Ljava/io/Writer;
.line 13
iget-object p1, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
const/16 v1, 0xa
invoke-virtual {p1, v1}, Ljava/io/Writer;->append(C)Ljava/io/Writer;
.line 14
invoke-virtual {p0}, Lcom/bumptech/glide/disklrucache/a;->D()Z
move-result p1
if-eqz p1, :cond_57
.line 15
iget-object p1, p0, Lcom/bumptech/glide/disklrucache/a;->m:Ljava/util/concurrent/ThreadPoolExecutor;
iget-object v1, p0, Lcom/bumptech/glide/disklrucache/a;->n:Lcom/bumptech/glide/disklrucache/a$a;
invoke-static {p1, v1}, Lcom/bumptech/glide/disklrucache/a;->a(Ljava/util/concurrent/ThreadPoolExecutor;Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;
.line 16
:cond_57
new-instance p1, Lcom/bumptech/glide/disklrucache/a$e;
iget-object v0, v0, Lcom/bumptech/glide/disklrucache/a$d;->c:[Ljava/io/File;
invoke-direct {p1, v0}, Lcom/bumptech/glide/disklrucache/a$e;-><init>([Ljava/io/File;)V
:try_end_5e
.catchall {:try_start_2a .. :try_end_5e} :catchall_60
monitor-exit p0
return-object p1
:catchall_60
move-exception p1
monitor-exit p0
throw p1
.end method
.method public final D()Z
.registers 3
.line 1
iget v0, p0, Lcom/bumptech/glide/disklrucache/a;->k:I
const/16 v1, 0x7d0
if-lt v0, v1, :cond_10
iget-object v1, p0, Lcom/bumptech/glide/disklrucache/a;->j:Ljava/util/LinkedHashMap;
.line 2
invoke-virtual {v1}, Ljava/util/AbstractMap;->size()I
move-result v1
if-lt v0, v1, :cond_10
const/4 v0, 0x1
goto :goto_11
:cond_10
const/4 v0, 0x0
:goto_11
return v0
.end method
.method public final H()V
.registers 9
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
iget-object v0, p0, Lcom/bumptech/glide/disklrucache/a;->c:Ljava/io/File;
invoke-static {v0}, Lcom/bumptech/glide/disklrucache/a;->o(Ljava/io/File;)V
.line 2
iget-object v0, p0, Lcom/bumptech/glide/disklrucache/a;->j: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
:cond_f
:goto_f
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_4c
.line 3
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/bumptech/glide/disklrucache/a$d;
.line 4
iget-object v2, v1, Lcom/bumptech/glide/disklrucache/a$d;->f:Lcom/bumptech/glide/disklrucache/a$c;
const/4 v3, 0x0
if-nez v2, :cond_30
.line 5
:goto_20
iget v2, p0, Lcom/bumptech/glide/disklrucache/a;->g:I
if-ge v3, v2, :cond_f
.line 6
iget-wide v4, p0, Lcom/bumptech/glide/disklrucache/a;->h:J
.line 7
iget-object v2, v1, Lcom/bumptech/glide/disklrucache/a$d;->b:[J
.line 8
aget-wide v6, v2, v3
add-long/2addr v4, v6
iput-wide v4, p0, Lcom/bumptech/glide/disklrucache/a;->h:J
add-int/lit8 v3, v3, 0x1
goto :goto_20
:cond_30
const/4 v2, 0x0
.line 9
iput-object v2, v1, Lcom/bumptech/glide/disklrucache/a$d;->f:Lcom/bumptech/glide/disklrucache/a$c;
.line 10
:goto_33
iget v2, p0, Lcom/bumptech/glide/disklrucache/a;->g:I
if-ge v3, v2, :cond_48
.line 11
iget-object v2, v1, Lcom/bumptech/glide/disklrucache/a$d;->c:[Ljava/io/File;
aget-object v2, v2, v3
.line 12
invoke-static {v2}, Lcom/bumptech/glide/disklrucache/a;->o(Ljava/io/File;)V
.line 13
iget-object v2, v1, Lcom/bumptech/glide/disklrucache/a$d;->d:[Ljava/io/File;
aget-object v2, v2, v3
.line 14
invoke-static {v2}, Lcom/bumptech/glide/disklrucache/a;->o(Ljava/io/File;)V
add-int/lit8 v3, v3, 0x1
goto :goto_33
.line 15
:cond_48
invoke-interface {v0}, Ljava/util/Iterator;->remove()V
goto :goto_f
:cond_4c
return-void
.end method
.method public final J()V
.registers 10
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const-string v0, ", "
.line 1
new-instance v1, Lcom/bumptech/glide/disklrucache/b;
new-instance v2, Ljava/io/FileInputStream;
iget-object v3, p0, Lcom/bumptech/glide/disklrucache/a;->b:Ljava/io/File;
invoke-direct {v2, v3}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
sget-object v3, Lcom/bumptech/glide/disklrucache/c;->a:Ljava/nio/charset/Charset;
invoke-direct {v1, v2, v3}, Lcom/bumptech/glide/disklrucache/b;-><init>(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V
.line 2
:try_start_10
invoke-virtual {v1}, Lcom/bumptech/glide/disklrucache/b;->h()Ljava/lang/String;
move-result-object v2
.line 3
invoke-virtual {v1}, Lcom/bumptech/glide/disklrucache/b;->h()Ljava/lang/String;
move-result-object v3
.line 4
invoke-virtual {v1}, Lcom/bumptech/glide/disklrucache/b;->h()Ljava/lang/String;
move-result-object v4
.line 5
invoke-virtual {v1}, Lcom/bumptech/glide/disklrucache/b;->h()Ljava/lang/String;
move-result-object v5
.line 6
invoke-virtual {v1}, Lcom/bumptech/glide/disklrucache/b;->h()Ljava/lang/String;
move-result-object v6
const-string v7, "libcore.io.DiskLruCache"
.line 7
invoke-virtual {v7, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v7
if-eqz v7, :cond_93
const-string v7, "1"
.line 8
invoke-virtual {v7, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v7
if-eqz v7, :cond_93
iget v7, p0, Lcom/bumptech/glide/disklrucache/a;->e:I
.line 9
invoke-static {v7}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;
move-result-object v7
invoke-virtual {v7, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_93
iget v4, p0, Lcom/bumptech/glide/disklrucache/a;->g:I
.line 10
invoke-static {v4}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;
move-result-object v4
invoke-virtual {v4, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_93
const-string v4, ""
.line 11
invoke-virtual {v4, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
:try_end_52
.catchall {:try_start_10 .. :try_end_52} :catchall_91
if-eqz v4, :cond_93
const/4 v0, 0x0
const/4 v2, 0x0
.line 12
:goto_56
:try_start_56
invoke-virtual {v1}, Lcom/bumptech/glide/disklrucache/b;->h()Ljava/lang/String;
move-result-object v3
invoke-virtual {p0, v3}, Lcom/bumptech/glide/disklrucache/a;->K(Ljava/lang/String;)V
:try_end_5d
.catch Ljava/io/EOFException; {:try_start_56 .. :try_end_5d} :catch_60
.catchall {:try_start_56 .. :try_end_5d} :catchall_91
add-int/lit8 v2, v2, 0x1
goto :goto_56
.line 13
:catch_60
:try_start_60
iget-object v3, p0, Lcom/bumptech/glide/disklrucache/a;->j:Ljava/util/LinkedHashMap;
invoke-virtual {v3}, Ljava/util/AbstractMap;->size()I
move-result v3
sub-int/2addr v2, v3
iput v2, p0, Lcom/bumptech/glide/disklrucache/a;->k:I
.line 14
iget v2, v1, Lcom/bumptech/glide/disklrucache/b;->e:I
const/4 v3, -0x1
const/4 v4, 0x1
if-ne v2, v3, :cond_70
const/4 v0, 0x1
:cond_70
if-eqz v0, :cond_76
.line 15
invoke-virtual {p0}, Lcom/bumptech/glide/disklrucache/a;->P()V
goto :goto_8b
.line 16
:cond_76
new-instance v0, Ljava/io/BufferedWriter;
new-instance v2, Ljava/io/OutputStreamWriter;
new-instance v3, Ljava/io/FileOutputStream;
iget-object v5, p0, Lcom/bumptech/glide/disklrucache/a;->b:Ljava/io/File;
invoke-direct {v3, v5, v4}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;Z)V
sget-object v4, Lcom/bumptech/glide/disklrucache/c;->a:Ljava/nio/charset/Charset;
invoke-direct {v2, v3, v4}, Ljava/io/OutputStreamWriter;-><init>(Ljava/io/OutputStream;Ljava/nio/charset/Charset;)V
invoke-direct {v0, v2}, Ljava/io/BufferedWriter;-><init>(Ljava/io/Writer;)V
iput-object v0, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
:try_end_8b
.catchall {:try_start_60 .. :try_end_8b} :catchall_91
.line 17
:goto_8b
:try_start_8b
invoke-virtual {v1}, Lcom/bumptech/glide/disklrucache/b;->close()V
:try_end_8e
.catch Ljava/lang/RuntimeException; {:try_start_8b .. :try_end_8e} :catch_8f
.catch Ljava/lang/Exception; {:try_start_8b .. :try_end_8e} :catch_8e
:catch_8e
return-void
:catch_8f
move-exception v0
.line 18
throw v0
:catchall_91
move-exception v0
goto :goto_c1
.line 19
:cond_93
:try_start_93
new-instance v4, Ljava/io/IOException;
new-instance v7, Ljava/lang/StringBuilder;
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
const-string v8, "unexpected journal header: ["
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v7, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v7, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v7, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v7, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v7, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v7, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v7, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v0, "]"
invoke-virtual {v7, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {v4, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v4
:try_end_c1
.catchall {:try_start_93 .. :try_end_c1} :catchall_91
.line 20
:goto_c1
:try_start_c1
invoke-virtual {v1}, Lcom/bumptech/glide/disklrucache/b;->close()V
:try_end_c4
.catch Ljava/lang/RuntimeException; {:try_start_c1 .. :try_end_c4} :catch_c5
.catch Ljava/lang/Exception; {:try_start_c1 .. :try_end_c4} :catch_c4
.line 21
:catch_c4
throw v0
:catch_c5
move-exception v0
.line 22
throw v0
.end method
.method public final K(Ljava/lang/String;)V
.registers 9
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/16 v0, 0x20
.line 1
invoke-virtual {p1, v0}, Ljava/lang/String;->indexOf(I)I
move-result v1
const-string v2, "unexpected journal line: "
const/4 v3, -0x1
if-eq v1, v3, :cond_aa
add-int/lit8 v4, v1, 0x1
.line 2
invoke-virtual {p1, v0, v4}, Ljava/lang/String;->indexOf(II)I
move-result v0
if-ne v0, v3, :cond_28
.line 3
invoke-virtual {p1, v4}, Ljava/lang/String;->substring(I)Ljava/lang/String;
move-result-object v4
const/4 v5, 0x6
if-ne v1, v5, :cond_2c
const-string v5, "REMOVE"
.line 4
invoke-virtual {p1, v5}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v5
if-eqz v5, :cond_2c
.line 5
iget-object p1, p0, Lcom/bumptech/glide/disklrucache/a;->j:Ljava/util/LinkedHashMap;
invoke-virtual {p1, v4}, Ljava/util/AbstractMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
return-void
.line 6
:cond_28
invoke-virtual {p1, v4, v0}, Ljava/lang/String;->substring(II)Ljava/lang/String;
move-result-object v4
.line 7
:cond_2c
iget-object v5, p0, Lcom/bumptech/glide/disklrucache/a;->j:Ljava/util/LinkedHashMap;
invoke-virtual {v5, v4}, Ljava/util/LinkedHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v5
check-cast v5, Lcom/bumptech/glide/disklrucache/a$d;
if-nez v5, :cond_40
.line 8
new-instance v5, Lcom/bumptech/glide/disklrucache/a$d;
invoke-direct {v5, p0, v4}, Lcom/bumptech/glide/disklrucache/a$d;-><init>(Lcom/bumptech/glide/disklrucache/a;Ljava/lang/String;)V
.line 9
iget-object v6, p0, Lcom/bumptech/glide/disklrucache/a;->j:Ljava/util/LinkedHashMap;
invoke-virtual {v6, v4, v5}, Ljava/util/AbstractMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
:cond_40
const/4 v4, 0x5
if-eq v0, v3, :cond_7e
if-ne v1, v4, :cond_7e
const-string v6, "CLEAN"
.line 10
invoke-virtual {p1, v6}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v6
if-eqz v6, :cond_7e
const/4 v1, 0x1
add-int/2addr v0, v1
.line 11
invoke-virtual {p1, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;
move-result-object p1
const-string v0, " "
invoke-virtual {p1, v0}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
move-result-object p1
.line 12
iput-boolean v1, v5, Lcom/bumptech/glide/disklrucache/a$d;->e:Z
const/4 v0, 0x0
.line 13
iput-object v0, v5, Lcom/bumptech/glide/disklrucache/a$d;->f:Lcom/bumptech/glide/disklrucache/a$c;
.line 14
array-length v1, p1
iget-object v2, v5, Lcom/bumptech/glide/disklrucache/a$d;->h:Lcom/bumptech/glide/disklrucache/a;
.line 15
iget v2, v2, Lcom/bumptech/glide/disklrucache/a;->g:I
if-ne v1, v2, :cond_7a
const/4 v1, 0x0
.line 16
:goto_66
:try_start_66
array-length v2, p1
if-ge v1, v2, :cond_9f
.line 17
iget-object v2, v5, Lcom/bumptech/glide/disklrucache/a$d;->b:[J
aget-object v3, p1, v1
invoke-static {v3}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
move-result-wide v3
aput-wide v3, v2, v1
:try_end_73
.catch Ljava/lang/NumberFormatException; {:try_start_66 .. :try_end_73} :catch_76
add-int/lit8 v1, v1, 0x1
goto :goto_66
.line 18
:catch_76
invoke-virtual {v5, p1}, Lcom/bumptech/glide/disklrucache/a$d;->b([Ljava/lang/String;)Ljava/io/IOException;
throw v0
.line 19
:cond_7a
invoke-virtual {v5, p1}, Lcom/bumptech/glide/disklrucache/a$d;->b([Ljava/lang/String;)Ljava/io/IOException;
throw v0
:cond_7e
if-ne v0, v3, :cond_92
if-ne v1, v4, :cond_92
const-string v4, "DIRTY"
.line 20
invoke-virtual {p1, v4}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v4
if-eqz v4, :cond_92
.line 21
new-instance p1, Lcom/bumptech/glide/disklrucache/a$c;
invoke-direct {p1, p0, v5}, Lcom/bumptech/glide/disklrucache/a$c;-><init>(Lcom/bumptech/glide/disklrucache/a;Lcom/bumptech/glide/disklrucache/a$d;)V
.line 22
iput-object p1, v5, Lcom/bumptech/glide/disklrucache/a$d;->f:Lcom/bumptech/glide/disklrucache/a$c;
goto :goto_9f
:cond_92
if-ne v0, v3, :cond_a0
const/4 v0, 0x4
if-ne v1, v0, :cond_a0
const-string v0, "READ"
.line 23
invoke-virtual {p1, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_a0
:cond_9f
:goto_9f
return-void
.line 24
:cond_a0
new-instance v0, Ljava/io/IOException;
.line 25
invoke-static {v2, p1}, Landroidx/appcompat/e;->g(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
.line 26
invoke-direct {v0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.line 27
:cond_aa
new-instance v0, Ljava/io/IOException;
.line 28
invoke-static {v2, p1}, Landroidx/appcompat/e;->g(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
.line 29
invoke-direct {v0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public final declared-synchronized P()V
.registers 7
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
.line 1
:try_start_1
iget-object v0, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
if-eqz v0, :cond_8
.line 2
invoke-static {v0}, Lcom/bumptech/glide/disklrucache/a;->n(Ljava/io/Writer;)V
.line 3
:cond_8
new-instance v0, Ljava/io/BufferedWriter;
new-instance v1, Ljava/io/OutputStreamWriter;
new-instance v2, Ljava/io/FileOutputStream;
iget-object v3, p0, Lcom/bumptech/glide/disklrucache/a;->c:Ljava/io/File;
invoke-direct {v2, v3}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
sget-object v3, Lcom/bumptech/glide/disklrucache/c;->a:Ljava/nio/charset/Charset;
invoke-direct {v1, v2, v3}, Ljava/io/OutputStreamWriter;-><init>(Ljava/io/OutputStream;Ljava/nio/charset/Charset;)V
invoke-direct {v0, v1}, Ljava/io/BufferedWriter;-><init>(Ljava/io/Writer;)V
:try_end_1b
.catchall {:try_start_1 .. :try_end_1b} :catchall_e3
:try_start_1b
const-string v1, "libcore.io.DiskLruCache"
.line 4
invoke-virtual {v0, v1}, Ljava/io/Writer;->write(Ljava/lang/String;)V
const-string v1, "\n"
.line 5
invoke-virtual {v0, v1}, Ljava/io/Writer;->write(Ljava/lang/String;)V
const-string v1, "1"
.line 6
invoke-virtual {v0, v1}, Ljava/io/Writer;->write(Ljava/lang/String;)V
const-string v1, "\n"
.line 7
invoke-virtual {v0, v1}, Ljava/io/Writer;->write(Ljava/lang/String;)V
.line 8
iget v1, p0, Lcom/bumptech/glide/disklrucache/a;->e:I
invoke-static {v1}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/io/Writer;->write(Ljava/lang/String;)V
const-string v1, "\n"
.line 9
invoke-virtual {v0, v1}, Ljava/io/Writer;->write(Ljava/lang/String;)V
.line 10
iget v1, p0, Lcom/bumptech/glide/disklrucache/a;->g:I
invoke-static {v1}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/io/Writer;->write(Ljava/lang/String;)V
const-string v1, "\n"
.line 11
invoke-virtual {v0, v1}, Ljava/io/Writer;->write(Ljava/lang/String;)V
const-string v1, "\n"
.line 12
invoke-virtual {v0, v1}, Ljava/io/Writer;->write(Ljava/lang/String;)V
.line 13
iget-object v1, p0, Lcom/bumptech/glide/disklrucache/a;->j:Ljava/util/LinkedHashMap;
invoke-virtual {v1}, Ljava/util/LinkedHashMap;->values()Ljava/util/Collection;
move-result-object v1
invoke-interface {v1}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
move-result-object v1
:goto_5a
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_a7
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/bumptech/glide/disklrucache/a$d;
.line 14
iget-object v3, v2, Lcom/bumptech/glide/disklrucache/a$d;->f:Lcom/bumptech/glide/disklrucache/a$c;
const/16 v4, 0xa
if-eqz v3, :cond_86
.line 15
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "DIRTY "
invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 16
iget-object v2, v2, Lcom/bumptech/glide/disklrucache/a$d;->a:Ljava/lang/String;
.line 17
invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-virtual {v0, v2}, Ljava/io/Writer;->write(Ljava/lang/String;)V
goto :goto_5a
.line 18
:cond_86
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "CLEAN "
invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 19
iget-object v5, v2, Lcom/bumptech/glide/disklrucache/a$d;->a:Ljava/lang/String;
.line 20
invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Lcom/bumptech/glide/disklrucache/a$d;->a()Ljava/lang/String;
move-result-object v2
invoke-virtual {v3, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-virtual {v0, v2}, Ljava/io/Writer;->write(Ljava/lang/String;)V
:try_end_a6
.catchall {:try_start_1b .. :try_end_a6} :catchall_de
goto :goto_5a
.line 21
:cond_a7
:try_start_a7
invoke-static {v0}, Lcom/bumptech/glide/disklrucache/a;->n(Ljava/io/Writer;)V
.line 22
iget-object v0, p0, Lcom/bumptech/glide/disklrucache/a;->b:Ljava/io/File;
invoke-virtual {v0}, Ljava/io/File;->exists()Z
move-result v0
const/4 v1, 0x1
if-eqz v0, :cond_ba
.line 23
iget-object v0, p0, Lcom/bumptech/glide/disklrucache/a;->b:Ljava/io/File;
iget-object v2, p0, Lcom/bumptech/glide/disklrucache/a;->d:Ljava/io/File;
invoke-static {v0, v2, v1}, Lcom/bumptech/glide/disklrucache/a;->R(Ljava/io/File;Ljava/io/File;Z)V
.line 24
:cond_ba
iget-object v0, p0, Lcom/bumptech/glide/disklrucache/a;->c:Ljava/io/File;
iget-object v2, p0, Lcom/bumptech/glide/disklrucache/a;->b:Ljava/io/File;
const/4 v3, 0x0
invoke-static {v0, v2, v3}, Lcom/bumptech/glide/disklrucache/a;->R(Ljava/io/File;Ljava/io/File;Z)V
.line 25
iget-object v0, p0, Lcom/bumptech/glide/disklrucache/a;->d:Ljava/io/File;
invoke-virtual {v0}, Ljava/io/File;->delete()Z
.line 26
new-instance v0, Ljava/io/BufferedWriter;
new-instance v2, Ljava/io/OutputStreamWriter;
new-instance v3, Ljava/io/FileOutputStream;
iget-object v4, p0, Lcom/bumptech/glide/disklrucache/a;->b:Ljava/io/File;
invoke-direct {v3, v4, v1}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;Z)V
sget-object v1, Lcom/bumptech/glide/disklrucache/c;->a:Ljava/nio/charset/Charset;
invoke-direct {v2, v3, v1}, Ljava/io/OutputStreamWriter;-><init>(Ljava/io/OutputStream;Ljava/nio/charset/Charset;)V
invoke-direct {v0, v2}, Ljava/io/BufferedWriter;-><init>(Ljava/io/Writer;)V
iput-object v0, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
:try_end_dc
.catchall {:try_start_a7 .. :try_end_dc} :catchall_e3
.line 27
monitor-exit p0
return-void
:catchall_de
move-exception v1
.line 28
:try_start_df
invoke-static {v0}, Lcom/bumptech/glide/disklrucache/a;->n(Ljava/io/Writer;)V
.line 29
throw v1
:try_end_e3
.catchall {:try_start_df .. :try_end_e3} :catchall_e3
:catchall_e3
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final U()V
.registers 9
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
:goto_0
iget-wide v0, p0, Lcom/bumptech/glide/disklrucache/a;->h:J
iget-wide v2, p0, Lcom/bumptech/glide/disklrucache/a;->f:J
cmp-long v4, v0, v2
if-lez v4, :cond_a9
.line 2
iget-object v0, p0, Lcom/bumptech/glide/disklrucache/a;->j:Ljava/util/LinkedHashMap;
invoke-virtual {v0}, Ljava/util/LinkedHashMap;->entrySet()Ljava/util/Set;
move-result-object v0
invoke-interface {v0}, Ljava/util/Set;->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, Ljava/util/Map$Entry;
.line 3
invoke-interface {v0}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/String;
.line 4
monitor-enter p0
.line 5
:try_start_1f
invoke-virtual {p0}, Lcom/bumptech/glide/disklrucache/a;->l()V
.line 6
iget-object v1, p0, Lcom/bumptech/glide/disklrucache/a;->j:Ljava/util/LinkedHashMap;
invoke-virtual {v1, v0}, Ljava/util/LinkedHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/bumptech/glide/disklrucache/a$d;
const/4 v2, 0x0
if-eqz v1, :cond_a3
.line 7
iget-object v3, v1, Lcom/bumptech/glide/disklrucache/a$d;->f:Lcom/bumptech/glide/disklrucache/a$c;
if-eqz v3, :cond_32
goto :goto_a3
.line 8
:cond_32
:goto_32
iget v3, p0, Lcom/bumptech/glide/disklrucache/a;->g:I
if-ge v2, v3, :cond_6e
.line 9
iget-object v3, v1, Lcom/bumptech/glide/disklrucache/a$d;->c:[Ljava/io/File;
aget-object v3, v3, v2
.line 10
invoke-virtual {v3}, Ljava/io/File;->exists()Z
move-result v4
if-eqz v4, :cond_5e
invoke-virtual {v3}, Ljava/io/File;->delete()Z
move-result v4
if-eqz v4, :cond_47
goto :goto_5e
.line 11
:cond_47
new-instance v0, Ljava/io/IOException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "failed to delete "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.line 12
:cond_5e
:goto_5e
iget-wide v3, p0, Lcom/bumptech/glide/disklrucache/a;->h:J
.line 13
iget-object v5, v1, Lcom/bumptech/glide/disklrucache/a$d;->b:[J
.line 14
aget-wide v6, v5, v2
sub-long/2addr v3, v6
iput-wide v3, p0, Lcom/bumptech/glide/disklrucache/a;->h:J
const-wide/16 v3, 0x0
.line 15
aput-wide v3, v5, v2
add-int/lit8 v2, v2, 0x1
goto :goto_32
.line 16
:cond_6e
iget v1, p0, Lcom/bumptech/glide/disklrucache/a;->k:I
add-int/lit8 v1, v1, 0x1
iput v1, p0, Lcom/bumptech/glide/disklrucache/a;->k:I
.line 17
iget-object v1, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
const-string v2, "REMOVE"
invoke-virtual {v1, v2}, Ljava/io/Writer;->append(Ljava/lang/CharSequence;)Ljava/io/Writer;
.line 18
iget-object v1, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
const/16 v2, 0x20
invoke-virtual {v1, v2}, Ljava/io/Writer;->append(C)Ljava/io/Writer;
.line 19
iget-object v1, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
invoke-virtual {v1, v0}, Ljava/io/Writer;->append(Ljava/lang/CharSequence;)Ljava/io/Writer;
.line 20
iget-object v1, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
const/16 v2, 0xa
invoke-virtual {v1, v2}, Ljava/io/Writer;->append(C)Ljava/io/Writer;
.line 21
iget-object v1, p0, Lcom/bumptech/glide/disklrucache/a;->j:Ljava/util/LinkedHashMap;
invoke-virtual {v1, v0}, Ljava/util/AbstractMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
.line 22
invoke-virtual {p0}, Lcom/bumptech/glide/disklrucache/a;->D()Z
move-result v0
if-eqz v0, :cond_a0
.line 23
iget-object v0, p0, Lcom/bumptech/glide/disklrucache/a;->m:Ljava/util/concurrent/ThreadPoolExecutor;
iget-object v1, p0, Lcom/bumptech/glide/disklrucache/a;->n:Lcom/bumptech/glide/disklrucache/a$a;
invoke-static {v0, v1}, Lcom/bumptech/glide/disklrucache/a;->a(Ljava/util/concurrent/ThreadPoolExecutor;Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;
:try_end_a0
.catchall {:try_start_1f .. :try_end_a0} :catchall_a6
.line 24
:cond_a0
monitor-exit p0
goto/16 :goto_0
.line 25
:cond_a3
:goto_a3
monitor-exit p0
goto/16 :goto_0
:catchall_a6
move-exception v0
monitor-exit p0
throw v0
:cond_a9
return-void
.end method
.method public final declared-synchronized close()V
.registers 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
.line 1
:try_start_1
iget-object v0, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
:try_end_3
.catchall {:try_start_1 .. :try_end_3} :catchall_37
if-nez v0, :cond_7
.line 2
monitor-exit p0
return-void
.line 3
:cond_7
:try_start_7
new-instance v0, Ljava/util/ArrayList;
iget-object v1, p0, Lcom/bumptech/glide/disklrucache/a;->j:Ljava/util/LinkedHashMap;
invoke-virtual {v1}, Ljava/util/LinkedHashMap;->values()Ljava/util/Collection;
move-result-object v1
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v0
:cond_16
:goto_16
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_2a
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/bumptech/glide/disklrucache/a$d;
.line 4
iget-object v1, v1, Lcom/bumptech/glide/disklrucache/a$d;->f:Lcom/bumptech/glide/disklrucache/a$c;
if-eqz v1, :cond_16
.line 5
invoke-virtual {v1}, Lcom/bumptech/glide/disklrucache/a$c;->a()V
goto :goto_16
.line 6
:cond_2a
invoke-virtual {p0}, Lcom/bumptech/glide/disklrucache/a;->U()V
.line 7
iget-object v0, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
invoke-static {v0}, Lcom/bumptech/glide/disklrucache/a;->n(Ljava/io/Writer;)V
const/4 v0, 0x0
.line 8
iput-object v0, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
:try_end_35
.catchall {:try_start_7 .. :try_end_35} :catchall_37
.line 9
monitor-exit p0
return-void
:catchall_37
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final l()V
.registers 3
.line 1
iget-object v0, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
if-eqz v0, :cond_5
return-void
.line 2
:cond_5
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
.end method
.method public final u(Ljava/lang/String;)Lcom/bumptech/glide/disklrucache/a$c;
.registers 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 1
monitor-enter p0
.line 2
:try_start_1
invoke-virtual {p0}, Lcom/bumptech/glide/disklrucache/a;->l()V
.line 3
iget-object v0, p0, Lcom/bumptech/glide/disklrucache/a;->j:Ljava/util/LinkedHashMap;
invoke-virtual {v0, p1}, Ljava/util/LinkedHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/bumptech/glide/disklrucache/a$d;
const/4 v1, 0x0
if-nez v0, :cond_1a
.line 4
new-instance v0, Lcom/bumptech/glide/disklrucache/a$d;
invoke-direct {v0, p0, p1}, Lcom/bumptech/glide/disklrucache/a$d;-><init>(Lcom/bumptech/glide/disklrucache/a;Ljava/lang/String;)V
.line 5
iget-object v1, p0, Lcom/bumptech/glide/disklrucache/a;->j:Ljava/util/LinkedHashMap;
invoke-virtual {v1, p1, v0}, Ljava/util/AbstractMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
goto :goto_20
.line 6
:cond_1a
iget-object v2, v0, Lcom/bumptech/glide/disklrucache/a$d;->f:Lcom/bumptech/glide/disklrucache/a$c;
:try_end_1c
.catchall {:try_start_1 .. :try_end_1c} :catchall_48
if-eqz v2, :cond_20
.line 7
monitor-exit p0
goto :goto_47
.line 8
:cond_20
:goto_20
:try_start_20
new-instance v1, Lcom/bumptech/glide/disklrucache/a$c;
invoke-direct {v1, p0, v0}, Lcom/bumptech/glide/disklrucache/a$c;-><init>(Lcom/bumptech/glide/disklrucache/a;Lcom/bumptech/glide/disklrucache/a$d;)V
.line 9
iput-object v1, v0, Lcom/bumptech/glide/disklrucache/a$d;->f:Lcom/bumptech/glide/disklrucache/a$c;
.line 10
iget-object v0, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
const-string v2, "DIRTY"
invoke-virtual {v0, v2}, Ljava/io/Writer;->append(Ljava/lang/CharSequence;)Ljava/io/Writer;
.line 11
iget-object v0, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
const/16 v2, 0x20
invoke-virtual {v0, v2}, Ljava/io/Writer;->append(C)Ljava/io/Writer;
.line 12
iget-object v0, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
invoke-virtual {v0, p1}, Ljava/io/Writer;->append(Ljava/lang/CharSequence;)Ljava/io/Writer;
.line 13
iget-object p1, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
const/16 v0, 0xa
invoke-virtual {p1, v0}, Ljava/io/Writer;->append(C)Ljava/io/Writer;
.line 14
iget-object p1, p0, Lcom/bumptech/glide/disklrucache/a;->i:Ljava/io/BufferedWriter;
invoke-static {p1}, Lcom/bumptech/glide/disklrucache/a;->x(Ljava/io/Writer;)V
:try_end_46
.catchall {:try_start_20 .. :try_end_46} :catchall_48
.line 15
monitor-exit p0
:goto_47
return-object v1
:catchall_48
move-exception p1
monitor-exit p0
throw p1
.end method