mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2024-12-25 16:42:30 -06:00
1000 lines
26 KiB
Smali
1000 lines
26 KiB
Smali
.class public final Lokhttp3/Cache;
|
|
.super Ljava/lang/Object;
|
|
.source "Cache.kt"
|
|
|
|
# interfaces
|
|
.implements Ljava/io/Closeable;
|
|
.implements Ljava/io/Flushable;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lokhttp3/Cache$RealCacheRequest;,
|
|
Lokhttp3/Cache$Entry;,
|
|
Lokhttp3/Cache$CacheResponseBody;,
|
|
Lokhttp3/Cache$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Lkotlin/Metadata;
|
|
bv = {
|
|
0x1,
|
|
0x0,
|
|
0x3
|
|
}
|
|
d1 = {
|
|
"\u0000r\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0004\n\u0002\u0010\u0008\n\u0000\n\u0002\u0010\u000b\n\u0002\u0008\u000c\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0006\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0003\n\u0002\u0018\u0002\n\u0002\u0008\t\n\u0002\u0018\u0002\n\u0002\u0008\u0006\n\u0002\u0010)\n\u0002\u0010\u000e\n\u0002\u0008\u0005\u0018\u0000 C2\u00020\u00012\u00020\u0002:\u0004BCDEB\u0017\u0008\u0016\u0012\u0006\u0010\u0003\u001a\u00020\u0004\u0012\u0006\u0010\u0005\u001a\u00020\u0006\u00a2\u0006\u0002\u0010\u0007B\u001f\u0008\u0000\u0012\u0006\u0010\u0003\u001a\u00020\u0004\u0012\u0006\u0010\u0005\u001a\u00020\u0006\u0012\u0006\u0010\u0008\u001a\u00020\t\u00a2\u0006\u0002\u0010\nJ\u0016\u0010\u001f\u001a\u00020 2\u000c\u0010!\u001a\u0008\u0018\u00010\"R\u00020\u000cH\u0002J\u0008\u0010#\u001a\u00020 H\u0016J\u0006\u0010$\u001a\u00020 J\r\u0010\u0003\u001a\u00020\u0004H\u0007\u00a2\u0006\u0002\u0008%J\u0006\u0010&\u001a\u00020 J\u0008\u0010\'\u001a\u00020 H\u0016J\u0017\u0010(\u001a\u0004\u0018\u00010)2\u0006\u0010*\u001a\u00020+H\u0000\u00a2\u0006\u0002\u0008,J\u0006\u0010\u0010\u001a\u00020\u0011J\u0006\u0010-\u001a\u00020 J\u0006\u0010\u0005\u001a\u00020\u0006J\u0006\u0010\u0015\u001a\u00020\u0011J\u0017\u0010.\u001a\u0004\u0018\u00010/2\u0006\u00100\u001a\u00020)H\u0000\u00a2\u0006\u0002\u00081J\u0015\u00102\u001a\u00020 2\u0006\u0010*\u001a\u00020+H\u0000\u00a2\u0006\u0002\u00083J\u0006\u0010\u0016\u001a\u00020\u0011J\u0006\u00104\u001a\u00020\u0006J\r\u00105\u001a\u00020 H\u0000\u00a2\u0006\u0002\u00086J\u0015\u00107\u001a\u00020 2\u0006\u00108\u001a\u000209H\u0000\u00a2\u0006\u0002\u0008:J\u001d\u0010;\u001a\u00020 2\u0006\u0010<\u001a\u00020)2\u0006\u0010=\u001a\u00020)H\u0000\u00a2\u0006\u0002\u0008>J\u000c\u0010?\u001a\u0008\u0012\u0004\u0012\u00020A0@J\u0006\u0010\u0017\u001a\u00020\u0011J\u0006\u0010\u001c\u001a\u00020\u0011R\u0014\u0010\u000b\u001a\u00020\u000cX\u0080\u0004\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\r\u0010\u000eR\u0011\u0010\u0003\u001a\u00020\u00048G\u00a2\u0006\u0006\u001a\u0004\u0008\u0003\u0010\u000fR\u000e\u0010\u0010\u001a\u00020\u0011X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u0011\u0010\u0012\u001a\u00020\u00138F\u00a2\u0006\u0006\u001a\u0004\u0008\u0012\u0010\u0014R\u000e\u0010\u0015\u001a\u00020\u0011X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0016\u001a\u00020\u0011X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u001a\u0010\u0017\u001a\u00020\u0011X\u0080\u000e\u00a2\u0006\u000e\n\u0000\u001a\u0004\u0008\u0018\u0010\u0019\"\u0004\u0008\u001a\u0010\u001bR\u001a\u0010\u001c\u001a\u00020\u0011X\u0080\u000e\u00a2\u0006\u000e\n\u0000\u001a\u0004\u0008\u001d\u0010\u0019\"\u0004\u0008\u001e\u0010\u001b\u00a8\u0006F"
|
|
}
|
|
d2 = {
|
|
"Lokhttp3/Cache;",
|
|
"Ljava/io/Closeable;",
|
|
"Ljava/io/Flushable;",
|
|
"directory",
|
|
"Ljava/io/File;",
|
|
"maxSize",
|
|
"",
|
|
"(Ljava/io/File;J)V",
|
|
"fileSystem",
|
|
"Lokhttp3/internal/io/FileSystem;",
|
|
"(Ljava/io/File;JLokhttp3/internal/io/FileSystem;)V",
|
|
"cache",
|
|
"Lokhttp3/internal/cache/DiskLruCache;",
|
|
"getCache$okhttp",
|
|
"()Lokhttp3/internal/cache/DiskLruCache;",
|
|
"()Ljava/io/File;",
|
|
"hitCount",
|
|
"",
|
|
"isClosed",
|
|
"",
|
|
"()Z",
|
|
"networkCount",
|
|
"requestCount",
|
|
"writeAbortCount",
|
|
"getWriteAbortCount$okhttp",
|
|
"()I",
|
|
"setWriteAbortCount$okhttp",
|
|
"(I)V",
|
|
"writeSuccessCount",
|
|
"getWriteSuccessCount$okhttp",
|
|
"setWriteSuccessCount$okhttp",
|
|
"abortQuietly",
|
|
"",
|
|
"editor",
|
|
"Lokhttp3/internal/cache/DiskLruCache$Editor;",
|
|
"close",
|
|
"delete",
|
|
"-deprecated_directory",
|
|
"evictAll",
|
|
"flush",
|
|
"get",
|
|
"Lokhttp3/Response;",
|
|
"request",
|
|
"Lokhttp3/Request;",
|
|
"get$okhttp",
|
|
"initialize",
|
|
"put",
|
|
"Lokhttp3/internal/cache/CacheRequest;",
|
|
"response",
|
|
"put$okhttp",
|
|
"remove",
|
|
"remove$okhttp",
|
|
"size",
|
|
"trackConditionalCacheHit",
|
|
"trackConditionalCacheHit$okhttp",
|
|
"trackResponse",
|
|
"cacheStrategy",
|
|
"Lokhttp3/internal/cache/CacheStrategy;",
|
|
"trackResponse$okhttp",
|
|
"update",
|
|
"cached",
|
|
"network",
|
|
"update$okhttp",
|
|
"urls",
|
|
"",
|
|
"",
|
|
"CacheResponseBody",
|
|
"Companion",
|
|
"Entry",
|
|
"RealCacheRequest",
|
|
"okhttp"
|
|
}
|
|
k = 0x1
|
|
mv = {
|
|
0x1,
|
|
0x4,
|
|
0x0
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final Companion:Lokhttp3/Cache$Companion;
|
|
|
|
.field private static final ENTRY_BODY:I = 0x1
|
|
|
|
.field private static final ENTRY_COUNT:I = 0x2
|
|
|
|
.field private static final ENTRY_METADATA:I = 0x0
|
|
|
|
.field private static final VERSION:I = 0x31191
|
|
|
|
|
|
# instance fields
|
|
.field private final cache:Lokhttp3/internal/cache/DiskLruCache;
|
|
|
|
.field private hitCount:I
|
|
|
|
.field private networkCount:I
|
|
|
|
.field private requestCount:I
|
|
|
|
.field private writeAbortCount:I
|
|
|
|
.field private writeSuccessCount:I
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Lokhttp3/Cache$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lokhttp3/Cache$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lokhttp3/Cache;->Companion:Lokhttp3/Cache$Companion;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/io/File;J)V
|
|
.locals 1
|
|
|
|
const-string v0, "directory"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 166
|
|
sget-object v0, Lokhttp3/internal/io/FileSystem;->SYSTEM:Lokhttp3/internal/io/FileSystem;
|
|
|
|
invoke-direct {p0, p1, p2, p3, v0}, Lokhttp3/Cache;-><init>(Ljava/io/File;JLokhttp3/internal/io/FileSystem;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/io/File;JLokhttp3/internal/io/FileSystem;)V
|
|
.locals 9
|
|
|
|
const-string v0, "directory"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "fileSystem"
|
|
|
|
invoke-static {p4, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 141
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 146
|
|
new-instance v0, Lokhttp3/internal/cache/DiskLruCache;
|
|
|
|
const v4, 0x31191
|
|
|
|
const/4 v5, 0x2
|
|
|
|
.line 152
|
|
sget-object v8, Lokhttp3/internal/concurrent/TaskRunner;->INSTANCE:Lokhttp3/internal/concurrent/TaskRunner;
|
|
|
|
move-object v1, v0
|
|
|
|
move-object v2, p4
|
|
|
|
move-object v3, p1
|
|
|
|
move-wide v6, p2
|
|
|
|
.line 146
|
|
invoke-direct/range {v1 .. v8}, Lokhttp3/internal/cache/DiskLruCache;-><init>(Lokhttp3/internal/io/FileSystem;Ljava/io/File;IIJLokhttp3/internal/concurrent/TaskRunner;)V
|
|
|
|
iput-object v0, p0, Lokhttp3/Cache;->cache:Lokhttp3/internal/cache/DiskLruCache;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final abortQuietly(Lokhttp3/internal/cache/DiskLruCache$Editor;)V
|
|
.locals 0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 247
|
|
:try_start_0
|
|
invoke-virtual {p1}, Lokhttp3/internal/cache/DiskLruCache$Editor;->abort()V
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:catch_0
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final key(Lokhttp3/HttpUrl;)Ljava/lang/String;
|
|
.locals 1
|
|
.annotation runtime Lkotlin/jvm/JvmStatic;
|
|
.end annotation
|
|
|
|
sget-object v0, Lokhttp3/Cache;->Companion:Lokhttp3/Cache$Companion;
|
|
|
|
invoke-virtual {v0, p0}, Lokhttp3/Cache$Companion;->key(Lokhttp3/HttpUrl;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final -deprecated_directory()Ljava/io/File;
|
|
.locals 0
|
|
.annotation runtime Lkotlin/Deprecated;
|
|
level = .enum Lkotlin/DeprecationLevel;->ERROR:Lkotlin/DeprecationLevel;
|
|
message = "moved to val"
|
|
replaceWith = .subannotation Lkotlin/ReplaceWith;
|
|
expression = "directory"
|
|
imports = {}
|
|
.end subannotation
|
|
.end annotation
|
|
|
|
iget-object p0, p0, Lokhttp3/Cache;->cache:Lokhttp3/internal/cache/DiskLruCache;
|
|
|
|
.line 365
|
|
invoke-virtual {p0}, Lokhttp3/internal/cache/DiskLruCache;->getDirectory()Ljava/io/File;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public close()V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object p0, p0, Lokhttp3/Cache;->cache:Lokhttp3/internal/cache/DiskLruCache;
|
|
|
|
.line 354
|
|
invoke-virtual {p0}, Lokhttp3/internal/cache/DiskLruCache;->close()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final delete()V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object p0, p0, Lokhttp3/Cache;->cache:Lokhttp3/internal/cache/DiskLruCache;
|
|
|
|
.line 274
|
|
invoke-virtual {p0}, Lokhttp3/internal/cache/DiskLruCache;->delete()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final directory()Ljava/io/File;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lokhttp3/Cache;->cache:Lokhttp3/internal/cache/DiskLruCache;
|
|
|
|
.line 358
|
|
invoke-virtual {p0}, Lokhttp3/internal/cache/DiskLruCache;->getDirectory()Ljava/io/File;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public final evictAll()V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object p0, p0, Lokhttp3/Cache;->cache:Lokhttp3/internal/cache/DiskLruCache;
|
|
|
|
.line 283
|
|
invoke-virtual {p0}, Lokhttp3/internal/cache/DiskLruCache;->evictAll()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public flush()V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object p0, p0, Lokhttp3/Cache;->cache:Lokhttp3/internal/cache/DiskLruCache;
|
|
|
|
.line 349
|
|
invoke-virtual {p0}, Lokhttp3/internal/cache/DiskLruCache;->flush()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final get$okhttp(Lokhttp3/Request;)Lokhttp3/Response;
|
|
.locals 3
|
|
|
|
const-string v0, "request"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lokhttp3/Cache;->Companion:Lokhttp3/Cache$Companion;
|
|
|
|
.line 169
|
|
invoke-virtual {p1}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lokhttp3/Cache$Companion;->key(Lokhttp3/HttpUrl;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:try_start_0
|
|
iget-object p0, p0, Lokhttp3/Cache;->cache:Lokhttp3/internal/cache/DiskLruCache;
|
|
|
|
.line 171
|
|
invoke-virtual {p0, v0}, Lokhttp3/internal/cache/DiskLruCache;->get(Ljava/lang/String;)Lokhttp3/internal/cache/DiskLruCache$Snapshot;
|
|
|
|
move-result-object p0
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1
|
|
|
|
if-eqz p0, :cond_2
|
|
|
|
.line 177
|
|
:try_start_1
|
|
new-instance v0, Lokhttp3/Cache$Entry;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-virtual {p0, v2}, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->getSource(I)Lokio/Source;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-direct {v0, v2}, Lokhttp3/Cache$Entry;-><init>(Lokio/Source;)V
|
|
:try_end_1
|
|
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0
|
|
|
|
.line 183
|
|
invoke-virtual {v0, p0}, Lokhttp3/Cache$Entry;->response(Lokhttp3/internal/cache/DiskLruCache$Snapshot;)Lokhttp3/Response;
|
|
|
|
move-result-object p0
|
|
|
|
.line 184
|
|
invoke-virtual {v0, p1, p0}, Lokhttp3/Cache$Entry;->matches(Lokhttp3/Request;Lokhttp3/Response;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
.line 185
|
|
invoke-virtual {p0}, Lokhttp3/Response;->body()Lokhttp3/ResponseBody;
|
|
|
|
move-result-object p0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
check-cast p0, Ljava/io/Closeable;
|
|
|
|
invoke-static {p0}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V
|
|
|
|
:cond_0
|
|
return-object v1
|
|
|
|
:cond_1
|
|
return-object p0
|
|
|
|
.line 179
|
|
:catch_0
|
|
check-cast p0, Ljava/io/Closeable;
|
|
|
|
invoke-static {p0}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V
|
|
|
|
:catch_1
|
|
:cond_2
|
|
return-object v1
|
|
.end method
|
|
|
|
.method public final getCache$okhttp()Lokhttp3/internal/cache/DiskLruCache;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lokhttp3/Cache;->cache:Lokhttp3/internal/cache/DiskLruCache;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public final getWriteAbortCount$okhttp()I
|
|
.locals 0
|
|
|
|
iget p0, p0, Lokhttp3/Cache;->writeAbortCount:I
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public final getWriteSuccessCount$okhttp()I
|
|
.locals 0
|
|
|
|
iget p0, p0, Lokhttp3/Cache;->writeSuccessCount:I
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public final declared-synchronized hitCount()I
|
|
.locals 1
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget v0, p0, Lokhttp3/Cache;->hitCount:I
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 385
|
|
monitor-exit p0
|
|
|
|
return v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final initialize()V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object p0, p0, Lokhttp3/Cache;->cache:Lokhttp3/internal/cache/DiskLruCache;
|
|
|
|
.line 265
|
|
invoke-virtual {p0}, Lokhttp3/internal/cache/DiskLruCache;->initialize()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final isClosed()Z
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lokhttp3/Cache;->cache:Lokhttp3/internal/cache/DiskLruCache;
|
|
|
|
.line 163
|
|
invoke-virtual {p0}, Lokhttp3/internal/cache/DiskLruCache;->isClosed()Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public final maxSize()J
|
|
.locals 2
|
|
|
|
iget-object p0, p0, Lokhttp3/Cache;->cache:Lokhttp3/internal/cache/DiskLruCache;
|
|
|
|
.line 345
|
|
invoke-virtual {p0}, Lokhttp3/internal/cache/DiskLruCache;->getMaxSize()J
|
|
|
|
move-result-wide v0
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public final declared-synchronized networkCount()I
|
|
.locals 1
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget v0, p0, Lokhttp3/Cache;->networkCount:I
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 383
|
|
monitor-exit p0
|
|
|
|
return v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final put$okhttp(Lokhttp3/Response;)Lokhttp3/internal/cache/CacheRequest;
|
|
.locals 10
|
|
|
|
const-string v0, "response"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 193
|
|
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lokhttp3/Request;->method()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 195
|
|
sget-object v1, Lokhttp3/internal/http/HttpMethod;->INSTANCE:Lokhttp3/internal/http/HttpMethod;
|
|
|
|
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lokhttp3/Request;->method()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Lokhttp3/internal/http/HttpMethod;->invalidatesCache(Ljava/lang/String;)Z
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 197
|
|
:try_start_0
|
|
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lokhttp3/Cache;->remove$okhttp(Lokhttp3/Request;)V
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:catch_0
|
|
return-object v2
|
|
|
|
:cond_0
|
|
const-string v1, "GET"
|
|
|
|
.line 204
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
xor-int/lit8 v0, v0, 0x1
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
return-object v2
|
|
|
|
:cond_1
|
|
sget-object v0, Lokhttp3/Cache;->Companion:Lokhttp3/Cache$Companion;
|
|
|
|
.line 210
|
|
invoke-virtual {v0, p1}, Lokhttp3/Cache$Companion;->hasVaryAll(Lokhttp3/Response;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
return-object v2
|
|
|
|
.line 214
|
|
:cond_2
|
|
new-instance v1, Lokhttp3/Cache$Entry;
|
|
|
|
invoke-direct {v1, p1}, Lokhttp3/Cache$Entry;-><init>(Lokhttp3/Response;)V
|
|
|
|
.line 215
|
|
move-object v3, v2
|
|
|
|
check-cast v3, Lokhttp3/internal/cache/DiskLruCache$Editor;
|
|
|
|
:try_start_1
|
|
iget-object v4, p0, Lokhttp3/Cache;->cache:Lokhttp3/internal/cache/DiskLruCache;
|
|
|
|
.line 217
|
|
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Lokhttp3/Cache$Companion;->key(Lokhttp3/HttpUrl;)Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
const-wide/16 v6, 0x0
|
|
|
|
const/4 v8, 0x2
|
|
|
|
const/4 v9, 0x0
|
|
|
|
invoke-static/range {v4 .. v9}, Lokhttp3/internal/cache/DiskLruCache;->edit$default(Lokhttp3/internal/cache/DiskLruCache;Ljava/lang/String;JILjava/lang/Object;)Lokhttp3/internal/cache/DiskLruCache$Editor;
|
|
|
|
move-result-object p1
|
|
:try_end_1
|
|
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_1
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
.line 218
|
|
:try_start_2
|
|
invoke-virtual {v1, p1}, Lokhttp3/Cache$Entry;->writeTo(Lokhttp3/internal/cache/DiskLruCache$Editor;)V
|
|
|
|
.line 219
|
|
new-instance v0, Lokhttp3/Cache$RealCacheRequest;
|
|
|
|
invoke-direct {v0, p0, p1}, Lokhttp3/Cache$RealCacheRequest;-><init>(Lokhttp3/Cache;Lokhttp3/internal/cache/DiskLruCache$Editor;)V
|
|
|
|
check-cast v0, Lokhttp3/internal/cache/CacheRequest;
|
|
:try_end_2
|
|
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_2
|
|
|
|
return-object v0
|
|
|
|
:cond_3
|
|
return-object v2
|
|
|
|
:catch_1
|
|
move-object p1, v2
|
|
|
|
.line 221
|
|
:catch_2
|
|
invoke-direct {p0, p1}, Lokhttp3/Cache;->abortQuietly(Lokhttp3/internal/cache/DiskLruCache$Editor;)V
|
|
|
|
return-object v2
|
|
.end method
|
|
|
|
.method public final remove$okhttp(Lokhttp3/Request;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "request"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object p0, p0, Lokhttp3/Cache;->cache:Lokhttp3/internal/cache/DiskLruCache;
|
|
|
|
sget-object v0, Lokhttp3/Cache;->Companion:Lokhttp3/Cache$Companion;
|
|
|
|
.line 228
|
|
invoke-virtual {p1}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Lokhttp3/Cache$Companion;->key(Lokhttp3/HttpUrl;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lokhttp3/internal/cache/DiskLruCache;->remove(Ljava/lang/String;)Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final declared-synchronized requestCount()I
|
|
.locals 1
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget v0, p0, Lokhttp3/Cache;->requestCount:I
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 387
|
|
monitor-exit p0
|
|
|
|
return v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final setWriteAbortCount$okhttp(I)V
|
|
.locals 0
|
|
|
|
iput p1, p0, Lokhttp3/Cache;->writeAbortCount:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setWriteSuccessCount$okhttp(I)V
|
|
.locals 0
|
|
|
|
iput p1, p0, Lokhttp3/Cache;->writeSuccessCount:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final size()J
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object p0, p0, Lokhttp3/Cache;->cache:Lokhttp3/internal/cache/DiskLruCache;
|
|
|
|
.line 342
|
|
invoke-virtual {p0}, Lokhttp3/internal/cache/DiskLruCache;->size()J
|
|
|
|
move-result-wide v0
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public final declared-synchronized trackConditionalCacheHit$okhttp()V
|
|
.locals 1
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget v0, p0, Lokhttp3/Cache;->hitCount:I
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
iput v0, p0, Lokhttp3/Cache;->hitCount:I
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 381
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final declared-synchronized trackResponse$okhttp(Lokhttp3/internal/cache/CacheStrategy;)V
|
|
.locals 1
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
const-string v0, "cacheStrategy"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget v0, p0, Lokhttp3/Cache;->requestCount:I
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
iput v0, p0, Lokhttp3/Cache;->requestCount:I
|
|
|
|
.line 370
|
|
invoke-virtual {p1}, Lokhttp3/internal/cache/CacheStrategy;->getNetworkRequest()Lokhttp3/Request;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget p1, p0, Lokhttp3/Cache;->networkCount:I
|
|
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
iput p1, p0, Lokhttp3/Cache;->networkCount:I
|
|
|
|
goto :goto_0
|
|
|
|
.line 373
|
|
:cond_0
|
|
invoke-virtual {p1}, Lokhttp3/internal/cache/CacheStrategy;->getCacheResponse()Lokhttp3/Response;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
iget p1, p0, Lokhttp3/Cache;->hitCount:I
|
|
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
iput p1, p0, Lokhttp3/Cache;->hitCount:I
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 377
|
|
:cond_1
|
|
:goto_0
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final update$okhttp(Lokhttp3/Response;Lokhttp3/Response;)V
|
|
.locals 2
|
|
|
|
const-string v0, "cached"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "network"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 232
|
|
new-instance v0, Lokhttp3/Cache$Entry;
|
|
|
|
invoke-direct {v0, p2}, Lokhttp3/Cache$Entry;-><init>(Lokhttp3/Response;)V
|
|
|
|
.line 233
|
|
invoke-virtual {p1}, Lokhttp3/Response;->body()Lokhttp3/ResponseBody;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
check-cast p1, Lokhttp3/Cache$CacheResponseBody;
|
|
|
|
invoke-virtual {p1}, Lokhttp3/Cache$CacheResponseBody;->getSnapshot()Lokhttp3/internal/cache/DiskLruCache$Snapshot;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 p2, 0x0
|
|
|
|
.line 234
|
|
move-object v1, p2
|
|
|
|
check-cast v1, Lokhttp3/internal/cache/DiskLruCache$Editor;
|
|
|
|
.line 236
|
|
:try_start_0
|
|
invoke-virtual {p1}, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->edit()Lokhttp3/internal/cache/DiskLruCache$Editor;
|
|
|
|
move-result-object p2
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
.line 237
|
|
invoke-virtual {v0, p2}, Lokhttp3/Cache$Entry;->writeTo(Lokhttp3/internal/cache/DiskLruCache$Editor;)V
|
|
|
|
.line 238
|
|
invoke-virtual {p2}, Lokhttp3/internal/cache/DiskLruCache$Editor;->commit()V
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
return-void
|
|
|
|
.line 240
|
|
:catch_0
|
|
invoke-direct {p0, p2}, Lokhttp3/Cache;->abortQuietly(Lokhttp3/internal/cache/DiskLruCache$Editor;)V
|
|
|
|
:goto_0
|
|
return-void
|
|
|
|
.line 233
|
|
:cond_1
|
|
new-instance p0, Ljava/lang/NullPointerException;
|
|
|
|
const-string p1, "null cannot be cast to non-null type okhttp3.Cache.CacheResponseBody"
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public final urls()Ljava/util/Iterator;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/Iterator<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 297
|
|
new-instance v0, Lokhttp3/Cache$urls$1;
|
|
|
|
invoke-direct {v0, p0}, Lokhttp3/Cache$urls$1;-><init>(Lokhttp3/Cache;)V
|
|
|
|
check-cast v0, Ljava/util/Iterator;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final declared-synchronized writeAbortCount()I
|
|
.locals 1
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget v0, p0, Lokhttp3/Cache;->writeAbortCount:I
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 337
|
|
monitor-exit p0
|
|
|
|
return v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final declared-synchronized writeSuccessCount()I
|
|
.locals 1
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget v0, p0, Lokhttp3/Cache;->writeSuccessCount:I
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 339
|
|
monitor-exit p0
|
|
|
|
return v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|