You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
155 lines
3.3 KiB
155 lines
3.3 KiB
.class public final Lokhttp3/internal/http/CacheStrategy; |
|
.super Ljava/lang/Object; |
|
.source "CacheStrategy.java" |
|
|
|
|
|
# annotations |
|
.annotation system Ldalvik/annotation/MemberClasses; |
|
value = { |
|
Lokhttp3/internal/http/CacheStrategy$Factory; |
|
} |
|
.end annotation |
|
|
|
|
|
# instance fields |
|
.field public final cacheResponse:Lokhttp3/Response; |
|
|
|
.field public final networkRequest:Lokhttp3/Request; |
|
|
|
|
|
# direct methods |
|
.method private constructor <init>(Lokhttp3/Request;Lokhttp3/Response;)V |
|
.locals 0 |
|
|
|
.prologue |
|
.line 52 |
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V |
|
|
|
.line 53 |
|
iput-object p1, p0, Lokhttp3/internal/http/CacheStrategy;->networkRequest:Lokhttp3/Request; |
|
|
|
.line 54 |
|
iput-object p2, p0, Lokhttp3/internal/http/CacheStrategy;->cacheResponse:Lokhttp3/Response; |
|
|
|
.line 55 |
|
return-void |
|
.end method |
|
|
|
.method synthetic constructor <init>(Lokhttp3/Request;Lokhttp3/Response;Lokhttp3/internal/http/CacheStrategy$1;)V |
|
.locals 0 |
|
|
|
.prologue |
|
.line 45 |
|
invoke-direct {p0, p1, p2}, Lokhttp3/internal/http/CacheStrategy;-><init>(Lokhttp3/Request;Lokhttp3/Response;)V |
|
|
|
return-void |
|
.end method |
|
|
|
.method public static isCacheable(Lokhttp3/Response;Lokhttp3/Request;)Z |
|
.locals 3 |
|
|
|
.prologue |
|
const/4 v0, 0x0 |
|
|
|
.line 61 |
|
invoke-virtual {p0}, Lokhttp3/Response;->code()I |
|
|
|
move-result v1 |
|
|
|
sparse-switch v1, :sswitch_data_0 |
|
|
|
.line 95 |
|
:cond_0 |
|
:goto_0 |
|
return v0 |
|
|
|
.line 81 |
|
:sswitch_0 |
|
const-string v1, "Expires" |
|
|
|
invoke-virtual {p0, v1}, Lokhttp3/Response;->header(Ljava/lang/String;)Ljava/lang/String; |
|
|
|
move-result-object v1 |
|
|
|
if-nez v1, :cond_1 |
|
|
|
.line 82 |
|
invoke-virtual {p0}, Lokhttp3/Response;->cacheControl()Lokhttp3/CacheControl; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v1}, Lokhttp3/CacheControl;->maxAgeSeconds()I |
|
|
|
move-result v1 |
|
|
|
const/4 v2, -0x1 |
|
|
|
if-ne v1, v2, :cond_1 |
|
|
|
.line 83 |
|
invoke-virtual {p0}, Lokhttp3/Response;->cacheControl()Lokhttp3/CacheControl; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v1}, Lokhttp3/CacheControl;->isPublic()Z |
|
|
|
move-result v1 |
|
|
|
if-nez v1, :cond_1 |
|
|
|
.line 84 |
|
invoke-virtual {p0}, Lokhttp3/Response;->cacheControl()Lokhttp3/CacheControl; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v1}, Lokhttp3/CacheControl;->isPrivate()Z |
|
|
|
move-result v1 |
|
|
|
if-eqz v1, :cond_0 |
|
|
|
.line 95 |
|
:cond_1 |
|
:sswitch_1 |
|
invoke-virtual {p0}, Lokhttp3/Response;->cacheControl()Lokhttp3/CacheControl; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v1}, Lokhttp3/CacheControl;->noStore()Z |
|
|
|
move-result v1 |
|
|
|
if-nez v1, :cond_0 |
|
|
|
invoke-virtual {p1}, Lokhttp3/Request;->cacheControl()Lokhttp3/CacheControl; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v1}, Lokhttp3/CacheControl;->noStore()Z |
|
|
|
move-result v1 |
|
|
|
if-nez v1, :cond_0 |
|
|
|
const/4 v0, 0x1 |
|
|
|
goto :goto_0 |
|
|
|
.line 61 |
|
:sswitch_data_0 |
|
.sparse-switch |
|
0xc8 -> :sswitch_1 |
|
0xcb -> :sswitch_1 |
|
0xcc -> :sswitch_1 |
|
0x12c -> :sswitch_1 |
|
0x12d -> :sswitch_1 |
|
0x12e -> :sswitch_0 |
|
0x133 -> :sswitch_0 |
|
0x134 -> :sswitch_1 |
|
0x194 -> :sswitch_1 |
|
0x195 -> :sswitch_1 |
|
0x19a -> :sswitch_1 |
|
0x19e -> :sswitch_1 |
|
0x1f5 -> :sswitch_1 |
|
.end sparse-switch |
|
.end method
|
|
|