58 lines
2.0 KiB
Java
58 lines
2.0 KiB
Java
|
package com.google.firebase.iid;
|
||
|
|
||
|
import android.util.Pair;
|
||
|
import com.google.android.gms.tasks.Continuation;
|
||
|
import com.google.android.gms.tasks.Task;
|
||
|
import java.util.Map;
|
||
|
import java.util.concurrent.Executor;
|
||
|
import o.nyh;
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes.dex */
|
||
|
public final class zzat {
|
||
|
private final Executor zza;
|
||
|
private final Map<Pair<String, String>, Task<InstanceIdResult>> zzb = new nyh();
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public zzat(Executor executor) {
|
||
|
this.zza = executor;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* JADX WARN: Multi-variable type inference failed */
|
||
|
public final Task<InstanceIdResult> zza(String str, String str2, zzav zzavVar) {
|
||
|
synchronized (this) {
|
||
|
final Pair pair = new Pair(str, str2);
|
||
|
Task<InstanceIdResult> task = this.zzb.get(pair);
|
||
|
if (task != null) {
|
||
|
return task;
|
||
|
}
|
||
|
Task continueWithTask = zzavVar.zza().continueWithTask(this.zza, new Continuation(this, pair) { // from class: com.google.firebase.iid.zzas
|
||
|
private final zzat zza;
|
||
|
private final Pair zzb;
|
||
|
|
||
|
@Override // com.google.android.gms.tasks.Continuation
|
||
|
public final Object then(Task task2) {
|
||
|
return this.zza.zza(this.zzb, task2);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
{
|
||
|
this.zza = this;
|
||
|
this.zzb = pair;
|
||
|
}
|
||
|
});
|
||
|
this.zzb.put(pair, continueWithTask);
|
||
|
return continueWithTask;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public final /* synthetic */ Task zza(Pair pair, Task task) throws Exception {
|
||
|
synchronized (this) {
|
||
|
this.zzb.remove(pair);
|
||
|
}
|
||
|
return task;
|
||
|
}
|
||
|
}
|