Aurimas Liutikas | 3aa5a20 | 2020-10-05 09:42:14 -0700 | [diff] [blame] | 1 | // Signature format: 4.0 |
Alan Viverette | cd1aae0 | 2019-08-28 15:28:57 -0400 | [diff] [blame] | 2 | package androidx.lifecycle { |
| 3 | |
| 4 | public abstract class Lifecycle { |
| 5 | ctor public Lifecycle(); |
| 6 | method @MainThread public abstract void addObserver(androidx.lifecycle.LifecycleObserver); |
| 7 | method @MainThread public abstract androidx.lifecycle.Lifecycle.State getCurrentState(); |
| 8 | method @MainThread public abstract void removeObserver(androidx.lifecycle.LifecycleObserver); |
| 9 | } |
| 10 | |
| 11 | public enum Lifecycle.Event { |
Adam Powell | 86a72f8 | 2020-06-09 11:06:29 -0700 | [diff] [blame] | 12 | method public static androidx.lifecycle.Lifecycle.Event? downFrom(androidx.lifecycle.Lifecycle.State); |
| 13 | method public static androidx.lifecycle.Lifecycle.Event? downTo(androidx.lifecycle.Lifecycle.State); |
| 14 | method public androidx.lifecycle.Lifecycle.State getTargetState(); |
| 15 | method public static androidx.lifecycle.Lifecycle.Event? upFrom(androidx.lifecycle.Lifecycle.State); |
| 16 | method public static androidx.lifecycle.Lifecycle.Event? upTo(androidx.lifecycle.Lifecycle.State); |
Alan Viverette | cd1aae0 | 2019-08-28 15:28:57 -0400 | [diff] [blame] | 17 | enum_constant public static final androidx.lifecycle.Lifecycle.Event ON_ANY; |
| 18 | enum_constant public static final androidx.lifecycle.Lifecycle.Event ON_CREATE; |
| 19 | enum_constant public static final androidx.lifecycle.Lifecycle.Event ON_DESTROY; |
| 20 | enum_constant public static final androidx.lifecycle.Lifecycle.Event ON_PAUSE; |
| 21 | enum_constant public static final androidx.lifecycle.Lifecycle.Event ON_RESUME; |
| 22 | enum_constant public static final androidx.lifecycle.Lifecycle.Event ON_START; |
| 23 | enum_constant public static final androidx.lifecycle.Lifecycle.Event ON_STOP; |
| 24 | } |
| 25 | |
| 26 | public enum Lifecycle.State { |
| 27 | method public boolean isAtLeast(androidx.lifecycle.Lifecycle.State); |
| 28 | enum_constant public static final androidx.lifecycle.Lifecycle.State CREATED; |
| 29 | enum_constant public static final androidx.lifecycle.Lifecycle.State DESTROYED; |
| 30 | enum_constant public static final androidx.lifecycle.Lifecycle.State INITIALIZED; |
| 31 | enum_constant public static final androidx.lifecycle.Lifecycle.State RESUMED; |
| 32 | enum_constant public static final androidx.lifecycle.Lifecycle.State STARTED; |
| 33 | } |
| 34 | |
| 35 | public interface LifecycleEventObserver extends androidx.lifecycle.LifecycleObserver { |
| 36 | method public void onStateChanged(androidx.lifecycle.LifecycleOwner, androidx.lifecycle.Lifecycle.Event); |
| 37 | } |
| 38 | |
| 39 | public interface LifecycleObserver { |
| 40 | } |
| 41 | |
| 42 | public interface LifecycleOwner { |
| 43 | method public androidx.lifecycle.Lifecycle getLifecycle(); |
| 44 | } |
| 45 | |
| 46 | @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) public @interface OnLifecycleEvent { |
| 47 | method public abstract androidx.lifecycle.Lifecycle.Event! value(); |
| 48 | } |
| 49 | |
| 50 | } |
| 51 | |