.class public Landroidx/lifecycle/LifecycleRegistry; .super Landroidx/lifecycle/Lifecycle; .source "LifecycleRegistry.kt" # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Landroidx/lifecycle/LifecycleRegistry$Companion;, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState; } .end annotation .annotation runtime Lkotlin/Metadata; d1 = { "\u0000`\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010\u000b\n\u0002\u0008\u0002\n\u0002\u0010\u0008\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\t\n\u0002\u0018\u0002\n\u0002\u0008\u0005\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\u0008\u0005\n\u0002\u0010\u000e\n\u0002\u0008\u0003\n\u0002\u0018\u0002\n\u0002\u0008\n\u0008\u0016\u0018\u0000 42\u00020\u0001:\u000245B\u000f\u0008\u0016\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u00a2\u0006\u0002\u0010\u0004B\u0017\u0008\u0002\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0005\u001a\u00020\u0006\u00a2\u0006\u0002\u0010\u0007J\u0010\u0010!\u001a\u00020\"2\u0006\u0010#\u001a\u00020\u001cH\u0016J\u0010\u0010$\u001a\u00020\"2\u0006\u0010\u0014\u001a\u00020\u0003H\u0002J\u0010\u0010%\u001a\u00020\u000b2\u0006\u0010#\u001a\u00020\u001cH\u0002J\u0010\u0010&\u001a\u00020\"2\u0006\u0010\'\u001a\u00020(H\u0003J\u0010\u0010)\u001a\u00020\"2\u0006\u0010\u0014\u001a\u00020\u0003H\u0002J\u0010\u0010*\u001a\u00020\"2\u0006\u0010+\u001a\u00020,H\u0016J\u0010\u0010-\u001a\u00020\"2\u0006\u0010\n\u001a\u00020\u000bH\u0017J\u0010\u0010.\u001a\u00020\"2\u0006\u0010/\u001a\u00020\u000bH\u0002J\u0008\u00100\u001a\u00020\"H\u0002J\u0010\u00101\u001a\u00020\"2\u0006\u0010\n\u001a\u00020\u000bH\u0002J\u0010\u00102\u001a\u00020\"2\u0006\u0010#\u001a\u00020\u001cH\u0016J\u0008\u00103\u001a\u00020\"H\u0002R\u000e\u0010\u0008\u001a\u00020\tX\u0082\u000e\u00a2\u0006\u0002\n\u0000R$\u0010\u000c\u001a\u00020\u000b2\u0006\u0010\n\u001a\u00020\u000b8V@VX\u0096\u000e\u00a2\u0006\u000c\u001a\u0004\u0008\r\u0010\u000e\"\u0004\u0008\u000f\u0010\u0010R\u000e\u0010\u0005\u001a\u00020\u0006X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0011\u001a\u00020\u0006X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u0014\u0010\u0012\u001a\u00020\u00068BX\u0082\u0004\u00a2\u0006\u0006\u001a\u0004\u0008\u0012\u0010\u0013R\u0014\u0010\u0014\u001a\u0008\u0012\u0004\u0012\u00020\u00030\u0015X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0016\u001a\u00020\u0006X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u0014\u0010\u0017\u001a\u00020\t8VX\u0096\u0004\u00a2\u0006\u0006\u001a\u0004\u0008\u0018\u0010\u0019R\u001a\u0010\u001a\u001a\u000e\u0012\u0004\u0012\u00020\u001c\u0012\u0004\u0012\u00020\u001d0\u001bX\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u001e\u0010\u001e\u001a\u0012\u0012\u0004\u0012\u00020\u000b0\u001fj\u0008\u0012\u0004\u0012\u00020\u000b` X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\n\u001a\u00020\u000bX\u0082\u000e\u00a2\u0006\u0002\n\u0000\u00a8\u00066" } d2 = { "Landroidx/lifecycle/LifecycleRegistry;", "Landroidx/lifecycle/Lifecycle;", "provider", "Landroidx/lifecycle/LifecycleOwner;", "(Landroidx/lifecycle/LifecycleOwner;)V", "enforceMainThread", "", "(Landroidx/lifecycle/LifecycleOwner;Z)V", "addingObserverCounter", "", "state", "Landroidx/lifecycle/Lifecycle$State;", "currentState", "getCurrentState", "()Landroidx/lifecycle/Lifecycle$State;", "setCurrentState", "(Landroidx/lifecycle/Lifecycle$State;)V", "handlingEvent", "isSynced", "()Z", "lifecycleOwner", "Ljava/lang/ref/WeakReference;", "newEventOccurred", "observerCount", "getObserverCount", "()I", "observerMap", "Landroidx/arch/core/internal/FastSafeIterableMap;", "Landroidx/lifecycle/LifecycleObserver;", "Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;", "parentStates", "Ljava/util/ArrayList;", "Lkotlin/collections/ArrayList;", "addObserver", "", "observer", "backwardPass", "calculateTargetState", "enforceMainThreadIfNeeded", "methodName", "", "forwardPass", "handleLifecycleEvent", "event", "Landroidx/lifecycle/Lifecycle$Event;", "markState", "moveToState", "next", "popParentState", "pushParentState", "removeObserver", "sync", "Companion", "ObserverWithState", "lifecycle-runtime_release" } k = 0x1 mv = { 0x1, 0x8, 0x0 } xi = 0x30 .end annotation # static fields .field public static final Companion:Landroidx/lifecycle/LifecycleRegistry$Companion; # instance fields .field private addingObserverCounter:I .field private final enforceMainThread:Z .field private handlingEvent:Z .field private final lifecycleOwner:Ljava/lang/ref/WeakReference; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/lang/ref/WeakReference<", "Landroidx/lifecycle/LifecycleOwner;", ">;" } .end annotation .end field .field private newEventOccurred:Z .field private observerMap: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 parentStates:Ljava/util/ArrayList; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/ArrayList<", "Landroidx/lifecycle/Lifecycle$State;", ">;" } .end annotation .end field .field private state:Landroidx/lifecycle/Lifecycle$State; # direct methods .method static constructor ()V .locals 2 new-instance v0, Landroidx/lifecycle/LifecycleRegistry$Companion; const/4 v1, 0x0 invoke-direct {v0, v1}, Landroidx/lifecycle/LifecycleRegistry$Companion;->(Lkotlin/jvm/internal/DefaultConstructorMarker;)V sput-object v0, Landroidx/lifecycle/LifecycleRegistry;->Companion:Landroidx/lifecycle/LifecycleRegistry$Companion; return-void .end method .method public constructor (Landroidx/lifecycle/LifecycleOwner;)V .locals 1 const-string v0, "provider" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const/4 v0, 0x1 .line 79 invoke-direct {p0, p1, v0}, Landroidx/lifecycle/LifecycleRegistry;->(Landroidx/lifecycle/LifecycleOwner;Z)V return-void .end method .method private constructor (Landroidx/lifecycle/LifecycleOwner;Z)V .locals 0 .line 34 invoke-direct {p0}, Landroidx/lifecycle/Lifecycle;->()V iput-boolean p2, p0, Landroidx/lifecycle/LifecycleRegistry;->enforceMainThread:Z .line 42 new-instance p2, Landroidx/arch/core/internal/FastSafeIterableMap; invoke-direct {p2}, Landroidx/arch/core/internal/FastSafeIterableMap;->()V iput-object p2, p0, Landroidx/lifecycle/LifecycleRegistry;->observerMap:Landroidx/arch/core/internal/FastSafeIterableMap; .line 47 sget-object p2, Landroidx/lifecycle/Lifecycle$State;->INITIALIZED:Landroidx/lifecycle/Lifecycle$State; iput-object p2, p0, Landroidx/lifecycle/LifecycleRegistry;->state:Landroidx/lifecycle/Lifecycle$State; .line 69 new-instance p2, Ljava/util/ArrayList; invoke-direct {p2}, Ljava/util/ArrayList;->()V iput-object p2, p0, Landroidx/lifecycle/LifecycleRegistry;->parentStates:Ljava/util/ArrayList; .line 82 new-instance p2, Ljava/lang/ref/WeakReference; invoke-direct {p2, p1}, Ljava/lang/ref/WeakReference;->(Ljava/lang/Object;)V iput-object p2, p0, Landroidx/lifecycle/LifecycleRegistry;->lifecycleOwner:Ljava/lang/ref/WeakReference; return-void .end method .method public synthetic constructor (Landroidx/lifecycle/LifecycleOwner;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V .locals 0 invoke-direct {p0, p1, p2}, Landroidx/lifecycle/LifecycleRegistry;->(Landroidx/lifecycle/LifecycleOwner;Z)V return-void .end method .method private final backwardPass(Landroidx/lifecycle/LifecycleOwner;)V .locals 5 iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->observerMap:Landroidx/arch/core/internal/FastSafeIterableMap; .line 258 invoke-virtual {v0}, Landroidx/arch/core/internal/FastSafeIterableMap;->descendingIterator()Ljava/util/Iterator; move-result-object v0 const-string v1, "observerMap.descendingIterator()" invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V .line 259 :cond_0 invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z move-result v1 if-eqz v1, :cond_2 iget-boolean v1, p0, Landroidx/lifecycle/LifecycleRegistry;->newEventOccurred:Z if-nez v1, :cond_2 .line 260 invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v1 check-cast v1, Ljava/util/Map$Entry; const-string v2, "next()" invoke-static {v1, v2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object; move-result-object v2 check-cast v2, Landroidx/lifecycle/LifecycleObserver; invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object; move-result-object v1 check-cast v1, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState; .line 261 :goto_0 invoke-virtual {v1}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->getState()Landroidx/lifecycle/Lifecycle$State; move-result-object v3 iget-object v4, p0, Landroidx/lifecycle/LifecycleRegistry;->state:Landroidx/lifecycle/Lifecycle$State; check-cast v4, Ljava/lang/Enum; 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;->newEventOccurred:Z if-nez v3, :cond_0 iget-object v3, p0, Landroidx/lifecycle/LifecycleRegistry;->observerMap:Landroidx/arch/core/internal/FastSafeIterableMap; invoke-virtual {v3, v2}, Landroidx/arch/core/internal/FastSafeIterableMap;->contains(Ljava/lang/Object;)Z move-result v3 if-eqz v3, :cond_0 .line 263 sget-object v3, Landroidx/lifecycle/Lifecycle$Event;->Companion:Landroidx/lifecycle/Lifecycle$Event$Companion; invoke-virtual {v1}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->getState()Landroidx/lifecycle/Lifecycle$State; move-result-object v4 invoke-virtual {v3, v4}, Landroidx/lifecycle/Lifecycle$Event$Companion;->downFrom(Landroidx/lifecycle/Lifecycle$State;)Landroidx/lifecycle/Lifecycle$Event; move-result-object v3 if-eqz v3, :cond_1 .line 265 invoke-virtual {v3}, Landroidx/lifecycle/Lifecycle$Event;->getTargetState()Landroidx/lifecycle/Lifecycle$State; move-result-object v4 invoke-direct {p0, v4}, Landroidx/lifecycle/LifecycleRegistry;->pushParentState(Landroidx/lifecycle/Lifecycle$State;)V .line 266 invoke-virtual {v1, p1, v3}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->dispatchEvent(Landroidx/lifecycle/LifecycleOwner;Landroidx/lifecycle/Lifecycle$Event;)V .line 267 invoke-direct {p0}, Landroidx/lifecycle/LifecycleRegistry;->popParentState()V goto :goto_0 .line 264 :cond_1 new-instance p0, Ljava/lang/IllegalStateException; new-instance p1, Ljava/lang/StringBuilder; const-string v0, "no event down from " invoke-direct {p1, v0}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {v1}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->getState()Landroidx/lifecycle/Lifecycle$State; move-result-object v0 invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object p1 invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw p0 :cond_2 return-void .end method .method private final calculateTargetState(Landroidx/lifecycle/LifecycleObserver;)Landroidx/lifecycle/Lifecycle$State; .locals 2 iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->observerMap:Landroidx/arch/core/internal/FastSafeIterableMap; .line 154 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 .line 155 invoke-interface {p1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object; move-result-object p1 check-cast p1, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState; if-eqz p1, :cond_0 invoke-virtual {p1}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->getState()Landroidx/lifecycle/Lifecycle$State; move-result-object p1 goto :goto_0 :cond_0 move-object p1, v0 :goto_0 iget-object v1, p0, Landroidx/lifecycle/LifecycleRegistry;->parentStates:Ljava/util/ArrayList; .line 157 check-cast v1, Ljava/util/Collection; invoke-interface {v1}, Ljava/util/Collection;->isEmpty()Z move-result v1 xor-int/lit8 v1, v1, 0x1 if-eqz v1, :cond_1 iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->parentStates:Ljava/util/ArrayList; invoke-virtual {v0}, Ljava/util/ArrayList;->size()I 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 sget-object v1, Landroidx/lifecycle/LifecycleRegistry;->Companion:Landroidx/lifecycle/LifecycleRegistry$Companion; iget-object p0, p0, Landroidx/lifecycle/LifecycleRegistry;->state:Landroidx/lifecycle/Lifecycle$State; .line 158 invoke-virtual {v1, p0, p1}, Landroidx/lifecycle/LifecycleRegistry$Companion;->min$lifecycle_runtime_release(Landroidx/lifecycle/Lifecycle$State;Landroidx/lifecycle/Lifecycle$State;)Landroidx/lifecycle/Lifecycle$State; move-result-object p0 invoke-virtual {v1, p0, v0}, Landroidx/lifecycle/LifecycleRegistry$Companion;->min$lifecycle_runtime_release(Landroidx/lifecycle/Lifecycle$State;Landroidx/lifecycle/Lifecycle$State;)Landroidx/lifecycle/Lifecycle$State; move-result-object p0 return-object p0 .end method .method public static final createUnsafe(Landroidx/lifecycle/LifecycleOwner;)Landroidx/lifecycle/LifecycleRegistry; .locals 1 .annotation runtime Lkotlin/jvm/JvmStatic; .end annotation sget-object v0, Landroidx/lifecycle/LifecycleRegistry;->Companion:Landroidx/lifecycle/LifecycleRegistry$Companion; invoke-virtual {v0, p0}, Landroidx/lifecycle/LifecycleRegistry$Companion;->createUnsafe(Landroidx/lifecycle/LifecycleOwner;)Landroidx/lifecycle/LifecycleRegistry; move-result-object p0 return-object p0 .end method .method private final enforceMainThreadIfNeeded(Ljava/lang/String;)V .locals 1 iget-boolean p0, p0, Landroidx/lifecycle/LifecycleRegistry;->enforceMainThread:Z if-eqz p0, :cond_1 .line 296 invoke-static {}, Landroidx/arch/core/executor/ArchTaskExecutor;->getInstance()Landroidx/arch/core/executor/ArchTaskExecutor; move-result-object p0 invoke-virtual {p0}, Landroidx/arch/core/executor/ArchTaskExecutor;->isMainThread()Z move-result p0 if-eqz p0, :cond_0 goto :goto_0 .line 297 :cond_0 new-instance p0, Ljava/lang/StringBuilder; const-string v0, "Method " invoke-direct {p0, v0}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p0 const-string p1, " must be called on the main thread" invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p0 invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p0 .line 296 new-instance p1, Ljava/lang/IllegalStateException; invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String; move-result-object p0 invoke-direct {p1, p0}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw p1 :cond_1 :goto_0 return-void .end method .method private final forwardPass(Landroidx/lifecycle/LifecycleOwner;)V .locals 5 iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->observerMap:Landroidx/arch/core/internal/FastSafeIterableMap; .line 243 invoke-virtual {v0}, Landroidx/arch/core/internal/FastSafeIterableMap;->iteratorWithAdditions()Landroidx/arch/core/internal/SafeIterableMap$IteratorWithAdditions; move-result-object v0 const-string v1, "observerMap.iteratorWithAdditions()" invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V check-cast v0, Ljava/util/Iterator; .line 244 :cond_0 invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z move-result v1 if-eqz v1, :cond_2 iget-boolean v1, p0, Landroidx/lifecycle/LifecycleRegistry;->newEventOccurred:Z if-nez v1, :cond_2 .line 245 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;->getKey()Ljava/lang/Object; move-result-object v2 check-cast v2, Landroidx/lifecycle/LifecycleObserver; invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object; move-result-object v1 check-cast v1, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState; .line 246 :goto_0 invoke-virtual {v1}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->getState()Landroidx/lifecycle/Lifecycle$State; move-result-object v3 iget-object v4, p0, Landroidx/lifecycle/LifecycleRegistry;->state:Landroidx/lifecycle/Lifecycle$State; check-cast v4, Ljava/lang/Enum; 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;->newEventOccurred:Z if-nez v3, :cond_0 iget-object v3, p0, Landroidx/lifecycle/LifecycleRegistry;->observerMap:Landroidx/arch/core/internal/FastSafeIterableMap; invoke-virtual {v3, v2}, Landroidx/arch/core/internal/FastSafeIterableMap;->contains(Ljava/lang/Object;)Z move-result v3 if-eqz v3, :cond_0 .line 248 invoke-virtual {v1}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->getState()Landroidx/lifecycle/Lifecycle$State; move-result-object v3 invoke-direct {p0, v3}, Landroidx/lifecycle/LifecycleRegistry;->pushParentState(Landroidx/lifecycle/Lifecycle$State;)V .line 249 sget-object v3, Landroidx/lifecycle/Lifecycle$Event;->Companion:Landroidx/lifecycle/Lifecycle$Event$Companion; invoke-virtual {v1}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->getState()Landroidx/lifecycle/Lifecycle$State; move-result-object v4 invoke-virtual {v3, v4}, Landroidx/lifecycle/Lifecycle$Event$Companion;->upFrom(Landroidx/lifecycle/Lifecycle$State;)Landroidx/lifecycle/Lifecycle$Event; move-result-object v3 if-eqz v3, :cond_1 .line 251 invoke-virtual {v1, p1, v3}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->dispatchEvent(Landroidx/lifecycle/LifecycleOwner;Landroidx/lifecycle/Lifecycle$Event;)V .line 252 invoke-direct {p0}, Landroidx/lifecycle/LifecycleRegistry;->popParentState()V goto :goto_0 .line 250 :cond_1 new-instance p0, Ljava/lang/IllegalStateException; new-instance p1, Ljava/lang/StringBuilder; const-string v0, "no event up from " invoke-direct {p1, v0}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {v1}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->getState()Landroidx/lifecycle/Lifecycle$State; move-result-object v0 invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object p1 invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw p0 :cond_2 return-void .end method .method private final isSynced()Z .locals 3 iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->observerMap:Landroidx/arch/core/internal/FastSafeIterableMap; .line 145 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;->observerMap:Landroidx/arch/core/internal/FastSafeIterableMap; .line 148 invoke-virtual {v0}, Landroidx/arch/core/internal/FastSafeIterableMap;->eldest()Ljava/util/Map$Entry; move-result-object v0 invoke-static {v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V invoke-interface {v0}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object; move-result-object v0 check-cast v0, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState; invoke-virtual {v0}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->getState()Landroidx/lifecycle/Lifecycle$State; move-result-object v0 iget-object v2, p0, Landroidx/lifecycle/LifecycleRegistry;->observerMap:Landroidx/arch/core/internal/FastSafeIterableMap; .line 149 invoke-virtual {v2}, Landroidx/arch/core/internal/FastSafeIterableMap;->newest()Ljava/util/Map$Entry; move-result-object v2 invoke-static {v2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V invoke-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object; move-result-object v2 check-cast v2, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState; invoke-virtual {v2}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->getState()Landroidx/lifecycle/Lifecycle$State; move-result-object v2 if-ne v0, v2, :cond_1 iget-object p0, p0, Landroidx/lifecycle/LifecycleRegistry;->state:Landroidx/lifecycle/Lifecycle$State; if-ne p0, v2, :cond_1 goto :goto_0 :cond_1 const/4 v1, 0x0 :goto_0 return v1 .end method .method public static final min$lifecycle_runtime_release(Landroidx/lifecycle/Lifecycle$State;Landroidx/lifecycle/Lifecycle$State;)Landroidx/lifecycle/Lifecycle$State; .locals 1 .annotation runtime Lkotlin/jvm/JvmStatic; .end annotation sget-object v0, Landroidx/lifecycle/LifecycleRegistry;->Companion:Landroidx/lifecycle/LifecycleRegistry$Companion; invoke-virtual {v0, p0, p1}, Landroidx/lifecycle/LifecycleRegistry$Companion;->min$lifecycle_runtime_release(Landroidx/lifecycle/Lifecycle$State;Landroidx/lifecycle/Lifecycle$State;)Landroidx/lifecycle/Lifecycle$State; move-result-object p0 return-object p0 .end method .method private final moveToState(Landroidx/lifecycle/Lifecycle$State;)V .locals 2 iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->state:Landroidx/lifecycle/Lifecycle$State; if-ne v0, p1, :cond_0 return-void .line 126 :cond_0 sget-object v1, Landroidx/lifecycle/Lifecycle$State;->INITIALIZED:Landroidx/lifecycle/Lifecycle$State; if-ne v0, v1, :cond_2 sget-object v0, Landroidx/lifecycle/Lifecycle$State;->DESTROYED:Landroidx/lifecycle/Lifecycle$State; if-eq p1, v0, :cond_1 goto :goto_0 .line 127 :cond_1 new-instance p1, Ljava/lang/StringBuilder; const-string v0, "no event down from " invoke-direct {p1, v0}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->state:Landroidx/lifecycle/Lifecycle$State; invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object p1 const-string v0, " in component " invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p1 iget-object p0, p0, Landroidx/lifecycle/LifecycleRegistry;->lifecycleOwner:Ljava/lang/ref/WeakReference; invoke-virtual {p0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object; move-result-object p0 invoke-virtual {p1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object p0 invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p0 .line 126 new-instance p1, Ljava/lang/IllegalStateException; invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String; move-result-object p0 invoke-direct {p1, p0}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw p1 :cond_2 :goto_0 iput-object p1, p0, Landroidx/lifecycle/LifecycleRegistry;->state:Landroidx/lifecycle/Lifecycle$State; iget-boolean p1, p0, Landroidx/lifecycle/LifecycleRegistry;->handlingEvent:Z const/4 v0, 0x1 if-nez p1, :cond_5 iget p1, p0, Landroidx/lifecycle/LifecycleRegistry;->addingObserverCounter:I if-eqz p1, :cond_3 goto :goto_1 :cond_3 iput-boolean v0, p0, Landroidx/lifecycle/LifecycleRegistry;->handlingEvent:Z .line 136 invoke-direct {p0}, Landroidx/lifecycle/LifecycleRegistry;->sync()V const/4 p1, 0x0 iput-boolean p1, p0, Landroidx/lifecycle/LifecycleRegistry;->handlingEvent:Z iget-object p1, p0, Landroidx/lifecycle/LifecycleRegistry;->state:Landroidx/lifecycle/Lifecycle$State; .line 138 sget-object v0, Landroidx/lifecycle/Lifecycle$State;->DESTROYED:Landroidx/lifecycle/Lifecycle$State; if-ne p1, v0, :cond_4 .line 139 new-instance p1, Landroidx/arch/core/internal/FastSafeIterableMap; invoke-direct {p1}, Landroidx/arch/core/internal/FastSafeIterableMap;->()V iput-object p1, p0, Landroidx/lifecycle/LifecycleRegistry;->observerMap:Landroidx/arch/core/internal/FastSafeIterableMap; :cond_4 return-void :cond_5 :goto_1 iput-boolean v0, p0, Landroidx/lifecycle/LifecycleRegistry;->newEventOccurred:Z return-void .end method .method private final popParentState()V .locals 1 iget-object p0, p0, Landroidx/lifecycle/LifecycleRegistry;->parentStates:Ljava/util/ArrayList; .line 205 invoke-virtual {p0}, Ljava/util/ArrayList;->size()I move-result v0 add-int/lit8 v0, v0, -0x1 invoke-virtual {p0, v0}, Ljava/util/ArrayList;->remove(I)Ljava/lang/Object; return-void .end method .method private final pushParentState(Landroidx/lifecycle/Lifecycle$State;)V .locals 0 iget-object p0, p0, Landroidx/lifecycle/LifecycleRegistry;->parentStates:Ljava/util/ArrayList; .line 209 invoke-virtual {p0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z return-void .end method .method private final sync()V .locals 3 iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->lifecycleOwner:Ljava/lang/ref/WeakReference; .line 275 invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object; move-result-object v0 check-cast v0, Landroidx/lifecycle/LifecycleOwner; if-eqz v0, :cond_3 .line 280 :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;->newEventOccurred:Z iget-object v1, p0, Landroidx/lifecycle/LifecycleRegistry;->state:Landroidx/lifecycle/Lifecycle$State; iget-object v2, p0, Landroidx/lifecycle/LifecycleRegistry;->observerMap:Landroidx/arch/core/internal/FastSafeIterableMap; .line 282 invoke-virtual {v2}, Landroidx/arch/core/internal/FastSafeIterableMap;->eldest()Ljava/util/Map$Entry; move-result-object v2 invoke-static {v2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V invoke-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object; move-result-object v2 check-cast v2, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState; invoke-virtual {v2}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->getState()Landroidx/lifecycle/Lifecycle$State; move-result-object v2 check-cast v2, Ljava/lang/Enum; invoke-virtual {v1, v2}, Landroidx/lifecycle/Lifecycle$State;->compareTo(Ljava/lang/Enum;)I move-result v1 if-gez v1, :cond_1 .line 283 invoke-direct {p0, v0}, Landroidx/lifecycle/LifecycleRegistry;->backwardPass(Landroidx/lifecycle/LifecycleOwner;)V :cond_1 iget-object v1, p0, Landroidx/lifecycle/LifecycleRegistry;->observerMap:Landroidx/arch/core/internal/FastSafeIterableMap; .line 285 invoke-virtual {v1}, Landroidx/arch/core/internal/FastSafeIterableMap;->newest()Ljava/util/Map$Entry; move-result-object v1 iget-boolean v2, p0, Landroidx/lifecycle/LifecycleRegistry;->newEventOccurred:Z if-nez v2, :cond_0 if-eqz v1, :cond_0 iget-object v2, p0, Landroidx/lifecycle/LifecycleRegistry;->state:Landroidx/lifecycle/Lifecycle$State; .line 286 invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object; move-result-object v1 check-cast v1, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState; invoke-virtual {v1}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->getState()Landroidx/lifecycle/Lifecycle$State; move-result-object v1 check-cast v1, Ljava/lang/Enum; invoke-virtual {v2, v1}, Landroidx/lifecycle/Lifecycle$State;->compareTo(Ljava/lang/Enum;)I move-result v1 if-lez v1, :cond_0 .line 287 invoke-direct {p0, v0}, Landroidx/lifecycle/LifecycleRegistry;->forwardPass(Landroidx/lifecycle/LifecycleOwner;)V goto :goto_0 :cond_2 iput-boolean v2, p0, Landroidx/lifecycle/LifecycleRegistry;->newEventOccurred:Z return-void .line 276 :cond_3 new-instance p0, Ljava/lang/IllegalStateException; const-string v0, "LifecycleOwner of this LifecycleRegistry is already garbage collected. It is too late to change lifecycle state." invoke-direct {p0, v0}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw p0 .end method # virtual methods .method public addObserver(Landroidx/lifecycle/LifecycleObserver;)V .locals 6 const-string v0, "observer" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "addObserver" .line 174 invoke-direct {p0, v0}, Landroidx/lifecycle/LifecycleRegistry;->enforceMainThreadIfNeeded(Ljava/lang/String;)V iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->state:Landroidx/lifecycle/Lifecycle$State; .line 175 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; .line 176 :goto_0 new-instance v1, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState; invoke-direct {v1, p1, v0}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->(Landroidx/lifecycle/LifecycleObserver;Landroidx/lifecycle/Lifecycle$State;)V iget-object v0, p0, Landroidx/lifecycle/LifecycleRegistry;->observerMap:Landroidx/arch/core/internal/FastSafeIterableMap; .line 177 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;->lifecycleOwner:Ljava/lang/ref/WeakReference; .line 181 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;->addingObserverCounter:I const/4 v3, 0x1 if-nez v2, :cond_4 iget-boolean v2, p0, Landroidx/lifecycle/LifecycleRegistry;->handlingEvent:Z if-eqz v2, :cond_3 goto :goto_1 :cond_3 const/4 v2, 0x0 goto :goto_2 :cond_4 :goto_1 move v2, v3 .line 185 :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;->addingObserverCounter:I add-int/2addr v5, v3 iput v5, p0, Landroidx/lifecycle/LifecycleRegistry;->addingObserverCounter:I .line 187 :goto_3 invoke-virtual {v1}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->getState()Landroidx/lifecycle/Lifecycle$State; move-result-object v3 check-cast v4, Ljava/lang/Enum; invoke-virtual {v3, v4}, Landroidx/lifecycle/Lifecycle$State;->compareTo(Ljava/lang/Enum;)I move-result v3 if-gez v3, :cond_6 iget-object v3, p0, Landroidx/lifecycle/LifecycleRegistry;->observerMap:Landroidx/arch/core/internal/FastSafeIterableMap; invoke-virtual {v3, p1}, Landroidx/arch/core/internal/FastSafeIterableMap;->contains(Ljava/lang/Object;)Z move-result v3 if-eqz v3, :cond_6 .line 189 invoke-virtual {v1}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->getState()Landroidx/lifecycle/Lifecycle$State; move-result-object v3 invoke-direct {p0, v3}, Landroidx/lifecycle/LifecycleRegistry;->pushParentState(Landroidx/lifecycle/Lifecycle$State;)V .line 190 sget-object v3, Landroidx/lifecycle/Lifecycle$Event;->Companion:Landroidx/lifecycle/Lifecycle$Event$Companion; invoke-virtual {v1}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->getState()Landroidx/lifecycle/Lifecycle$State; move-result-object v4 invoke-virtual {v3, v4}, Landroidx/lifecycle/Lifecycle$Event$Companion;->upFrom(Landroidx/lifecycle/Lifecycle$State;)Landroidx/lifecycle/Lifecycle$Event; move-result-object v3 if-eqz v3, :cond_5 .line 192 invoke-virtual {v1, v0, v3}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->dispatchEvent(Landroidx/lifecycle/LifecycleOwner;Landroidx/lifecycle/Lifecycle$Event;)V .line 193 invoke-direct {p0}, Landroidx/lifecycle/LifecycleRegistry;->popParentState()V .line 195 invoke-direct {p0, p1}, Landroidx/lifecycle/LifecycleRegistry;->calculateTargetState(Landroidx/lifecycle/LifecycleObserver;)Landroidx/lifecycle/Lifecycle$State; move-result-object v4 goto :goto_3 .line 191 :cond_5 new-instance p0, Ljava/lang/IllegalStateException; new-instance p1, Ljava/lang/StringBuilder; const-string v0, "no event up from " invoke-direct {p1, v0}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {v1}, Landroidx/lifecycle/LifecycleRegistry$ObserverWithState;->getState()Landroidx/lifecycle/Lifecycle$State; move-result-object v0 invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object p1 invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw p0 :cond_6 if-nez v2, :cond_7 .line 199 invoke-direct {p0}, Landroidx/lifecycle/LifecycleRegistry;->sync()V :cond_7 iget p1, p0, Landroidx/lifecycle/LifecycleRegistry;->addingObserverCounter:I add-int/lit8 p1, p1, -0x1 iput p1, p0, Landroidx/lifecycle/LifecycleRegistry;->addingObserverCounter:I return-void .end method .method public getCurrentState()Landroidx/lifecycle/Lifecycle$State; .locals 0 iget-object p0, p0, Landroidx/lifecycle/LifecycleRegistry;->state:Landroidx/lifecycle/Lifecycle$State; return-object p0 .end method .method public getObserverCount()I .locals 1 const-string v0, "getObserverCount" .line 236 invoke-direct {p0, v0}, Landroidx/lifecycle/LifecycleRegistry;->enforceMainThreadIfNeeded(Ljava/lang/String;)V iget-object p0, p0, Landroidx/lifecycle/LifecycleRegistry;->observerMap:Landroidx/arch/core/internal/FastSafeIterableMap; .line 237 invoke-virtual {p0}, Landroidx/arch/core/internal/FastSafeIterableMap;->size()I move-result p0 return p0 .end method .method public handleLifecycleEvent(Landroidx/lifecycle/Lifecycle$Event;)V .locals 1 const-string v0, "event" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "handleLifecycleEvent" .line 118 invoke-direct {p0, v0}, Landroidx/lifecycle/LifecycleRegistry;->enforceMainThreadIfNeeded(Ljava/lang/String;)V .line 119 invoke-virtual {p1}, Landroidx/lifecycle/Lifecycle$Event;->getTargetState()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 1 .annotation runtime Lkotlin/Deprecated; message = "Override [currentState]." .end annotation const-string v0, "state" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "markState" .line 93 invoke-direct {p0, v0}, Landroidx/lifecycle/LifecycleRegistry;->enforceMainThreadIfNeeded(Ljava/lang/String;)V .line 94 invoke-virtual {p0, p1}, Landroidx/lifecycle/LifecycleRegistry;->setCurrentState(Landroidx/lifecycle/Lifecycle$State;)V return-void .end method .method public removeObserver(Landroidx/lifecycle/LifecycleObserver;)V .locals 1 const-string v0, "observer" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "removeObserver" .line 213 invoke-direct {p0, v0}, Landroidx/lifecycle/LifecycleRegistry;->enforceMainThreadIfNeeded(Ljava/lang/String;)V iget-object p0, p0, Landroidx/lifecycle/LifecycleRegistry;->observerMap:Landroidx/arch/core/internal/FastSafeIterableMap; .line 226 invoke-virtual {p0, p1}, Landroidx/arch/core/internal/FastSafeIterableMap;->remove(Ljava/lang/Object;)Ljava/lang/Object; return-void .end method .method public setCurrentState(Landroidx/lifecycle/Lifecycle$State;)V .locals 1 const-string v0, "state" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "setCurrentState" .line 105 invoke-direct {p0, v0}, Landroidx/lifecycle/LifecycleRegistry;->enforceMainThreadIfNeeded(Ljava/lang/String;)V .line 106 invoke-direct {p0, p1}, Landroidx/lifecycle/LifecycleRegistry;->moveToState(Landroidx/lifecycle/Lifecycle$State;)V return-void .end method