Skip to content

Commit

Permalink
Delete com/facebook/react/surface package
Browse files Browse the repository at this point in the history
Summary:
com/facebook/react/surface package only contains one file (ReactStage), this annotation is only used internally by the framework and it fit better in uimanager package.

In this diff we are:
- deleting com/facebook/react/surface package
- moving ReactStage to com/facebook/react/uimanager
- Properly using ReactStage in ReactRoot and ReactRootView

This is a backward compatible change because ReactStage is only used in the internals of React Native

changelog: [internal] internal

Differential Revision: D51228376
  • Loading branch information
mdvacca authored and facebook-github-bot committed Nov 12, 2023
1 parent 50349c7 commit 6920779
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@
import com.facebook.react.modules.core.ReactChoreographer;
import com.facebook.react.modules.debug.interfaces.DeveloperSettings;
import com.facebook.react.packagerconnection.RequestHandler;
import com.facebook.react.surface.ReactStage;
import com.facebook.react.uimanager.DisplayMetricsHolder;
import com.facebook.react.uimanager.ReactRoot;
import com.facebook.react.uimanager.ReactStage;
import com.facebook.react.uimanager.UIManagerHelper;
import com.facebook.react.uimanager.ViewManager;
import com.facebook.react.uimanager.common.UIManagerType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
import com.facebook.react.config.ReactFeatureFlags;
import com.facebook.react.modules.appregistry.AppRegistry;
import com.facebook.react.modules.deviceinfo.DeviceInfoModule;
import com.facebook.react.surface.ReactStage;
import com.facebook.react.uimanager.DisplayMetricsHolder;
import com.facebook.react.uimanager.IllegalViewOperationException;
import com.facebook.react.uimanager.JSPointerDispatcher;
Expand All @@ -60,6 +59,7 @@
import com.facebook.react.uimanager.ReactClippingProhibitedView;
import com.facebook.react.uimanager.ReactRoot;
import com.facebook.react.uimanager.ReactRootViewTagGenerator;
import com.facebook.react.uimanager.ReactStage;
import com.facebook.react.uimanager.RootView;
import com.facebook.react.uimanager.RootViewUtil;
import com.facebook.react.uimanager.UIManagerHelper;
Expand Down Expand Up @@ -598,7 +598,7 @@ public void unmountReactApplication() {
}

@Override
public void onStage(int stage) {
public void onStage(@ReactStage int stage) {
switch (stage) {
case ReactStage.ON_ATTACH_TO_INSTANCE:
onAttachedToReactInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public interface ReactRoot {
void runApplication();

/** Handler for stages {@link com.facebook.react.surface.ReactStage} */
void onStage(int stage);
void onStage(@ReactStage int stage);

/** Return native view for root */
ViewGroup getRootViewGroup();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

package com.facebook.react.surface;
package com.facebook.react.uimanager;

import static java.lang.annotation.RetentionPolicy.SOURCE;

Expand Down

0 comments on commit 6920779

Please sign in to comment.