Android开发——LiveData实现原理
@NonNull Lifecycle.Event event) {//获取当前生命周期状态Lifecycle.State currentState = mOwner.getLifecycle().getCurrentState();//如果组件已销毁了,就移除观察if (currentState == DESTROYED) {removeObserver(mObserver);return;}Lifecycle.State prevState = null;while (prevState