2019-02-04 20:08:30 +00:00
|
|
|
.class public Landroidx/lifecycle/LifecycleRegistry;
|
|
|
|
.super Landroidx/lifecycle/Lifecycle;
|
2019-02-04 20:29:01 +00:00
|
|
|
.source "LifecycleRegistry.java"
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field private static final LOG_TAG:Ljava/lang/String; = "LifecycleRegistry"
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field private mAddingObserverCounter:I
|
|
|
|
|
|
|
|
.field private mHandlingEvent:Z
|
|
|
|
|
|
|
|
.field private final mLifecycleOwner:Ljava/lang/ref/WeakReference;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/lang/ref/WeakReference<",
|
|
|
|
"Landroidx/lifecycle/LifecycleOwner;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field private mNewEventOccurred:Z
|
|
|
|
|
|
|
|
.field private mObserverMap:Landroidx/arch/core/internal/FastSafeIterableMap;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Landroidx/arch/core/internal/FastSafeIterableMap<",
|
|
|
|
"Landroidx/lifecycle/LifecycleObserver;",
|
|
|
|
"Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field private mParentStates:Ljava/util/ArrayList;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/ArrayList<",
|
|
|
|
"Landroidx/lifecycle/Lifecycle$State;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field private mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Landroidx/lifecycle/LifecycleOwner;)V
|
|
|
|
.locals 1
|
|
|
|
.param p1 # Landroidx/lifecycle/LifecycleOwner;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
invoke-direct {p0}, Landroidx/lifecycle/Lifecycle;-><init>()V
|
|
|
|
|
|
|
|
new-instance v0, Landroidx/arch/core/internal/FastSafeIterableMap;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Landroidx/arch/core/internal/FastSafeIterableMap;-><init>()V
|
|
|
|
|
|
|
|
iput-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mObserverMap:Landroidx/arch/core/internal/FastSafeIterableMap;
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
iput v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mAddingObserverCounter:I
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mHandlingEvent:Z
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mNewEventOccurred:Z
|
|
|
|
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
|
|
|
|
iput-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mParentStates:Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
new-instance v0, Ljava/lang/ref/WeakReference;
|
|
|
|
|
|
|
|
invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
iput-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mLifecycleOwner:Ljava/lang/ref/WeakReference;
|
|
|
|
|
|
|
|
sget-object p1, Landroidx/lifecycle/Lifecycle$State;->INITIALIZED:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
iput-object p1, p0, Landroidx/lifecycle/LifecycleRegistry;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private backwardPass(Landroidx/lifecycle/LifecycleOwner;)V
|
|
|
|
.locals 5
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mObserverMap:Landroidx/arch/core/internal/FastSafeIterableMap;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Landroidx/arch/core/internal/FastSafeIterableMap;->descendingIterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
|
|
|
|
iget-boolean v1, p0, Landroidx/lifecycle/LifecycleRegistry;->mNewEventOccurred:Z
|
|
|
|
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Ljava/util/Map$Entry;
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
check-cast v2, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
iget-object v3, v2, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
iget-object v4, p0, Landroidx/lifecycle/LifecycleRegistry;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
invoke-virtual {v3, v4}, Landroidx/lifecycle/Lifecycle$State;->compareTo(Ljava/lang/Enum;)I
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
if-lez v3, :cond_0
|
|
|
|
|
|
|
|
iget-boolean v3, p0, Landroidx/lifecycle/LifecycleRegistry;->mNewEventOccurred:Z
|
|
|
|
|
|
|
|
if-nez v3, :cond_0
|
|
|
|
|
|
|
|
iget-object v3, p0, Landroidx/lifecycle/LifecycleRegistry;->mObserverMap:Landroidx/arch/core/internal/FastSafeIterableMap;
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-virtual {v3, v4}, Landroidx/arch/core/internal/FastSafeIterableMap;->contains(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
|
|
|
|
iget-object v3, v2, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
invoke-static {v3}, Landroidx/lifecycle/LifecycleRegistry;->downEvent(Landroidx/lifecycle/Lifecycle$State;)Landroidx/lifecycle/Lifecycle$Event;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-static {v3}, Landroidx/lifecycle/LifecycleRegistry;->getStateAfter(Landroidx/lifecycle/Lifecycle$Event;)Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-direct {p0, v4}, Landroidx/lifecycle/LifecycleRegistry;->pushParentState(Landroidx/lifecycle/Lifecycle$State;)V
|
|
|
|
|
|
|
|
invoke-virtual {v2, p1, v3}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->dispatchEvent(Landroidx/lifecycle/LifecycleOwner;Landroidx/lifecycle/Lifecycle$Event;)V
|
|
|
|
|
|
|
|
invoke-direct {p0}, Landroidx/lifecycle/LifecycleRegistry;->popParentState()V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private calculateTargetState(Landroidx/lifecycle/LifecycleObserver;)Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mObserverMap:Landroidx/arch/core/internal/FastSafeIterableMap;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Landroidx/arch/core/internal/FastSafeIterableMap;->ceil(Ljava/lang/Object;)Ljava/util/Map$Entry;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
check-cast p1, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;
|
|
|
|
|
|
|
|
iget-object p1, p1, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
move-object p1, v0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
iget-object v1, p0, Landroidx/lifecycle/LifecycleRegistry;->mParentStates:Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/util/ArrayList;->isEmpty()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mParentStates:Ljava/util/ArrayList;
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
add-int/lit8 v1, v1, -0x1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iget-object v1, p0, Landroidx/lifecycle/LifecycleRegistry;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
invoke-static {v1, p1}, Landroidx/lifecycle/LifecycleRegistry;->min(Landroidx/lifecycle/Lifecycle$State;Landroidx/lifecycle/Lifecycle$State;)Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {p1, v0}, Landroidx/lifecycle/LifecycleRegistry;->min(Landroidx/lifecycle/Lifecycle$State;Landroidx/lifecycle/Lifecycle$State;)Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private static downEvent(Landroidx/lifecycle/Lifecycle$State;)Landroidx/lifecycle/Lifecycle$Event;
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
sget-object v0, Landroidx/lifecycle/LifecycleRegistry$1;->$SwitchMap$androidx$lifecycle$Lifecycle$State:[I
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroidx/lifecycle/Lifecycle$State;->ordinal()I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
aget v0, v0, v1
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
if-eq v0, v1, :cond_4
|
|
|
|
|
|
|
|
const/4 v1, 0x2
|
|
|
|
|
|
|
|
if-eq v0, v1, :cond_3
|
|
|
|
|
|
|
|
const/4 v1, 0x3
|
|
|
|
|
|
|
|
if-eq v0, v1, :cond_2
|
|
|
|
|
|
|
|
const/4 v1, 0x4
|
|
|
|
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
|
|
|
|
const/4 v1, 0x5
|
|
|
|
|
|
|
|
if-eq v0, v1, :cond_0
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
new-instance v0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
invoke-static {p0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
const-string v1, "Unexpected state value "
|
|
|
|
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
:cond_0
|
2019-02-04 20:08:30 +00:00
|
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/IllegalArgumentException;-><init>()V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
:cond_1
|
2019-02-04 20:08:30 +00:00
|
|
|
sget-object p0, Landroidx/lifecycle/Lifecycle$Event;->ON_PAUSE:Landroidx/lifecycle/Lifecycle$Event;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
:cond_2
|
2019-02-04 20:08:30 +00:00
|
|
|
sget-object p0, Landroidx/lifecycle/Lifecycle$Event;->ON_STOP:Landroidx/lifecycle/Lifecycle$Event;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
:cond_3
|
2019-02-04 20:08:30 +00:00
|
|
|
sget-object p0, Landroidx/lifecycle/Lifecycle$Event;->ON_DESTROY:Landroidx/lifecycle/Lifecycle$Event;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
:cond_4
|
2019-02-04 20:08:30 +00:00
|
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/IllegalArgumentException;-><init>()V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private forwardPass(Landroidx/lifecycle/LifecycleOwner;)V
|
|
|
|
.locals 5
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mObserverMap:Landroidx/arch/core/internal/FastSafeIterableMap;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Landroidx/arch/core/internal/FastSafeIterableMap;->iteratorWithAdditions()Landroidx/arch/core/internal/SafeIterableMap$IteratorWithAdditions;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
|
|
|
|
iget-boolean v1, p0, Landroidx/lifecycle/LifecycleRegistry;->mNewEventOccurred:Z
|
|
|
|
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Ljava/util/Map$Entry;
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
check-cast v2, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
iget-object v3, v2, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
iget-object v4, p0, Landroidx/lifecycle/LifecycleRegistry;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
invoke-virtual {v3, v4}, Landroidx/lifecycle/Lifecycle$State;->compareTo(Ljava/lang/Enum;)I
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
if-gez v3, :cond_0
|
|
|
|
|
|
|
|
iget-boolean v3, p0, Landroidx/lifecycle/LifecycleRegistry;->mNewEventOccurred:Z
|
|
|
|
|
|
|
|
if-nez v3, :cond_0
|
|
|
|
|
|
|
|
iget-object v3, p0, Landroidx/lifecycle/LifecycleRegistry;->mObserverMap:Landroidx/arch/core/internal/FastSafeIterableMap;
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-virtual {v3, v4}, Landroidx/arch/core/internal/FastSafeIterableMap;->contains(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
|
|
|
|
iget-object v3, v2, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
invoke-direct {p0, v3}, Landroidx/lifecycle/LifecycleRegistry;->pushParentState(Landroidx/lifecycle/Lifecycle$State;)V
|
|
|
|
|
|
|
|
iget-object v3, v2, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
invoke-static {v3}, Landroidx/lifecycle/LifecycleRegistry;->upEvent(Landroidx/lifecycle/Lifecycle$State;)Landroidx/lifecycle/Lifecycle$Event;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-virtual {v2, p1, v3}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->dispatchEvent(Landroidx/lifecycle/LifecycleOwner;Landroidx/lifecycle/Lifecycle$Event;)V
|
|
|
|
|
|
|
|
invoke-direct {p0}, Landroidx/lifecycle/LifecycleRegistry;->popParentState()V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method static getStateAfter(Landroidx/lifecycle/Lifecycle$Event;)Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
sget-object v0, Landroidx/lifecycle/LifecycleRegistry$1;->$SwitchMap$androidx$lifecycle$Lifecycle$Event:[I
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroidx/lifecycle/Lifecycle$Event;->ordinal()I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
aget v0, v0, v1
|
|
|
|
|
|
|
|
packed-switch v0, :pswitch_data_0
|
|
|
|
|
|
|
|
new-instance v0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
invoke-static {p0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
const-string v1, "Unexpected event value "
|
|
|
|
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:pswitch_0
|
|
|
|
sget-object p0, Landroidx/lifecycle/Lifecycle$State;->DESTROYED:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
|
|
|
:pswitch_1
|
|
|
|
sget-object p0, Landroidx/lifecycle/Lifecycle$State;->RESUMED:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
|
|
|
:pswitch_2
|
|
|
|
sget-object p0, Landroidx/lifecycle/Lifecycle$State;->STARTED:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
|
|
|
:pswitch_3
|
|
|
|
sget-object p0, Landroidx/lifecycle/Lifecycle$State;->CREATED:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
|
|
|
nop
|
|
|
|
|
|
|
|
:pswitch_data_0
|
|
|
|
.packed-switch 0x1
|
|
|
|
:pswitch_3
|
|
|
|
:pswitch_3
|
|
|
|
:pswitch_2
|
|
|
|
:pswitch_2
|
|
|
|
:pswitch_1
|
|
|
|
:pswitch_0
|
|
|
|
.end packed-switch
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private isSynced()Z
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mObserverMap:Landroidx/arch/core/internal/FastSafeIterableMap;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Landroidx/arch/core/internal/FastSafeIterableMap;->size()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
|
|
|
|
return v1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mObserverMap:Landroidx/arch/core/internal/FastSafeIterableMap;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Landroidx/arch/core/internal/FastSafeIterableMap;->eldest()Ljava/util/Map$Entry;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;
|
|
|
|
|
|
|
|
iget-object v0, v0, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
iget-object v2, p0, Landroidx/lifecycle/LifecycleRegistry;->mObserverMap:Landroidx/arch/core/internal/FastSafeIterableMap;
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Landroidx/arch/core/internal/FastSafeIterableMap;->newest()Ljava/util/Map$Entry;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
check-cast v2, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;
|
|
|
|
|
|
|
|
iget-object v2, v2, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
if-ne v0, v2, :cond_1
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
if-ne v0, v2, :cond_1
|
|
|
|
|
|
|
|
return v1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method static min(Landroidx/lifecycle/Lifecycle$State;Landroidx/lifecycle/Lifecycle$State;)Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
.locals 1
|
|
|
|
.param p0 # Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p1 # Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p1, p0}, Landroidx/lifecycle/Lifecycle$State;->compareTo(Ljava/lang/Enum;)I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-gez v0, :cond_0
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private moveToState(Landroidx/lifecycle/Lifecycle$State;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
if-ne v0, p1, :cond_0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iput-object p1, p0, Landroidx/lifecycle/LifecycleRegistry;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
iget-boolean p1, p0, Landroidx/lifecycle/LifecycleRegistry;->mHandlingEvent:Z
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
|
|
|
|
iget p1, p0, Landroidx/lifecycle/LifecycleRegistry;->mAddingObserverCounter:I
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iput-boolean v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mHandlingEvent:Z
|
|
|
|
|
|
|
|
invoke-direct {p0}, Landroidx/lifecycle/LifecycleRegistry;->sync()V
|
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Landroidx/lifecycle/LifecycleRegistry;->mHandlingEvent:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
:goto_0
|
|
|
|
iput-boolean v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mNewEventOccurred:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private popParentState()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mParentStates:Ljava/util/ArrayList;
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
add-int/lit8 v1, v1, -0x1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->remove(I)Ljava/lang/Object;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private pushParentState(Landroidx/lifecycle/Lifecycle$State;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mParentStates:Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private sync()V
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mLifecycleOwner:Ljava/lang/ref/WeakReference;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Landroidx/lifecycle/LifecycleOwner;
|
|
|
|
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
|
|
|
|
const-string v0, "LifecycleRegistry"
|
|
|
|
|
|
|
|
const-string v1, "LifecycleOwner is garbage collected, you shouldn\'t try dispatch new events from it."
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:goto_0
|
|
|
|
invoke-direct {p0}, Landroidx/lifecycle/LifecycleRegistry;->isSynced()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
|
|
|
|
iput-boolean v2, p0, Landroidx/lifecycle/LifecycleRegistry;->mNewEventOccurred:Z
|
|
|
|
|
|
|
|
iget-object v1, p0, Landroidx/lifecycle/LifecycleRegistry;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
iget-object v2, p0, Landroidx/lifecycle/LifecycleRegistry;->mObserverMap:Landroidx/arch/core/internal/FastSafeIterableMap;
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Landroidx/arch/core/internal/FastSafeIterableMap;->eldest()Ljava/util/Map$Entry;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
check-cast v2, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;
|
|
|
|
|
|
|
|
iget-object v2, v2, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
invoke-virtual {v1, v2}, Landroidx/lifecycle/Lifecycle$State;->compareTo(Ljava/lang/Enum;)I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-gez v1, :cond_1
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Landroidx/lifecycle/LifecycleRegistry;->backwardPass(Landroidx/lifecycle/LifecycleOwner;)V
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iget-object v1, p0, Landroidx/lifecycle/LifecycleRegistry;->mObserverMap:Landroidx/arch/core/internal/FastSafeIterableMap;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Landroidx/arch/core/internal/FastSafeIterableMap;->newest()Ljava/util/Map$Entry;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
iget-boolean v2, p0, Landroidx/lifecycle/LifecycleRegistry;->mNewEventOccurred:Z
|
|
|
|
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
iget-object v2, p0, Landroidx/lifecycle/LifecycleRegistry;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;
|
|
|
|
|
|
|
|
iget-object v1, v1, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
invoke-virtual {v2, v1}, Landroidx/lifecycle/Lifecycle$State;->compareTo(Ljava/lang/Enum;)I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-lez v1, :cond_0
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Landroidx/lifecycle/LifecycleRegistry;->forwardPass(Landroidx/lifecycle/LifecycleOwner;)V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
iput-boolean v2, p0, Landroidx/lifecycle/LifecycleRegistry;->mNewEventOccurred:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private static upEvent(Landroidx/lifecycle/Lifecycle$State;)Landroidx/lifecycle/Lifecycle$Event;
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
sget-object v0, Landroidx/lifecycle/LifecycleRegistry$1;->$SwitchMap$androidx$lifecycle$Lifecycle$State:[I
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroidx/lifecycle/Lifecycle$State;->ordinal()I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
aget v0, v0, v1
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
const/4 v1, 0x1
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
if-eq v0, v1, :cond_4
|
|
|
|
|
|
|
|
const/4 v1, 0x2
|
|
|
|
|
|
|
|
if-eq v0, v1, :cond_3
|
|
|
|
|
|
|
|
const/4 v1, 0x3
|
|
|
|
|
|
|
|
if-eq v0, v1, :cond_2
|
|
|
|
|
|
|
|
const/4 v1, 0x4
|
|
|
|
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
|
|
|
|
const/4 v1, 0x5
|
|
|
|
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
2019-02-04 20:08:30 +00:00
|
|
|
new-instance v0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
invoke-static {p0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
const-string v1, "Unexpected state value "
|
|
|
|
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
:cond_1
|
2019-02-04 20:08:30 +00:00
|
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/IllegalArgumentException;-><init>()V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
:cond_2
|
2019-02-04 20:08:30 +00:00
|
|
|
sget-object p0, Landroidx/lifecycle/Lifecycle$Event;->ON_RESUME:Landroidx/lifecycle/Lifecycle$Event;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
:cond_3
|
2019-02-04 20:08:30 +00:00
|
|
|
sget-object p0, Landroidx/lifecycle/Lifecycle$Event;->ON_START:Landroidx/lifecycle/Lifecycle$Event;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
:cond_4
|
|
|
|
:goto_0
|
2019-02-04 20:08:30 +00:00
|
|
|
sget-object p0, Landroidx/lifecycle/Lifecycle$Event;->ON_CREATE:Landroidx/lifecycle/Lifecycle$Event;
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public addObserver(Landroidx/lifecycle/LifecycleObserver;)V
|
|
|
|
.locals 6
|
|
|
|
.param p1 # Landroidx/lifecycle/LifecycleObserver;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
sget-object v1, Landroidx/lifecycle/Lifecycle$State;->DESTROYED:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
|
|
|
|
sget-object v0, Landroidx/lifecycle/Lifecycle$State;->DESTROYED:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
sget-object v0, Landroidx/lifecycle/Lifecycle$State;->INITIALIZED:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
new-instance v1, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;
|
|
|
|
|
|
|
|
invoke-direct {v1, p1, v0}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;-><init>(Landroidx/lifecycle/LifecycleObserver;Landroidx/lifecycle/Lifecycle$State;)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mObserverMap:Landroidx/arch/core/internal/FastSafeIterableMap;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1, v1}, Landroidx/arch/core/internal/FastSafeIterableMap;->putIfAbsent(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mLifecycleOwner:Ljava/lang/ref/WeakReference;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Landroidx/lifecycle/LifecycleOwner;
|
|
|
|
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
iget v2, p0, Landroidx/lifecycle/LifecycleRegistry;->mAddingObserverCounter:I
|
|
|
|
|
|
|
|
const/4 v3, 0x1
|
|
|
|
|
|
|
|
if-nez v2, :cond_4
|
|
|
|
|
|
|
|
iget-boolean v2, p0, Landroidx/lifecycle/LifecycleRegistry;->mHandlingEvent:Z
|
|
|
|
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
:goto_1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
|
|
|
|
:goto_2
|
|
|
|
invoke-direct {p0, p1}, Landroidx/lifecycle/LifecycleRegistry;->calculateTargetState(Landroidx/lifecycle/LifecycleObserver;)Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
iget v5, p0, Landroidx/lifecycle/LifecycleRegistry;->mAddingObserverCounter:I
|
|
|
|
|
|
|
|
add-int/2addr v5, v3
|
|
|
|
|
|
|
|
iput v5, p0, Landroidx/lifecycle/LifecycleRegistry;->mAddingObserverCounter:I
|
|
|
|
|
|
|
|
:goto_3
|
|
|
|
iget-object v5, v1, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
invoke-virtual {v5, v4}, Landroidx/lifecycle/Lifecycle$State;->compareTo(Ljava/lang/Enum;)I
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
if-gez v4, :cond_5
|
|
|
|
|
|
|
|
iget-object v4, p0, Landroidx/lifecycle/LifecycleRegistry;->mObserverMap:Landroidx/arch/core/internal/FastSafeIterableMap;
|
|
|
|
|
|
|
|
invoke-virtual {v4, p1}, Landroidx/arch/core/internal/FastSafeIterableMap;->contains(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
if-eqz v4, :cond_5
|
|
|
|
|
|
|
|
iget-object v4, v1, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
invoke-direct {p0, v4}, Landroidx/lifecycle/LifecycleRegistry;->pushParentState(Landroidx/lifecycle/Lifecycle$State;)V
|
|
|
|
|
|
|
|
iget-object v4, v1, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
invoke-static {v4}, Landroidx/lifecycle/LifecycleRegistry;->upEvent(Landroidx/lifecycle/Lifecycle$State;)Landroidx/lifecycle/Lifecycle$Event;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-virtual {v1, v0, v4}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->dispatchEvent(Landroidx/lifecycle/LifecycleOwner;Landroidx/lifecycle/Lifecycle$Event;)V
|
|
|
|
|
|
|
|
invoke-direct {p0}, Landroidx/lifecycle/LifecycleRegistry;->popParentState()V
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Landroidx/lifecycle/LifecycleRegistry;->calculateTargetState(Landroidx/lifecycle/LifecycleObserver;)Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
if-nez v2, :cond_6
|
|
|
|
|
|
|
|
invoke-direct {p0}, Landroidx/lifecycle/LifecycleRegistry;->sync()V
|
|
|
|
|
|
|
|
:cond_6
|
|
|
|
iget p1, p0, Landroidx/lifecycle/LifecycleRegistry;->mAddingObserverCounter:I
|
|
|
|
|
|
|
|
sub-int/2addr p1, v3
|
|
|
|
|
|
|
|
iput p1, p0, Landroidx/lifecycle/LifecycleRegistry;->mAddingObserverCounter:I
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getCurrentState()Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
.locals 1
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mState:Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getObserverCount()I
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mObserverMap:Landroidx/arch/core/internal/FastSafeIterableMap;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Landroidx/arch/core/internal/FastSafeIterableMap;->size()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public handleLifecycleEvent(Landroidx/lifecycle/Lifecycle$Event;)V
|
|
|
|
.locals 0
|
|
|
|
.param p1 # Landroidx/lifecycle/Lifecycle$Event;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
invoke-static {p1}, Landroidx/lifecycle/LifecycleRegistry;->getStateAfter(Landroidx/lifecycle/Lifecycle$Event;)Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Landroidx/lifecycle/LifecycleRegistry;->moveToState(Landroidx/lifecycle/Lifecycle$State;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public markState(Landroidx/lifecycle/Lifecycle$State;)V
|
|
|
|
.locals 0
|
|
|
|
.param p1 # Landroidx/lifecycle/Lifecycle$State;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.annotation build Landroidx/annotation/MainThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Landroidx/lifecycle/LifecycleRegistry;->moveToState(Landroidx/lifecycle/Lifecycle$State;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public removeObserver(Landroidx/lifecycle/LifecycleObserver;)V
|
|
|
|
.locals 1
|
|
|
|
.param p1 # Landroidx/lifecycle/LifecycleObserver;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->mObserverMap:Landroidx/arch/core/internal/FastSafeIterableMap;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Landroidx/arch/core/internal/FastSafeIterableMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|