granularity level: instruction
.class public final Lw/c;
.super Lh0/d;
.source "SourceFile"
.field public final synthetic a:Lw/b;
.method public constructor <init>(Lw/b;Landroid/os/Looper;)V
.locals 0
iput-object p1, p0, Lw/c;->a:Lw/b;
invoke-direct {p0, p2}, Lh0/d;-><init>(Landroid/os/Looper;)V
return-void
.end method
.method public final handleMessage(Landroid/os/Message;)V
.locals 8
iget-object v0, p0, Lw/c;->a:Lw/b;
if-eqz p1, :cond_11
iget-object v1, p1, Landroid/os/Message;->obj:Ljava/lang/Object;
instance-of v2, v1, Landroid/content/Intent;
if-eqz v2, :cond_11
check-cast v1, Landroid/content/Intent;
new-instance v2, Lw/d;
invoke-direct {v2}, Lw/d;-><init>()V
invoke-virtual {v1, v2}, Landroid/content/Intent;->setExtrasClassLoader(Ljava/lang/ClassLoader;)V
const-string v2, "google.messenger"
invoke-virtual {v1, v2}, Landroid/content/Intent;->hasExtra(Ljava/lang/String;)Z
move-result v2
if-eqz v2, :cond_1
const-string v2, "google.messenger"
invoke-virtual {v1, v2}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;
move-result-object v1
instance-of v2, v1, Lw/e;
if-eqz v2, :cond_0
move-object v2, v1
check-cast v2, Lw/e;
iput-object v2, v0, Lw/b;->g:Lw/e;
:cond_0
instance-of v2, v1, Landroid/os/Messenger;
if-eqz v2, :cond_1
check-cast v1, Landroid/os/Messenger;
iput-object v1, v0, Lw/b;->f:Landroid/os/Messenger;
:cond_1
iget-object p1, p1, Landroid/os/Message;->obj:Ljava/lang/Object;
check-cast p1, Landroid/content/Intent;
invoke-virtual {p1}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object v1
const-string v2, "com.google.android.c2dm.intent.REGISTRATION"
invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
const/4 v3, 0x3
if-nez v2, :cond_3
const-string p1, "Rpc"
invoke-static {p1, v3}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result p1
if-eqz p1, :cond_12
invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
const-string v0, "Unexpected response action: "
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v1
if-eqz v1, :cond_2
invoke-virtual {v0, p1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
goto/16 :goto_4
:cond_2
new-instance p1, Ljava/lang/String;
invoke-direct {p1, v0}, Ljava/lang/String;-><init>(Ljava/lang/String;)V
goto/16 :goto_4
:cond_3
const-string v1, "registration_id"
invoke-virtual {p1, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
if-nez v1, :cond_4
const-string v1, "unregistered"
invoke-virtual {p1, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
:cond_4
const/4 v2, 0x2
const/4 v4, 0x1
if-nez v1, :cond_e
const-string v1, "error"
invoke-virtual {p1, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
if-nez v1, :cond_5
invoke-virtual {p1}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;
move-result-object p1
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
new-instance v1, Ljava/lang/StringBuilder;
add-int/lit8 v0, v0, 0x31
invoke-direct {v1, v0}, Ljava/lang/StringBuilder;-><init>(I)V
const-string v0, "Unexpected response, no error or registration id "
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p1, "Rpc"
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
goto/16 :goto_6
:cond_5
const-string v5, "Rpc"
invoke-static {v5, v3}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result v5
if-eqz v5, :cond_7
const-string v5, "Received InstanceID error "
invoke-virtual {v1}, Ljava/lang/String;->length()I
move-result v6
if-eqz v6, :cond_6
invoke-virtual {v5, v1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object v5
goto :goto_0
:cond_6
new-instance v6, Ljava/lang/String;
invoke-direct {v6, v5}, Ljava/lang/String;-><init>(Ljava/lang/String;)V
move-object v5, v6
:goto_0
const-string v6, "Rpc"
invoke-static {v6, v5}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
:cond_7
const-string v5, "|"
invoke-virtual {v1, v5}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v5
if-eqz v5, :cond_c
const-string v5, "\\|"
invoke-virtual {v1, v5}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
move-result-object v5
array-length v6, v5
if-le v6, v2, :cond_a
const-string v6, "ID"
aget-object v7, v5, v4
invoke-virtual {v6, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v6
if-nez v6, :cond_8
goto :goto_1
:cond_8
aget-object v1, v5, v2
aget-object v2, v5, v3
const-string v3, ":"
invoke-virtual {v2, v3}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v3
if-eqz v3, :cond_9
invoke-virtual {v2, v4}, Ljava/lang/String;->substring(I)Ljava/lang/String;
move-result-object v2
:cond_9
const-string v3, "error"
invoke-virtual {p1, v3, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
move-result-object p1
invoke-virtual {p1}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;
move-result-object p1
goto/16 :goto_5
:goto_1
:cond_a
const-string p1, "Unexpected structured response "
invoke-virtual {v1}, Ljava/lang/String;->length()I
move-result v0
if-eqz v0, :cond_b
invoke-virtual {p1, v1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
goto :goto_2
:cond_b
new-instance v0, Ljava/lang/String;
invoke-direct {v0, p1}, Ljava/lang/String;-><init>(Ljava/lang/String;)V
move-object p1, v0
:goto_2
const-string v0, "Rpc"
invoke-static {v0, p1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
goto/16 :goto_7
:cond_c
iget-object v5, v0, Lw/b;->a:Lb/i;
monitor-enter v5
const/4 v1, 0x0
:try_start_0
:goto_3
iget-object v2, v0, Lw/b;->a:Lb/i;
iget v3, v2, Lb/i;->c:I
if-ge v1, v3, :cond_d
iget-object v2, v2, Lb/i;->b:[Ljava/lang/Object;
shl-int/lit8 v3, v1, 0x1
aget-object v2, v2, v3
check-cast v2, Ljava/lang/String;
invoke-virtual {p1}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;
move-result-object v3
invoke-virtual {v0, v2, v3}, Lw/b;->b(Ljava/lang/String;Landroid/os/Bundle;)V
add-int/lit8 v1, v1, 0x1
goto :goto_3
:cond_d
monitor-exit v5
goto :goto_7
:catchall_0
move-exception p1
monitor-exit v5
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw p1
:cond_e
sget-object v5, Lw/b;->j:Ljava/util/regex/Pattern;
invoke-virtual {v5, v1}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
move-result-object v5
invoke-virtual {v5}, Ljava/util/regex/Matcher;->matches()Z
move-result v6
if-nez v6, :cond_10
const-string p1, "Rpc"
invoke-static {p1, v3}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
move-result p1
if-eqz p1, :cond_12
const-string p1, "Unexpected response string: "
invoke-virtual {v1}, Ljava/lang/String;->length()I
move-result v0
if-eqz v0, :cond_f
invoke-virtual {p1, v1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
goto :goto_4
:cond_f
new-instance v0, Ljava/lang/String;
invoke-direct {v0, p1}, Ljava/lang/String;-><init>(Ljava/lang/String;)V
move-object p1, v0
:goto_4
const-string v0, "Rpc"
invoke-static {v0, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_7
:cond_10
invoke-virtual {v5, v4}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;
move-result-object v1
invoke-virtual {v5, v2}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;
move-result-object v2
if-eqz v1, :cond_12
invoke-virtual {p1}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;
move-result-object p1
const-string v3, "registration_id"
invoke-virtual {p1, v3, v2}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
:goto_5
invoke-virtual {v0, v1, p1}, Lw/b;->b(Ljava/lang/String;Landroid/os/Bundle;)V
goto :goto_7
:cond_11
const-string p1, "Rpc"
const-string v0, "Dropping invalid message"
:goto_6
invoke-static {p1, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
:cond_12
:goto_7
return-void
.end method