granularity level: instruction
.class final Lcom/google/android/gms/tasks/zzv;
.super Lcom/google/android/gms/common/api/internal/LifecycleCallback;
.source "com.google.android.gms:play-services-tasks@@18.0.1"
.field private final zza:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Ljava/lang/ref/WeakReference<",
"Lcom/google/android/gms/tasks/zzq<",
"*>;>;>;"
}
.end annotation
.end field
.method private constructor <init>(Lcom/google/android/gms/common/api/internal/LifecycleFragment;)V
.locals 1
invoke-direct {p0, p1}, Lcom/google/android/gms/common/api/internal/LifecycleCallback;-><init>(Lcom/google/android/gms/common/api/internal/LifecycleFragment;)V
new-instance p1, Ljava/util/ArrayList;
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
iput-object p1, p0, Lcom/google/android/gms/tasks/zzv;->zza:Ljava/util/List;
iget-object p1, p0, Lcom/google/android/gms/tasks/zzv;->mLifecycleFragment:Lcom/google/android/gms/common/api/internal/LifecycleFragment;
const-string v0, "TaskOnStopCallback"
invoke-interface {p1, v0, p0}, Lcom/google/android/gms/common/api/internal/LifecycleFragment;->addCallback(Ljava/lang/String;Lcom/google/android/gms/common/api/internal/LifecycleCallback;)V
return-void
.end method
.method public static zza(Landroid/app/Activity;)Lcom/google/android/gms/tasks/zzv;
.locals 2
invoke-static {p0}, Lcom/google/android/gms/tasks/zzv;->getFragment(Landroid/app/Activity;)Lcom/google/android/gms/common/api/internal/LifecycleFragment;
move-result-object p0
const-class v0, Lcom/google/android/gms/tasks/zzv;
const-string v1, "TaskOnStopCallback"
invoke-interface {p0, v1, v0}, Lcom/google/android/gms/common/api/internal/LifecycleFragment;->getCallbackOrNull(Ljava/lang/String;Ljava/lang/Class;)Lcom/google/android/gms/common/api/internal/LifecycleCallback;
move-result-object v0
check-cast v0, Lcom/google/android/gms/tasks/zzv;
if-nez v0, :cond_0
new-instance v0, Lcom/google/android/gms/tasks/zzv;
invoke-direct {v0, p0}, Lcom/google/android/gms/tasks/zzv;-><init>(Lcom/google/android/gms/common/api/internal/LifecycleFragment;)V
:cond_0
return-object v0
.end method
.method public final onStop()V
.locals 3
iget-object v0, p0, Lcom/google/android/gms/tasks/zzv;->zza:Ljava/util/List;
monitor-enter v0
:try_start_0
iget-object v1, p0, Lcom/google/android/gms/tasks/zzv;->zza:Ljava/util/List;
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v1
:goto_0
:cond_0
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_1
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/lang/ref/WeakReference;
invoke-virtual {v2}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/google/android/gms/tasks/zzq;
if-eqz v2, :cond_0
invoke-interface {v2}, Lcom/google/android/gms/tasks/zzq;->zzc()V
goto :goto_0
:cond_1
iget-object v1, p0, Lcom/google/android/gms/tasks/zzv;->zza:Ljava/util/List;
invoke-interface {v1}, Ljava/util/List;->clear()V
monitor-exit v0
return-void
:catchall_0
move-exception v1
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v1
.end method
.method public final zzb(Lcom/google/android/gms/tasks/zzq;)V
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Lcom/google/android/gms/tasks/zzq<",
"TT;>;)V"
}
.end annotation
iget-object v0, p0, Lcom/google/android/gms/tasks/zzv;->zza:Ljava/util/List;
monitor-enter v0
:try_start_0
iget-object v1, p0, Lcom/google/android/gms/tasks/zzv;->zza:Ljava/util/List;
new-instance v2, Ljava/lang/ref/WeakReference;
invoke-direct {v2, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
monitor-exit v0
return-void
:catchall_0
move-exception p1
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw p1
.end method