granularity level: instruction

		.class public final Lh1/m0;
.super Ljava/lang/Object;
.source "SourceFile"
.implements Landroid/content/ServiceConnection;


.field public final a:Landroid/content/Context;
.field public final b:Landroid/content/Intent;
.field public final c:Ljava/util/concurrent/ScheduledExecutorService;
.field public final d:Ljava/util/ArrayDeque;
.field public e:Lh1/k0;
.field public f:Z


.method public constructor <init>(Landroid/content/Context;)V
	.locals 3

	new-instance v0, Ljava/util/concurrent/ScheduledThreadPoolExecutor;
	new-instance v1, La/b;
	const-string v2, "Firebase-FirebaseInstanceIdServiceConnection"
	invoke-direct {v1, v2}, La/b;-><init>(Ljava/lang/String;)V
	const/4 v2, 0x0
	invoke-direct {v0, v2, v1}, Ljava/util/concurrent/ScheduledThreadPoolExecutor;-><init>(ILjava/util/concurrent/ThreadFactory;)V
	invoke-direct {p0}, Ljava/lang/Object;-><init>()V
	new-instance v1, Ljava/util/ArrayDeque;
	invoke-direct {v1}, Ljava/util/ArrayDeque;-><init>()V
	iput-object v1, p0, Lh1/m0;->d:Ljava/util/ArrayDeque;
	iput-boolean v2, p0, Lh1/m0;->f:Z
	invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
	move-result-object p1
	iput-object p1, p0, Lh1/m0;->a:Landroid/content/Context;
	new-instance v1, Landroid/content/Intent;
	const-string v2, "com.google.firebase.MESSAGING_EVENT"
	invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
	invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
	move-result-object p1
	invoke-virtual {v1, p1}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
	move-result-object p1
	iput-object p1, p0, Lh1/m0;->b:Landroid/content/Intent;
	iput-object v0, p0, Lh1/m0;->c:Ljava/util/concurrent/ScheduledExecutorService;
	return-void
.end method

.method public final declared-synchronized a()V
	.locals 3

	monitor-enter p0
	:try_start_0
	const-string v0, "FirebaseMessaging"
	const/4 v1, 0x3
	invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
	move-result v0
	if-eqz v0, :cond_0
	const-string v0, "FirebaseMessaging"
	const-string v2, "flush queue called"
	invoke-static {v0, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
	:goto_0
	:cond_0
	iget-object v0, p0, Lh1/m0;->d:Ljava/util/ArrayDeque;
	invoke-virtual {v0}, Ljava/util/ArrayDeque;->isEmpty()Z
	move-result v0
	if-nez v0, :cond_4
	const-string v0, "FirebaseMessaging"
	invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
	move-result v0
	if-eqz v0, :cond_1
	const-string v0, "FirebaseMessaging"
	const-string v2, "found intent to be delivered"
	invoke-static {v0, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
	:cond_1
	iget-object v0, p0, Lh1/m0;->e:Lh1/k0;
	if-eqz v0, :cond_3
	invoke-virtual {v0}, Landroid/os/Binder;->isBinderAlive()Z
	move-result v0
	if-eqz v0, :cond_3
	const-string v0, "FirebaseMessaging"
	invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
	move-result v0
	if-eqz v0, :cond_2
	const-string v0, "FirebaseMessaging"
	const-string v2, "binder is alive, sending the intent."
	invoke-static {v0, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
	:cond_2
	iget-object v0, p0, Lh1/m0;->d:Ljava/util/ArrayDeque;
	invoke-virtual {v0}, Ljava/util/ArrayDeque;->poll()Ljava/lang/Object;
	move-result-object v0
	check-cast v0, Lh1/l0;
	iget-object v2, p0, Lh1/m0;->e:Lh1/k0;
	invoke-virtual {v2, v0}, Lh1/k0;->a(Lh1/l0;)V
	goto :goto_0
	:cond_3
	invoke-virtual {p0}, Lh1/m0;->c()V
	:try_end_0
	.catchall {:try_start_0 .. :try_end_0} :catchall_0
	monitor-exit p0
	return-void
	:cond_4
	monitor-exit p0
	return-void
	:catchall_0
	move-exception v0
	monitor-exit p0
	throw v0
.end method

.method public final declared-synchronized b(Landroid/content/Intent;)Lo0/o;
	.locals 5

	monitor-enter p0
	:try_start_0
	const-string v0, "FirebaseMessaging"
	const/4 v1, 0x3
	invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
	move-result v0
	if-eqz v0, :cond_0
	const-string v0, "FirebaseMessaging"
	const-string v2, "new intent queued in the bind-strategy delivery"
	invoke-static {v0, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
	:cond_0
	new-instance v0, Lh1/l0;
	invoke-direct {v0, p1}, Lh1/l0;-><init>(Landroid/content/Intent;)V
	iget-object p1, p0, Lh1/m0;->c:Ljava/util/concurrent/ScheduledExecutorService;
	iget-object v2, v0, Lh1/l0;->a:Landroid/content/Intent;
	invoke-virtual {v2}, Landroid/content/Intent;->getFlags()I
	move-result v2
	const/high16 v3, 0x10000000
	and-int/2addr v2, v3
	if-eqz v2, :cond_1
	const/4 v2, 0x1
	goto :goto_0
	:cond_1
	const/4 v2, 0x0
	:goto_0
	new-instance v3, Lq/n;
	invoke-direct {v3, v1, v0}, Lq/n;-><init>(ILjava/lang/Object;)V
	if-eqz v2, :cond_2
	sget-wide v1, Lh1/j0;->a:J
	goto :goto_1
	:cond_2
	const-wide/16 v1, 0x2328
	:goto_1
	sget-object v4, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
	invoke-interface {p1, v3, v1, v2, v4}, Ljava/util/concurrent/ScheduledExecutorService;->schedule(Ljava/lang/Runnable;JLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
	move-result-object v1
	iget-object v2, v0, Lh1/l0;->b:Lo0/i;
	iget-object v2, v2, Lo0/i;->a:Lo0/o;
	new-instance v3, Lj/b;
	const/16 v4, 0xc
	invoke-direct {v3, v4, v1}, Lj/b;-><init>(ILjava/lang/Object;)V
	invoke-virtual {v2, p1, v3}, Lo0/o;->a(Ljava/util/concurrent/Executor;Lo0/d;)V
	iget-object p1, p0, Lh1/m0;->d:Ljava/util/ArrayDeque;
	invoke-virtual {p1, v0}, Ljava/util/ArrayDeque;->add(Ljava/lang/Object;)Z
	invoke-virtual {p0}, Lh1/m0;->a()V
	iget-object p1, v0, Lh1/l0;->b:Lo0/i;
	iget-object p1, p1, Lo0/i;->a:Lo0/o;
	:try_end_0
	.catchall {:try_start_0 .. :try_end_0} :catchall_0
	monitor-exit p0
	return-object p1
	:catchall_0
	move-exception p1
	monitor-exit p0
	throw p1
.end method

.method public final c()V
	.locals 9

	const-string v0, "FirebaseMessaging"
	const/4 v1, 0x3
	invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
	move-result v1
	const/4 v2, 0x1
	if-eqz v1, :cond_0
	const-string v1, "binder is dead. start connection? "
	invoke-static {v1}, Lc0/b;->b(Ljava/lang/String;)Ljava/lang/StringBuilder;
	move-result-object v1
	iget-boolean v3, p0, Lh1/m0;->f:Z
	xor-int/2addr v3, v2
	invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
	invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
	move-result-object v1
	invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
	:cond_0
	iget-boolean v1, p0, Lh1/m0;->f:Z
	if-eqz v1, :cond_1
	return-void
	:cond_1
	iput-boolean v2, p0, Lh1/m0;->f:Z
	:try_start_0
	invoke-static {}, Ld0/a;->a()Ld0/a;
	move-result-object v3
	iget-object v4, p0, Lh1/m0;->a:Landroid/content/Context;
	iget-object v6, p0, Lh1/m0;->b:Landroid/content/Intent;
	const/16 v8, 0x41
	invoke-virtual {v4}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
	move-result-object v1
	invoke-virtual {v1}, Ljava/lang/Class;->getName()Ljava/lang/String;
	move-result-object v5
	move-object v7, p0
	invoke-virtual/range {v3 .. v8}, Ld0/a;->c(Landroid/content/Context;Ljava/lang/String;Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z
	move-result v1
	if-eqz v1, :cond_2
	return-void
	:cond_2
	const-string v1, "binding to the service failed"
	invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
	:try_end_0
	.catch Ljava/lang/SecurityException; {:try_start_0 .. :try_end_0} :catch_0
	goto :goto_0
	:catch_0
	move-exception v1
	const-string v2, "Exception while binding the service"
	invoke-static {v0, v2, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
	:goto_0
	const/4 v0, 0x0
	iput-boolean v0, p0, Lh1/m0;->f:Z
	:goto_1
	iget-object v0, p0, Lh1/m0;->d:Ljava/util/ArrayDeque;
	invoke-virtual {v0}, Ljava/util/ArrayDeque;->isEmpty()Z
	move-result v0
	if-nez v0, :cond_3
	iget-object v0, p0, Lh1/m0;->d:Ljava/util/ArrayDeque;
	invoke-virtual {v0}, Ljava/util/ArrayDeque;->poll()Ljava/lang/Object;
	move-result-object v0
	check-cast v0, Lh1/l0;
	iget-object v0, v0, Lh1/l0;->b:Lo0/i;
	const/4 v1, 0x0
	invoke-virtual {v0, v1}, Lo0/i;->c(Ljava/lang/Object;)V
	goto :goto_1
	:cond_3
	return-void
.end method

.method public final declared-synchronized onServiceConnected(Landroid/content/ComponentName;Landroid/os/IBinder;)V
	.locals 3

	monitor-enter p0
	:try_start_0
	const-string v0, "FirebaseMessaging"
	const/4 v1, 0x3
	invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
	move-result v0
	if-eqz v0, :cond_0
	const-string v0, "FirebaseMessaging"
	new-instance v1, Ljava/lang/StringBuilder;
	invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
	const-string v2, "onServiceConnected: "
	invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
	invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
	invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
	move-result-object p1
	invoke-static {v0, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
	:cond_0
	const/4 p1, 0x0
	iput-boolean p1, p0, Lh1/m0;->f:Z
	instance-of p1, p2, Lh1/k0;
	if-nez p1, :cond_2
	const-string p1, "FirebaseMessaging"
	new-instance v0, Ljava/lang/StringBuilder;
	invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
	const-string v1, "Invalid service connection: "
	invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
	invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
	invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
	move-result-object p2
	invoke-static {p1, p2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
	:goto_0
	iget-object p1, p0, Lh1/m0;->d:Ljava/util/ArrayDeque;
	invoke-virtual {p1}, Ljava/util/ArrayDeque;->isEmpty()Z
	move-result p1
	if-nez p1, :cond_1
	iget-object p1, p0, Lh1/m0;->d:Ljava/util/ArrayDeque;
	invoke-virtual {p1}, Ljava/util/ArrayDeque;->poll()Ljava/lang/Object;
	move-result-object p1
	check-cast p1, Lh1/l0;
	iget-object p1, p1, Lh1/l0;->b:Lo0/i;
	const/4 p2, 0x0
	invoke-virtual {p1, p2}, Lo0/i;->c(Ljava/lang/Object;)V
	:try_end_0
	.catchall {:try_start_0 .. :try_end_0} :catchall_0
	goto :goto_0
	:cond_1
	monitor-exit p0
	return-void
	:try_start_1
	:cond_2
	check-cast p2, Lh1/k0;
	iput-object p2, p0, Lh1/m0;->e:Lh1/k0;
	invoke-virtual {p0}, Lh1/m0;->a()V
	:try_end_1
	.catchall {:try_start_1 .. :try_end_1} :catchall_0
	monitor-exit p0
	return-void
	:catchall_0
	move-exception p1
	monitor-exit p0
	throw p1
.end method

.method public final onServiceDisconnected(Landroid/content/ComponentName;)V
	.locals 3

	const-string v0, "FirebaseMessaging"
	const/4 v1, 0x3
	invoke-static {v0, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
	move-result v1
	if-eqz v1, :cond_0
	new-instance v1, Ljava/lang/StringBuilder;
	invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
	const-string v2, "onServiceDisconnected: "
	invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
	invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
	invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
	move-result-object p1
	invoke-static {v0, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
	:cond_0
	invoke-virtual {p0}, Lh1/m0;->a()V
	return-void
.end method