b.smali
.class public Lo2/b;
.super Landroid/os/HandlerThread;
.source "NetworkThread.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lo2/b$c;,
Lo2/b$b;
}
.end annotation
# instance fields
.field public a:Ln2/a;
.field public b:Lo2/a;
.field public final c:Ll2/f;
.field public final d:Ll2/b;
.field public e:Lo2/c;
.field public final f:Ljava/util/concurrent/ExecutorService;
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method public constructor <init>(Ln2/a;Ll2/f;Ll2/b;)V
.registers 5
const-string v0, "NETWORK_THREAD"
invoke-direct {p0, v0}, Landroid/os/HandlerThread;-><init>(Ljava/lang/String;)V
iput-object p1, p0, Lo2/b;->a:Ln2/a;
iput-object p2, p0, Lo2/b;->c:Ll2/f;
iput-object p3, p0, Lo2/b;->d:Ll2/b;
invoke-static {}, Ljava/util/concurrent/Executors;->newSingleThreadExecutor()Ljava/util/concurrent/ExecutorService;
move-result-object p1
iput-object p1, p0, Lo2/b;->f:Ljava/util/concurrent/ExecutorService;
return-void
.end method
.method public static synthetic a(Lo2/b;)V
.registers 1
invoke-virtual {p0}, Lo2/b;->d()V
return-void
.end method
.method public static synthetic a(Lo2/b;Ll2/e;)V
.registers 2
invoke-virtual {p0, p1}, Lo2/b;->a(Ll2/e;)V
return-void
.end method
.method public static synthetic b(Lo2/b;)V
.registers 1
invoke-virtual {p0}, Lo2/b;->c()V
return-void
.end method
.method public static synthetic c(Lo2/b;)Ll2/b;
.registers 1
iget-object p0, p0, Lo2/b;->d:Ll2/b;
return-object p0
.end method
# virtual methods
.method public a()Ll2/a;
.registers 5
invoke-virtual {p0}, Landroid/os/HandlerThread;->getLooper()Landroid/os/Looper;
move-result-object v0
iget-object v1, p0, Lo2/b;->b:Lo2/a;
if-nez v1, :cond_17
if-eqz v0, :cond_17
new-instance v1, Lo2/a;
new-instance v2, Lo2/b$b;
const/4 v3, 0x0
invoke-direct {v2, p0, v3}, Lo2/b$b;-><init>(Lo2/b;Lo2/b$a;)V
invoke-direct {v1, v0, v2}, Lo2/a;-><init>(Landroid/os/Looper;Ll2/a;)V
iput-object v1, p0, Lo2/b;->b:Lo2/a;
:cond_17
iget-object v0, p0, Lo2/b;->b:Lo2/a;
return-object v0
.end method
.method public final a(Ll2/e;)V
.registers 4
:try_start_0
iget-object v0, p0, Lo2/b;->a:Ln2/a;
invoke-virtual {v0}, Ln2/a;->e()Z
move-result v0
if-eqz v0, :cond_12
iget-object v0, p0, Lo2/b;->a:Ln2/a;
invoke-interface {p1}, Ll2/e;->toByteArray()[B
move-result-object v1
invoke-virtual {v0, v1}, Ln2/a;->a([B)V
goto :goto_1d
:cond_12
iget-object v0, p0, Lo2/b;->d:Ll2/b;
invoke-interface {v0, p1}, Ll2/b;->b(Ll2/e;)V
:try_end_17
.catch Lm2/b; {:try_start_0 .. :try_end_17} :catch_18
goto :goto_1d
:catch_18
iget-object v0, p0, Lo2/b;->d:Ll2/b;
invoke-interface {v0, p1}, Ll2/b;->b(Ll2/e;)V
:goto_1d
return-void
.end method
.method public final b()Z
.registers 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/util/concurrent/RejectedExecutionException;
}
.end annotation
iget-object v0, p0, Lo2/b;->f:Ljava/util/concurrent/ExecutorService;
invoke-interface {v0}, Ljava/util/concurrent/ExecutorService;->isShutdown()Z
move-result v0
if-nez v0, :cond_23
iget-object v0, p0, Lo2/b;->f:Ljava/util/concurrent/ExecutorService;
invoke-interface {v0}, Ljava/util/concurrent/ExecutorService;->isTerminated()Z
move-result v0
if-eqz v0, :cond_11
goto :goto_23
:cond_11
new-instance v0, Lo2/e;
iget-object v1, p0, Lo2/b;->a:Ln2/a;
iget-object v2, p0, Lo2/b;->c:Ll2/f;
iget-object v3, p0, Lo2/b;->e:Lo2/c;
invoke-direct {v0, v1, v2, v3}, Lo2/e;-><init>(Ln2/a;Ll2/f;Lo2/c;)V
iget-object v1, p0, Lo2/b;->f:Ljava/util/concurrent/ExecutorService;
invoke-interface {v1, v0}, Ljava/util/concurrent/ExecutorService;->submit(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
const/4 v0, 0x1
return v0
:cond_23
:goto_23
const/4 v0, 0x0
return v0
.end method
.method public final c()V
.registers 2
iget-object v0, p0, Lo2/b;->a:Ln2/a;
invoke-virtual {v0}, Ln2/a;->b()V
iget-object v0, p0, Lo2/b;->f:Ljava/util/concurrent/ExecutorService;
invoke-interface {v0}, Ljava/util/concurrent/ExecutorService;->shutdownNow()Ljava/util/List;
invoke-virtual {p0}, Landroid/os/HandlerThread;->quit()Z
return-void
.end method
.method public final d()V
.registers 4
iget-object v0, p0, Lo2/b;->a:Ln2/a;
invoke-virtual {v0}, Ln2/a;->e()Z
move-result v0
if-eqz v0, :cond_14
iget-object v0, p0, Lo2/b;->d:Ll2/b;
iget-object v1, p0, Lo2/b;->a:Ln2/a;
invoke-virtual {v1}, Ln2/a;->c()Ljava/lang/String;
move-result-object v1
invoke-interface {v0, v1}, Ll2/b;->a(Ljava/lang/String;)V
return-void
:cond_14
:try_start_14
iget-object v0, p0, Lo2/b;->a:Ln2/a;
invoke-virtual {v0}, Ln2/a;->a()V
invoke-virtual {p0}, Lo2/b;->b()Z
move-result v0
if-eqz v0, :cond_2b
iget-object v0, p0, Lo2/b;->d:Ll2/b;
iget-object v1, p0, Lo2/b;->a:Ln2/a;
invoke-virtual {v1}, Ln2/a;->c()Ljava/lang/String;
move-result-object v1
invoke-interface {v0, v1}, Ll2/b;->a(Ljava/lang/String;)V
goto :goto_4f
:cond_2b
iget-object v0, p0, Lo2/b;->a:Ln2/a;
invoke-virtual {v0}, Ln2/a;->b()V
:try_end_30
.catch Lm2/d; {:try_start_14 .. :try_end_30} :catch_3f
.catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_14 .. :try_end_30} :catch_31
goto :goto_4f
:catch_31
iget-object v0, p0, Lo2/b;->d:Ll2/b;
iget-object v1, p0, Lo2/b;->a:Ln2/a;
invoke-virtual {v1}, Ln2/a;->c()Ljava/lang/String;
move-result-object v1
sget-object v2, Lcom/garena/tcpcore/exception/TCPError;->UNKNOWN:Lcom/garena/tcpcore/exception/TCPError;
invoke-interface {v0, v1, v2}, Ll2/b;->a(Ljava/lang/String;Lcom/garena/tcpcore/exception/TCPError;)V
goto :goto_4f
:catch_3f
move-exception v0
iget-object v1, p0, Lo2/b;->d:Ll2/b;
iget-object v2, p0, Lo2/b;->a:Ln2/a;
invoke-virtual {v2}, Ln2/a;->c()Ljava/lang/String;
move-result-object v2
invoke-virtual {v0}, Lm2/d;->a()Lcom/garena/tcpcore/exception/TCPError;
move-result-object v0
invoke-interface {v1, v2, v0}, Ll2/b;->a(Ljava/lang/String;Lcom/garena/tcpcore/exception/TCPError;)V
:goto_4f
return-void
.end method
.method public onLooperPrepared()V
.registers 5
invoke-super {p0}, Landroid/os/HandlerThread;->onLooperPrepared()V
new-instance v0, Lo2/d;
invoke-virtual {p0}, Landroid/os/HandlerThread;->getLooper()Landroid/os/Looper;
move-result-object v1
new-instance v2, Lo2/b$c;
const/4 v3, 0x0
invoke-direct {v2, p0, v3}, Lo2/b$c;-><init>(Lo2/b;Lo2/b$a;)V
invoke-direct {v0, v1, v2}, Lo2/d;-><init>(Landroid/os/Looper;Lo2/c;)V
iput-object v0, p0, Lo2/b;->e:Lo2/c;
return-void
.end method