mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-09 22:43:10 +08:00
Remove exported constants from RCTTimers to allow lazy initialization
Summary: As per javache comments in #8734. Also removes now useless feature detection check. **Test plan** Tested that rIC still works in UIExplorer example. Closes https://github.com/facebook/react-native/pull/8795 Differential Revision: D3572566 Pulled By: javache fbshipit-source-id: 261d13d8b03898313f8b4184d634c70f81a61b62
This commit is contained in:
committed by
Facebook Github Bot 4
parent
f067811cd2
commit
80872ffccd
@@ -45,6 +45,7 @@ import javax.annotation.Nullable;
|
||||
public final class Timing extends ReactContextBaseJavaModule implements LifecycleEventListener,
|
||||
OnExecutorUnregisteredListener {
|
||||
|
||||
// These timing contants should be kept in sync with the ones in `JSTimersExecution.js`.
|
||||
// The minimum time in milliseconds left in the frame to call idle callbacks.
|
||||
private static final float IDLE_CALLBACK_FRAME_DEADLINE_MS = 1.f;
|
||||
// The total duration of a frame in milliseconds, this assumes that devices run at 60 fps.
|
||||
@@ -309,13 +310,6 @@ public final class Timing extends ReactContextBaseJavaModule implements Lifecycl
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getConstants() {
|
||||
return MapBuilder.<String, Object>of(
|
||||
"frameDuration", FRAME_DURATION_MS,
|
||||
"idleCallbackFrameDeadline", IDLE_CALLBACK_FRAME_DEADLINE_MS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onExecutorDestroyed(ExecutorToken executorToken) {
|
||||
synchronized (mTimerGuard) {
|
||||
|
||||
Reference in New Issue
Block a user