Use AndroidX GuardedBy annotation in favor of Javax GuardedBy annotation

Summary: Use AndroidX GuardedBy annotation in favor of Javax GuardedBy annotation

Reviewed By: ejanzer

Differential Revision: D16234167

fbshipit-source-id: 7f818d20b332a866926f80275b4c8a7489d4c6d3
This commit is contained in:
David Vacca 2019-07-12 18:46:53 -07:00 коммит произвёл Facebook Github Bot
Родитель 9645328606
Коммит 1914d9a4c0
9 изменённых файлов: 10 добавлений и 8 удалений

Просмотреть файл

@ -7,9 +7,9 @@
package com.facebook.react.uiapp;
import android.os.Bundle;
import androidx.annotation.Nullable;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import javax.annotation.Nullable;
public class RNTesterActivity extends ReactActivity {
public static class RNTesterActivityDelegate extends ReactActivityDelegate {

Просмотреть файл

@ -6,9 +6,9 @@
*/
package com.facebook.jni;
import androidx.annotation.Nullable;
import com.facebook.proguard.annotations.DoNotStrip;
import java.util.Iterator;
import javax.annotation.Nullable;
/**
* To iterate over an Iterator from C++ requires two calls per entry: hasNext() and next(). This

Просмотреть файл

@ -6,10 +6,10 @@
*/
package com.facebook.jni;
import androidx.annotation.Nullable;
import com.facebook.proguard.annotations.DoNotStrip;
import java.util.Iterator;
import java.util.Map;
import javax.annotation.Nullable;
/**
* To iterate over a Map from C++ requires four calls per entry: hasNext(), next(), getKey(),

Просмотреть файл

@ -5,7 +5,7 @@
package com.facebook.react.bridge;
import javax.annotation.concurrent.GuardedBy;
import androidx.annotation.GuardedBy;
/**
* Wrapper for JavaScriptContext native pointer. CatalystInstanceImpl creates this on demand, and

Просмотреть файл

@ -10,6 +10,7 @@ import static com.facebook.react.bridge.ReactMarkerConstants.CREATE_MODULE_END;
import static com.facebook.react.bridge.ReactMarkerConstants.CREATE_MODULE_START;
import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_JAVA_BRIDGE;
import androidx.annotation.GuardedBy;
import androidx.annotation.Nullable;
import com.facebook.debug.holder.PrinterHolder;
import com.facebook.debug.tags.ReactDebugOverlayTags;
@ -19,7 +20,6 @@ import com.facebook.react.module.model.ReactModuleInfo;
import com.facebook.react.turbomodule.core.interfaces.TurboModule;
import com.facebook.systrace.SystraceMessage;
import java.util.concurrent.atomic.AtomicInteger;
import javax.annotation.concurrent.GuardedBy;
import javax.inject.Provider;
/**

Просмотреть файл

@ -6,13 +6,13 @@
*/
package com.facebook.react.modules.core;
import androidx.annotation.GuardedBy;
import androidx.annotation.Nullable;
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 java.util.ArrayDeque;
import javax.annotation.concurrent.GuardedBy;
/**
* A simple wrapper around Choreographer that allows us to control the order certain callbacks are

Просмотреть файл

@ -8,6 +8,7 @@ package com.facebook.react.uimanager;
import android.os.SystemClock;
import android.view.View;
import androidx.annotation.GuardedBy;
import androidx.annotation.Nullable;
import com.facebook.common.logging.FLog;
import com.facebook.react.bridge.Callback;
@ -27,7 +28,6 @@ import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.concurrent.GuardedBy;
/**
* This class acts as a buffer for command executed on {@link NativeViewHierarchyManager}. It expose

Просмотреть файл

@ -3,10 +3,12 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
rn_android_library(
name = "util",
srcs = glob(["*.java"]),
is_androidx = True,
visibility = [
"PUBLIC",
],
deps = [
react_native_dep("third-party/android/androidx:annotation"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_target("res:uimanager"),
],

Просмотреть файл

@ -7,6 +7,7 @@ package com.facebook.react.uimanager.util;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.Nullable;
import com.facebook.react.R;
import java.util.ArrayList;
import java.util.HashMap;
@ -14,7 +15,6 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.annotation.Nullable;
/** Finds views in React Native view hierarchies */
public class ReactFindViewUtil {