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.
189 lines
4.7 KiB
189 lines
4.7 KiB
2 years ago
|
.class public Lcom/viatech/util/VPaiPicasso;
|
||
|
.super Ljava/lang/Object;
|
||
|
.source "VPaiPicasso.java"
|
||
|
|
||
|
|
||
|
# annotations
|
||
|
.annotation system Ldalvik/annotation/MemberClasses;
|
||
|
value = {
|
||
|
Lcom/viatech/util/VPaiPicasso$CircleTransform;,
|
||
|
Lcom/viatech/util/VPaiPicasso$MemDiskCache;
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
|
||
|
# static fields
|
||
|
.field private static final CACHE_MANAGER_VERSION:I = 0xb
|
||
|
|
||
|
.field private static final TAG:Ljava/lang/String; = "VpaiPicasso"
|
||
|
|
||
|
.field private static mNetworkPicasso:Lcom/squareup/picasso/Picasso;
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method static constructor <clinit>()V
|
||
|
.locals 1
|
||
|
|
||
|
.prologue
|
||
|
.line 34
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
sput-object v0, Lcom/viatech/util/VPaiPicasso;->mNetworkPicasso:Lcom/squareup/picasso/Picasso;
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public constructor <init>()V
|
||
|
.locals 0
|
||
|
|
||
|
.prologue
|
||
|
.line 30
|
||
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method static synthetic access$000(Landroid/content/Context;Ljava/lang/String;)Ljava/io/File;
|
||
|
.locals 1
|
||
|
|
||
|
.prologue
|
||
|
.line 30
|
||
|
invoke-static {p0, p1}, Lcom/viatech/util/VPaiPicasso;->getDiskCacheDir(Landroid/content/Context;Ljava/lang/String;)Ljava/io/File;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method private static getDiskCacheDir(Landroid/content/Context;Ljava/lang/String;)Ljava/io/File;
|
||
|
.locals 3
|
||
|
|
||
|
.prologue
|
||
|
.line 54
|
||
|
const-string v0, "mounted"
|
||
|
|
||
|
invoke-static {}, Landroid/os/Environment;->getExternalStorageState()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-nez v0, :cond_0
|
||
|
|
||
|
.line 55
|
||
|
invoke-static {}, Landroid/os/Environment;->isExternalStorageRemovable()Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-nez v0, :cond_1
|
||
|
|
||
|
:cond_0
|
||
|
invoke-virtual {p0}, Landroid/content/Context;->getExternalCacheDir()Ljava/io/File;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
if-eqz v0, :cond_1
|
||
|
|
||
|
.line 56
|
||
|
invoke-virtual {p0}, Landroid/content/Context;->getExternalCacheDir()Ljava/io/File;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0}, Ljava/io/File;->getPath()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
.line 60
|
||
|
:goto_0
|
||
|
new-instance v1, Ljava/io/File;
|
||
|
|
||
|
new-instance v2, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
sget-object v2, Ljava/io/File;->separator:Ljava/lang/String;
|
||
|
|
||
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-direct {v1, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
return-object v1
|
||
|
|
||
|
.line 58
|
||
|
:cond_1
|
||
|
invoke-virtual {p0}, Landroid/content/Context;->getCacheDir()Ljava/io/File;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0}, Ljava/io/File;->getPath()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
goto :goto_0
|
||
|
.end method
|
||
|
|
||
|
.method public static localPicasso(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;
|
||
|
.locals 1
|
||
|
|
||
|
.prologue
|
||
|
.line 49
|
||
|
invoke-static {p0}, Lcom/squareup/picasso/Picasso;->with(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static networkPicasso(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;
|
||
|
.locals 2
|
||
|
|
||
|
.prologue
|
||
|
.line 39
|
||
|
sget-object v0, Lcom/viatech/util/VPaiPicasso;->mNetworkPicasso:Lcom/squareup/picasso/Picasso;
|
||
|
|
||
|
if-nez v0, :cond_0
|
||
|
|
||
|
.line 40
|
||
|
new-instance v0, Lcom/squareup/picasso/Picasso$Builder;
|
||
|
|
||
|
invoke-direct {v0, p0}, Lcom/squareup/picasso/Picasso$Builder;-><init>(Landroid/content/Context;)V
|
||
|
|
||
|
.line 41
|
||
|
new-instance v1, Lcom/viatech/util/VPaiPicasso$MemDiskCache;
|
||
|
|
||
|
invoke-direct {v1, p0}, Lcom/viatech/util/VPaiPicasso$MemDiskCache;-><init>(Landroid/content/Context;)V
|
||
|
|
||
|
invoke-virtual {v0, v1}, Lcom/squareup/picasso/Picasso$Builder;->memoryCache(Lcom/squareup/picasso/Cache;)Lcom/squareup/picasso/Picasso$Builder;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
.line 42
|
||
|
invoke-virtual {v0}, Lcom/squareup/picasso/Picasso$Builder;->build()Lcom/squareup/picasso/Picasso;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
sput-object v0, Lcom/viatech/util/VPaiPicasso;->mNetworkPicasso:Lcom/squareup/picasso/Picasso;
|
||
|
|
||
|
.line 44
|
||
|
:cond_0
|
||
|
sget-object v0, Lcom/viatech/util/VPaiPicasso;->mNetworkPicasso:Lcom/squareup/picasso/Picasso;
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|