.class public final Lcom/google/android/gms/measurement/AppMeasurementReceiver;
.super Ly0/a;
.source ""

# interfaces
.implements Lj6/t3;


# instance fields
.field public t:Lj6/u3;


# direct methods
.method public constructor <init>()V
    .registers 1

    invoke-direct {p0}, Ly0/a;-><init>()V

    return-void
.end method


# virtual methods
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
    .registers 8

    iget-object v0, p0, Lcom/google/android/gms/measurement/AppMeasurementReceiver;->t:Lj6/u3;

    if-nez v0, :cond_b

    new-instance v0, Lj6/u3;

    invoke-direct {v0, p0}, Lj6/u3;-><init>(Lj6/t3;)V

    iput-object v0, p0, Lcom/google/android/gms/measurement/AppMeasurementReceiver;->t:Lj6/u3;

    :cond_b
    iget-object v0, p0, Lcom/google/android/gms/measurement/AppMeasurementReceiver;->t:Lj6/u3;

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

    const/4 v1, 0x0

    .line 1
    invoke-static {p1, v1, v1}, Lcom/google/android/gms/measurement/internal/d;->u(Landroid/content/Context;Lg6/y0;Ljava/lang/Long;)Lcom/google/android/gms/measurement/internal/d;

    move-result-object v1

    invoke-virtual {v1}, Lcom/google/android/gms/measurement/internal/d;->s()Lcom/google/android/gms/measurement/internal/b;

    move-result-object v1

    if-nez p2, :cond_21

    .line 2
    iget-object p1, v1, Lcom/google/android/gms/measurement/internal/b;->i:Lj6/e3;

    const-string p2, "Receiver called with null intent"

    goto/16 :goto_ab

    .line 3
    :cond_21
    invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object p2

    .line 4
    iget-object v2, v1, Lcom/google/android/gms/measurement/internal/b;->n:Lj6/e3;

    const-string v3, "Local receiver got"

    .line 5
    invoke-virtual {v2, v3, p2}, Lj6/e3;->d(Ljava/lang/String;Ljava/lang/Object;)V

    const-string v2, "com.google.android.gms.measurement.UPLOAD"

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

    move-result v2

    if-eqz v2, :cond_9f

    new-instance p2, Landroid/content/Intent;

    invoke-direct {p2}, Landroid/content/Intent;-><init>()V

    const-string v2, "com.google.android.gms.measurement.AppMeasurementService"

    invoke-virtual {p2, p1, v2}, Landroid/content/Intent;->setClassName(Landroid/content/Context;Ljava/lang/String;)Landroid/content/Intent;

    move-result-object p2

    const-string v2, "com.google.android.gms.measurement.UPLOAD"

    invoke-virtual {p2, v2}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    .line 6
    iget-object v1, v1, Lcom/google/android/gms/measurement/internal/b;->n:Lj6/e3;

    const-string v2, "Starting wakeful intent."

    .line 7
    invoke-virtual {v1, v2}, Lj6/e3;->c(Ljava/lang/String;)V

    iget-object v0, v0, Lj6/u3;->a:Lj6/t3;

    check-cast v0, Lcom/google/android/gms/measurement/AppMeasurementReceiver;

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

    .line 8
    sget-object v0, Ly0/a;->r:Landroid/util/SparseArray;

    monitor-enter v0

    :try_start_55
    sget v1, Ly0/a;->s:I

    add-int/lit8 v2, v1, 0x1

    sput v2, Ly0/a;->s:I

    const/4 v3, 0x1

    if-gtz v2, :cond_60

    sput v3, Ly0/a;->s:I

    :cond_60
    const-string v2, "androidx.contentpager.content.wakelockid"

    invoke-virtual {p2, v2, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    invoke-virtual {p1, p2}, Landroid/content/Context;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;

    move-result-object p2

    if-nez p2, :cond_6c

    goto :goto_9a

    :cond_6c
    const-string v2, "power"

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

    move-result-object p1

    check-cast p1, Landroid/os/PowerManager;

    new-instance v2, Ljava/lang/StringBuilder;

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

    const-string v4, "androidx.core:wake:"

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

    invoke-virtual {p2}, Landroid/content/ComponentName;->flattenToShortString()Ljava/lang/String;

    move-result-object p2

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

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

    move-result-object p2

    invoke-virtual {p1, v3, p2}, Landroid/os/PowerManager;->newWakeLock(ILjava/lang/String;)Landroid/os/PowerManager$WakeLock;

    move-result-object p1

    const/4 p2, 0x0

    invoke-virtual {p1, p2}, Landroid/os/PowerManager$WakeLock;->setReferenceCounted(Z)V

    const-wide/32 v2, 0xea60

    invoke-virtual {p1, v2, v3}, Landroid/os/PowerManager$WakeLock;->acquire(J)V

    invoke-virtual {v0, v1, p1}, Landroid/util/SparseArray;->put(ILjava/lang/Object;)V

    :goto_9a
    monitor-exit v0

    goto :goto_ae

    :catchall_9c
    move-exception p1

    monitor-exit v0
    :try_end_9e
    .catchall {:try_start_55 .. :try_end_9e} :catchall_9c

    throw p1

    :cond_9f
    const-string p1, "com.android.vending.INSTALL_REFERRER"

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

    move-result p1

    if-eqz p1, :cond_ae

    .line 10
    iget-object p1, v1, Lcom/google/android/gms/measurement/internal/b;->i:Lj6/e3;

    const-string p2, "Install Referrer Broadcasts are deprecated"

    .line 11
    :goto_ab
    invoke-virtual {p1, p2}, Lj6/e3;->c(Ljava/lang/String;)V

    :cond_ae
    :goto_ae
    return-void
.end method
