UrlConnectionDownloader$ResponseCacheIcs.smali
1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
.class Lcom/squareup/picasso/UrlConnectionDownloader$ResponseCacheIcs;
.super Ljava/lang/Object;
.source "UrlConnectionDownloader.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/squareup/picasso/UrlConnectionDownloader;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0xa
name = "ResponseCacheIcs"
.end annotation
# direct methods
.method private constructor <init>()V
.locals 0
.line 126
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method static close(Ljava/lang/Object;)V
.locals 0
.line 139
:try_start_0
check-cast p0, Landroid/net/http/HttpResponseCache;
invoke-virtual {p0}, Landroid/net/http/HttpResponseCache;->close()V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
:catch_0
return-void
.end method
.method static install(Landroid/content/Context;)Ljava/lang/Object;
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 128
invoke-static {p0}, Lcom/squareup/picasso/Utils;->createDefaultCacheDir(Landroid/content/Context;)Ljava/io/File;
move-result-object p0
.line 129
invoke-static {}, Landroid/net/http/HttpResponseCache;->getInstalled()Landroid/net/http/HttpResponseCache;
move-result-object v0
if-nez v0, :cond_0
.line 131
invoke-static {p0}, Lcom/squareup/picasso/Utils;->calculateDiskCacheSize(Ljava/io/File;)J
move-result-wide v0
.line 132
invoke-static {p0, v0, v1}, Landroid/net/http/HttpResponseCache;->install(Ljava/io/File;J)Landroid/net/http/HttpResponseCache;
move-result-object v0
:cond_0
return-object v0
.end method