Migrate Nullable and NonNull annotations to AndroidX

Summary:
This diff migrates the usages Nullable and NonNull annotations to AndroidX instead of javax.

The purpose of this change is to bring consistency in the annotations used by the core of RN

Reviewed By: makovkastar

Differential Revision: D16054504

fbshipit-source-id: 21d888854da088d2a14615a90d4dc058e5286b91
This commit is contained in:
David Vacca
2019-07-11 16:23:29 -07:00
committed by Facebook Github Bot
parent 96318e438f
commit aa5edca0e2
253 changed files with 432 additions and 384 deletions
@@ -7,6 +7,7 @@
package com.facebook.react.modules.debug;
import android.widget.Toast;
import androidx.annotation.Nullable;
import com.facebook.common.logging.FLog;
import com.facebook.react.bridge.JSApplicationCausedNativeException;
import com.facebook.react.bridge.ReactApplicationContext;
@@ -16,7 +17,6 @@ import com.facebook.react.common.ReactConstants;
import com.facebook.react.module.annotations.ReactModule;
import com.facebook.react.modules.debug.interfaces.DeveloperSettings;
import java.util.Locale;
import javax.annotation.Nullable;
/**
* Module that records debug information during transitions (animated navigation events such as
@@ -3,10 +3,12 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
rn_android_library(
name = "debug",
srcs = glob(["*.java"]),
is_androidx = True,
visibility = [
"PUBLIC",
],
deps = [
react_native_dep("third-party/android/androidx:annotation"),
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"),
@@ -6,6 +6,7 @@
*/
package com.facebook.react.modules.debug;
import androidx.annotation.Nullable;
import com.facebook.infer.annotation.Assertions;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.bridge.UiThreadUtil;
@@ -13,7 +14,6 @@ import com.facebook.react.modules.core.ChoreographerCompat;
import com.facebook.react.uimanager.UIManagerModule;
import java.util.Map;
import java.util.TreeMap;
import javax.annotation.Nullable;
/**
* Each time a frame is drawn, records whether it should have expected any more callbacks since the
@@ -6,13 +6,13 @@
*/
package com.facebook.react.modules.debug;
import androidx.annotation.Nullable;
import com.facebook.infer.annotation.Assertions;
import com.facebook.react.bridge.BaseJavaModule;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.module.annotations.ReactModule;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Nullable;
/**
* Module that exposes the URL to the source code map (used for exception stack trace parsing) to JS