Skip to content

Commit

Permalink
Use AndroidX GuardedBy annotation in favor of Javax GuardedBy annotation
Browse files Browse the repository at this point in the history
Summary: Use AndroidX GuardedBy annotation in favor of Javax GuardedBy annotation

Reviewed By: ejanzer

Differential Revision: D16234167

fbshipit-source-id: 7f818d20b332a866926f80275b4c8a7489d4c6d3
  • Loading branch information
mdvacca authored and facebook-github-bot committed Jul 13, 2019
1 parent 9645328 commit 1914d9a
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
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;
Expand All @@ -19,7 +20,6 @@
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;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

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;
Expand All @@ -27,7 +28,6 @@
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

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;
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 {
Expand Down

0 comments on commit 1914d9a

Please sign in to comment.