.class public final Lcom/google/android/gms/common/internal/j;
.super Le6/d;
.source ""


# instance fields
.field public final synthetic a:Lcom/google/android/gms/common/internal/a;


# direct methods
.method public constructor <init>(Lcom/google/android/gms/common/internal/a;Landroid/os/Looper;)V
    .registers 3

    iput-object p1, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    invoke-direct {p0, p2}, Le6/d;-><init>(Landroid/os/Looper;)V

    return-void
.end method

.method public static final a(Landroid/os/Message;)Z
    .registers 3

    iget p0, p0, Landroid/os/Message;->what:I

    const/4 v0, 0x1

    const/4 v1, 0x2

    if-eq p0, v1, :cond_e

    if-eq p0, v0, :cond_e

    const/4 v1, 0x7

    if-ne p0, v1, :cond_c

    goto :goto_e

    :cond_c
    const/4 p0, 0x0

    return p0

    :cond_e
    :goto_e
    return v0
.end method


# virtual methods
.method public final handleMessage(Landroid/os/Message;)V
    .registers 9

    iget-object v0, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    iget-object v0, v0, Lcom/google/android/gms/common/internal/a;->zzd:Ljava/util/concurrent/atomic/AtomicInteger;

    invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->get()I

    move-result v0

    iget v1, p1, Landroid/os/Message;->arg1:I

    if-eq v0, v1, :cond_1d

    invoke-static {p1}, Lcom/google/android/gms/common/internal/j;->a(Landroid/os/Message;)Z

    move-result v0

    if-eqz v0, :cond_1c

    .line 1
    iget-object p1, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast p1, Lp5/e0;

    invoke-virtual {p1}, Lp5/e0;->a()V

    invoke-virtual {p1}, Lp5/e0;->c()V

    :cond_1c
    return-void

    .line 2
    :cond_1d
    iget v0, p1, Landroid/os/Message;->what:I

    const/4 v1, 0x4

    const/4 v2, 0x1

    const/4 v3, 0x5

    if-eq v0, v2, :cond_35

    const/4 v4, 0x7

    if-eq v0, v4, :cond_35

    if-ne v0, v1, :cond_31

    iget-object v0, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    invoke-virtual {v0}, Lcom/google/android/gms/common/internal/a;->enableLocalFallback()Z

    move-result v0

    if-eqz v0, :cond_35

    :cond_31
    iget v0, p1, Landroid/os/Message;->what:I

    if-ne v0, v3, :cond_3d

    :cond_35
    iget-object v0, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    invoke-virtual {v0}, Lcom/google/android/gms/common/internal/a;->isConnecting()Z

    move-result v0

    if-eqz v0, :cond_16d

    :cond_3d
    iget v0, p1, Landroid/os/Message;->what:I

    const/16 v4, 0x8

    const/4 v5, 0x3

    const/4 v6, 0x0

    if-ne v0, v1, :cond_89

    iget-object v0, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    new-instance v1, Lm5/b;

    iget p1, p1, Landroid/os/Message;->arg2:I

    invoke-direct {v1, p1}, Lm5/b;-><init>(I)V

    invoke-static {v0, v1}, Lcom/google/android/gms/common/internal/a;->zzf(Lcom/google/android/gms/common/internal/a;Lm5/b;)Lm5/b;

    iget-object p1, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    invoke-static {p1}, Lcom/google/android/gms/common/internal/a;->zzg(Lcom/google/android/gms/common/internal/a;)Z

    move-result p1

    if-eqz p1, :cond_68

    iget-object p1, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    invoke-static {p1}, Lcom/google/android/gms/common/internal/a;->zzh(Lcom/google/android/gms/common/internal/a;)Z

    move-result p1

    if-eqz p1, :cond_62

    goto :goto_68

    :cond_62
    iget-object p1, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    invoke-static {p1, v5, v6}, Lcom/google/android/gms/common/internal/a;->zzi(Lcom/google/android/gms/common/internal/a;ILandroid/os/IInterface;)V

    return-void

    :cond_68
    :goto_68
    iget-object p1, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    invoke-static {p1}, Lcom/google/android/gms/common/internal/a;->zzj(Lcom/google/android/gms/common/internal/a;)Lm5/b;

    move-result-object p1

    if-eqz p1, :cond_77

    iget-object p1, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    invoke-static {p1}, Lcom/google/android/gms/common/internal/a;->zzj(Lcom/google/android/gms/common/internal/a;)Lm5/b;

    move-result-object p1

    goto :goto_7c

    :cond_77
    new-instance p1, Lm5/b;

    invoke-direct {p1, v4}, Lm5/b;-><init>(I)V

    :goto_7c
    iget-object v0, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    iget-object v0, v0, Lcom/google/android/gms/common/internal/a;->zzc:Lcom/google/android/gms/common/internal/a$c;

    invoke-interface {v0, p1}, Lcom/google/android/gms/common/internal/a$c;->a(Lm5/b;)V

    iget-object v0, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    invoke-virtual {v0, p1}, Lcom/google/android/gms/common/internal/a;->onConnectionFailed(Lm5/b;)V

    return-void

    :cond_89
    if-ne v0, v3, :cond_ac

    iget-object p1, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    invoke-static {p1}, Lcom/google/android/gms/common/internal/a;->zzj(Lcom/google/android/gms/common/internal/a;)Lm5/b;

    move-result-object p1

    if-eqz p1, :cond_9a

    iget-object p1, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    invoke-static {p1}, Lcom/google/android/gms/common/internal/a;->zzj(Lcom/google/android/gms/common/internal/a;)Lm5/b;

    move-result-object p1

    goto :goto_9f

    :cond_9a
    new-instance p1, Lm5/b;

    invoke-direct {p1, v4}, Lm5/b;-><init>(I)V

    :goto_9f
    iget-object v0, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    iget-object v0, v0, Lcom/google/android/gms/common/internal/a;->zzc:Lcom/google/android/gms/common/internal/a$c;

    invoke-interface {v0, p1}, Lcom/google/android/gms/common/internal/a$c;->a(Lm5/b;)V

    iget-object v0, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    invoke-virtual {v0, p1}, Lcom/google/android/gms/common/internal/a;->onConnectionFailed(Lm5/b;)V

    return-void

    :cond_ac
    if-ne v0, v5, :cond_cb

    iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    instance-of v1, v0, Landroid/app/PendingIntent;

    if-eqz v1, :cond_b7

    move-object v6, v0

    check-cast v6, Landroid/app/PendingIntent;

    :cond_b7
    new-instance v0, Lm5/b;

    iget p1, p1, Landroid/os/Message;->arg2:I

    invoke-direct {v0, p1, v6}, Lm5/b;-><init>(ILandroid/app/PendingIntent;)V

    iget-object p1, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    iget-object p1, p1, Lcom/google/android/gms/common/internal/a;->zzc:Lcom/google/android/gms/common/internal/a$c;

    invoke-interface {p1, v0}, Lcom/google/android/gms/common/internal/a$c;->a(Lm5/b;)V

    iget-object p1, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    invoke-virtual {p1, v0}, Lcom/google/android/gms/common/internal/a;->onConnectionFailed(Lm5/b;)V

    return-void

    :cond_cb
    const/4 v1, 0x6

    if-ne v0, v1, :cond_f3

    iget-object v0, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    invoke-static {v0, v3, v6}, Lcom/google/android/gms/common/internal/a;->zzi(Lcom/google/android/gms/common/internal/a;ILandroid/os/IInterface;)V

    iget-object v0, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    invoke-static {v0}, Lcom/google/android/gms/common/internal/a;->zzk(Lcom/google/android/gms/common/internal/a;)Lcom/google/android/gms/common/internal/a$a;

    move-result-object v0

    if-eqz v0, :cond_e6

    iget-object v0, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    invoke-static {v0}, Lcom/google/android/gms/common/internal/a;->zzk(Lcom/google/android/gms/common/internal/a;)Lcom/google/android/gms/common/internal/a$a;

    move-result-object v0

    iget v1, p1, Landroid/os/Message;->arg2:I

    invoke-interface {v0, v1}, Lcom/google/android/gms/common/internal/a$a;->p(I)V

    :cond_e6
    iget-object v0, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    iget p1, p1, Landroid/os/Message;->arg2:I

    invoke-virtual {v0, p1}, Lcom/google/android/gms/common/internal/a;->onConnectionSuspended(I)V

    iget-object p1, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    invoke-static {p1, v3, v2, v6}, Lcom/google/android/gms/common/internal/a;->zzl(Lcom/google/android/gms/common/internal/a;IILandroid/os/IInterface;)Z

    return-void

    :cond_f3
    const/4 v1, 0x2

    if-ne v0, v1, :cond_10a

    iget-object v0, p0, Lcom/google/android/gms/common/internal/j;->a:Lcom/google/android/gms/common/internal/a;

    invoke-virtual {v0}, Lcom/google/android/gms/common/internal/a;->isConnected()Z

    move-result v0

    if-eqz v0, :cond_ff

    goto :goto_10a

    .line 3
    :cond_ff
    iget-object p1, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast p1, Lp5/e0;

    invoke-virtual {p1}, Lp5/e0;->a()V

    invoke-virtual {p1}, Lp5/e0;->c()V

    return-void

    .line 4
    :cond_10a
    :goto_10a
    invoke-static {p1}, Lcom/google/android/gms/common/internal/j;->a(Landroid/os/Message;)Z

    move-result v0

    if-eqz v0, :cond_158

    iget-object p1, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    move-object v0, p1

    check-cast v0, Lp5/e0;

    .line 5
    monitor-enter v0

    :try_start_116
    iget-object p1, v0, Lp5/e0;->a:Ljava/lang/Object;

    iget-boolean v1, v0, Lp5/e0;->b:Z

    if-eqz v1, :cond_141

    const-string v1, "GmsClient"

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v4

    add-int/lit8 v4, v4, 0x2f

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5, v4}, Ljava/lang/StringBuilder;-><init>(I)V

    const-string v4, "Callback proxy "

    invoke-virtual {v5, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v3, " being reused. This is not safe."

    invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v1, v3}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

    :cond_141
    monitor-exit v0
    :try_end_142
    .catchall {:try_start_116 .. :try_end_142} :catchall_155

    if-eqz p1, :cond_14a

    :try_start_144
    invoke-virtual {v0, p1}, Lp5/e0;->b(Ljava/lang/Object;)V
    :try_end_147
    .catch Ljava/lang/RuntimeException; {:try_start_144 .. :try_end_147} :catch_148

    goto :goto_14a

    :catch_148
    move-exception p1

    throw p1

    :cond_14a
    :goto_14a
    monitor-enter v0

    :try_start_14b
    iput-boolean v2, v0, Lp5/e0;->b:Z

    monitor-exit v0
    :try_end_14e
    .catchall {:try_start_14b .. :try_end_14e} :catchall_152

    invoke-virtual {v0}, Lp5/e0;->c()V

    return-void

    :catchall_152
    move-exception p1

    :try_start_153
    monitor-exit v0
    :try_end_154
    .catchall {:try_start_153 .. :try_end_154} :catchall_152

    throw p1

    :catchall_155
    move-exception p1

    :try_start_156
    monitor-exit v0
    :try_end_157
    .catchall {:try_start_156 .. :try_end_157} :catchall_155

    throw p1

    .line 6
    :cond_158
    iget p1, p1, Landroid/os/Message;->what:I

    const/16 v0, 0x2d

    const-string v1, "Don\'t know how to handle message: "

    invoke-static {v0, v1, p1}, Le/f;->a(ILjava/lang/String;I)Ljava/lang/String;

    move-result-object p1

    new-instance v0, Ljava/lang/Exception;

    invoke-direct {v0}, Ljava/lang/Exception;-><init>()V

    const-string v1, "GmsClient"

    invoke-static {v1, p1, v0}, Landroid/util/Log;->wtf(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    return-void

    .line 7
    :cond_16d
    iget-object p1, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast p1, Lp5/e0;

    invoke-virtual {p1}, Lp5/e0;->a()V

    invoke-virtual {p1}, Lp5/e0;->c()V

    return-void
.end method
