1// Signature format: 4.0 2package androidx.lifecycle { 3 4 public interface DefaultLifecycleObserver extends androidx.lifecycle.LifecycleObserver { 5 method public default void onCreate(androidx.lifecycle.LifecycleOwner owner); 6 method public default void onDestroy(androidx.lifecycle.LifecycleOwner owner); 7 method public default void onPause(androidx.lifecycle.LifecycleOwner owner); 8 method public default void onResume(androidx.lifecycle.LifecycleOwner owner); 9 method public default void onStart(androidx.lifecycle.LifecycleOwner owner); 10 method public default void onStop(androidx.lifecycle.LifecycleOwner owner); 11 } 12 13 public abstract class Lifecycle { 14 ctor public Lifecycle(); 15 method @MainThread public abstract void addObserver(androidx.lifecycle.LifecycleObserver observer); 16 method @MainThread public abstract androidx.lifecycle.Lifecycle.State getCurrentState(); 17 method public kotlinx.coroutines.flow.StateFlow<androidx.lifecycle.Lifecycle.State> getCurrentStateFlow(); 18 method @MainThread public abstract void removeObserver(androidx.lifecycle.LifecycleObserver observer); 19 property @MainThread public abstract androidx.lifecycle.Lifecycle.State currentState; 20 property public kotlinx.coroutines.flow.StateFlow<androidx.lifecycle.Lifecycle.State> currentStateFlow; 21 } 22 23 public enum Lifecycle.Event { 24 method public static androidx.lifecycle.Lifecycle.Event? downFrom(androidx.lifecycle.Lifecycle.State state); 25 method public static androidx.lifecycle.Lifecycle.Event? downTo(androidx.lifecycle.Lifecycle.State state); 26 method public androidx.lifecycle.Lifecycle.State getTargetState(); 27 method public static androidx.lifecycle.Lifecycle.Event? upFrom(androidx.lifecycle.Lifecycle.State state); 28 method public static androidx.lifecycle.Lifecycle.Event? upTo(androidx.lifecycle.Lifecycle.State state); 29 property public androidx.lifecycle.Lifecycle.State targetState; 30 enum_constant public static final androidx.lifecycle.Lifecycle.Event ON_ANY; 31 enum_constant public static final androidx.lifecycle.Lifecycle.Event ON_CREATE; 32 enum_constant public static final androidx.lifecycle.Lifecycle.Event ON_DESTROY; 33 enum_constant public static final androidx.lifecycle.Lifecycle.Event ON_PAUSE; 34 enum_constant public static final androidx.lifecycle.Lifecycle.Event ON_RESUME; 35 enum_constant public static final androidx.lifecycle.Lifecycle.Event ON_START; 36 enum_constant public static final androidx.lifecycle.Lifecycle.Event ON_STOP; 37 field public static final androidx.lifecycle.Lifecycle.Event.Companion Companion; 38 } 39 40 public static final class Lifecycle.Event.Companion { 41 method public androidx.lifecycle.Lifecycle.Event? downFrom(androidx.lifecycle.Lifecycle.State state); 42 method public androidx.lifecycle.Lifecycle.Event? downTo(androidx.lifecycle.Lifecycle.State state); 43 method public androidx.lifecycle.Lifecycle.Event? upFrom(androidx.lifecycle.Lifecycle.State state); 44 method public androidx.lifecycle.Lifecycle.Event? upTo(androidx.lifecycle.Lifecycle.State state); 45 } 46 47 public enum Lifecycle.State { 48 method public boolean isAtLeast(androidx.lifecycle.Lifecycle.State state); 49 enum_constant public static final androidx.lifecycle.Lifecycle.State CREATED; 50 enum_constant public static final androidx.lifecycle.Lifecycle.State DESTROYED; 51 enum_constant public static final androidx.lifecycle.Lifecycle.State INITIALIZED; 52 enum_constant public static final androidx.lifecycle.Lifecycle.State RESUMED; 53 enum_constant public static final androidx.lifecycle.Lifecycle.State STARTED; 54 } 55 56 public abstract class LifecycleCoroutineScope implements kotlinx.coroutines.CoroutineScope { 57 method @Deprecated public final kotlinx.coroutines.Job launchWhenCreated(kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,? extends java.lang.Object?> block); 58 method @Deprecated public final kotlinx.coroutines.Job launchWhenResumed(kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,? extends java.lang.Object?> block); 59 method @Deprecated public final kotlinx.coroutines.Job launchWhenStarted(kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super kotlin.Unit>,? extends java.lang.Object?> block); 60 } 61 62 public fun interface LifecycleEventObserver extends androidx.lifecycle.LifecycleObserver { 63 method public void onStateChanged(androidx.lifecycle.LifecycleOwner source, androidx.lifecycle.Lifecycle.Event event); 64 } 65 66 public final class LifecycleKt { 67 method public static androidx.lifecycle.LifecycleCoroutineScope getCoroutineScope(androidx.lifecycle.Lifecycle); 68 method public static kotlinx.coroutines.flow.Flow<androidx.lifecycle.Lifecycle.Event> getEventFlow(androidx.lifecycle.Lifecycle); 69 property public static androidx.lifecycle.LifecycleCoroutineScope androidx.lifecycle.Lifecycle.coroutineScope; 70 property public static kotlinx.coroutines.flow.Flow<androidx.lifecycle.Lifecycle.Event> androidx.lifecycle.Lifecycle.eventFlow; 71 } 72 73 public interface LifecycleObserver { 74 } 75 76 public interface LifecycleOwner { 77 method public androidx.lifecycle.Lifecycle getLifecycle(); 78 property public abstract androidx.lifecycle.Lifecycle lifecycle; 79 } 80 81 public final class LifecycleOwnerKt { 82 method public static androidx.lifecycle.LifecycleCoroutineScope getLifecycleScope(androidx.lifecycle.LifecycleOwner); 83 property public static androidx.lifecycle.LifecycleCoroutineScope androidx.lifecycle.LifecycleOwner.lifecycleScope; 84 } 85 86 @Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) public @interface OnLifecycleEvent { 87 method @Deprecated public abstract androidx.lifecycle.Lifecycle.Event value(); 88 } 89 90 public final class PausingDispatcherKt { 91 method @Deprecated public static suspend <T> Object? whenCreated(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,? extends java.lang.Object?> block, kotlin.coroutines.Continuation<? super T>); 92 method @Deprecated public static suspend <T> Object? whenCreated(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,? extends java.lang.Object?> block, kotlin.coroutines.Continuation<? super T>); 93 method @Deprecated public static suspend <T> Object? whenResumed(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,? extends java.lang.Object?> block, kotlin.coroutines.Continuation<? super T>); 94 method @Deprecated public static suspend <T> Object? whenResumed(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,? extends java.lang.Object?> block, kotlin.coroutines.Continuation<? super T>); 95 method @Deprecated public static suspend <T> Object? whenStarted(androidx.lifecycle.Lifecycle, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,? extends java.lang.Object?> block, kotlin.coroutines.Continuation<? super T>); 96 method @Deprecated public static suspend <T> Object? whenStarted(androidx.lifecycle.LifecycleOwner, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,? extends java.lang.Object?> block, kotlin.coroutines.Continuation<? super T>); 97 method @Deprecated public static suspend <T> Object? whenStateAtLeast(androidx.lifecycle.Lifecycle, androidx.lifecycle.Lifecycle.State minState, kotlin.jvm.functions.Function2<? super kotlinx.coroutines.CoroutineScope,? super kotlin.coroutines.Continuation<? super T>,? extends java.lang.Object?> block, kotlin.coroutines.Continuation<? super T>); 98 } 99 100} 101 102