.class public final Lz5/w71;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Lcom/google/android/gms/common/internal/a$a;
.implements Lcom/google/android/gms/common/internal/a$b;


# instance fields
.field public final r:Lz5/p81;

.field public final s:Ljava/lang/String;

.field public final t:Ljava/lang/String;

.field public final u:Ljava/util/concurrent/LinkedBlockingQueue;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/concurrent/LinkedBlockingQueue<",
            "Lz5/v02;",
            ">;"
        }
    .end annotation
.end field

.field public final v:Landroid/os/HandlerThread;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
    .registers 10

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

    iput-object p2, p0, Lz5/w71;->s:Ljava/lang/String;

    iput-object p3, p0, Lz5/w71;->t:Ljava/lang/String;

    new-instance p2, Landroid/os/HandlerThread;

    const-string p3, "GassClient"

    invoke-direct {p2, p3}, Landroid/os/HandlerThread;-><init>(Ljava/lang/String;)V

    iput-object p2, p0, Lz5/w71;->v:Landroid/os/HandlerThread;

    invoke-virtual {p2}, Landroid/os/HandlerThread;->start()V

    new-instance p3, Lz5/p81;

    invoke-virtual {p2}, Landroid/os/HandlerThread;->getLooper()Landroid/os/Looper;

    move-result-object v2

    const v5, 0x8c6180

    move-object v0, p3

    move-object v1, p1

    move-object v3, p0

    move-object v4, p0

    invoke-direct/range {v0 .. v5}, Lz5/p81;-><init>(Landroid/content/Context;Landroid/os/Looper;Lcom/google/android/gms/common/internal/a$a;Lcom/google/android/gms/common/internal/a$b;I)V

    iput-object p3, p0, Lz5/w71;->r:Lz5/p81;

    new-instance p1, Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-direct {p1}, Ljava/util/concurrent/LinkedBlockingQueue;-><init>()V

    iput-object p1, p0, Lz5/w71;->u:Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-virtual {p3}, Lcom/google/android/gms/common/internal/a;->checkAvailabilityAndConnect()V

    return-void
.end method

.method public static b()Lz5/v02;
    .registers 3

    invoke-static {}, Lz5/v02;->q0()Lz5/j02;

    move-result-object v0

    const-wide/32 v1, 0x8000

    invoke-virtual {v0, v1, v2}, Lz5/j02;->t(J)Lz5/j02;

    invoke-virtual {v0}, Lz5/uk1;->m()Lz5/xk1;

    move-result-object v0

    check-cast v0, Lz5/v02;

    return-object v0
.end method


# virtual methods
.method public final D(Landroid/os/Bundle;)V
    .registers 6

    const/4 p1, 0x0

    .line 1
    :try_start_1
    iget-object v0, p0, Lz5/w71;->r:Lz5/p81;

    invoke-virtual {v0}, Lz5/p81;->b()Lz5/u81;

    move-result-object v0
    :try_end_7
    .catch Ljava/lang/IllegalStateException; {:try_start_1 .. :try_end_7} :catch_8
    .catch Landroid/os/DeadObjectException; {:try_start_1 .. :try_end_7} :catch_8

    goto :goto_9

    :catch_8
    move-object v0, p1

    :goto_9
    if-eqz v0, :cond_6e

    .line 2
    :try_start_b
    new-instance v1, Lz5/q81;

    iget-object v2, p0, Lz5/w71;->s:Ljava/lang/String;

    iget-object v3, p0, Lz5/w71;->t:Ljava/lang/String;

    invoke-direct {v1, v2, v3}, Lz5/q81;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    .line 3
    invoke-virtual {v0}, Lz5/m1;->zza()Landroid/os/Parcel;

    move-result-object v2

    invoke-static {v2, v1}, Lz5/o1;->c(Landroid/os/Parcel;Landroid/os/Parcelable;)V

    const/4 v1, 0x1

    invoke-virtual {v0, v1, v2}, Lz5/m1;->zzbi(ILandroid/os/Parcel;)Landroid/os/Parcel;

    move-result-object v0

    sget-object v1, Lz5/s81;->CREATOR:Landroid/os/Parcelable$Creator;

    invoke-static {v0, v1}, Lz5/o1;->b(Landroid/os/Parcel;Landroid/os/Parcelable$Creator;)Landroid/os/Parcelable;

    move-result-object v1

    check-cast v1, Lz5/s81;

    invoke-virtual {v0}, Landroid/os/Parcel;->recycle()V

    .line 4
    iget-object v0, v1, Lz5/s81;->s:Lz5/v02;
    :try_end_2d
    .catchall {:try_start_b .. :try_end_2d} :catchall_5a

    if-nez v0, :cond_47

    :try_start_2f
    iget-object v0, v1, Lz5/s81;->t:[B

    invoke-static {}, Lz5/lk1;->a()Lz5/lk1;

    move-result-object v2

    invoke-static {v0, v2}, Lz5/v02;->p0([BLz5/lk1;)Lz5/v02;

    move-result-object v0

    iput-object v0, v1, Lz5/s81;->s:Lz5/v02;

    iput-object p1, v1, Lz5/s81;->t:[B
    :try_end_3d
    .catch Lz5/il1; {:try_start_2f .. :try_end_3d} :catch_40
    .catch Ljava/lang/NullPointerException; {:try_start_2f .. :try_end_3d} :catch_3e
    .catchall {:try_start_2f .. :try_end_3d} :catchall_5a

    goto :goto_47

    :catch_3e
    move-exception p1

    goto :goto_41

    :catch_40
    move-exception p1

    :goto_41
    :try_start_41
    new-instance v0, Ljava/lang/IllegalStateException;

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

    throw v0

    :cond_47
    :goto_47
    invoke-virtual {v1}, Lz5/s81;->zzb()V

    iget-object p1, v1, Lz5/s81;->s:Lz5/v02;

    .line 5
    iget-object v0, p0, Lz5/w71;->u:Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-virtual {v0, p1}, Ljava/util/concurrent/LinkedBlockingQueue;->put(Ljava/lang/Object;)V
    :try_end_51
    .catchall {:try_start_41 .. :try_end_51} :catchall_5a

    :catch_51
    :goto_51
    invoke-virtual {p0}, Lz5/w71;->a()V

    iget-object p1, p0, Lz5/w71;->v:Landroid/os/HandlerThread;

    invoke-virtual {p1}, Landroid/os/HandlerThread;->quit()Z

    return-void

    :catchall_5a
    :try_start_5a
    iget-object p1, p0, Lz5/w71;->u:Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-static {}, Lz5/w71;->b()Lz5/v02;

    move-result-object v0

    invoke-virtual {p1, v0}, Ljava/util/concurrent/LinkedBlockingQueue;->put(Ljava/lang/Object;)V
    :try_end_63
    .catch Ljava/lang/InterruptedException; {:try_start_5a .. :try_end_63} :catch_51
    .catchall {:try_start_5a .. :try_end_63} :catchall_64

    goto :goto_51

    :catchall_64
    move-exception p1

    invoke-virtual {p0}, Lz5/w71;->a()V

    iget-object v0, p0, Lz5/w71;->v:Landroid/os/HandlerThread;

    invoke-virtual {v0}, Landroid/os/HandlerThread;->quit()Z

    throw p1

    :cond_6e
    return-void
.end method

.method public final a()V
    .registers 2

    iget-object v0, p0, Lz5/w71;->r:Lz5/p81;

    if-eqz v0, :cond_17

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

    move-result v0

    if-nez v0, :cond_12

    iget-object v0, p0, Lz5/w71;->r:Lz5/p81;

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

    move-result v0

    if-eqz v0, :cond_17

    :cond_12
    iget-object v0, p0, Lz5/w71;->r:Lz5/p81;

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

    :cond_17
    return-void
.end method

.method public final l(Lm5/b;)V
    .registers 3

    :try_start_0
    iget-object p1, p0, Lz5/w71;->u:Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-static {}, Lz5/w71;->b()Lz5/v02;

    move-result-object v0

    invoke-virtual {p1, v0}, Ljava/util/concurrent/LinkedBlockingQueue;->put(Ljava/lang/Object;)V
    :try_end_9
    .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_9} :catch_9

    :catch_9
    return-void
.end method

.method public final p(I)V
    .registers 3

    :try_start_0
    iget-object p1, p0, Lz5/w71;->u:Ljava/util/concurrent/LinkedBlockingQueue;

    invoke-static {}, Lz5/w71;->b()Lz5/v02;

    move-result-object v0

    invoke-virtual {p1, v0}, Ljava/util/concurrent/LinkedBlockingQueue;->put(Ljava/lang/Object;)V
    :try_end_9
    .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_9} :catch_9

    :catch_9
    return-void
.end method
