GifDrawableEncoder.smali
.class public Lcom/bumptech/glide/load/resource/gif/GifDrawableEncoder;
.super Ljava/lang/Object;
.source "GifDrawableEncoder.java"
# interfaces
.implements Lcom/bumptech/glide/load/ResourceEncoder;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Lcom/bumptech/glide/load/ResourceEncoder<",
"Lcom/bumptech/glide/load/resource/gif/GifDrawable;",
">;"
}
.end annotation
# static fields
.field private static final TAG:Ljava/lang/String; = "GifEncoder"
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method public constructor <init>()V
.registers 1
.line 17
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public encode(Lcom/bumptech/glide/load/engine/Resource;Ljava/io/File;Lcom/bumptech/glide/load/Options;)Z
.registers 9
.param p2, "file" # Ljava/io/File;
.param p3, "options" # Lcom/bumptech/glide/load/Options;
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/bumptech/glide/load/engine/Resource<",
"Lcom/bumptech/glide/load/resource/gif/GifDrawable;",
">;",
"Ljava/io/File;",
"Lcom/bumptech/glide/load/Options;",
")Z"
}
.end annotation
.line 29
.local p1, "data":Lcom/bumptech/glide/load/engine/Resource;, "Lcom/bumptech/glide/load/engine/Resource<Lcom/bumptech/glide/load/resource/gif/GifDrawable;>;"
invoke-interface {p1}, Lcom/bumptech/glide/load/engine/Resource;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/bumptech/glide/load/resource/gif/GifDrawable;
.line 30
.local v0, "drawable":Lcom/bumptech/glide/load/resource/gif/GifDrawable;
const/4 v1, 0x0
.line 32
.local v1, "success":Z
:try_start_7
invoke-virtual {v0}, Lcom/bumptech/glide/load/resource/gif/GifDrawable;->getBuffer()Ljava/nio/ByteBuffer;
move-result-object v2
invoke-static {v2, p2}, Lcom/bumptech/glide/util/ByteBufferUtil;->toFile(Ljava/nio/ByteBuffer;Ljava/io/File;)V
:try_end_e
.catch Ljava/io/IOException; {:try_start_7 .. :try_end_e} :catch_10
.line 33
const/4 v1, 0x1
.line 38
goto :goto_1f
.line 34
:catch_10
move-exception v2
.line 35
.local v2, "e":Ljava/io/IOException;
const/4 v3, 0x5
const-string v4, "GifEncoder"
invoke-static {v4, v3}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result v3
if-eqz v3, :cond_1f
.line 36
const-string v3, "Failed to encode GIF drawable data"
invoke-static {v4, v3, v2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
.line 39
.end local v2 # "e":Ljava/io/IOException;
:cond_1f
:goto_1f
return v1
.end method
.method public bridge synthetic encode(Ljava/lang/Object;Ljava/io/File;Lcom/bumptech/glide/load/Options;)Z
.registers 4
.line 17
check-cast p1, Lcom/bumptech/glide/load/engine/Resource;
invoke-virtual {p0, p1, p2, p3}, Lcom/bumptech/glide/load/resource/gif/GifDrawableEncoder;->encode(Lcom/bumptech/glide/load/engine/Resource;Ljava/io/File;Lcom/bumptech/glide/load/Options;)Z
move-result p1
return p1
.end method
.method public getEncodeStrategy(Lcom/bumptech/glide/load/Options;)Lcom/bumptech/glide/load/EncodeStrategy;
.registers 3
.param p1, "options" # Lcom/bumptech/glide/load/Options;
.line 23
sget-object v0, Lcom/bumptech/glide/load/EncodeStrategy;->SOURCE:Lcom/bumptech/glide/load/EncodeStrategy;
return-object v0
.end method