UrlConnectionDownloader$ResponseCacheIcs.smali
.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
.registers 1
.line 126
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method static close(Ljava/lang/Object;)V
.registers 1
.line 139
:try_start_0
check-cast p0, Landroid/net/http/HttpResponseCache;
invoke-virtual {p0}, Landroid/net/http/HttpResponseCache;->close()V
:try_end_5
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_5} :catch_5
:catch_5
return-void
.end method
.method static install(Landroid/content/Context;)Ljava/lang/Object;
.registers 3
.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_12
.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_12
return-object v0
.end method