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:
Janic Duplessis
2016-07-15 13:57:19 -07:00
committed by Facebook Github Bot 4
parent f067811cd2
commit 80872ffccd
4 changed files with 10 additions and 23 deletions

View File

@@ -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) {