|
|
@ -10,8 +10,11 @@ import androidx.lifecycle.OnLifecycleEvent;
|
|
|
|
public class TwoStateOwner implements LifecycleOwner {
|
|
|
|
public class TwoStateOwner implements LifecycleOwner {
|
|
|
|
private LifecycleRegistry registry;
|
|
|
|
private LifecycleRegistry registry;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// https://developer.android.com/topic/libraries/architecture/lifecycle#lc
|
|
|
|
|
|
|
|
|
|
|
|
TwoStateOwner() {
|
|
|
|
TwoStateOwner() {
|
|
|
|
registry = new LifecycleRegistry(this);
|
|
|
|
registry = new LifecycleRegistry(this);
|
|
|
|
|
|
|
|
registry.handleLifecycleEvent(Lifecycle.Event.ON_CREATE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TwoStateOwner(LifecycleOwner owner) {
|
|
|
|
TwoStateOwner(LifecycleOwner owner) {
|
|
|
|