h$h.smali
.class final Lcom/opensource/svgaplayer/h$h;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Ljava/lang/Runnable;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/opensource/svgaplayer/h;->a(Ljava/io/InputStream;Ljava/lang/String;Lcom/opensource/svgaplayer/h$d;Z)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x18
name = null
.end annotation
# instance fields
.field final synthetic a:Lcom/opensource/svgaplayer/h;
.field final synthetic b:Ljava/io/InputStream;
.field final synthetic c:Ljava/lang/String;
.field final synthetic d:Lcom/opensource/svgaplayer/h$d;
.field final synthetic e:Z
# direct methods
.method constructor <init>(Lcom/opensource/svgaplayer/h;Ljava/io/InputStream;Ljava/lang/String;Lcom/opensource/svgaplayer/h$d;Z)V
.registers 6
iput-object p1, p0, Lcom/opensource/svgaplayer/h$h;->a:Lcom/opensource/svgaplayer/h;
iput-object p2, p0, Lcom/opensource/svgaplayer/h$h;->b:Ljava/io/InputStream;
iput-object p3, p0, Lcom/opensource/svgaplayer/h$h;->c:Ljava/lang/String;
iput-object p4, p0, Lcom/opensource/svgaplayer/h$h;->d:Lcom/opensource/svgaplayer/h$d;
iput-boolean p5, p0, Lcom/opensource/svgaplayer/h$h;->e:Z
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public final run()V
.registers 7
.line 291
:try_start_0
iget-object v0, p0, Lcom/opensource/svgaplayer/h$h;->b:Ljava/io/InputStream;
invoke-static {v0}, Lcom/opensource/svgaplayer/h;->b(Ljava/io/InputStream;)[B
move-result-object v0
if-eqz v0, :cond_e5
.line 292
array-length v1, v0
const/4 v2, 0x4
if-le v1, v2, :cond_99
const/4 v1, 0x0
aget-byte v3, v0, v1
const/16 v4, 0x50
if-ne v3, v4, :cond_99
const/4 v3, 0x1
aget-byte v4, v0, v3
const/16 v5, 0x4b
if-ne v4, v5, :cond_99
const/4 v4, 0x2
aget-byte v4, v0, v4
const/4 v5, 0x3
if-ne v4, v5, :cond_99
aget-byte v4, v0, v5
if-ne v4, v2, :cond_99
.line 293
sget-object v2, Lcom/opensource/svgaplayer/d/a/c;->a:Lcom/opensource/svgaplayer/d/a/c;
const-string v2, "SVGAParser"
const-string v4, "decode from zip file"
invoke-static {v2, v4}, Lcom/opensource/svgaplayer/d/a/c;->a(Ljava/lang/String;Ljava/lang/String;)V
.line 294
sget-object v2, Lcom/opensource/svgaplayer/c;->c:Lcom/opensource/svgaplayer/c;
iget-object v2, p0, Lcom/opensource/svgaplayer/h$h;->c:Ljava/lang/String;
invoke-static {v2}, Lcom/opensource/svgaplayer/c;->c(Ljava/lang/String;)Ljava/io/File;
move-result-object v2
invoke-virtual {v2}, Ljava/io/File;->exists()Z
move-result v2
if-eqz v2, :cond_3f
.line 1001
sget-boolean v2, Lcom/opensource/svgaplayer/i;->b:Z
if-eqz v2, :cond_8c
.line 2001
:cond_3f
sget v2, Lcom/opensource/svgaplayer/i;->a:I
.line 295
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
monitor-enter v2
:try_end_46
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_46} :catch_fd
.catchall {:try_start_0 .. :try_end_46} :catchall_fb
.line 296
:try_start_46
sget-object v4, Lcom/opensource/svgaplayer/c;->c:Lcom/opensource/svgaplayer/c;
iget-object v4, p0, Lcom/opensource/svgaplayer/h$h;->c:Ljava/lang/String;
invoke-static {v4}, Lcom/opensource/svgaplayer/c;->c(Ljava/lang/String;)Ljava/io/File;
move-result-object v4
invoke-virtual {v4}, Ljava/io/File;->exists()Z
move-result v4
if-nez v4, :cond_89
.line 3001
sput-boolean v3, Lcom/opensource/svgaplayer/i;->b:Z
.line 298
sget-object v3, Lcom/opensource/svgaplayer/d/a/c;->a:Lcom/opensource/svgaplayer/d/a/c;
const-string v3, "SVGAParser"
const-string v4, "no cached, prepare to unzip"
invoke-static {v3, v4}, Lcom/opensource/svgaplayer/d/a/c;->a(Ljava/lang/String;Ljava/lang/String;)V
.line 299
new-instance v3, Ljava/io/ByteArrayInputStream;
invoke-direct {v3, v0}, Ljava/io/ByteArrayInputStream;-><init>([B)V
check-cast v3, Ljava/io/Closeable;
:try_end_66
.catchall {:try_start_46 .. :try_end_66} :catchall_96
:try_start_66
move-object v0, v3
check-cast v0, Ljava/io/ByteArrayInputStream;
.line 300
check-cast v0, Ljava/io/InputStream;
iget-object v4, p0, Lcom/opensource/svgaplayer/h$h;->c:Ljava/lang/String;
invoke-static {v0, v4}, Lcom/opensource/svgaplayer/h;->a(Ljava/io/InputStream;Ljava/lang/String;)V
.line 4001
sput-boolean v1, Lcom/opensource/svgaplayer/i;->b:Z
.line 302
sget-object v0, Lcom/opensource/svgaplayer/d/a/c;->a:Lcom/opensource/svgaplayer/d/a/c;
const-string v0, "SVGAParser"
const-string v1, "unzip success"
invoke-static {v0, v1}, Lcom/opensource/svgaplayer/d/a/c;->a(Ljava/lang/String;Ljava/lang/String;)V
.line 303
sget-object v0, Lkotlin/w;->a:Lkotlin/w;
:try_end_7d
.catchall {:try_start_66 .. :try_end_7d} :catchall_82
const/4 v0, 0x0
.line 299
:try_start_7e
invoke-static {v3, v0}, Lkotlin/io/b;->a(Ljava/io/Closeable;Ljava/lang/Throwable;)V
:try_end_81
.catchall {:try_start_7e .. :try_end_81} :catchall_96
goto :goto_89
:catchall_82
move-exception v0
:try_start_83
throw v0
:try_end_84
.catchall {:try_start_83 .. :try_end_84} :catchall_84
:catchall_84
move-exception v1
:try_start_85
invoke-static {v3, v0}, Lkotlin/io/b;->a(Ljava/io/Closeable;Ljava/lang/Throwable;)V
throw v1
.line 305
:cond_89
:goto_89
sget-object v0, Lkotlin/w;->a:Lkotlin/w;
:try_end_8b
.catchall {:try_start_85 .. :try_end_8b} :catchall_96
.line 295
:try_start_8b
monitor-exit v2
.line 307
:cond_8c
iget-object v0, p0, Lcom/opensource/svgaplayer/h$h;->a:Lcom/opensource/svgaplayer/h;
iget-object v1, p0, Lcom/opensource/svgaplayer/h$h;->c:Ljava/lang/String;
iget-object v2, p0, Lcom/opensource/svgaplayer/h$h;->d:Lcom/opensource/svgaplayer/h$d;
invoke-static {v0, v1, v2}, Lcom/opensource/svgaplayer/h;->a(Lcom/opensource/svgaplayer/h;Ljava/lang/String;Lcom/opensource/svgaplayer/h$d;)V
goto :goto_f1
:catchall_96
move-exception v0
.line 295
monitor-exit v2
throw v0
.line 309
:cond_99
sget-object v1, Lcom/opensource/svgaplayer/d/a/c;->a:Lcom/opensource/svgaplayer/d/a/c;
const-string v1, "SVGAParser"
const-string v2, "decode from input stream, inflate start"
invoke-static {v1, v2}, Lcom/opensource/svgaplayer/d/a/c;->a(Ljava/lang/String;Ljava/lang/String;)V
.line 310
invoke-static {v0}, Lcom/opensource/svgaplayer/h;->b([B)[B
move-result-object v0
if-eqz v0, :cond_d8
.line 311
new-instance v1, Lcom/opensource/svgaplayer/j;
.line 312
sget-object v2, Lcom/opensource/svgaplayer/proto/MovieEntity;->ADAPTER:Lcom/squareup/wire/ProtoAdapter;
invoke-virtual {v2, v0}, Lcom/squareup/wire/ProtoAdapter;->decode([B)Ljava/lang/Object;
move-result-object v0
const-string v2, "MovieEntity.ADAPTER.decode(it)"
invoke-static {v0, v2}, Lkotlin/f/b/o;->a(Ljava/lang/Object;Ljava/lang/String;)V
check-cast v0, Lcom/opensource/svgaplayer/proto/MovieEntity;
.line 313
new-instance v2, Ljava/io/File;
iget-object v3, p0, Lcom/opensource/svgaplayer/h$h;->c:Ljava/lang/String;
invoke-direct {v2, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V
.line 314
iget-object v3, p0, Lcom/opensource/svgaplayer/h$h;->a:Lcom/opensource/svgaplayer/h;
invoke-static {v3}, Lcom/opensource/svgaplayer/h;->b(Lcom/opensource/svgaplayer/h;)I
move-result v3
.line 315
iget-object v4, p0, Lcom/opensource/svgaplayer/h$h;->a:Lcom/opensource/svgaplayer/h;
invoke-static {v4}, Lcom/opensource/svgaplayer/h;->c(Lcom/opensource/svgaplayer/h;)I
move-result v4
.line 311
invoke-direct {v1, v0, v2, v3, v4}, Lcom/opensource/svgaplayer/j;-><init>(Lcom/opensource/svgaplayer/proto/MovieEntity;Ljava/io/File;II)V
.line 317
new-instance v0, Lcom/opensource/svgaplayer/h$h$a;
invoke-direct {v0, v1, p0}, Lcom/opensource/svgaplayer/h$h$a;-><init>(Lcom/opensource/svgaplayer/j;Lcom/opensource/svgaplayer/h$h;)V
check-cast v0, Lkotlin/f/a/a;
invoke-virtual {v1, v0}, Lcom/opensource/svgaplayer/j;->a(Lkotlin/f/a/a;)V
goto :goto_f1
.line 323
:cond_d8
new-instance v0, Ljava/lang/Exception;
const-string v1, "inflate(bytes) cause exception"
invoke-direct {v0, v1}, Ljava/lang/Exception;-><init>(Ljava/lang/String;)V
.line 324
iget-object v1, p0, Lcom/opensource/svgaplayer/h$h;->d:Lcom/opensource/svgaplayer/h$d;
.line 322
invoke-static {v0, v1}, Lcom/opensource/svgaplayer/h;->b(Ljava/lang/Exception;Lcom/opensource/svgaplayer/h$d;)V
goto :goto_f1
.line 328
:cond_e5
new-instance v0, Ljava/lang/Exception;
const-string v1, "readAsBytes(inputStream) cause exception"
invoke-direct {v0, v1}, Ljava/lang/Exception;-><init>(Ljava/lang/String;)V
.line 329
iget-object v1, p0, Lcom/opensource/svgaplayer/h$h;->d:Lcom/opensource/svgaplayer/h$d;
.line 327
invoke-static {v0, v1}, Lcom/opensource/svgaplayer/h;->b(Ljava/lang/Exception;Lcom/opensource/svgaplayer/h$d;)V
:try_end_f1
.catch Ljava/lang/Exception; {:try_start_8b .. :try_end_f1} :catch_fd
.catchall {:try_start_8b .. :try_end_f1} :catchall_fb
.line 334
:goto_f1
iget-boolean v0, p0, Lcom/opensource/svgaplayer/h$h;->e:Z
if-eqz v0, :cond_fa
.line 335
iget-object v0, p0, Lcom/opensource/svgaplayer/h$h;->b:Ljava/io/InputStream;
invoke-virtual {v0}, Ljava/io/InputStream;->close()V
:cond_fa
return-void
:catchall_fb
move-exception v0
goto :goto_10d
:catch_fd
move-exception v0
.line 332
:try_start_fe
iget-object v1, p0, Lcom/opensource/svgaplayer/h$h;->d:Lcom/opensource/svgaplayer/h$d;
invoke-static {v0, v1}, Lcom/opensource/svgaplayer/h;->b(Ljava/lang/Exception;Lcom/opensource/svgaplayer/h$d;)V
:try_end_103
.catchall {:try_start_fe .. :try_end_103} :catchall_fb
.line 334
iget-boolean v0, p0, Lcom/opensource/svgaplayer/h$h;->e:Z
if-eqz v0, :cond_10c
.line 335
iget-object v0, p0, Lcom/opensource/svgaplayer/h$h;->b:Ljava/io/InputStream;
invoke-virtual {v0}, Ljava/io/InputStream;->close()V
:cond_10c
return-void
.line 334
:goto_10d
iget-boolean v1, p0, Lcom/opensource/svgaplayer/h$h;->e:Z
if-eqz v1, :cond_116
.line 335
iget-object v1, p0, Lcom/opensource/svgaplayer/h$h;->b:Ljava/io/InputStream;
invoke-virtual {v1}, Ljava/io/InputStream;->close()V
:cond_116
throw v0
.end method