mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Resume LockFreeEventDispatcher from onHostResume
Summary: Found that after backgrounding `mShouldStop` would always remain true, which prevents events from being dispatched / scheduled. Changelog: [Internal] Reviewed By: JoshuaGross Differential Revision: D34247567 fbshipit-source-id: 63876986dc0cee5e2a73cb4f8a35d90379d9f8ea
This commit is contained in:
committed by
Facebook GitHub Bot
parent
7b2d8178b1
commit
90b98efa73
+7
-1
@@ -125,7 +125,8 @@ public class LockFreeEventDispatcherImpl implements EventDispatcher, LifecycleEv
|
||||
|
||||
@Override
|
||||
public void onHostResume() {
|
||||
maybePostFrameCallbackFromNonUI();
|
||||
UiThreadUtil.assertOnUiThread();
|
||||
mCurrentFrameCallback.resume();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -183,6 +184,11 @@ public class LockFreeEventDispatcherImpl implements EventDispatcher, LifecycleEv
|
||||
driveEventBeats();
|
||||
}
|
||||
|
||||
public void resume() {
|
||||
mShouldStop = false;
|
||||
maybePost();
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
mShouldStop = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user