.class final Lcom/google/android/gms/ads/identifier/zza;
.super Ljava/lang/Thread;
.source ""


# instance fields
.field private final synthetic zzl:Ljava/util/Map;


# direct methods
.method public constructor <init>(Lcom/google/android/gms/ads/identifier/AdvertisingIdClient;Ljava/util/Map;)V
    .registers 3

    iput-object p2, p0, Lcom/google/android/gms/ads/identifier/zza;->zzl:Ljava/util/Map;

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

    return-void
.end method


# virtual methods
.method public final run()V
    .registers 8

    const-string v0, ". "

    const-string v1, "HttpUrlPinger"

    new-instance v2, Lcom/google/android/gms/ads/identifier/zzc;

    invoke-direct {v2}, Lcom/google/android/gms/ads/identifier/zzc;-><init>()V

    iget-object v2, p0, Lcom/google/android/gms/ads/identifier/zza;->zzl:Ljava/util/Map;

    const-string v3, "https://pagead2.googlesyndication.col/pagead/gen_204?id=gmob-apps"

    invoke-static {v3}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v3

    invoke-virtual {v3}, Landroid/net/Uri;->buildUpon()Landroid/net/Uri$Builder;

    move-result-object v3

    invoke-interface {v2}, Ljava/util/Map;->keySet()Ljava/util/Set;

    move-result-object v4

    invoke-interface {v4}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v4

    :goto_1d
    invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z

    move-result v5

    if-eqz v5, :cond_33

    invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Ljava/lang/String;

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

    move-result-object v6

    check-cast v6, Ljava/lang/String;

    invoke-virtual {v3, v5, v6}, Landroid/net/Uri$Builder;->appendQueryParameter(Ljava/lang/String;Ljava/lang/String;)Landroid/net/Uri$Builder;

    goto :goto_1d

    :cond_33
    invoke-virtual {v3}, Landroid/net/Uri$Builder;->build()Landroid/net/Uri;

    move-result-object v2

    invoke-virtual {v2}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v2

    :try_start_3b
    new-instance v3, Ljava/net/URL;

    invoke-direct {v3, v2}, Ljava/net/URL;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3}, Ljava/net/URL;->openConnection()Ljava/net/URLConnection;

    move-result-object v3

    check-cast v3, Ljava/net/HttpURLConnection;
    :try_end_46
    .catch Ljava/lang/IndexOutOfBoundsException; {:try_start_3b .. :try_end_46} :catch_9a
    .catch Ljava/io/IOException; {:try_start_3b .. :try_end_46} :catch_83
    .catch Ljava/lang/RuntimeException; {:try_start_3b .. :try_end_46} :catch_81

    :try_start_46
    invoke-virtual {v3}, Ljava/net/HttpURLConnection;->getResponseCode()I

    move-result v4

    const/16 v5, 0xc8

    if-lt v4, v5, :cond_52

    const/16 v5, 0x12c

    if-lt v4, v5, :cond_78

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

    move-result-object v5

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

    move-result v5

    add-int/lit8 v5, v5, 0x41

    new-instance v6, Ljava/lang/StringBuilder;

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

    const-string v5, "Received non-success response code "

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

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

    const-string v4, " from pinging URL: "

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

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

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

    move-result-object v4

    invoke-static {v1, v4}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_78
    .catchall {:try_start_46 .. :try_end_78} :catchall_7c

    :cond_78
    :try_start_78
    invoke-virtual {v3}, Ljava/net/HttpURLConnection;->disconnect()V

    return-void

    :catchall_7c
    move-exception v4

    invoke-virtual {v3}, Ljava/net/HttpURLConnection;->disconnect()V

    throw v4
    :try_end_81
    .catch Ljava/lang/IndexOutOfBoundsException; {:try_start_78 .. :try_end_81} :catch_9a
    .catch Ljava/io/IOException; {:try_start_78 .. :try_end_81} :catch_83
    .catch Ljava/lang/RuntimeException; {:try_start_78 .. :try_end_81} :catch_81

    :catch_81
    move-exception v3

    goto :goto_84

    :catch_83
    move-exception v3

    :goto_84
    invoke-virtual {v3}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v4

    const/16 v5, 0x1b

    invoke-static {v2, v5}, Lw/a;->a(Ljava/lang/String;I)I

    move-result v5

    invoke-static {v4, v5}, Lw/a;->a(Ljava/lang/String;I)I

    move-result v5

    new-instance v6, Ljava/lang/StringBuilder;

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

    const-string v5, "Error while pinging URL: "

    goto :goto_b0

    :catch_9a
    move-exception v3

    invoke-virtual {v3}, Ljava/lang/IndexOutOfBoundsException;->getMessage()Ljava/lang/String;

    move-result-object v4

    const/16 v5, 0x20

    invoke-static {v2, v5}, Lw/a;->a(Ljava/lang/String;I)I

    move-result v5

    invoke-static {v4, v5}, Lw/a;->a(Ljava/lang/String;I)I

    move-result v5

    new-instance v6, Ljava/lang/StringBuilder;

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

    const-string v5, "Error while parsing ping URL: "

    :goto_b0
    invoke-static {v6, v5, v2, v0, v4}, Lb1/e;->a(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

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

    return-void
.end method
