Prevent crash

pull/153/head
M66B 6 years ago
parent c9b8bc64ff
commit e3f018aaa2

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

Loading…
Cancel
Save