453 lines
11 KiB
Smali
453 lines
11 KiB
Smali
.class public Lcom/facebook/imagepipeline/cache/s;
|
|
.super Ljava/lang/Object;
|
|
|
|
|
|
# static fields
|
|
.field private static final Bp:Ljava/lang/Class;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/lang/Class<",
|
|
"*>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# instance fields
|
|
.field private ND:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map<",
|
|
"Lcom/facebook/cache/common/CacheKey;",
|
|
"Lcom/facebook/imagepipeline/f/e;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation build Ljavax/annotation/concurrent/GuardedBy;
|
|
value = "this"
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
const-class v0, Lcom/facebook/imagepipeline/cache/s;
|
|
|
|
sput-object v0, Lcom/facebook/imagepipeline/cache/s;->Bp:Ljava/lang/Class;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>()V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/facebook/imagepipeline/cache/s;->ND:Ljava/util/Map;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static ho()Lcom/facebook/imagepipeline/cache/s;
|
|
.locals 1
|
|
|
|
new-instance v0, Lcom/facebook/imagepipeline/cache/s;
|
|
|
|
invoke-direct {v0}, Lcom/facebook/imagepipeline/cache/s;-><init>()V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private declared-synchronized hp()V
|
|
.locals 3
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
sget-object v0, Lcom/facebook/imagepipeline/cache/s;->Bp:Ljava/lang/Class;
|
|
|
|
const-string v1, "Count = %d"
|
|
|
|
iget-object v2, p0, Lcom/facebook/imagepipeline/cache/s;->ND:Ljava/util/Map;
|
|
|
|
invoke-interface {v2}, Ljava/util/Map;->size()I
|
|
|
|
move-result v2
|
|
|
|
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v0, v1, v2}, Lcom/facebook/common/e/a;->a(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/Object;)V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final declared-synchronized a(Lcom/facebook/cache/common/CacheKey;Lcom/facebook/imagepipeline/f/e;)V
|
|
.locals 1
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
invoke-static {p1}, Lcom/facebook/common/d/i;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
invoke-static {p2}, Lcom/facebook/imagepipeline/f/e;->f(Lcom/facebook/imagepipeline/f/e;)Z
|
|
|
|
move-result v0
|
|
|
|
invoke-static {v0}, Lcom/facebook/common/d/i;->checkArgument(Z)V
|
|
|
|
iget-object v0, p0, Lcom/facebook/imagepipeline/cache/s;->ND:Ljava/util/Map;
|
|
|
|
invoke-static {p2}, Lcom/facebook/imagepipeline/f/e;->b(Lcom/facebook/imagepipeline/f/e;)Lcom/facebook/imagepipeline/f/e;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-interface {v0, p1, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/facebook/imagepipeline/f/e;
|
|
|
|
invoke-static {p1}, Lcom/facebook/imagepipeline/f/e;->e(Lcom/facebook/imagepipeline/f/e;)V
|
|
|
|
invoke-direct {p0}, Lcom/facebook/imagepipeline/cache/s;->hp()V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final declared-synchronized b(Lcom/facebook/cache/common/CacheKey;Lcom/facebook/imagepipeline/f/e;)Z
|
|
.locals 5
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
invoke-static {p1}, Lcom/facebook/common/d/i;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
invoke-static {p2}, Lcom/facebook/common/d/i;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
invoke-static {p2}, Lcom/facebook/imagepipeline/f/e;->f(Lcom/facebook/imagepipeline/f/e;)Z
|
|
|
|
move-result v0
|
|
|
|
invoke-static {v0}, Lcom/facebook/common/d/i;->checkArgument(Z)V
|
|
|
|
iget-object v0, p0, Lcom/facebook/imagepipeline/cache/s;->ND:Ljava/util/Map;
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/facebook/imagepipeline/f/e;
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
monitor-exit p0
|
|
|
|
return v1
|
|
|
|
:cond_0
|
|
:try_start_1
|
|
iget-object v2, v0, Lcom/facebook/imagepipeline/f/e;->Qp:Lcom/facebook/common/references/CloseableReference;
|
|
|
|
invoke-static {v2}, Lcom/facebook/common/references/CloseableReference;->b(Lcom/facebook/common/references/CloseableReference;)Lcom/facebook/common/references/CloseableReference;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object p2, p2, Lcom/facebook/imagepipeline/f/e;->Qp:Lcom/facebook/common/references/CloseableReference;
|
|
|
|
invoke-static {p2}, Lcom/facebook/common/references/CloseableReference;->b(Lcom/facebook/common/references/CloseableReference;)Lcom/facebook/common/references/CloseableReference;
|
|
|
|
move-result-object p2
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_1
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
:try_start_2
|
|
invoke-virtual {v2}, Lcom/facebook/common/references/CloseableReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {p2}, Lcom/facebook/common/references/CloseableReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
if-eq v3, v4, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
iget-object v1, p0, Lcom/facebook/imagepipeline/cache/s;->ND:Ljava/util/Map;
|
|
|
|
invoke-interface {v1, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
:try_start_3
|
|
invoke-static {p2}, Lcom/facebook/common/references/CloseableReference;->c(Lcom/facebook/common/references/CloseableReference;)V
|
|
|
|
invoke-static {v2}, Lcom/facebook/common/references/CloseableReference;->c(Lcom/facebook/common/references/CloseableReference;)V
|
|
|
|
invoke-static {v0}, Lcom/facebook/imagepipeline/f/e;->e(Lcom/facebook/imagepipeline/f/e;)V
|
|
|
|
invoke-direct {p0}, Lcom/facebook/imagepipeline/cache/s;->hp()V
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_1
|
|
|
|
const/4 p1, 0x1
|
|
|
|
monitor-exit p0
|
|
|
|
return p1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
:try_start_4
|
|
invoke-static {p2}, Lcom/facebook/common/references/CloseableReference;->c(Lcom/facebook/common/references/CloseableReference;)V
|
|
|
|
invoke-static {v2}, Lcom/facebook/common/references/CloseableReference;->c(Lcom/facebook/common/references/CloseableReference;)V
|
|
|
|
invoke-static {v0}, Lcom/facebook/imagepipeline/f/e;->e(Lcom/facebook/imagepipeline/f/e;)V
|
|
|
|
throw p1
|
|
|
|
:cond_2
|
|
:goto_0
|
|
invoke-static {p2}, Lcom/facebook/common/references/CloseableReference;->c(Lcom/facebook/common/references/CloseableReference;)V
|
|
|
|
invoke-static {v2}, Lcom/facebook/common/references/CloseableReference;->c(Lcom/facebook/common/references/CloseableReference;)V
|
|
|
|
invoke-static {v0}, Lcom/facebook/imagepipeline/f/e;->e(Lcom/facebook/imagepipeline/f/e;)V
|
|
:try_end_4
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_1
|
|
|
|
monitor-exit p0
|
|
|
|
return v1
|
|
|
|
:catchall_1
|
|
move-exception p1
|
|
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final h(Lcom/facebook/cache/common/CacheKey;)Z
|
|
.locals 1
|
|
|
|
invoke-static {p1}, Lcom/facebook/common/d/i;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/facebook/imagepipeline/cache/s;->ND:Ljava/util/Map;
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/facebook/imagepipeline/f/e;
|
|
|
|
monitor-exit p0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
|
|
:cond_0
|
|
:try_start_1
|
|
invoke-virtual {p1}, Lcom/facebook/imagepipeline/f/e;->isValid()Z
|
|
|
|
move-result v0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
invoke-virtual {p1}, Lcom/facebook/imagepipeline/f/e;->close()V
|
|
|
|
return v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
invoke-virtual {p1}, Lcom/facebook/imagepipeline/f/e;->close()V
|
|
|
|
throw v0
|
|
|
|
:catchall_1
|
|
move-exception p1
|
|
|
|
:try_start_2
|
|
monitor-exit p0
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_1
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final declared-synchronized i(Lcom/facebook/cache/common/CacheKey;)Lcom/facebook/imagepipeline/f/e;
|
|
.locals 6
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
invoke-static {p1}, Lcom/facebook/common/d/i;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object v0, p0, Lcom/facebook/imagepipeline/cache/s;->ND:Ljava/util/Map;
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/facebook/imagepipeline/f/e;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
monitor-enter v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
:try_start_1
|
|
invoke-static {v0}, Lcom/facebook/imagepipeline/f/e;->f(Lcom/facebook/imagepipeline/f/e;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
iget-object v1, p0, Lcom/facebook/imagepipeline/cache/s;->ND:Ljava/util/Map;
|
|
|
|
invoke-interface {v1, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
sget-object v1, Lcom/facebook/imagepipeline/cache/s;->Bp:Ljava/lang/Class;
|
|
|
|
const-string v2, "Found closed reference %d for key %s (%d)"
|
|
|
|
const/4 v3, 0x3
|
|
|
|
new-array v3, v3, [Ljava/lang/Object;
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-static {v0}, Ljava/lang/System;->identityHashCode(Ljava/lang/Object;)I
|
|
|
|
move-result v5
|
|
|
|
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v5
|
|
|
|
aput-object v5, v3, v4
|
|
|
|
const/4 v4, 0x1
|
|
|
|
invoke-interface {p1}, Lcom/facebook/cache/common/CacheKey;->getUriString()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
aput-object v5, v3, v4
|
|
|
|
const/4 v4, 0x2
|
|
|
|
invoke-static {p1}, Ljava/lang/System;->identityHashCode(Ljava/lang/Object;)I
|
|
|
|
move-result p1
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p1
|
|
|
|
aput-object p1, v3, v4
|
|
|
|
invoke-static {v1, v2, v3}, Lcom/facebook/common/e/a;->b(Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/Object;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
monitor-exit v0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
:try_start_2
|
|
invoke-static {v0}, Lcom/facebook/imagepipeline/f/e;->b(Lcom/facebook/imagepipeline/f/e;)Lcom/facebook/imagepipeline/f/e;
|
|
|
|
move-result-object p1
|
|
|
|
monitor-exit v0
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
monitor-exit v0
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
:try_start_3
|
|
throw p1
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_1
|
|
|
|
:cond_1
|
|
move-object p1, v0
|
|
|
|
:goto_0
|
|
monitor-exit p0
|
|
|
|
return-object p1
|
|
|
|
:catchall_1
|
|
move-exception p1
|
|
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|