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


# instance fields
.field public final c:Ljava/util/HashMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/HashMap<",
            "Lp5/k0;",
            "Lp5/l0;",
            ">;"
        }
    .end annotation

    .annotation build Ljavax/annotation/concurrent/GuardedBy;
        value = "connectionStatus"
    .end annotation
.end field

.field public final d:Landroid/content/Context;

.field public final e:Landroid/os/Handler;

.field public final f:Lt5/a;

.field public final g:J

.field public final h:J


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .registers 4

    invoke-direct {p0}, Lp5/d;-><init>()V

    new-instance v0, Ljava/util/HashMap;

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

    iput-object v0, p0, Lcom/google/android/gms/common/internal/n;->c:Ljava/util/HashMap;

    invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    iput-object v0, p0, Lcom/google/android/gms/common/internal/n;->d:Landroid/content/Context;

    new-instance v0, Le6/d;

    invoke-virtual {p1}, Landroid/content/Context;->getMainLooper()Landroid/os/Looper;

    move-result-object p1

    new-instance v1, Lp5/m0;

    invoke-direct {v1, p0}, Lp5/m0;-><init>(Lcom/google/android/gms/common/internal/n;)V

    invoke-direct {v0, p1, v1}, Le6/d;-><init>(Landroid/os/Looper;Landroid/os/Handler$Callback;)V

    iput-object v0, p0, Lcom/google/android/gms/common/internal/n;->e:Landroid/os/Handler;

    invoke-static {}, Lt5/a;->b()Lt5/a;

    move-result-object p1

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

    const-wide/16 v0, 0x1388

    iput-wide v0, p0, Lcom/google/android/gms/common/internal/n;->g:J

    const-wide/32 v0, 0x493e0

    iput-wide v0, p0, Lcom/google/android/gms/common/internal/n;->h:J

    return-void
.end method


# virtual methods
.method public final c(Lp5/k0;Landroid/content/ServiceConnection;Ljava/lang/String;)Z
    .registers 8

    iget-object v0, p0, Lcom/google/android/gms/common/internal/n;->c:Ljava/util/HashMap;

    monitor-enter v0

    :try_start_3
    iget-object v1, p0, Lcom/google/android/gms/common/internal/n;->c:Ljava/util/HashMap;

    invoke-virtual {v1, p1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lp5/l0;

    if-nez v1, :cond_20

    new-instance v1, Lp5/l0;

    invoke-direct {v1, p0, p1}, Lp5/l0;-><init>(Lcom/google/android/gms/common/internal/n;Lp5/k0;)V

    .line 1
    iget-object v2, v1, Lp5/l0;->r:Ljava/util/Map;

    invoke-interface {v2, p2, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 2
    invoke-virtual {v1, p3}, Lp5/l0;->a(Ljava/lang/String;)V

    iget-object p2, p0, Lcom/google/android/gms/common/internal/n;->c:Ljava/util/HashMap;

    invoke-virtual {p2, p1, v1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_49

    :cond_20
    iget-object v2, p0, Lcom/google/android/gms/common/internal/n;->e:Landroid/os/Handler;

    const/4 v3, 0x0

    invoke-virtual {v2, v3, p1}, Landroid/os/Handler;->removeMessages(ILjava/lang/Object;)V

    .line 3
    iget-object v2, v1, Lp5/l0;->r:Ljava/util/Map;

    invoke-interface {v2, p2}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z

    move-result v2

    if-nez v2, :cond_4f

    .line 4
    iget-object p1, v1, Lp5/l0;->r:Ljava/util/Map;

    invoke-interface {p1, p2, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 5
    iget p1, v1, Lp5/l0;->s:I

    const/4 v2, 0x1

    if-eq p1, v2, :cond_40

    const/4 p2, 0x2

    if-eq p1, p2, :cond_3c

    goto :goto_49

    .line 6
    :cond_3c
    invoke-virtual {v1, p3}, Lp5/l0;->a(Ljava/lang/String;)V

    goto :goto_49

    .line 7
    :cond_40
    iget-object p1, v1, Lp5/l0;->w:Landroid/content/ComponentName;

    .line 8
    iget-object p3, v1, Lp5/l0;->u:Landroid/os/IBinder;

    .line 9
    check-cast p2, Lcom/google/android/gms/common/internal/k;

    invoke-virtual {p2, p1, p3}, Lcom/google/android/gms/common/internal/k;->onServiceConnected(Landroid/content/ComponentName;Landroid/os/IBinder;)V

    .line 10
    :goto_49
    iget-boolean p1, v1, Lp5/l0;->t:Z

    .line 11
    monitor-exit v0

    return p1

    :catchall_4d
    move-exception p1

    goto :goto_70

    :cond_4f
    new-instance p2, Ljava/lang/IllegalStateException;

    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 p3

    add-int/lit8 p3, p3, 0x51

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string p3, "Trying to bind a GmsServiceConnection that was already connected before.  config="

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

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

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

    move-result-object p1

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

    throw p2

    :goto_70
    monitor-exit v0
    :try_end_71
    .catchall {:try_start_3 .. :try_end_71} :catchall_4d

    throw p1
.end method
