granularity level: instruction

		.class  Lcom/google/firebase/messaging/RequestDeduplicator;
.super Ljava/lang/Object;
.source "RequestDeduplicator.java"

.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/google/firebase/messaging/RequestDeduplicator$GetTokenRequest;
}
.end annotation

.field private final executor:Ljava/util/concurrent/Executor;
.field private final getTokenRequests:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"Ljava/lang/String;",
"Lcom/google/android/gms/tasks/Task<",
"Ljava/lang/String;",
">;>;"
}
.end annotation
.end field


.method constructor <init>(Ljava/util/concurrent/Executor;)V
	.locals 1

	invoke-direct {p0}, Ljava/lang/Object;-><init>()V
	new-instance v0, Landroidx/collection/ArrayMap;
	invoke-direct {v0}, Landroidx/collection/ArrayMap;-><init>()V
	iput-object v0, p0, Lcom/google/firebase/messaging/RequestDeduplicator;->getTokenRequests:Ljava/util/Map;
	iput-object p1, p0, Lcom/google/firebase/messaging/RequestDeduplicator;->executor:Ljava/util/concurrent/Executor;
	return-void
.end method

.method declared-synchronized getOrStartGetTokenRequest(Ljava/lang/String;Lcom/google/firebase/messaging/RequestDeduplicator$GetTokenRequest;)Lcom/google/android/gms/tasks/Task;
	.locals 3
	.annotation system Ldalvik/annotation/Signature;
	value = {
	"(",
	"Ljava/lang/String;",
	"Lcom/google/firebase/messaging/RequestDeduplicator$GetTokenRequest;",
	")",
	"Lcom/google/android/gms/tasks/Task<",
	"Ljava/lang/String;",
	">;"
	}
	.end annotation

	monitor-enter p0
	:try_start_0
	iget-object v0, p0, Lcom/google/firebase/messaging/RequestDeduplicator;->getTokenRequests:Ljava/util/Map;
	invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
	move-result-object v0
	check-cast v0, Lcom/google/android/gms/tasks/Task;
	const/4 v1, 0x3
	if-eqz v0, :cond_1
	const-string p2, "FirebaseMessaging"
	invoke-static {p2, v1}, Landroid/util/Log;->isLoggable(Ljava/lang/String;I)Z
	move-result p2
	if-eqz p2, :cond_0
	const-string p2, "FirebaseMessaging"
	new-instance v1, Ljava/lang/StringBuilder;
	invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
	const-string v2, "Joining ongoing request for: "
	invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
	invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
	invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
	move-result-object p1
	invoke-static {p2, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
	:try_end_0
	.catchall {:try_start_0 .. :try_end_0} :catchall_0
	:cond_0
	monitor-exit p0
	return-object v0
	:try_start_1
	:cond_1
	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"
	new-instance v1, Ljava/lang/StringBuilder;
	invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
	const-string v2, "Making new request for: "
	invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
	invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)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_2
	invoke-interface {p2}, Lcom/google/firebase/messaging/RequestDeduplicator$GetTokenRequest;->start()Lcom/google/android/gms/tasks/Task;
	move-result-object p2
	iget-object v0, p0, Lcom/google/firebase/messaging/RequestDeduplicator;->executor:Ljava/util/concurrent/Executor;
	new-instance v1, Lcom/google/firebase/messaging/RequestDeduplicator$$ExternalSyntheticLambda0;
	invoke-direct {v1, p0, p1}, Lcom/google/firebase/messaging/RequestDeduplicator$$ExternalSyntheticLambda0;-><init>(Lcom/google/firebase/messaging/RequestDeduplicator;Ljava/lang/String;)V
	invoke-virtual {p2, v0, v1}, Lcom/google/android/gms/tasks/Task;->continueWithTask(Ljava/util/concurrent/Executor;Lcom/google/android/gms/tasks/Continuation;)Lcom/google/android/gms/tasks/Task;
	move-result-object p2
	iget-object v0, p0, Lcom/google/firebase/messaging/RequestDeduplicator;->getTokenRequests:Ljava/util/Map;
	invoke-interface {v0, p1, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
	:try_end_1
	.catchall {:try_start_1 .. :try_end_1} :catchall_0
	monitor-exit p0
	return-object p2
	:catchall_0
	move-exception p1
	monitor-exit p0
	throw p1
.end method

.method synthetic lambda$getOrStartGetTokenRequest$0$com-google-firebase-messaging-RequestDeduplicator(Ljava/lang/String;Lcom/google/android/gms/tasks/Task;)Lcom/google/android/gms/tasks/Task;
	.locals 1
	.annotation system Ldalvik/annotation/Throws;
	value = {
	Ljava/lang/Exception;
	}
	.end annotation

	monitor-enter p0
	:try_start_0
	iget-object v0, p0, Lcom/google/firebase/messaging/RequestDeduplicator;->getTokenRequests:Ljava/util/Map;
	invoke-interface {v0, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
	monitor-exit p0
	return-object p2
	:catchall_0
	move-exception p1
	monitor-exit p0
	:try_end_0
	.catchall {:try_start_0 .. :try_end_0} :catchall_0
	throw p1
.end method