.class public Ld5/h;
.super Ljava/lang/Object;
.source ""


# instance fields
.field public final a:Landroid/content/Context;

.field public final b:La5/d;

.field public final c:Le5/c;

.field public final d:Ld5/k;

.field public final e:Ljava/util/concurrent/Executor;

.field public final f:Lf5/b;

.field public final g:Lg5/a;


# direct methods
.method public constructor <init>(Landroid/content/Context;La5/d;Le5/c;Ld5/k;Ljava/util/concurrent/Executor;Lf5/b;Lg5/a;)V
    .registers 8

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

    iput-object p1, p0, Ld5/h;->a:Landroid/content/Context;

    iput-object p2, p0, Ld5/h;->b:La5/d;

    iput-object p3, p0, Ld5/h;->c:Le5/c;

    iput-object p4, p0, Ld5/h;->d:Ld5/k;

    iput-object p5, p0, Ld5/h;->e:Ljava/util/concurrent/Executor;

    iput-object p6, p0, Ld5/h;->f:Lf5/b;

    iput-object p7, p0, Ld5/h;->g:Lg5/a;

    return-void
.end method


# virtual methods
.method public a(Lz4/i;I)V
    .registers 11

    iget-object v0, p0, Ld5/h;->b:La5/d;

    invoke-virtual {p1}, Lz4/i;->b()Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, La5/d;->a(Ljava/lang/String;)La5/h;

    move-result-object v0

    iget-object v1, p0, Ld5/h;->f:Lf5/b;

    new-instance v2, Ld5/e;

    invoke-direct {v2, p0, p1}, Ld5/e;-><init>(Ld5/h;Lz4/i;)V

    invoke-interface {v1, v2}, Lf5/b;->b(Lf5/b$a;)Ljava/lang/Object;

    move-result-object v1

    move-object v5, v1

    check-cast v5, Ljava/lang/Iterable;

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

    move-result-object v1

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

    move-result v1

    if-nez v1, :cond_23

    return-void

    :cond_23
    if-nez v0, :cond_32

    const-string v0, "Uploader"

    const-string v1, "Unknown backend for %s, deleting event batch for it..."

    invoke-static {v0, v1, p1}, Le/l;->b(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)V

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

    move-result-object v0

    :goto_30
    move-object v4, v0

    goto :goto_5e

    :cond_32
    new-instance v1, Ljava/util/ArrayList;

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

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

    move-result-object v2

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

    move-result v3

    if-eqz v3, :cond_4f

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

    move-result-object v3

    check-cast v3, Le5/h;

    invoke-virtual {v3}, Le5/h;->a()Lz4/f;

    move-result-object v3

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

    goto :goto_3b

    :cond_4f
    invoke-virtual {p1}, Lz4/i;->c()[B

    move-result-object v2

    .line 1
    new-instance v3, La5/a;

    const/4 v4, 0x0

    invoke-direct {v3, v1, v2, v4}, La5/a;-><init>(Ljava/lang/Iterable;[BLa5/a$a;)V

    .line 2
    invoke-interface {v0, v3}, La5/h;->b(Lcom/google/android/datatransport/runtime/backends/b;)Lcom/google/android/datatransport/runtime/backends/c;

    move-result-object v0

    goto :goto_30

    :goto_5e
    iget-object v0, p0, Ld5/h;->f:Lf5/b;

    new-instance v1, Ld5/d;

    move-object v2, v1

    move-object v3, p0

    move-object v6, p1

    move v7, p2

    invoke-direct/range {v2 .. v7}, Ld5/d;-><init>(Ld5/h;Lcom/google/android/datatransport/runtime/backends/c;Ljava/lang/Iterable;Lz4/i;I)V

    invoke-interface {v0, v1}, Lf5/b;->b(Lf5/b$a;)Ljava/lang/Object;

    return-void
.end method
