From 2869117127292b50e92ecbcf8b8edc6b18ed77c5 Mon Sep 17 00:00:00 2001 From: Emily Janzer Date: Tue, 11 Sep 2018 16:25:55 -0700 Subject: [PATCH] Remove @CountEnum from OSS classes Summary: Back out D9614432 and partially revert D9623235 to unbreak OSS. Reviewed By: hramos Differential Revision: D9779548 fbshipit-source-id: 931c4987ed5acbae3790c42717662fed77599335 --- ReactAndroid/src/main/java/com/facebook/react/bridge/BUCK | 1 - .../src/main/java/com/facebook/react/bridge/JsonWriter.java | 3 --- .../main/java/com/facebook/react/bridge/MemoryPressure.java | 3 --- .../java/com/facebook/react/bridge/ReactMarkerConstants.java | 3 --- .../facebook/react/bridge/queue/MessageQueueThreadSpec.java | 3 --- ReactAndroid/src/main/java/com/facebook/react/common/BUCK | 1 - .../main/java/com/facebook/react/common/LifecycleState.java | 3 --- .../src/main/java/com/facebook/react/modules/core/BUCK | 1 - .../com/facebook/react/modules/core/ReactChoreographer.java | 2 -- .../src/main/java/com/facebook/react/modules/datepicker/BUCK | 1 - .../com/facebook/react/modules/datepicker/DatePickerMode.java | 3 --- .../src/main/java/com/facebook/react/modules/timepicker/BUCK | 1 - .../com/facebook/react/modules/timepicker/TimePickerMode.java | 2 -- ReactAndroid/src/main/java/com/facebook/react/processing/BUCK | 1 - .../com/facebook/react/processing/ReactPropertyProcessor.java | 3 --- ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK | 1 - .../main/java/com/facebook/react/uimanager/PointerEvents.java | 3 --- .../com/facebook/react/uimanager/events/TouchEventType.java | 3 --- .../react/uimanager/layoutanimation/AnimatedPropertyType.java | 3 --- .../react/uimanager/layoutanimation/LayoutAnimationType.java | 3 --- .../src/main/java/com/facebook/react/views/image/BUCK | 1 - .../com/facebook/react/views/image/ImageResizeMethod.java | 3 --- .../src/main/java/com/facebook/react/views/scroll/BUCK | 1 - .../java/com/facebook/react/views/scroll/ScrollEventType.java | 3 --- ReactAndroid/src/main/java/com/facebook/react/views/view/BUCK | 1 - .../react/views/view/ReactViewBackgroundDrawable.java | 4 ---- 26 files changed, 57 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/bridge/BUCK b/ReactAndroid/src/main/java/com/facebook/react/bridge/BUCK index 907de5040..3f14185bf 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/bridge/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/bridge/BUCK @@ -31,7 +31,6 @@ rn_android_library( react_native_dep("third-party/android/support-annotations:android-support-annotations"), react_native_dep("java/com/facebook/debug/debugoverlay/model:model"), react_native_dep("java/com/facebook/systrace:systrace"), - react_native_dep("java/com/facebook/thecount:thecount"), react_native_dep("libraries/fbcore/src/main/java/com/facebook/common/logging:logging"), react_native_dep("libraries/soloader/java/com/facebook/soloader:soloader"), react_native_dep("third-party/java/infer-annotations:infer-annotations"), diff --git a/ReactAndroid/src/main/java/com/facebook/react/bridge/JsonWriter.java b/ReactAndroid/src/main/java/com/facebook/react/bridge/JsonWriter.java index 47b5fdc34..924b79156 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/bridge/JsonWriter.java +++ b/ReactAndroid/src/main/java/com/facebook/react/bridge/JsonWriter.java @@ -13,8 +13,6 @@ import java.io.Writer; import java.util.ArrayDeque; import java.util.Deque; -import com.facebook.thecount.api.CountEnum; - /** * Simple Json generator that does no validation. */ @@ -209,7 +207,6 @@ public class JsonWriter implements Closeable { mScopes.push(scope); } - @CountEnum private enum Scope { EMPTY_OBJECT, OBJECT, diff --git a/ReactAndroid/src/main/java/com/facebook/react/bridge/MemoryPressure.java b/ReactAndroid/src/main/java/com/facebook/react/bridge/MemoryPressure.java index 299780d4a..315ad7bc2 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/bridge/MemoryPressure.java +++ b/ReactAndroid/src/main/java/com/facebook/react/bridge/MemoryPressure.java @@ -5,9 +5,6 @@ package com.facebook.react.bridge; -import com.facebook.thecount.api.CountEnum; - -@CountEnum public enum MemoryPressure { UI_HIDDEN, MODERATE, diff --git a/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactMarkerConstants.java b/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactMarkerConstants.java index 098a41f90..12fa70f5b 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactMarkerConstants.java +++ b/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactMarkerConstants.java @@ -5,12 +5,9 @@ package com.facebook.react.bridge; -import com.facebook.thecount.api.CountEnum; - /** * Constants used by ReactMarker. */ -@CountEnum public enum ReactMarkerConstants { CREATE_REACT_CONTEXT_START, CREATE_REACT_CONTEXT_END, diff --git a/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThreadSpec.java b/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThreadSpec.java index 0c921698f..bc48673a1 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThreadSpec.java +++ b/ReactAndroid/src/main/java/com/facebook/react/bridge/queue/MessageQueueThreadSpec.java @@ -7,8 +7,6 @@ package com.facebook.react.bridge.queue; -import com.facebook.thecount.api.CountEnum; - /** * Spec for creating a MessageQueueThread. */ @@ -20,7 +18,6 @@ public class MessageQueueThreadSpec { // The Thread constructor interprets zero the same as not specifying a stack size public static final long DEFAULT_STACK_SIZE_BYTES = 0; - @CountEnum protected static enum ThreadType { MAIN_UI, NEW_BACKGROUND, diff --git a/ReactAndroid/src/main/java/com/facebook/react/common/BUCK b/ReactAndroid/src/main/java/com/facebook/react/common/BUCK index 74874f3ac..6a6a5452b 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/common/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/common/BUCK @@ -19,7 +19,6 @@ rn_android_library( ], deps = [ ":build_config", - react_native_dep("java/com/facebook/thecount:thecount"), react_native_dep("libraries/fbcore/src/main/java/com/facebook/common/logging:logging"), react_native_dep("third-party/java/infer-annotations:infer-annotations"), react_native_dep("third-party/java/jsr-305:jsr-305"), diff --git a/ReactAndroid/src/main/java/com/facebook/react/common/LifecycleState.java b/ReactAndroid/src/main/java/com/facebook/react/common/LifecycleState.java index 38ae1948c..656d77d96 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/common/LifecycleState.java +++ b/ReactAndroid/src/main/java/com/facebook/react/common/LifecycleState.java @@ -7,8 +7,6 @@ package com.facebook.react.common; -import com.facebook.thecount.api.CountEnum; - /** * Lifecycle state for an Activity. The state right after pause and right before resume are the * basically the same so this enum is in terms of the forward lifecycle progression (onResume, etc). @@ -20,7 +18,6 @@ import com.facebook.thecount.api.CountEnum; * STARTED, * RESUMED */ -@CountEnum public enum LifecycleState { BEFORE_CREATE, BEFORE_RESUME, diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/core/BUCK b/ReactAndroid/src/main/java/com/facebook/react/modules/core/BUCK index 0c786291e..57580c41a 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/core/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/core/BUCK @@ -7,7 +7,6 @@ rn_android_library( "PUBLIC", ], deps = [ - react_native_dep("java/com/facebook/thecount:thecount"), react_native_dep("libraries/fbcore/src/main/java/com/facebook/common/logging:logging"), react_native_dep("third-party/java/infer-annotations:infer-annotations"), react_native_dep("third-party/java/jsr-305:jsr-305"), diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/core/ReactChoreographer.java b/ReactAndroid/src/main/java/com/facebook/react/modules/core/ReactChoreographer.java index e4cf8d1ec..05aa36aa9 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/core/ReactChoreographer.java +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/core/ReactChoreographer.java @@ -13,7 +13,6 @@ import com.facebook.common.logging.FLog; import com.facebook.infer.annotation.Assertions; import com.facebook.react.bridge.UiThreadUtil; import com.facebook.react.common.ReactConstants; -import com.facebook.thecount.api.CountEnum; /** * A simple wrapper around Choreographer that allows us to control the order certain callbacks @@ -22,7 +21,6 @@ import com.facebook.thecount.api.CountEnum; */ public class ReactChoreographer { - @CountEnum public enum CallbackType { /** diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/datepicker/BUCK b/ReactAndroid/src/main/java/com/facebook/react/modules/datepicker/BUCK index 69efcf59c..edb587a8d 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/datepicker/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/datepicker/BUCK @@ -10,7 +10,6 @@ rn_android_library( "PUBLIC", ], deps = [ - react_native_dep("java/com/facebook/thecount:thecount"), react_native_dep("third-party/java/infer-annotations:infer-annotations"), react_native_dep("third-party/java/jsr-305:jsr-305"), react_native_target("java/com/facebook/react/bridge:bridge"), diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/datepicker/DatePickerMode.java b/ReactAndroid/src/main/java/com/facebook/react/modules/datepicker/DatePickerMode.java index d70c96d27..61dc5c620 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/datepicker/DatePickerMode.java +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/datepicker/DatePickerMode.java @@ -7,12 +7,9 @@ package com.facebook.react.modules.datepicker; -import com.facebook.thecount.api.CountEnum; - /** * Date picker modes */ -@CountEnum public enum DatePickerMode { CALENDAR, SPINNER, diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/timepicker/BUCK b/ReactAndroid/src/main/java/com/facebook/react/modules/timepicker/BUCK index 80b5d878b..51685f7d9 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/timepicker/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/timepicker/BUCK @@ -10,7 +10,6 @@ rn_android_library( "PUBLIC", ], deps = [ - react_native_dep("java/com/facebook/thecount:thecount"), react_native_dep("third-party/java/infer-annotations:infer-annotations"), react_native_dep("third-party/java/jsr-305:jsr-305"), react_native_target("java/com/facebook/react/bridge:bridge"), diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/timepicker/TimePickerMode.java b/ReactAndroid/src/main/java/com/facebook/react/modules/timepicker/TimePickerMode.java index 5400c4f75..2b8243ef8 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/timepicker/TimePickerMode.java +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/timepicker/TimePickerMode.java @@ -7,9 +7,7 @@ package com.facebook.react.modules.timepicker; -import com.facebook.thecount.api.CountEnum; -@CountEnum public enum TimePickerMode { CLOCK, SPINNER, diff --git a/ReactAndroid/src/main/java/com/facebook/react/processing/BUCK b/ReactAndroid/src/main/java/com/facebook/react/processing/BUCK index 19e1a2c4d..f88f4fe67 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/processing/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/processing/BUCK @@ -18,7 +18,6 @@ rn_java_library( source = "7", target = "7", deps = [ - react_native_dep("java/com/facebook/thecount:thecount"), react_native_dep("third-party/java/infer-annotations:infer-annotations"), react_native_dep("third-party/java/javapoet:javapoet"), react_native_dep("third-party/java/jsr-305:jsr-305"), diff --git a/ReactAndroid/src/main/java/com/facebook/react/processing/ReactPropertyProcessor.java b/ReactAndroid/src/main/java/com/facebook/react/processing/ReactPropertyProcessor.java index 245acc059..f9742ac08 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/processing/ReactPropertyProcessor.java +++ b/ReactAndroid/src/main/java/com/facebook/react/processing/ReactPropertyProcessor.java @@ -53,8 +53,6 @@ import javax.lang.model.type.TypeMirror; import javax.lang.model.util.Elements; import javax.lang.model.util.Types; -import com.facebook.thecount.api.CountEnum; - /** * This annotation processor crawls subclasses of ReactShadowNode and ViewManager and finds their * exported properties with the @ReactProp or @ReactGroupProp annotation. It generates a class @@ -551,7 +549,6 @@ public class ReactPropertyProcessor extends AbstractProcessor { } } - @CountEnum private enum SettableType { VIEW_MANAGER, SHADOW_NODE diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK index 08635f986..262d60c93 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK @@ -23,7 +23,6 @@ rn_android_library( YOGA_TARGET, ":DisplayMetrics", react_native_dep("java/com/facebook/systrace:systrace"), - react_native_dep("java/com/facebook/thecount:thecount"), react_native_dep("libraries/fbcore/src/main/java/com/facebook/common/logging:logging"), react_native_dep("third-party/java/infer-annotations:infer-annotations"), react_native_target("java/com/facebook/debug/tags:tags"), diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/PointerEvents.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/PointerEvents.java index 0008a8796..0be5d8f6e 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/PointerEvents.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/PointerEvents.java @@ -7,13 +7,10 @@ package com.facebook.react.uimanager; -import com.facebook.thecount.api.CountEnum; - /** * Possible values for pointer events that a view and its descendants should receive. See * https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events for more info. */ -@CountEnum public enum PointerEvents { /** diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/TouchEventType.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/TouchEventType.java index 50686e648..605e282dc 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/TouchEventType.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/TouchEventType.java @@ -7,12 +7,9 @@ package com.facebook.react.uimanager.events; -import com.facebook.thecount.api.CountEnum; - /** * Touch event types that JS module RCTEventEmitter can understand */ -@CountEnum public enum TouchEventType { START("topTouchStart"), END("topTouchEnd"), diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/AnimatedPropertyType.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/AnimatedPropertyType.java index 18f4a7f25..2b4938a5c 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/AnimatedPropertyType.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/AnimatedPropertyType.java @@ -5,13 +5,10 @@ package com.facebook.react.uimanager.layoutanimation; -import com.facebook.thecount.api.CountEnum; - /** * Enum representing the different view properties that can be used when animating layout for * view creation. */ -@CountEnum /* package */ enum AnimatedPropertyType { OPACITY("opacity"), SCALE_X("scaleX"), diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationType.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationType.java index 88cd95e0b..e0345f165 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationType.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutAnimationType.java @@ -5,12 +5,9 @@ package com.facebook.react.uimanager.layoutanimation; -import com.facebook.thecount.api.CountEnum; - /** * Enum representing the different animation type that can be specified in layout animation config. */ -@CountEnum /* package */ enum LayoutAnimationType { CREATE("create"), UPDATE("update"), diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/image/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/image/BUCK index f8ee672de..fe352c0f2 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/image/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/views/image/BUCK @@ -35,7 +35,6 @@ rn_android_library( ], deps = [ YOGA_TARGET, - react_native_dep("java/com/facebook/thecount:thecount"), react_native_dep("libraries/fresco/fresco-react-native:fbcore"), react_native_dep("libraries/fresco/fresco-react-native:fresco-drawee"), react_native_dep("libraries/fresco/fresco-react-native:fresco-react-native"), diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/image/ImageResizeMethod.java b/ReactAndroid/src/main/java/com/facebook/react/views/image/ImageResizeMethod.java index 5edf56f60..52edd6665 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/image/ImageResizeMethod.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/image/ImageResizeMethod.java @@ -7,9 +7,6 @@ package com.facebook.react.views.image; -import com.facebook.thecount.api.CountEnum; - -@CountEnum public enum ImageResizeMethod { AUTO, RESIZE, diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/BUCK index 2e3c2e32c..2a72452d0 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/BUCK @@ -11,7 +11,6 @@ rn_android_library( ], deps = [ YOGA_TARGET, - react_native_dep("java/com/facebook/thecount:thecount"), react_native_dep("third-party/java/infer-annotations:infer-annotations"), react_native_dep("third-party/java/jsr-305:jsr-305"), react_native_target("java/com/facebook/react/bridge:bridge"), diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ScrollEventType.java b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ScrollEventType.java index b7d1df15f..e5fd4dbea 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ScrollEventType.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ScrollEventType.java @@ -7,12 +7,9 @@ package com.facebook.react.views.scroll; -import com.facebook.thecount.api.CountEnum; - /** * Scroll event types that JS module RCTEventEmitter can understand */ -@CountEnum public enum ScrollEventType { BEGIN_DRAG("topScrollBeginDrag"), END_DRAG("topScrollEndDrag"), diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/view/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/view/BUCK index 7edb8a061..a7b4d74e8 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/view/BUCK +++ b/ReactAndroid/src/main/java/com/facebook/react/views/view/BUCK @@ -8,7 +8,6 @@ rn_android_library( ], deps = [ YOGA_TARGET, - react_native_dep("java/com/facebook/thecount:thecount"), react_native_dep("third-party/java/infer-annotations:infer-annotations"), react_native_dep("third-party/java/jsr-305:jsr-305"), react_native_target("java/com/facebook/react/bridge:bridge"), diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundDrawable.java b/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundDrawable.java index 270c421b5..d50e00e45 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundDrawable.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundDrawable.java @@ -27,13 +27,11 @@ import com.facebook.react.common.annotations.VisibleForTesting; import com.facebook.react.modules.i18nmanager.I18nUtil; import com.facebook.react.uimanager.FloatUtil; import com.facebook.react.uimanager.Spacing; -import com.facebook.thecount.api.CountEnum; import com.facebook.yoga.YogaConstants; import java.util.Arrays; import java.util.Locale; import javax.annotation.Nullable; - /** * A subclass of {@link Drawable} used for background of {@link ReactViewGroup}. It supports drawing * background color and borders (including rounded borders) by providing a react friendly API @@ -55,7 +53,6 @@ public class ReactViewBackgroundDrawable extends Drawable { // 0 == 0x00000000, all bits set to 0. private static final int ALL_BITS_UNSET = 0; - private static enum BorderStyle { SOLID, DASHED, @@ -113,7 +110,6 @@ public class ReactViewBackgroundDrawable extends Drawable { private final Context mContext; private int mLayoutDirection; - @CountEnum public enum BorderRadiusLocation { TOP_LEFT, TOP_RIGHT,