311 lines
8.1 KiB
Smali
311 lines
8.1 KiB
Smali
.class public final Lcom/linecorp/apng/decoder/Apng$Companion;
|
|
.super Ljava/lang/Object;
|
|
.source "Apng.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/linecorp/apng/decoder/Apng;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Companion"
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final copy(Lcom/linecorp/apng/decoder/Apng;)Lcom/linecorp/apng/decoder/Apng;
|
|
.locals 11
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lcom/linecorp/apng/decoder/ApngException;
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
new-instance v1, Lcom/linecorp/apng/decoder/Apng$DecodeResult;
|
|
|
|
invoke-direct {v1}, Lcom/linecorp/apng/decoder/Apng$DecodeResult;-><init>()V
|
|
|
|
const-string v2, "Apng#copy"
|
|
|
|
invoke-static {v2}, Landroid/os/Trace;->beginSection(Ljava/lang/String;)V
|
|
|
|
:try_start_0
|
|
invoke-static {p1}, Lcom/linecorp/apng/decoder/Apng;->access$getId$p(Lcom/linecorp/apng/decoder/Apng;)I
|
|
|
|
move-result p1
|
|
|
|
invoke-static {p1, v1}, Lcom/linecorp/apng/decoder/ApngDecoderJni;->copy(ILcom/linecorp/apng/decoder/Apng$DecodeResult;)I
|
|
|
|
move-result v3
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
invoke-static {}, Landroid/os/Trace;->endSection()V
|
|
|
|
if-ltz v3, :cond_0
|
|
|
|
:try_start_1
|
|
new-instance p1, Lcom/linecorp/apng/decoder/Apng;
|
|
|
|
invoke-virtual {v1}, Lcom/linecorp/apng/decoder/Apng$DecodeResult;->getWidth()I
|
|
|
|
move-result v4
|
|
|
|
invoke-virtual {v1}, Lcom/linecorp/apng/decoder/Apng$DecodeResult;->getHeight()I
|
|
|
|
move-result v5
|
|
|
|
invoke-virtual {v1}, Lcom/linecorp/apng/decoder/Apng$DecodeResult;->getFrameCount()I
|
|
|
|
move-result v6
|
|
|
|
invoke-virtual {v1}, Lcom/linecorp/apng/decoder/Apng$DecodeResult;->getFrameDurations()[I
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v1}, Lcom/linecorp/apng/decoder/Apng$DecodeResult;->getLoopCount()I
|
|
|
|
move-result v8
|
|
|
|
invoke-virtual {v1}, Lcom/linecorp/apng/decoder/Apng$DecodeResult;->getAllFrameByteCount()J
|
|
|
|
move-result-wide v9
|
|
|
|
move-object v2, p1
|
|
|
|
invoke-direct/range {v2 .. v10}, Lcom/linecorp/apng/decoder/Apng;-><init>(IIII[IIJ)V
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
return-object p1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
new-instance v0, Lcom/linecorp/apng/decoder/ApngException;
|
|
|
|
invoke-direct {v0, p1}, Lcom/linecorp/apng/decoder/ApngException;-><init>(Ljava/lang/Throwable;)V
|
|
|
|
throw v0
|
|
|
|
:cond_0
|
|
new-instance p1, Lcom/linecorp/apng/decoder/ApngException;
|
|
|
|
sget-object v1, Lcom/linecorp/apng/decoder/ApngException$ErrorCode;->Companion:Lcom/linecorp/apng/decoder/ApngException$ErrorCode$Companion;
|
|
|
|
invoke-virtual {v1, v3}, Lcom/linecorp/apng/decoder/ApngException$ErrorCode$Companion;->fromErrorCode$apng_drawable_release(I)Lcom/linecorp/apng/decoder/ApngException$ErrorCode;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x2
|
|
|
|
invoke-direct {p1, v1, v0, v2, v0}, Lcom/linecorp/apng/decoder/ApngException;-><init>(Lcom/linecorp/apng/decoder/ApngException$ErrorCode;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
throw p1
|
|
|
|
:catchall_1
|
|
move-exception p1
|
|
|
|
:try_start_2
|
|
new-instance v0, Lcom/linecorp/apng/decoder/ApngException;
|
|
|
|
invoke-direct {v0, p1}, Lcom/linecorp/apng/decoder/ApngException;-><init>(Ljava/lang/Throwable;)V
|
|
|
|
throw v0
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_2
|
|
|
|
:catchall_2
|
|
move-exception p1
|
|
|
|
invoke-static {}, Landroid/os/Trace;->endSection()V
|
|
|
|
throw p1
|
|
|
|
:cond_1
|
|
const-string p1, "apng"
|
|
|
|
invoke-static {p1}, Lk0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final decode(Ljava/io/InputStream;)Lcom/linecorp/apng/decoder/Apng;
|
|
.locals 12
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lcom/linecorp/apng/decoder/ApngException;
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
new-instance v1, Lcom/linecorp/apng/decoder/Apng$DecodeResult;
|
|
|
|
invoke-direct {v1}, Lcom/linecorp/apng/decoder/Apng$DecodeResult;-><init>()V
|
|
|
|
const-string v2, "Apng#decode"
|
|
|
|
invoke-static {v2}, Landroid/os/Trace;->beginSection(Ljava/lang/String;)V
|
|
|
|
:try_start_0
|
|
invoke-static {p1, v1}, Lcom/linecorp/apng/decoder/ApngDecoderJni;->decode(Ljava/io/InputStream;Lcom/linecorp/apng/decoder/Apng$DecodeResult;)I
|
|
|
|
move-result v4
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
invoke-static {}, Landroid/os/Trace;->endSection()V
|
|
|
|
if-ltz v4, :cond_0
|
|
|
|
:try_start_1
|
|
new-instance p1, Lcom/linecorp/apng/decoder/Apng;
|
|
|
|
invoke-virtual {v1}, Lcom/linecorp/apng/decoder/Apng$DecodeResult;->getWidth()I
|
|
|
|
move-result v5
|
|
|
|
invoke-virtual {v1}, Lcom/linecorp/apng/decoder/Apng$DecodeResult;->getHeight()I
|
|
|
|
move-result v6
|
|
|
|
invoke-virtual {v1}, Lcom/linecorp/apng/decoder/Apng$DecodeResult;->getFrameCount()I
|
|
|
|
move-result v7
|
|
|
|
invoke-virtual {v1}, Lcom/linecorp/apng/decoder/Apng$DecodeResult;->getFrameDurations()[I
|
|
|
|
move-result-object v8
|
|
|
|
invoke-virtual {v1}, Lcom/linecorp/apng/decoder/Apng$DecodeResult;->getLoopCount()I
|
|
|
|
move-result v9
|
|
|
|
invoke-virtual {v1}, Lcom/linecorp/apng/decoder/Apng$DecodeResult;->getAllFrameByteCount()J
|
|
|
|
move-result-wide v10
|
|
|
|
move-object v3, p1
|
|
|
|
invoke-direct/range {v3 .. v11}, Lcom/linecorp/apng/decoder/Apng;-><init>(IIII[IIJ)V
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
return-object p1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
new-instance v0, Lcom/linecorp/apng/decoder/ApngException;
|
|
|
|
invoke-direct {v0, p1}, Lcom/linecorp/apng/decoder/ApngException;-><init>(Ljava/lang/Throwable;)V
|
|
|
|
throw v0
|
|
|
|
:cond_0
|
|
new-instance p1, Lcom/linecorp/apng/decoder/ApngException;
|
|
|
|
sget-object v1, Lcom/linecorp/apng/decoder/ApngException$ErrorCode;->Companion:Lcom/linecorp/apng/decoder/ApngException$ErrorCode$Companion;
|
|
|
|
invoke-virtual {v1, v4}, Lcom/linecorp/apng/decoder/ApngException$ErrorCode$Companion;->fromErrorCode$apng_drawable_release(I)Lcom/linecorp/apng/decoder/ApngException$ErrorCode;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x2
|
|
|
|
invoke-direct {p1, v1, v0, v2, v0}, Lcom/linecorp/apng/decoder/ApngException;-><init>(Lcom/linecorp/apng/decoder/ApngException$ErrorCode;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
throw p1
|
|
|
|
:catchall_1
|
|
move-exception p1
|
|
|
|
:try_start_2
|
|
new-instance v0, Lcom/linecorp/apng/decoder/ApngException;
|
|
|
|
invoke-direct {v0, p1}, Lcom/linecorp/apng/decoder/ApngException;-><init>(Ljava/lang/Throwable;)V
|
|
|
|
throw v0
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_2
|
|
|
|
:catchall_2
|
|
move-exception p1
|
|
|
|
invoke-static {}, Landroid/os/Trace;->endSection()V
|
|
|
|
throw p1
|
|
|
|
:cond_1
|
|
const-string p1, "stream"
|
|
|
|
invoke-static {p1}, Lk0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final isApng(Ljava/io/InputStream;)Z
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lcom/linecorp/apng/decoder/ApngException;
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
:try_start_0
|
|
invoke-static {p1}, Lcom/linecorp/apng/decoder/ApngDecoderJni;->isApng(Ljava/io/InputStream;)Z
|
|
|
|
move-result p1
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
return p1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
new-instance v0, Lcom/linecorp/apng/decoder/ApngException;
|
|
|
|
invoke-direct {v0, p1}, Lcom/linecorp/apng/decoder/ApngException;-><init>(Ljava/lang/Throwable;)V
|
|
|
|
throw v0
|
|
|
|
:cond_0
|
|
const-string p1, "stream"
|
|
|
|
invoke-static {p1}, Lk0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|