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 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 4
.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
invoke-interface {p1}, Lcom/bumptech/glide/load/engine/Resource;->get()Ljava/lang/Object;
move-result-object p1
check-cast p1, Lcom/bumptech/glide/load/resource/gif/GifDrawable;
.line 32
:try_start_6
invoke-virtual {p1}, Lcom/bumptech/glide/load/resource/gif/GifDrawable;->getBuffer()Ljava/nio/ByteBuffer;
move-result-object p1
invoke-static {p1, p2}, Lcom/bumptech/glide/util/ByteBufferUtil;->toFile(Ljava/nio/ByteBuffer;Ljava/io/File;)V
:try_end_d
.catch Ljava/io/IOException; {:try_start_6 .. :try_end_d} :catch_f
const/4 p1, 0x1
goto :goto_1f
:catch_f
move-exception p1
const/4 p2, 0x5
const-string p3, "GifEncoder"
.line 35
invoke-static {p3, p2}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result p2
if-eqz p2, :cond_1e
const-string p2, "Failed to encode GIF drawable data"
.line 36
invoke-static {p3, p2, p1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
:cond_1e
const/4 p1, 0x0
:goto_1f
return p1
.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 2
.line 23
sget-object p1, Lcom/bumptech/glide/load/EncodeStrategy;->SOURCE:Lcom/bumptech/glide/load/EncodeStrategy;
return-object p1
.end method