@Test public void getCurrentState() { mRegistry.handleLifecycleEvent(Lifecycle.Event.ON_RESUME); assertThat(mRegistry.getCurrentState(), is(Lifecycle.State.RESUMED)); mRegistry.handleLifecycleEvent(Lifecycle.Event.ON_DESTROY); assertThat(mRegistry.getCurrentState(), is(Lifecycle.State.DESTROYED)); }
@NonNull @Override public State getCurrentState() { return mState; }
LifecycleRegistry extends Lifecycle { @NonNull @Override public State getCurrentState() { return mState; } }
LifecycleRegistry extends Lifecycle { @NonNull @Override public State getCurrentState() { return mState; } LifecycleRegistry(@NonNull LifecycleOwner provider); }
LifecycleRegistry extends Lifecycle { @NonNull @Override public State getCurrentState() { return mState; } LifecycleRegistry(@NonNull LifecycleOwner provider); @Deprecated @MainThread void markState(@NonNull State state); @MainThread void setCurrentState(@NonNull State state); void handleLifecycleEvent(@NonNull Lifecycle.Event event); @Override void addObserver(@NonNull LifecycleObserver observer); @Override void removeObserver(@NonNull LifecycleObserver observer); @SuppressWarnings("WeakerAccess") int getObserverCount(); @NonNull @Override State getCurrentState(); }
LifecycleRegistry extends Lifecycle { @NonNull @Override public State getCurrentState() { return mState; } LifecycleRegistry(@NonNull LifecycleOwner provider); @Deprecated @MainThread void markState(@NonNull State state); @MainThread void setCurrentState(@NonNull State state); void handleLifecycleEvent(@NonNull Lifecycle.Event event); @Override void addObserver(@NonNull LifecycleObserver observer); @Override void removeObserver(@NonNull LifecycleObserver observer); @SuppressWarnings("WeakerAccess") int getObserverCount(); @NonNull @Override State getCurrentState();  }