convert CoreModulesPackage to use @ReactModuleList

Reviewed By: astreet

Differential Revision: D3809512

fbshipit-source-id: 658284c642d55cf5f90e16901fdf6d4229d6b762
This commit is contained in:
Aaron Chiu
2016-09-02 19:02:38 -07:00
committed by Facebook Github Bot 6
parent 31c8e20c8e
commit 367c71241a
9 changed files with 36 additions and 10 deletions

View File

@@ -27,6 +27,7 @@ import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.common.ReactConstants;
import com.facebook.react.module.annotations.ReactModule;
import com.facebook.react.uimanager.debug.NotThreadSafeViewHierarchyUpdateDebugListener;
import com.facebook.react.uimanager.events.EventDispatcher;
import com.facebook.systrace.Systrace;
@@ -37,12 +38,12 @@ import com.facebook.systrace.SystraceMessage;
*
* <p>
* <h2>== Transactional Requirement ==</h2>
* A requirement of this class is to make sure that transactional UI updates occur all at once, meaning
* that no intermediate state is ever rendered to the screen. For example, if a JS application
* update changes the background of View A to blue and the width of View B to 100, both need to
* appear at once. Practically, this means that all UI update code related to a single transaction
* must be executed as a single code block on the UI thread. Executing as multiple code blocks
* could allow the platform UI system to interrupt and render a partial UI state.
* A requirement of this class is to make sure that transactional UI updates occur all at once,
* meaning that no intermediate state is ever rendered to the screen. For example, if a JS
* application update changes the background of View A to blue and the width of View B to 100, both
* need to appear at once. Practically, this means that all UI update code related to a single
* transaction must be executed as a single code block on the UI thread. Executing as multiple code
* blocks could allow the platform UI system to interrupt and render a partial UI state.
* </p>
*
* <p>To facilitate this, this module enqueues operations that are then applied to native view
@@ -61,6 +62,7 @@ import com.facebook.systrace.SystraceMessage;
* consider implementing a pool
* TODO(5483063): Don't dispatch the view hierarchy at the end of a batch if no UI changes occurred
*/
@ReactModule(name = "RKUIManager")
public class UIManagerModule extends ReactContextBaseJavaModule implements
OnBatchCompleteListener, LifecycleEventListener, PerformanceCounter {