.class public final Lx4/c;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements La5/h;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lx4/c$a;,
        Lx4/c$b;
    }
.end annotation


# instance fields
.field public final a:Ly7/a;

.field public final b:Landroid/net/ConnectivityManager;

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

.field public final d:Ljava/net/URL;

.field public final e:Lg5/a;

.field public final f:Lg5/a;

.field public final g:I


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

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

    .line 2
    new-instance v0, La8/e;

    invoke-direct {v0}, La8/e;-><init>()V

    .line 3
    const-class v1, Ly4/o;

    sget-object v2, Ly4/c;->a:Ly4/c;

    invoke-virtual {v0, v1, v2}, La8/e;->a(Ljava/lang/Class;Ly7/e;)Lz7/a;

    const-class v1, Ly4/i;

    invoke-virtual {v0, v1, v2}, La8/e;->a(Ljava/lang/Class;Ly7/e;)Lz7/a;

    const-class v1, Ly4/r;

    sget-object v2, Ly4/f;->a:Ly4/f;

    invoke-virtual {v0, v1, v2}, La8/e;->a(Ljava/lang/Class;Ly7/e;)Lz7/a;

    const-class v1, Ly4/l;

    invoke-virtual {v0, v1, v2}, La8/e;->a(Ljava/lang/Class;Ly7/e;)Lz7/a;

    const-class v1, Ly4/p;

    sget-object v2, Ly4/d;->a:Ly4/d;

    invoke-virtual {v0, v1, v2}, La8/e;->a(Ljava/lang/Class;Ly7/e;)Lz7/a;

    const-class v1, Ly4/j;

    invoke-virtual {v0, v1, v2}, La8/e;->a(Ljava/lang/Class;Ly7/e;)Lz7/a;

    const-class v1, Ly4/a;

    sget-object v2, Ly4/b;->a:Ly4/b;

    invoke-virtual {v0, v1, v2}, La8/e;->a(Ljava/lang/Class;Ly7/e;)Lz7/a;

    const-class v1, Ly4/h;

    invoke-virtual {v0, v1, v2}, La8/e;->a(Ljava/lang/Class;Ly7/e;)Lz7/a;

    const-class v1, Ly4/q;

    sget-object v2, Ly4/e;->a:Ly4/e;

    invoke-virtual {v0, v1, v2}, La8/e;->a(Ljava/lang/Class;Ly7/e;)Lz7/a;

    const-class v1, Ly4/k;

    invoke-virtual {v0, v1, v2}, La8/e;->a(Ljava/lang/Class;Ly7/e;)Lz7/a;

    const-class v1, Ly4/t;

    sget-object v2, Ly4/g;->a:Ly4/g;

    invoke-virtual {v0, v1, v2}, La8/e;->a(Ljava/lang/Class;Ly7/e;)Lz7/a;

    const-class v1, Ly4/n;

    invoke-virtual {v0, v1, v2}, La8/e;->a(Ljava/lang/Class;Ly7/e;)Lz7/a;

    const/4 v1, 0x1

    .line 4
    iput-boolean v1, v0, La8/e;->d:Z

    .line 5
    new-instance v1, La8/d;

    invoke-direct {v1, v0}, La8/d;-><init>(La8/e;)V

    .line 6
    iput-object v1, p0, Lx4/c;->a:Ly7/a;

    iput-object p1, p0, Lx4/c;->c:Landroid/content/Context;

    const-string v0, "connectivity"

    invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Landroid/net/ConnectivityManager;

    iput-object p1, p0, Lx4/c;->b:Landroid/net/ConnectivityManager;

    sget-object p1, Lx4/a;->c:Ljava/lang/String;

    invoke-static {p1}, Lx4/c;->c(Ljava/lang/String;)Ljava/net/URL;

    move-result-object p1

    iput-object p1, p0, Lx4/c;->d:Ljava/net/URL;

    iput-object p3, p0, Lx4/c;->e:Lg5/a;

    iput-object p2, p0, Lx4/c;->f:Lg5/a;

    const p1, 0x9c40

    iput p1, p0, Lx4/c;->g:I

    return-void
.end method

.method public static c(Ljava/lang/String;)Ljava/net/URL;
    .registers 4

    :try_start_0
    new-instance v0, Ljava/net/URL;

    invoke-direct {v0, p0}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
    :try_end_5
    .catch Ljava/net/MalformedURLException; {:try_start_0 .. :try_end_5} :catch_6

    return-object v0

    :catch_6
    move-exception v0

    new-instance v1, Ljava/lang/IllegalArgumentException;

    const-string v2, "Invalid url: "

    invoke-static {v2, p0}, Le/a;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object p0

    invoke-direct {v1, p0, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V

    throw v1
.end method


# virtual methods
.method public a(Lz4/f;)Lz4/f;
    .registers 7

    iget-object v0, p0, Lx4/c;->b:Landroid/net/ConnectivityManager;

    invoke-virtual {v0}, Landroid/net/ConnectivityManager;->getActiveNetworkInfo()Landroid/net/NetworkInfo;

    move-result-object v0

    invoke-virtual {p1}, Lz4/f;->i()Lz4/f$a;

    move-result-object p1

    sget v1, Landroid/os/Build$VERSION;->SDK_INT:I

    .line 1
    invoke-virtual {p1}, Lz4/f$a;->c()Ljava/util/Map;

    move-result-object v2

    invoke-static {v1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v1

    const-string v3, "sdk-version"

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

    .line 2
    sget-object v1, Landroid/os/Build;->MODEL:Ljava/lang/String;

    .line 3
    invoke-virtual {p1}, Lz4/f$a;->c()Ljava/util/Map;

    move-result-object v2

    const-string v3, "model"

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

    .line 4
    sget-object v1, Landroid/os/Build;->HARDWARE:Ljava/lang/String;

    .line 5
    invoke-virtual {p1}, Lz4/f$a;->c()Ljava/util/Map;

    move-result-object v2

    const-string v3, "hardware"

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

    .line 6
    sget-object v1, Landroid/os/Build;->DEVICE:Ljava/lang/String;

    .line 7
    invoke-virtual {p1}, Lz4/f$a;->c()Ljava/util/Map;

    move-result-object v2

    const-string v3, "device"

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

    .line 8
    sget-object v1, Landroid/os/Build;->PRODUCT:Ljava/lang/String;

    .line 9
    invoke-virtual {p1}, Lz4/f$a;->c()Ljava/util/Map;

    move-result-object v2

    const-string v3, "product"

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

    .line 10
    sget-object v1, Landroid/os/Build;->ID:Ljava/lang/String;

    .line 11
    invoke-virtual {p1}, Lz4/f$a;->c()Ljava/util/Map;

    move-result-object v2

    const-string v3, "os-uild"

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

    .line 12
    sget-object v1, Landroid/os/Build;->MANUFACTURER:Ljava/lang/String;

    .line 13
    invoke-virtual {p1}, Lz4/f$a;->c()Ljava/util/Map;

    move-result-object v2

    const-string v3, "manufacturer"

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

    .line 14
    sget-object v1, Landroid/os/Build;->FINGERPRINT:Ljava/lang/String;

    .line 15
    invoke-virtual {p1}, Lz4/f$a;->c()Ljava/util/Map;

    move-result-object v2

    const-string v3, "fingerprint"

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

    .line 16
    invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;

    invoke-static {}, Ljava/util/TimeZone;->getDefault()Ljava/util/TimeZone;

    move-result-object v1

    invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;

    move-result-object v2

    invoke-virtual {v2}, Ljava/util/Calendar;->getTimeInMillis()J

    move-result-wide v2

    invoke-virtual {v1, v2, v3}, Ljava/util/TimeZone;->getOffset(J)I

    move-result v1

    div-int/lit16 v1, v1, 0x3e8

    int-to-long v1, v1

    .line 17
    invoke-virtual {p1}, Lz4/f$a;->c()Ljava/util/Map;

    move-result-object v3

    invoke-static {v1, v2}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v1

    const-string v2, "tz-offset"

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

    const/4 v1, -0x1

    if-nez v0, :cond_90

    .line 18
    sget-object v2, Ly4/t$b;->s:Ly4/t$b;

    move v2, v1

    goto :goto_94

    :cond_90
    invoke-virtual {v0}, Landroid/net/NetworkInfo;->getType()I

    move-result v2

    .line 19
    :goto_94
    invoke-virtual {p1}, Lz4/f$a;->c()Ljava/util/Map;

    move-result-object v3

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

    move-result-object v2

    const-string v4, "net-type"

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

    const/4 v2, 0x0

    if-nez v0, :cond_a7

    .line 20
    sget-object v0, Ly4/t$a;->s:Ly4/t$a;

    goto :goto_bd

    :cond_a7
    invoke-virtual {v0}, Landroid/net/NetworkInfo;->getSubtype()I

    move-result v0

    if-ne v0, v1, :cond_b2

    sget-object v0, Ly4/t$a;->t:Ly4/t$a;

    const/16 v0, 0x64

    goto :goto_be

    .line 21
    :cond_b2
    sget-object v3, Ly4/t$a;->u:Landroid/util/SparseArray;

    invoke-virtual {v3, v0}, Landroid/util/SparseArray;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ly4/t$a;

    if-eqz v3, :cond_bd

    goto :goto_be

    :cond_bd
    :goto_bd
    move v0, v2

    .line 22
    :goto_be
    invoke-virtual {p1}, Lz4/f$a;->c()Ljava/util/Map;

    move-result-object v3

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

    move-result-object v0

    const-string v4, "mobile-subtype"

    invoke-interface {v3, v4, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 23
    invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/Locale;->getCountry()Ljava/lang/String;

    move-result-object v0

    .line 24
    invoke-virtual {p1}, Lz4/f$a;->c()Ljava/util/Map;

    move-result-object v3

    const-string v4, "country"

    invoke-interface {v3, v4, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 25
    invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/Locale;->getLanguage()Ljava/lang/String;

    move-result-object v0

    .line 26
    invoke-virtual {p1}, Lz4/f$a;->c()Ljava/util/Map;

    move-result-object v3

    const-string v4, "locale"

    invoke-interface {v3, v4, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 27
    iget-object v0, p0, Lx4/c;->c:Landroid/content/Context;

    const-string v3, "phone"

    .line 28
    invoke-virtual {v0, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/telephony/TelephonyManager;

    .line 29
    invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getSimOperator()Ljava/lang/String;

    move-result-object v0

    .line 30
    invoke-virtual {p1}, Lz4/f$a;->c()Ljava/util/Map;

    move-result-object v3

    const-string v4, "mcc_mnc"

    invoke-interface {v3, v4, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 31
    iget-object v0, p0, Lx4/c;->c:Landroid/content/Context;

    .line 32
    :try_start_106
    invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v3

    invoke-virtual {v0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v3, v0, v2}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;

    move-result-object v0

    iget v1, v0, Landroid/content/pm/PackageInfo;->versionCode:I
    :try_end_114
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_106 .. :try_end_114} :catch_115

    goto :goto_11d

    :catch_115
    move-exception v0

    const-string v2, "CctTransportBackend"

    const-string v3, "Unable to find version code for package"

    invoke-static {v2, v3, v0}, Le/l;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 33
    :goto_11d
    invoke-static {v1}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;

    move-result-object v0

    .line 34
    invoke-virtual {p1}, Lz4/f$a;->c()Ljava/util/Map;

    move-result-object v1

    const-string v2, "application_build"

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

    .line 35
    invoke-virtual {p1}, Lz4/f$a;->b()Lz4/f;

    move-result-object p1

    return-object p1
.end method

.method public b(Lcom/google/android/datatransport/runtime/backends/b;)Lcom/google/android/datatransport/runtime/backends/c;
    .registers 36

    move-object/from16 v1, p0

    .line 1
    sget-object v2, Lcom/google/android/datatransport/runtime/backends/c$a;->s:Lcom/google/android/datatransport/runtime/backends/c$a;

    new-instance v0, Ljava/util/HashMap;

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

    move-object/from16 v3, p1

    check-cast v3, La5/a;

    .line 2
    iget-object v4, v3, La5/a;->a:Ljava/lang/Iterable;

    .line 3
    invoke-interface {v4}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;

    move-result-object v4

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

    move-result v5

    if-eqz v5, :cond_3f

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

    move-result-object v5

    check-cast v5, Lz4/f;

    invoke-virtual {v5}, Lz4/f;->g()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v0, v6}, Ljava/util/HashMap;->containsKey(Ljava/lang/Object;)Z

    move-result v7

    if-nez v7, :cond_35

    new-instance v7, Ljava/util/ArrayList;

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

    invoke-virtual {v7, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    invoke-virtual {v0, v6, v7}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_13

    :cond_35
    invoke-virtual {v0, v6}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Ljava/util/List;

    invoke-interface {v6, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_13

    :cond_3f
    new-instance v4, Ljava/util/ArrayList;

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

    invoke-virtual {v0}, Ljava/util/HashMap;->entrySet()Ljava/util/Set;

    move-result-object v0

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

    move-result-object v0

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

    move-result v5

    const-string v6, "CctTransportBackend"

    const/4 v7, 0x0

    if-eqz v5, :cond_277

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

    move-result-object v5

    check-cast v5, Ljava/util/Map$Entry;

    invoke-interface {v5}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;

    move-result-object v8

    check-cast v8, Ljava/util/List;

    const/4 v9, 0x0

    invoke-interface {v8, v9}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v8

    check-cast v8, Lz4/f;

    sget-object v18, Ly4/u;->r:Ly4/u;

    iget-object v9, v1, Lx4/c;->f:Lg5/a;

    invoke-interface {v9}, Lg5/a;->a()J

    move-result-wide v9

    .line 4
    invoke-static {v9, v10}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v9

    .line 5
    iget-object v10, v1, Lx4/c;->e:Lg5/a;

    invoke-interface {v10}, Lg5/a;->a()J

    move-result-wide v10

    .line 6
    invoke-static {v10, v11}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v10

    .line 7
    sget-object v11, Ly4/p$a;->r:Ly4/p$a;

    const-string v12, "sdk-version"

    invoke-virtual {v8, v12}, Lz4/f;->f(Ljava/lang/String;)I

    move-result v12

    invoke-static {v12}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v20

    const-string v12, "model"

    invoke-virtual {v8, v12}, Lz4/f;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v21

    const-string v12, "hardware"

    invoke-virtual {v8, v12}, Lz4/f;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v22

    const-string v12, "device"

    invoke-virtual {v8, v12}, Lz4/f;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v23

    const-string v12, "product"

    invoke-virtual {v8, v12}, Lz4/f;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v24

    const-string v12, "os-uild"

    invoke-virtual {v8, v12}, Lz4/f;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v25

    const-string v12, "manufacturer"

    invoke-virtual {v8, v12}, Lz4/f;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v26

    const-string v12, "fingerprint"

    invoke-virtual {v8, v12}, Lz4/f;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v27

    const-string v12, "country"

    invoke-virtual {v8, v12}, Lz4/f;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v29

    const-string v12, "locale"

    invoke-virtual {v8, v12}, Lz4/f;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v28

    const-string v12, "mcc_mnc"

    invoke-virtual {v8, v12}, Lz4/f;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v30

    const-string v12, "application_build"

    invoke-virtual {v8, v12}, Lz4/f;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v31

    .line 8
    new-instance v8, Ly4/h;

    const/16 v32, 0x0

    move-object/from16 v19, v8

    invoke-direct/range {v19 .. v32}, Ly4/h;-><init>(Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ly4/h$a;)V

    .line 9
    new-instance v14, Ly4/j;

    invoke-direct {v14, v11, v8, v7}, Ly4/j;-><init>(Ly4/p$a;Ly4/a;Ly4/j$a;)V

    .line 10
    :try_start_da
    invoke-interface {v5}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;

    move-result-object v8

    check-cast v8, Ljava/lang/String;

    invoke-static {v8}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v8

    .line 11
    invoke-static {v8}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v8
    :try_end_e8
    .catch Ljava/lang/NumberFormatException; {:try_start_da .. :try_end_e8} :catch_ec

    move-object/from16 v16, v7

    move-object v15, v8

    goto :goto_f5

    .line 12
    :catch_ec
    invoke-interface {v5}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;

    move-result-object v8

    check-cast v8, Ljava/lang/String;

    move-object v15, v7

    move-object/from16 v16, v8

    :goto_f5
    new-instance v7, Ljava/util/ArrayList;

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

    invoke-interface {v5}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Ljava/util/List;

    invoke-interface {v5}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v5

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

    move-result v8

    const-string v11, "Missing required properties:"

    const-string v12, ""

    if-eqz v8, :cond_236

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

    move-result-object v8

    check-cast v8, Lz4/f;

    invoke-virtual {v8}, Lz4/f;->d()Lz4/e;

    move-result-object v13

    move-object/from16 v20, v0

    .line 13
    iget-object v0, v13, Lz4/e;->a:Lw4/b;

    move-object/from16 v17, v5

    .line 14
    new-instance v5, Lw4/b;

    move-object/from16 v19, v12

    const-string v12, "proto"

    invoke-direct {v5, v12}, Lw4/b;-><init>(Ljava/lang/String;)V

    .line 15
    invoke-virtual {v0, v5}, Lw4/b;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_137

    .line 16
    iget-object v0, v13, Lz4/e;->b:[B

    .line 17
    new-instance v5, Ly4/k$b;

    invoke-direct {v5}, Ly4/k$b;-><init>()V

    .line 18
    iput-object v0, v5, Ly4/k$b;->d:[B

    goto :goto_158

    .line 19
    :cond_137
    new-instance v5, Lw4/b;

    const-string v12, "json"

    invoke-direct {v5, v12}, Lw4/b;-><init>(Ljava/lang/String;)V

    .line 20
    invoke-virtual {v0, v5}, Lw4/b;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_219

    new-instance v0, Ljava/lang/String;

    .line 21
    iget-object v5, v13, Lz4/e;->b:[B

    const-string v12, "UTF-8"

    .line 22
    invoke-static {v12}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;

    move-result-object v12

    invoke-direct {v0, v5, v12}, Ljava/lang/String;-><init>([BLjava/nio/charset/Charset;)V

    .line 23
    new-instance v5, Ly4/k$b;

    invoke-direct {v5}, Ly4/k$b;-><init>()V

    .line 24
    iput-object v0, v5, Ly4/k$b;->e:Ljava/lang/String;

    .line 25
    :goto_158
    invoke-virtual {v8}, Lz4/f;->e()J

    move-result-wide v12

    .line 26
    invoke-static {v12, v13}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v0

    iput-object v0, v5, Ly4/k$b;->a:Ljava/lang/Long;

    .line 27
    invoke-virtual {v8}, Lz4/f;->h()J

    move-result-wide v12

    .line 28
    invoke-static {v12, v13}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v0

    iput-object v0, v5, Ly4/k$b;->c:Ljava/lang/Long;

    .line 29
    invoke-virtual {v8}, Lz4/f;->b()Ljava/util/Map;

    move-result-object v0

    const-string v12, "tz-offset"

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

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    if-nez v0, :cond_17d

    const-wide/16 v12, 0x0

    goto :goto_185

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

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Long;->longValue()J

    move-result-wide v12

    .line 30
    :goto_185
    invoke-static {v12, v13}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v0

    iput-object v0, v5, Ly4/k$b;->f:Ljava/lang/Long;

    const-string v0, "net-type"

    .line 31
    invoke-virtual {v8, v0}, Lz4/f;->f(Ljava/lang/String;)I

    move-result v0

    .line 32
    sget-object v12, Ly4/t$b;->t:Landroid/util/SparseArray;

    invoke-virtual {v12, v0}, Landroid/util/SparseArray;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ly4/t$b;

    const-string v12, "mobile-subtype"

    .line 33
    invoke-virtual {v8, v12}, Lz4/f;->f(Ljava/lang/String;)I

    move-result v12

    .line 34
    sget-object v13, Ly4/t$a;->u:Landroid/util/SparseArray;

    invoke-virtual {v13, v12}, Landroid/util/SparseArray;->get(I)Ljava/lang/Object;

    move-result-object v12

    check-cast v12, Ly4/t$a;

    .line 35
    new-instance v13, Ly4/n;

    move-object/from16 v21, v2

    const/4 v2, 0x0

    invoke-direct {v13, v0, v12, v2}, Ly4/n;-><init>(Ly4/t$b;Ly4/t$a;Ly4/n$a;)V

    .line 36
    iput-object v13, v5, Ly4/k$b;->g:Ly4/t;

    .line 37
    invoke-virtual {v8}, Lz4/f;->c()Ljava/lang/Integer;

    move-result-object v0

    if-eqz v0, :cond_1bd

    invoke-virtual {v8}, Lz4/f;->c()Ljava/lang/Integer;

    move-result-object v0

    .line 38
    iput-object v0, v5, Ly4/k$b;->b:Ljava/lang/Integer;

    .line 39
    :cond_1bd
    iget-object v0, v5, Ly4/k$b;->a:Ljava/lang/Long;

    if-nez v0, :cond_1c4

    const-string v12, " eventTimeMs"

    goto :goto_1c6

    :cond_1c4
    move-object/from16 v12, v19

    :goto_1c6
    iget-object v0, v5, Ly4/k$b;->c:Ljava/lang/Long;

    if-nez v0, :cond_1d0

    const-string v0, " eventUptimeMs"

    invoke-static {v12, v0}, Le/a;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v12

    :cond_1d0
    iget-object v0, v5, Ly4/k$b;->f:Ljava/lang/Long;

    if-nez v0, :cond_1da

    const-string v0, " timezoneOffsetSeconds"

    invoke-static {v12, v0}, Le/a;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v12

    :cond_1da
    invoke-virtual {v12}, Ljava/lang/String;->isEmpty()Z

    move-result v0

    if-eqz v0, :cond_20f

    new-instance v0, Ly4/k;

    iget-object v2, v5, Ly4/k$b;->a:Ljava/lang/Long;

    invoke-virtual {v2}, Ljava/lang/Long;->longValue()J

    move-result-wide v23

    iget-object v2, v5, Ly4/k$b;->b:Ljava/lang/Integer;

    iget-object v8, v5, Ly4/k$b;->c:Ljava/lang/Long;

    invoke-virtual {v8}, Ljava/lang/Long;->longValue()J

    move-result-wide v26

    iget-object v8, v5, Ly4/k$b;->d:[B

    iget-object v11, v5, Ly4/k$b;->e:Ljava/lang/String;

    iget-object v12, v5, Ly4/k$b;->f:Ljava/lang/Long;

    invoke-virtual {v12}, Ljava/lang/Long;->longValue()J

    move-result-wide v30

    iget-object v5, v5, Ly4/k$b;->g:Ly4/t;

    const/16 v33, 0x0

    move-object/from16 v22, v0

    move-object/from16 v25, v2

    move-object/from16 v28, v8

    move-object/from16 v29, v11

    move-object/from16 v32, v5

    invoke-direct/range {v22 .. v33}, Ly4/k;-><init>(JLjava/lang/Integer;J[BLjava/lang/String;JLy4/t;Ly4/k$a;)V

    .line 40
    invoke-virtual {v7, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_22e

    .line 41
    :cond_20f
    new-instance v0, Ljava/lang/IllegalStateException;

    invoke-static {v11, v12}, Le/a;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

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

    throw v0

    :cond_219
    move-object/from16 v21, v2

    .line 42
    invoke-static {v6}, Le/l;->f(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    const/4 v5, 0x1

    new-array v5, v5, [Ljava/lang/Object;

    const/4 v8, 0x0

    aput-object v0, v5, v8

    const-string v0, "Received event of unsupported encoding %s. Skipping..."

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

    move-result-object v0

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

    :goto_22e
    move-object/from16 v5, v17

    move-object/from16 v0, v20

    move-object/from16 v2, v21

    goto/16 :goto_104

    :cond_236
    move-object/from16 v20, v0

    move-object/from16 v21, v2

    move-object/from16 v19, v12

    if-nez v9, :cond_241

    const-string v12, " requestTimeMs"

    goto :goto_243

    :cond_241
    move-object/from16 v12, v19

    :goto_243
    if-nez v10, :cond_24b

    const-string v0, " requestUptimeMs"

    .line 43
    invoke-static {v12, v0}, Le/a;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v12

    :cond_24b
    invoke-virtual {v12}, Ljava/lang/String;->isEmpty()Z

    move-result v0

    if-eqz v0, :cond_26d

    new-instance v0, Ly4/l;

    invoke-virtual {v9}, Ljava/lang/Long;->longValue()J

    move-result-wide v5

    invoke-virtual {v10}, Ljava/lang/Long;->longValue()J

    move-result-wide v12

    const/16 v19, 0x0

    move-object v9, v0

    move-wide v10, v5

    move-object/from16 v17, v7

    invoke-direct/range {v9 .. v19}, Ly4/l;-><init>(JJLy4/p;Ljava/lang/Integer;Ljava/lang/String;Ljava/util/List;Ly4/u;Ly4/l$a;)V

    .line 44
    invoke-virtual {v4, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    move-object/from16 v0, v20

    move-object/from16 v2, v21

    goto/16 :goto_4c

    .line 45
    :cond_26d
    new-instance v0, Ljava/lang/IllegalStateException;

    invoke-static {v11, v12}, Le/a;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

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

    throw v0

    :cond_277
    move-object/from16 v21, v2

    .line 46
    new-instance v0, Ly4/i;

    invoke-direct {v0, v4}, Ly4/i;-><init>(Ljava/util/List;)V

    .line 47
    iget-object v2, v1, Lx4/c;->d:Ljava/net/URL;

    .line 48
    iget-object v3, v3, La5/a;->b:[B

    if-eqz v3, :cond_2a2

    .line 49
    :try_start_284
    move-object/from16 v3, p1

    check-cast v3, La5/a;

    .line 50
    iget-object v3, v3, La5/a;->b:[B

    .line 51
    invoke-static {v3}, Lx4/a;->a([B)Lx4/a;

    move-result-object v3

    .line 52
    iget-object v4, v3, Lx4/a;->b:Ljava/lang/String;

    if-eqz v4, :cond_293

    goto :goto_294

    :cond_293
    move-object v4, v7

    .line 53
    :goto_294
    iget-object v3, v3, Lx4/a;->a:Ljava/lang/String;

    if-eqz v3, :cond_2a3

    .line 54
    invoke-static {v3}, Lx4/c;->c(Ljava/lang/String;)Ljava/net/URL;

    move-result-object v2
    :try_end_29c
    .catch Ljava/lang/IllegalArgumentException; {:try_start_284 .. :try_end_29c} :catch_29d

    goto :goto_2a3

    :catch_29d
    invoke-static {}, Lcom/google/android/datatransport/runtime/backends/c;->a()Lcom/google/android/datatransport/runtime/backends/c;

    move-result-object v0

    return-object v0

    :cond_2a2
    move-object v4, v7

    :cond_2a3
    :goto_2a3
    const/4 v3, 0x5

    const-wide/16 v8, -0x1

    :try_start_2a6
    new-instance v5, Lx4/c$a;

    invoke-direct {v5, v2, v0, v4}, Lx4/c$a;-><init>(Ljava/net/URL;Ly4/o;Ljava/lang/String;)V

    new-instance v0, Li4/d;

    invoke-direct {v0, v1}, Li4/d;-><init>(Lx4/c;)V

    .line 55
    :cond_2b0
    invoke-virtual {v0, v5}, Li4/d;->apply(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    move-object v4, v2

    check-cast v4, Lx4/c$b;

    .line 56
    iget-object v10, v4, Lx4/c$b;->b:Ljava/net/URL;

    if-eqz v10, :cond_2cd

    const-string v11, "Following redirect to: %s"

    invoke-static {v6, v11, v10}, Le/l;->b(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)V

    iget-object v4, v4, Lx4/c$b;->b:Ljava/net/URL;

    .line 57
    new-instance v10, Lx4/c$a;

    iget-object v11, v5, Lx4/c$a;->b:Ly4/o;

    iget-object v5, v5, Lx4/c$a;->c:Ljava/lang/String;

    invoke-direct {v10, v4, v11, v5}, Lx4/c$a;-><init>(Ljava/net/URL;Ly4/o;Ljava/lang/String;)V

    move-object v5, v10

    goto :goto_2ce

    :cond_2cd
    move-object v5, v7

    :goto_2ce
    if-eqz v5, :cond_2d5

    add-int/lit8 v3, v3, -0x1

    const/4 v4, 0x1

    if-ge v3, v4, :cond_2b0

    .line 58
    :cond_2d5
    check-cast v2, Lx4/c$b;

    iget v0, v2, Lx4/c$b;->a:I

    const/16 v3, 0xc8

    if-ne v0, v3, :cond_2e7

    iget-wide v2, v2, Lx4/c$b;->c:J

    .line 59
    new-instance v0, Lcom/google/android/datatransport/runtime/backends/a;

    sget-object v4, Lcom/google/android/datatransport/runtime/backends/c$a;->r:Lcom/google/android/datatransport/runtime/backends/c$a;

    invoke-direct {v0, v4, v2, v3}, Lcom/google/android/datatransport/runtime/backends/a;-><init>(Lcom/google/android/datatransport/runtime/backends/c$a;J)V

    return-object v0

    :cond_2e7
    const/16 v2, 0x1f4

    if-ge v0, v2, :cond_2f5

    const/16 v2, 0x194

    if-ne v0, v2, :cond_2f0

    goto :goto_2f5

    .line 60
    :cond_2f0
    invoke-static {}, Lcom/google/android/datatransport/runtime/backends/c;->a()Lcom/google/android/datatransport/runtime/backends/c;

    move-result-object v0

    return-object v0

    .line 61
    :cond_2f5
    :goto_2f5
    new-instance v0, Lcom/google/android/datatransport/runtime/backends/a;
    :try_end_2f7
    .catch Ljava/io/IOException; {:try_start_2a6 .. :try_end_2f7} :catch_2ff

    move-object/from16 v2, v21

    :try_start_2f9
    invoke-direct {v0, v2, v8, v9}, Lcom/google/android/datatransport/runtime/backends/a;-><init>(Lcom/google/android/datatransport/runtime/backends/c$a;J)V
    :try_end_2fc
    .catch Ljava/io/IOException; {:try_start_2f9 .. :try_end_2fc} :catch_2fd

    return-object v0

    :catch_2fd
    move-exception v0

    goto :goto_302

    :catch_2ff
    move-exception v0

    move-object/from16 v2, v21

    :goto_302
    const-string v3, "Could not make request to the backend"

    .line 62
    invoke-static {v6, v3, v0}, Le/l;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 63
    new-instance v0, Lcom/google/android/datatransport/runtime/backends/a;

    invoke-direct {v0, v2, v8, v9}, Lcom/google/android/datatransport/runtime/backends/a;-><init>(Lcom/google/android/datatransport/runtime/backends/c$a;J)V

    return-object v0
.end method
