.class public final Lj6/g5;
.super Lj6/q3;
.source ""


# instance fields
.field public volatile c:Lj6/d5;

.field public volatile d:Lj6/d5;

.field public e:Lj6/d5;

.field public final f:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map<",
            "Landroid/app/Activity;",
            "Lj6/d5;",
            ">;"
        }
    .end annotation
.end field

.field public g:Landroid/app/Activity;

.field public volatile h:Z

.field public volatile i:Lj6/d5;

.field public j:Lj6/d5;

.field public k:Z

.field public final l:Ljava/lang/Object;

.field public m:Ljava/lang/String;


# direct methods
.method public constructor <init>(Lcom/google/android/gms/measurement/internal/d;)V
    .registers 2

    invoke-direct {p0, p1}, Lj6/q3;-><init>(Lcom/google/android/gms/measurement/internal/d;)V

    new-instance p1, Ljava/lang/Object;

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

    iput-object p1, p0, Lj6/g5;->l:Ljava/lang/Object;

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

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

    iput-object p1, p0, Lj6/g5;->f:Ljava/util/Map;

    return-void
.end method


# virtual methods
.method public final j()Z
    .registers 2

    const/4 v0, 0x0

    return v0
.end method

.method public final k(Landroid/app/Activity;Lj6/d5;Z)V
    .registers 20

    move-object/from16 v7, p0

    move-object/from16 v0, p2

    iget-object v1, v7, Lj6/g5;->c:Lj6/d5;

    if-nez v1, :cond_b

    iget-object v1, v7, Lj6/g5;->d:Lj6/d5;

    goto :goto_d

    :cond_b
    iget-object v1, v7, Lj6/g5;->c:Lj6/d5;

    :goto_d
    move-object v3, v1

    iget-object v1, v0, Lj6/d5;->b:Ljava/lang/String;

    if-nez v1, :cond_31

    if-eqz p1, :cond_1f

    invoke-virtual/range {p1 .. p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v1

    const-string v2, "Activity"

    invoke-virtual {v7, v1, v2}, Lj6/g5;->o(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    goto :goto_20

    :cond_1f
    const/4 v1, 0x0

    :goto_20
    move-object v10, v1

    new-instance v1, Lj6/d5;

    iget-object v9, v0, Lj6/d5;->a:Ljava/lang/String;

    iget-wide v11, v0, Lj6/d5;->c:J

    iget-boolean v13, v0, Lj6/d5;->e:Z

    iget-wide v14, v0, Lj6/d5;->f:J

    move-object v8, v1

    invoke-direct/range {v8 .. v15}, Lj6/d5;-><init>(Ljava/lang/String;Ljava/lang/String;JZJ)V

    move-object v2, v1

    goto :goto_32

    :cond_31
    move-object v2, v0

    :goto_32
    iget-object v0, v7, Lj6/g5;->c:Lj6/d5;

    iput-object v0, v7, Lj6/g5;->d:Lj6/d5;

    iput-object v2, v7, Lj6/g5;->c:Lj6/d5;

    iget-object v0, v7, Lcom/google/android/gms/measurement/internal/e;->a:Lcom/google/android/gms/measurement/internal/d;

    .line 1
    iget-object v0, v0, Lcom/google/android/gms/measurement/internal/d;->n:Lu5/c;

    .line 2
    invoke-interface {v0}, Lu5/c;->c()J

    move-result-wide v4

    iget-object v0, v7, Lcom/google/android/gms/measurement/internal/e;->a:Lcom/google/android/gms/measurement/internal/d;

    invoke-virtual {v0}, Lcom/google/android/gms/measurement/internal/d;->c()Lj6/d4;

    move-result-object v8

    new-instance v9, Lj6/e5;

    move-object v0, v9

    move-object/from16 v1, p0

    move/from16 v6, p3

    invoke-direct/range {v0 .. v6}, Lj6/e5;-><init>(Lj6/g5;Lj6/d5;Lj6/d5;JZ)V

    invoke-virtual {v8, v9}, Lj6/d4;->r(Ljava/lang/Runnable;)V

    return-void
.end method

.method public final l(Lj6/d5;Lj6/d5;JZLandroid/os/Bundle;)V
    .registers 16

    invoke-virtual {p0}, Lj6/w2;->g()V

    const/4 v0, 0x0

    const/4 v1, 0x1

    if-eqz p2, :cond_26

    iget-wide v2, p2, Lj6/d5;->c:J

    iget-wide v4, p1, Lj6/d5;->c:J

    cmp-long v2, v2, v4

    if-nez v2, :cond_26

    iget-object v2, p2, Lj6/d5;->b:Ljava/lang/String;

    iget-object v3, p1, Lj6/d5;->b:Ljava/lang/String;

    invoke-static {v2, v3}, Lcom/google/android/gms/measurement/internal/f;->Z(Ljava/lang/String;Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_26

    iget-object v2, p2, Lj6/d5;->a:Ljava/lang/String;

    iget-object v3, p1, Lj6/d5;->a:Ljava/lang/String;

    invoke-static {v2, v3}, Lcom/google/android/gms/measurement/internal/f;->Z(Ljava/lang/String;Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_24

    goto :goto_26

    :cond_24
    move v2, v0

    goto :goto_27

    :cond_26
    :goto_26
    move v2, v1

    :goto_27
    if-eqz p5, :cond_2e

    iget-object p5, p0, Lj6/g5;->e:Lj6/d5;

    if-eqz p5, :cond_2e

    move v0, v1

    :cond_2e
    if-eqz v2, :cond_b4

    new-instance v8, Landroid/os/Bundle;

    if-eqz p6, :cond_38

    invoke-direct {v8, p6}, Landroid/os/Bundle;-><init>(Landroid/os/Bundle;)V

    goto :goto_3b

    :cond_38
    invoke-direct {v8}, Landroid/os/Bundle;-><init>()V

    :goto_3b
    invoke-static {p1, v8, v1}, Lcom/google/android/gms/measurement/internal/f;->x(Lj6/d5;Landroid/os/Bundle;Z)V

    if-eqz p2, :cond_59

    iget-object p5, p2, Lj6/d5;->a:Ljava/lang/String;

    if-eqz p5, :cond_49

    const-string p6, "_pn"

    invoke-virtual {v8, p6, p5}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    :cond_49
    iget-object p5, p2, Lj6/d5;->b:Ljava/lang/String;

    if-eqz p5, :cond_52

    const-string p6, "_pc"

    invoke-virtual {v8, p6, p5}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    :cond_52
    iget-wide p5, p2, Lj6/d5;->c:J

    const-string p2, "_pi"

    invoke-virtual {v8, p2, p5, p6}, Landroid/os/Bundle;->putLong(Ljava/lang/String;J)V

    :cond_59
    const-wide/16 p5, 0x0

    if-eqz v0, :cond_78

    iget-object p2, p0, Lcom/google/android/gms/measurement/internal/e;->a:Lcom/google/android/gms/measurement/internal/d;

    invoke-virtual {p2}, Lcom/google/android/gms/measurement/internal/d;->z()Lj6/u5;

    move-result-object p2

    iget-object p2, p2, Lj6/u5;->e:Lz5/hw1;

    iget-wide v2, p2, Lz5/hw1;->u:J

    sub-long v2, p3, v2

    iput-wide p3, p2, Lz5/hw1;->u:J

    cmp-long p2, v2, p5

    if-lez p2, :cond_78

    iget-object p2, p0, Lcom/google/android/gms/measurement/internal/e;->a:Lcom/google/android/gms/measurement/internal/d;

    invoke-virtual {p2}, Lcom/google/android/gms/measurement/internal/d;->A()Lcom/google/android/gms/measurement/internal/f;

    move-result-object p2

    invoke-virtual {p2, v8, v2, v3}, Lcom/google/android/gms/measurement/internal/f;->v(Landroid/os/Bundle;J)V

    :cond_78
    iget-object p2, p0, Lcom/google/android/gms/measurement/internal/e;->a:Lcom/google/android/gms/measurement/internal/d;

    .line 1
    iget-object p2, p2, Lcom/google/android/gms/measurement/internal/d;->g:Lj6/f;

    .line 2
    invoke-virtual {p2}, Lj6/f;->w()Z

    move-result p2

    if-nez p2, :cond_89

    const-wide/16 v2, 0x1

    const-string p2, "_mst"

    invoke-virtual {v8, p2, v2, v3}, Landroid/os/Bundle;->putLong(Ljava/lang/String;J)V

    :cond_89
    iget-boolean p2, p1, Lj6/d5;->e:Z

    if-eq v1, p2, :cond_90

    const-string p2, "auto"

    goto :goto_92

    :cond_90
    const-string p2, "app"

    :goto_92
    move-object v4, p2

    iget-object p2, p0, Lcom/google/android/gms/measurement/internal/e;->a:Lcom/google/android/gms/measurement/internal/d;

    .line 3
    iget-object p2, p2, Lcom/google/android/gms/measurement/internal/d;->n:Lu5/c;

    .line 4
    invoke-interface {p2}, Lu5/c;->b()J

    move-result-wide v2

    iget-boolean p2, p1, Lj6/d5;->e:Z

    if-eqz p2, :cond_a8

    iget-wide v5, p1, Lj6/d5;->f:J

    cmp-long p2, v5, p5

    if-nez p2, :cond_a6

    goto :goto_a8

    :cond_a6
    move-wide v6, v5

    goto :goto_a9

    :cond_a8
    :goto_a8
    move-wide v6, v2

    :goto_a9
    iget-object p2, p0, Lcom/google/android/gms/measurement/internal/e;->a:Lcom/google/android/gms/measurement/internal/d;

    invoke-virtual {p2}, Lcom/google/android/gms/measurement/internal/d;->v()Lj6/x4;

    move-result-object v3

    const-string v5, "_vs"

    invoke-virtual/range {v3 .. v8}, Lj6/x4;->o(Ljava/lang/String;Ljava/lang/String;JLandroid/os/Bundle;)V

    :cond_b4
    if-eqz v0, :cond_bb

    iget-object p2, p0, Lj6/g5;->e:Lj6/d5;

    invoke-virtual {p0, p2, v1, p3, p4}, Lj6/g5;->m(Lj6/d5;ZJ)V

    :cond_bb
    iput-object p1, p0, Lj6/g5;->e:Lj6/d5;

    iget-boolean p2, p1, Lj6/d5;->e:Z

    if-eqz p2, :cond_c3

    iput-object p1, p0, Lj6/g5;->j:Lj6/d5;

    :cond_c3
    iget-object p2, p0, Lcom/google/android/gms/measurement/internal/e;->a:Lcom/google/android/gms/measurement/internal/d;

    invoke-virtual {p2}, Lcom/google/android/gms/measurement/internal/d;->y()Lj6/m5;

    move-result-object p2

    .line 5
    invoke-virtual {p2}, Lj6/w2;->g()V

    invoke-virtual {p2}, Lj6/q3;->h()V

    new-instance p3, Ll5/m;

    invoke-direct {p3, p2, p1}, Ll5/m;-><init>(Lj6/m5;Lj6/d5;)V

    invoke-virtual {p2, p3}, Lj6/m5;->u(Ljava/lang/Runnable;)V

    return-void
.end method

.method public final m(Lj6/d5;ZJ)V
    .registers 8

    iget-object v0, p0, Lcom/google/android/gms/measurement/internal/e;->a:Lcom/google/android/gms/measurement/internal/d;

    invoke-virtual {v0}, Lcom/google/android/gms/measurement/internal/d;->l()Lj6/x1;

    move-result-object v0

    iget-object v1, p0, Lcom/google/android/gms/measurement/internal/e;->a:Lcom/google/android/gms/measurement/internal/d;

    .line 1
    iget-object v1, v1, Lcom/google/android/gms/measurement/internal/d;->n:Lu5/c;

    .line 2
    invoke-interface {v1}, Lu5/c;->c()J

    move-result-wide v1

    invoke-virtual {v0, v1, v2}, Lj6/x1;->j(J)V

    const/4 v0, 0x0

    if-eqz p1, :cond_1a

    iget-boolean v1, p1, Lj6/d5;->d:Z

    if-eqz v1, :cond_1a

    const/4 v1, 0x1

    goto :goto_1b

    :cond_1a
    move v1, v0

    :goto_1b
    iget-object v2, p0, Lcom/google/android/gms/measurement/internal/e;->a:Lcom/google/android/gms/measurement/internal/d;

    invoke-virtual {v2}, Lcom/google/android/gms/measurement/internal/d;->z()Lj6/u5;

    move-result-object v2

    iget-object v2, v2, Lj6/u5;->e:Lz5/hw1;

    invoke-virtual {v2, v1, p2, p3, p4}, Lz5/hw1;->c(ZZJ)Z

    move-result p2

    if-eqz p2, :cond_2d

    if-eqz p1, :cond_2d

    iput-boolean v0, p1, Lj6/d5;->d:Z

    :cond_2d
    return-void
.end method

.method public final n(Z)Lj6/d5;
    .registers 2

    invoke-virtual {p0}, Lj6/q3;->h()V

    invoke-virtual {p0}, Lj6/w2;->g()V

    if-nez p1, :cond_b

    iget-object p1, p0, Lj6/g5;->e:Lj6/d5;

    return-object p1

    :cond_b
    iget-object p1, p0, Lj6/g5;->e:Lj6/d5;

    if-eqz p1, :cond_10

    return-object p1

    :cond_10
    iget-object p1, p0, Lj6/g5;->j:Lj6/d5;

    return-object p1
.end method

.method public final o(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/String;
    .registers 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/Class<",
            "*>;",
            "Ljava/lang/String;",
            ")",
            "Ljava/lang/String;"
        }
    .end annotation

    invoke-virtual {p1}, Ljava/lang/Class;->getCanonicalName()Ljava/lang/String;

    move-result-object p1

    if-nez p1, :cond_9

    const-string p1, "Activity"

    return-object p1

    :cond_9
    const-string p2, "\\."

    invoke-virtual {p1, p2}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object p1

    array-length p2, p1

    if-lez p2, :cond_17

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

    aget-object p1, p1, p2

    goto :goto_19

    :cond_17
    const-string p1, ""

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

    move-result p2

    iget-object v0, p0, Lcom/google/android/gms/measurement/internal/e;->a:Lcom/google/android/gms/measurement/internal/d;

    invoke-static {v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    const/16 v0, 0x64

    if-le p2, v0, :cond_30

    iget-object p2, p0, Lcom/google/android/gms/measurement/internal/e;->a:Lcom/google/android/gms/measurement/internal/d;

    invoke-static {p2}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    const/4 p2, 0x0

    invoke-virtual {p1, p2, v0}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object p1

    :cond_30
    return-object p1
.end method

.method public final p(Landroid/app/Activity;Landroid/os/Bundle;)V
    .registers 8

    iget-object v0, p0, Lcom/google/android/gms/measurement/internal/e;->a:Lcom/google/android/gms/measurement/internal/d;

    .line 1
    iget-object v0, v0, Lcom/google/android/gms/measurement/internal/d;->g:Lj6/f;

    .line 2
    invoke-virtual {v0}, Lj6/f;->w()Z

    move-result v0

    if-nez v0, :cond_b

    return-void

    :cond_b
    if-nez p2, :cond_e

    return-void

    :cond_e
    const-string v0, "com.google.app_measurement.screen_service"

    invoke-virtual {p2, v0}, Landroid/os/Bundle;->getBundle(Ljava/lang/String;)Landroid/os/Bundle;

    move-result-object p2

    if-nez p2, :cond_17

    return-void

    :cond_17
    new-instance v0, Lj6/d5;

    const-string v1, "name"

    invoke-virtual {p2, v1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    const-string v2, "referrer_name"

    invoke-virtual {p2, v2}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    const-string v3, "id"

    invoke-virtual {p2, v3}, Landroid/os/Bundle;->getLong(Ljava/lang/String;)J

    move-result-wide v3

    invoke-direct {v0, v1, v2, v3, v4}, Lj6/d5;-><init>(Ljava/lang/String;Ljava/lang/String;J)V

    iget-object p2, p0, Lj6/g5;->f:Ljava/util/Map;

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

    return-void
.end method

.method public final r(Ljava/lang/String;Lj6/d5;)V
    .registers 3

    invoke-virtual {p0}, Lj6/w2;->g()V

    monitor-enter p0

    :try_start_4
    iget-object p2, p0, Lj6/g5;->m:Ljava/lang/String;

    if-eqz p2, :cond_f

    invoke-virtual {p2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p2

    if-nez p2, :cond_f

    goto :goto_11

    :cond_f
    iput-object p1, p0, Lj6/g5;->m:Ljava/lang/String;

    :goto_11
    monitor-exit p0

    return-void

    :catchall_13
    move-exception p1

    monitor-exit p0
    :try_end_15
    .catchall {:try_start_4 .. :try_end_15} :catchall_13

    throw p1
.end method

.method public final t(Landroid/app/Activity;)Lj6/d5;
    .registers 7

    const-string v0, "null reference"

    .line 1
    invoke-static {p1, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;

    .line 2
    iget-object v0, p0, Lj6/g5;->f:Ljava/util/Map;

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

    move-result-object v0

    check-cast v0, Lj6/d5;

    if-nez v0, :cond_2f

    invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v0

    const-string v1, "Activity"

    invoke-virtual {p0, v0, v1}, Lj6/g5;->o(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    new-instance v1, Lj6/d5;

    const/4 v2, 0x0

    iget-object v3, p0, Lcom/google/android/gms/measurement/internal/e;->a:Lcom/google/android/gms/measurement/internal/d;

    invoke-virtual {v3}, Lcom/google/android/gms/measurement/internal/d;->A()Lcom/google/android/gms/measurement/internal/f;

    move-result-object v3

    invoke-virtual {v3}, Lcom/google/android/gms/measurement/internal/f;->o0()J

    move-result-wide v3

    invoke-direct {v1, v2, v0, v3, v4}, Lj6/d5;-><init>(Ljava/lang/String;Ljava/lang/String;J)V

    iget-object v0, p0, Lj6/g5;->f:Ljava/util/Map;

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

    move-object v0, v1

    :cond_2f
    iget-object p1, p0, Lj6/g5;->i:Lj6/d5;

    if-eqz p1, :cond_36

    iget-object p1, p0, Lj6/g5;->i:Lj6/d5;

    return-object p1

    :cond_36
    return-object v0
.end method
