Fixes for migrating to Buck's source-only ABI feature

Reviewed By: dreiss

Differential Revision: D6475725

fbshipit-source-id: ac6725bbaaf2dbd78512a67497fbfcc044f59f60
This commit is contained in:
Jonathan Keljo 2017-12-05 10:22:53 -08:00 committed by Facebook Github Bot
parent b1701ccaef
commit 71006f74cd
5 changed files with 17 additions and 12 deletions

View File

@ -9,6 +9,7 @@
package com.facebook.react.flat; package com.facebook.react.flat;
import com.facebook.react.uimanager.UIViewOperationQueue;
import android.util.SparseIntArray; import android.util.SparseIntArray;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -34,7 +35,7 @@ import javax.annotation.Nullable;
private final FlatNativeViewHierarchyManager mNativeViewHierarchyManager; private final FlatNativeViewHierarchyManager mNativeViewHierarchyManager;
private final ProcessLayoutRequests mProcessLayoutRequests = new ProcessLayoutRequests(); private final ProcessLayoutRequests mProcessLayoutRequests = new ProcessLayoutRequests();
private final class ProcessLayoutRequests implements UIOperation { private final class ProcessLayoutRequests implements UIViewOperationQueue.UIOperation {
@Override @Override
public void execute() { public void execute() {
FlatViewGroup.processLayoutRequests(); FlatViewGroup.processLayoutRequests();
@ -44,7 +45,7 @@ import javax.annotation.Nullable;
/** /**
* UIOperation that updates DrawCommands for a View defined by reactTag. * UIOperation that updates DrawCommands for a View defined by reactTag.
*/ */
private final class UpdateMountState implements UIOperation { private final class UpdateMountState implements UIViewOperationQueue.UIOperation {
private final int mReactTag; private final int mReactTag;
private final @Nullable DrawCommand[] mDrawCommands; private final @Nullable DrawCommand[] mDrawCommands;
@ -75,7 +76,7 @@ import javax.annotation.Nullable;
/** /**
* UIOperation that updates DrawCommands for a View defined by reactTag. * UIOperation that updates DrawCommands for a View defined by reactTag.
*/ */
private final class UpdateClippingMountState implements UIOperation { private final class UpdateClippingMountState implements UIViewOperationQueue.UIOperation {
private final int mReactTag; private final int mReactTag;
private final @Nullable DrawCommand[] mDrawCommands; private final @Nullable DrawCommand[] mDrawCommands;
@ -127,7 +128,7 @@ import javax.annotation.Nullable;
} }
} }
private final class UpdateViewGroup implements UIOperation { private final class UpdateViewGroup implements UIViewOperationQueue.UIOperation {
private final int mReactTag; private final int mReactTag;
private final int[] mViewsToAdd; private final int[] mViewsToAdd;
@ -148,7 +149,7 @@ import javax.annotation.Nullable;
/** /**
* UIOperation that updates View bounds for a View defined by reactTag. * UIOperation that updates View bounds for a View defined by reactTag.
*/ */
public final class UpdateViewBounds implements UIOperation { public final class UpdateViewBounds implements UIViewOperationQueue.UIOperation {
private final int mReactTag; private final int mReactTag;
private final int mLeft; private final int mLeft;
@ -170,7 +171,7 @@ import javax.annotation.Nullable;
} }
} }
private final class SetPadding implements UIOperation { private final class SetPadding implements UIViewOperationQueue.UIOperation {
private final int mReactTag; private final int mReactTag;
private final int mPaddingLeft; private final int mPaddingLeft;
@ -202,7 +203,7 @@ import javax.annotation.Nullable;
} }
} }
private final class DropViews implements UIOperation { private final class DropViews implements UIViewOperationQueue.UIOperation {
private final SparseIntArray mViewsToDrop; private final SparseIntArray mViewsToDrop;
@ -220,7 +221,7 @@ import javax.annotation.Nullable;
} }
} }
private final class MeasureVirtualView implements UIOperation { private final class MeasureVirtualView implements UIViewOperationQueue.UIOperation {
private final int mReactTag; private final int mReactTag;
private final float mScaledX; private final float mScaledX;
@ -284,7 +285,7 @@ import javax.annotation.Nullable;
} }
} }
public final class DetachAllChildrenFromViews implements UIOperation { public final class DetachAllChildrenFromViews implements UIViewOperationQueue.UIOperation {
private @Nullable int[] mViewsToDetachAllChildrenFrom; private @Nullable int[] mViewsToDetachAllChildrenFrom;
public void setViewsToDetachAllChildrenFrom(int[] viewsToDetachAllChildrenFrom) { public void setViewsToDetachAllChildrenFrom(int[] viewsToDetachAllChildrenFrom) {
@ -297,7 +298,7 @@ import javax.annotation.Nullable;
} }
} }
private final class FindTargetForTouchOperation implements UIOperation { private final class FindTargetForTouchOperation implements UIViewOperationQueue.UIOperation {
private final int mReactTag; private final int mReactTag;
private final float mTargetX; private final float mTargetX;
@ -373,7 +374,7 @@ import javax.annotation.Nullable;
* Used to delay view manager command dispatch until after the view hierarchy is updated. * Used to delay view manager command dispatch until after the view hierarchy is updated.
* Mirrors command operation dispatch, but is only used in Nodes for view manager commands. * Mirrors command operation dispatch, but is only used in Nodes for view manager commands.
*/ */
public final class ViewManagerCommand implements UIOperation { public final class ViewManagerCommand implements UIViewOperationQueue.UIOperation {
private final int mReactTag; private final int mReactTag;
private final int mCommand; private final int mCommand;
@ -468,7 +469,7 @@ import javax.annotation.Nullable;
return new ViewManagerCommand(reactTag, command, args); return new ViewManagerCommand(reactTag, command, args);
} }
/* package */ void enqueueFlatUIOperation(UIOperation operation) { /* package */ void enqueueFlatUIOperation(UIViewOperationQueue.UIOperation operation) {
enqueueUIOperation(operation); enqueueUIOperation(operation);
} }

View File

@ -3,6 +3,7 @@ include_defs("//ReactAndroid/DEFS")
android_library( android_library(
name = "modal", name = "modal",
srcs = glob(["*.java"]), srcs = glob(["*.java"]),
required_for_source_only_abi = True,
visibility = [ visibility = [
"PUBLIC", "PUBLIC",
], ],

View File

@ -3,6 +3,7 @@ include_defs("//ReactAndroid/DEFS")
android_library( android_library(
name = "text", name = "text",
srcs = glob(["*.java"]), srcs = glob(["*.java"]),
required_for_source_only_abi = True,
visibility = [ visibility = [
"PUBLIC", "PUBLIC",
], ],

View File

@ -6,6 +6,7 @@ android_library(
provided_deps = [ provided_deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"), react_native_dep("third-party/android/support/v4:lib-support-v4"),
], ],
required_for_source_only_abi = True,
visibility = [ visibility = [
"PUBLIC", "PUBLIC",
], ],

View File

@ -6,6 +6,7 @@ android_library(
provided_deps = [ provided_deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"), react_native_dep("third-party/android/support/v4:lib-support-v4"),
], ],
required_for_source_only_abi = True,
visibility = [ visibility = [
"PUBLIC", "PUBLIC",
], ],