granularity level: instruction
.class public final synthetic Lw/h;
.super Ljava/lang/Object;
.source "SourceFile"
.implements Ljava/lang/Runnable;
.field public final synthetic a:I
.field public final synthetic b:Lw/j;
.method public synthetic constructor <init>(Lw/j;I)V
.locals 0
iput p2, p0, Lw/h;->a:I
iput-object p1, p0, Lw/h;->b:Lw/j;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public final run()V
.locals 9
iget v0, p0, Lw/h;->a:I
const/4 v1, 0x1
const/4 v2, 0x2
packed-switch v0, :pswitch_data_0
goto/16 :goto_3
:pswitch_0
iget-object v0, p0, Lw/h;->b:Lw/j;
:goto_0
monitor-enter v0
:try_start_0
iget v3, v0, Lw/j;->a:I
if-eq v3, v2, :cond_0
goto :goto_1
:cond_0
iget-object v3, v0, Lw/j;->d:Ljava/util/ArrayDeque;
invoke-virtual {v3}, Ljava/util/ArrayDeque;->isEmpty()Z
move-result v3
if-eqz v3, :cond_1
invoke-virtual {v0}, Lw/j;->c()V
:goto_1
monitor-exit v0
return-void
:cond_1
iget-object v3, v0, Lw/j;->d:Ljava/util/ArrayDeque;
invoke-virtual {v3}, Ljava/util/ArrayDeque;->poll()Ljava/lang/Object;
move-result-object v3
check-cast v3, Lw/l;
iget-object v4, v0, Lw/j;->e:Landroid/util/SparseArray;
iget v5, v3, Lw/l;->a:I
invoke-virtual {v4, v5, v3}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V
iget-object v4, v0, Lw/j;->f:Lw/m;
iget-object v4, v4, Lw/m;->b:Ljava/util/concurrent/ScheduledExecutorService;
new-instance v5, Lw/i;
invoke-direct {v5, v0, v3, v1}, Lw/i;-><init>(Ljava/lang/Object;Ljava/lang/Object;I)V
const-wide/16 v6, 0x1e
sget-object v8, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
invoke-interface {v4, v5, v6, v7, v8}, Ljava/util/concurrent/ScheduledExecutorService;->schedule(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const-string v4, "MessengerIpcClient"
const/4 v5, 0x3
invoke-static {v4, v5}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result v4
if-eqz v4, :cond_2
invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/String;->length()I
move-result v5
new-instance v6, Ljava/lang/StringBuilder;
add-int/lit8 v5, v5, 0x8
invoke-direct {v6, v5}, Ljava/lang/StringBuilder;-><init>(I)V
const-string v5, "Sending "
invoke-virtual {v6, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v4, "MessengerIpcClient"
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v5
invoke-static {v4, v5}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
:cond_2
iget-object v4, v0, Lw/j;->f:Lw/m;
iget-object v4, v4, Lw/m;->a:Landroid/content/Context;
iget-object v5, v0, Lw/j;->b:Landroid/os/Messenger;
invoke-static {}, Landroid/os/Message;->obtain()Landroid/os/Message;
move-result-object v6
iget v7, v3, Lw/l;->c:I
iput v7, v6, Landroid/os/Message;->what:I
iget v7, v3, Lw/l;->a:I
iput v7, v6, Landroid/os/Message;->arg1:I
iput-object v5, v6, Landroid/os/Message;->replyTo:Landroid/os/Messenger;
new-instance v5, Landroid/os/Bundle;
invoke-direct {v5}, Landroid/os/Bundle;-><init>()V
const-string v7, "oneWay"
move-object v8, v3
check-cast v8, Lw/k;
iget v8, v8, Lw/k;->e:I
packed-switch v8, :pswitch_data_1
const/4 v8, 0x0
goto :goto_2
:pswitch_1
const/4 v8, 0x1
:goto_2
invoke-virtual {v5, v7, v8}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V
const-string v7, "pkg"
invoke-virtual {v4}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object v4
invoke-virtual {v5, v7, v4}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
const-string v4, "data"
iget-object v3, v3, Lw/l;->d:Landroid/os/Bundle;
invoke-virtual {v5, v4, v3}, Landroid/os/Bundle;->putBundle(Ljava/lang/String;Landroid/os/Bundle;)V
invoke-virtual {v6, v5}, Landroid/os/Message;->setData(Landroid/os/Bundle;)V
:try_start_1
iget-object v3, v0, Lw/j;->c:Lk/j;
iget-object v4, v3, Lk/j;->b:Ljava/lang/Object;
check-cast v4, Landroid/os/Messenger;
if-eqz v4, :cond_3
invoke-virtual {v4, v6}, Landroid/os/Messenger;->send(Landroid/os/Message;)V
goto/16 :goto_0
:cond_3
iget-object v3, v3, Lk/j;->c:Ljava/lang/Object;
check-cast v3, Lw/e;
if-eqz v3, :cond_4
iget-object v3, v3, Lw/e;->a:Landroid/os/Messenger;
invoke-virtual {v3}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
invoke-virtual {v3, v6}, Landroid/os/Messenger;->send(Landroid/os/Message;)V
goto/16 :goto_0
:cond_4
new-instance v3, Ljava/lang/IllegalStateException;
const-string v4, "Both messengers are null"
invoke-direct {v3, v4}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v3
:try_end_1
.catch Landroid/os/RemoteException; {:try_start_1 .. :try_end_1} :catch_0
:catch_0
move-exception v3
invoke-virtual {v3}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;
move-result-object v3
invoke-virtual {v0, v2, v3}, Lw/j;->a(ILjava/lang/String;)V
goto/16 :goto_0
:catchall_0
move-exception v1
:try_start_2
monitor-exit v0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
throw v1
:pswitch_2
iget-object v0, p0, Lw/h;->b:Lw/j;
const-string v1, "Service disconnected"
invoke-virtual {v0, v2, v1}, Lw/j;->a(ILjava/lang/String;)V
return-void
:goto_3
iget-object v0, p0, Lw/h;->b:Lw/j;
monitor-enter v0
:try_start_3
iget v2, v0, Lw/j;->a:I
if-ne v2, v1, :cond_5
const-string v2, "Timed out while binding"
invoke-virtual {v0, v1, v2}, Lw/j;->a(ILjava/lang/String;)V
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1
:cond_5
monitor-exit v0
return-void
:catchall_1
move-exception v1
monitor-exit v0
throw v1
:pswitch_data_0
.packed-switch 0x0
:pswitch_2
:pswitch_0
.end packed-switch
:pswitch_data_1
.packed-switch 0x0
:pswitch_1
.end packed-switch
.end method