what-the-bank/sources/com/google/android/gms/tasks/zzv.java

47 lines
1.5 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.tasks;
import android.app.Activity;
import com.google.android.gms.common.api.internal.LifecycleCallback;
import com.google.android.gms.common.api.internal.LifecycleFragment;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/* loaded from: classes2.dex */
final class zzv extends LifecycleCallback {
private final List zza;
private zzv(LifecycleFragment lifecycleFragment) {
super(lifecycleFragment);
this.zza = new ArrayList();
this.mLifecycleFragment.addCallback("TaskOnStopCallback", this);
}
public static zzv zza(Activity activity) {
LifecycleFragment fragment = getFragment(activity);
zzv zzvVar = (zzv) fragment.getCallbackOrNull("TaskOnStopCallback", zzv.class);
return zzvVar == null ? new zzv(fragment) : zzvVar;
}
@Override // com.google.android.gms.common.api.internal.LifecycleCallback
public final void onStop() {
synchronized (this.zza) {
Iterator it = this.zza.iterator();
while (it.hasNext()) {
zzq zzqVar = (zzq) ((WeakReference) it.next()).get();
if (zzqVar != null) {
zzqVar.zzc();
}
}
this.zza.clear();
}
}
public final void zzb(zzq zzqVar) {
synchronized (this.zza) {
this.zza.add(new WeakReference(zzqVar));
}
}
}