223 lines
4.5 KiB
Smali
223 lines
4.5 KiB
Smali
.class public final Lokhttp3/internal/cache/CacheStrategy$Companion;
|
|
.super Ljava/lang/Object;
|
|
.source "CacheStrategy.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lokhttp3/internal/cache/CacheStrategy;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Companion"
|
|
.end annotation
|
|
|
|
.annotation runtime Lkotlin/Metadata;
|
|
bv = {
|
|
0x1,
|
|
0x0,
|
|
0x3
|
|
}
|
|
d1 = {
|
|
"\u0000\u001e\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0008\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\u0008\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\u0008\u0002\u00a2\u0006\u0002\u0010\u0002J\u0016\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\u0008\u00a8\u0006\t"
|
|
}
|
|
d2 = {
|
|
"Lokhttp3/internal/cache/CacheStrategy$Companion;",
|
|
"",
|
|
"()V",
|
|
"isCacheable",
|
|
"",
|
|
"response",
|
|
"Lokhttp3/Response;",
|
|
"request",
|
|
"Lokhttp3/Request;",
|
|
"okhttp"
|
|
}
|
|
k = 0x1
|
|
mv = {
|
|
0x1,
|
|
0x4,
|
|
0x0
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Lkotlin/jvm/internal/u;)V
|
|
.locals 0
|
|
|
|
.line 2
|
|
invoke-direct {p0}, Lokhttp3/internal/cache/CacheStrategy$Companion;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final isCacheable(Lokhttp3/Response;Lokhttp3/Request;)Z
|
|
.locals 4
|
|
.param p1 # Lokhttp3/Response;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Lokhttp3/Request;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
const-string v0, "response"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "request"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 1
|
|
invoke-virtual {p1}, Lokhttp3/Response;->code()I
|
|
|
|
move-result v0
|
|
|
|
const/16 v1, 0xc8
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
const/16 v1, 0x19a
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
const/16 v1, 0x19e
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
const/16 v1, 0x1f5
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
const/16 v1, 0xcb
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
const/16 v1, 0xcc
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
const/16 v1, 0x133
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
const/16 v1, 0x134
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
const/16 v1, 0x194
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
const/16 v1, 0x195
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
packed-switch v0, :pswitch_data_0
|
|
|
|
return v2
|
|
|
|
:cond_0
|
|
:pswitch_0
|
|
const/4 v0, 0x2
|
|
|
|
const-string v1, "Expires"
|
|
|
|
const/4 v3, 0x0
|
|
|
|
.line 2
|
|
invoke-static {p1, v1, v3, v0, v3}, Lokhttp3/Response;->header$default(Lokhttp3/Response;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
invoke-virtual {p1}, Lokhttp3/Response;->cacheControl()Lokhttp3/CacheControl;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lokhttp3/CacheControl;->maxAgeSeconds()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, -0x1
|
|
|
|
if-ne v0, v1, :cond_1
|
|
|
|
invoke-virtual {p1}, Lokhttp3/Response;->cacheControl()Lokhttp3/CacheControl;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lokhttp3/CacheControl;->isPublic()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
invoke-virtual {p1}, Lokhttp3/Response;->cacheControl()Lokhttp3/CacheControl;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lokhttp3/CacheControl;->isPrivate()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
return v2
|
|
|
|
.line 3
|
|
:cond_1
|
|
:pswitch_1
|
|
invoke-virtual {p1}, Lokhttp3/Response;->cacheControl()Lokhttp3/CacheControl;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lokhttp3/CacheControl;->noStore()Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
invoke-virtual {p2}, Lokhttp3/Request;->cacheControl()Lokhttp3/CacheControl;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lokhttp3/CacheControl;->noStore()Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
const/4 v2, 0x1
|
|
|
|
:cond_2
|
|
return v2
|
|
|
|
nop
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x12c
|
|
:pswitch_1
|
|
:pswitch_1
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|