CloseableImage.smali
.class public abstract Lcom/facebook/imagepipeline/image/CloseableImage;
.super Ljava/lang/Object;
.source "CloseableImage.java"
# interfaces
.implements Ljava/io/Closeable;
.implements Lcom/facebook/imagepipeline/image/ImageInfo;
# static fields
.field private static final TAG:Ljava/lang/String; = "CloseableImage"
.field private static final mImageExtrasList:Ljava/util/Set;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Set<",
"Ljava/lang/String;",
">;"
}
.end annotation
.end field
# instance fields
.field private mExtras:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/Object;",
">;"
}
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.registers 8
.line 27
new-instance v0, Ljava/util/HashSet;
const-string v1, "encoded_size"
const-string v2, "encoded_width"
const-string v3, "encoded_height"
const-string v4, "uri_source"
const-string v5, "image_format"
const-string v6, "bitmap_config"
const-string v7, "is_rounded"
filled-new-array/range {v1 .. v7}, [Ljava/lang/String;
move-result-object v1
.line 29
invoke-static {v1}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
move-result-object v1
invoke-direct {v0, v1}, Ljava/util/HashSet;-><init>(Ljava/util/Collection;)V
sput-object v0, Lcom/facebook/imagepipeline/image/CloseableImage;->mImageExtrasList:Ljava/util/Set;
return-void
.end method
.method public constructor <init>()V
.registers 2
.line 22
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 24
new-instance v0, Ljava/util/HashMap;
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
iput-object v0, p0, Lcom/facebook/imagepipeline/image/CloseableImage;->mExtras:Ljava/util/Map;
return-void
.end method
# virtual methods
.method public abstract close()V
.end method
.method protected finalize()V
.registers 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Throwable;
}
.end annotation
.line 96
invoke-virtual {p0}, Lcom/facebook/imagepipeline/image/CloseableImage;->isClosed()Z
move-result v0
if-eqz v0, :cond_7
return-void
:cond_7
const/4 v0, 0x2
new-array v0, v0, [Ljava/lang/Object;
const/4 v1, 0x0
.line 102
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
move-result-object v2
aput-object v2, v0, v1
const/4 v1, 0x1
.line 103
invoke-static {p0}, Ljava/lang/System;->identityHashCode(Ljava/lang/Object;)I
move-result v2
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
const-string v1, "CloseableImage"
const-string v2, "finalize: %s %x still open."
.line 99
invoke-static {v1, v2, v0}, Lcom/facebook/common/logging/FLog;->w(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V
.line 105
:try_start_27
invoke-virtual {p0}, Lcom/facebook/imagepipeline/image/CloseableImage;->close()V
:try_end_2a
.catchall {:try_start_27 .. :try_end_2a} :catchall_2e
.line 107
invoke-super {p0}, Ljava/lang/Object;->finalize()V
return-void
:catchall_2e
move-exception v0
invoke-super {p0}, Ljava/lang/Object;->finalize()V
.line 108
throw v0
.end method
.method public getExtras()Ljava/util/Map;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/Object;",
">;"
}
.end annotation
.line 69
iget-object v0, p0, Lcom/facebook/imagepipeline/image/CloseableImage;->mExtras:Ljava/util/Map;
return-object v0
.end method
.method public getQualityInfo()Lcom/facebook/imagepipeline/image/QualityInfo;
.registers 2
.line 55
sget-object v0, Lcom/facebook/imagepipeline/image/ImmutableQualityInfo;->FULL_QUALITY:Lcom/facebook/imagepipeline/image/QualityInfo;
return-object v0
.end method
.method public abstract getSizeInBytes()I
.end method
.method public abstract isClosed()Z
.end method
.method public isStateful()Z
.registers 2
const/4 v0, 0x0
return v0
.end method
.method public setImageExtra(Ljava/lang/String;Ljava/lang/Object;)V
.registers 4
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0,
0x0
}
names = {
"extra",
"value"
}
.end annotation
.line 88
sget-object v0, Lcom/facebook/imagepipeline/image/CloseableImage;->mImageExtrasList:Ljava/util/Set;
invoke-interface {v0, p1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_d
.line 89
iget-object v0, p0, Lcom/facebook/imagepipeline/image/CloseableImage;->mExtras:Ljava/util/Map;
invoke-interface {v0, p1, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
:cond_d
return-void
.end method
.method public setImageExtras(Ljava/util/Map;)V
.registers 6
.param p1 # Ljava/util/Map;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
.annotation system Ldalvik/annotation/MethodParameters;
accessFlags = {
0x0
}
names = {
"extras"
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/Object;",
">;)V"
}
.end annotation
if-nez p1, :cond_3
return-void
.line 78
:cond_3
sget-object v0, Lcom/facebook/imagepipeline/image/CloseableImage;->mImageExtrasList:Ljava/util/Set;
invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_9
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_22
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/lang/String;
.line 79
invoke-interface {p1, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v2
if-nez v2, :cond_1c
goto :goto_9
.line 83
:cond_1c
iget-object v3, p0, Lcom/facebook/imagepipeline/image/CloseableImage;->mExtras:Ljava/util/Map;
invoke-interface {v3, v1, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
goto :goto_9
:cond_22
return-void
.end method