creating a flag to explicitly load flipper
Summary: This change will allow loading flipper not only internal build but also in builds that explicitly turn on LOAD_FLIPPER_EXPLICIT in build config Reviewed By: timur-valiev Differential Revision: D25369245 fbshipit-source-id: 9f8e5c7033aa4ded6ce7bc8cc5b5c252ba65692b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
08b5644253
commit
eb475e7550
@@ -27,7 +27,7 @@ public final class AndroidFlipperClient {
|
||||
|
||||
public static synchronized FlipperClient getInstance(Context context) {
|
||||
if (!sIsInitialized) {
|
||||
if (!BuildConfig.IS_INTERNAL_BUILD) {
|
||||
if (!(BuildConfig.IS_INTERNAL_BUILD || BuildConfig.LOAD_FLIPPER_EXPLICIT)) {
|
||||
Log.e("Flipper", "Attempted to initialize in non-internal build");
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import com.facebook.soloader.SoLoader;
|
||||
@DoNotStrip
|
||||
class EventBase extends HybridClassBase {
|
||||
static {
|
||||
if (BuildConfig.IS_INTERNAL_BUILD) {
|
||||
if (BuildConfig.IS_INTERNAL_BUILD || BuildConfig.LOAD_FLIPPER_EXPLICIT) {
|
||||
SoLoader.loadLibrary("flipper");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import javax.annotation.Nullable;
|
||||
@DoNotStrip
|
||||
class FlipperClientImpl implements FlipperClient {
|
||||
static {
|
||||
if (BuildConfig.IS_INTERNAL_BUILD) {
|
||||
if (BuildConfig.IS_INTERNAL_BUILD || BuildConfig.LOAD_FLIPPER_EXPLICIT) {
|
||||
SoLoader.loadLibrary("flipper");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import com.facebook.soloader.SoLoader;
|
||||
@DoNotStrip
|
||||
class FlipperConnectionImpl implements FlipperConnection {
|
||||
static {
|
||||
if (BuildConfig.IS_INTERNAL_BUILD) {
|
||||
if (BuildConfig.IS_INTERNAL_BUILD || BuildConfig.LOAD_FLIPPER_EXPLICIT) {
|
||||
SoLoader.loadLibrary("flipper");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ import com.facebook.soloader.SoLoader;
|
||||
@DoNotStrip
|
||||
class FlipperResponderImpl implements FlipperResponder {
|
||||
static {
|
||||
if (BuildConfig.IS_INTERNAL_BUILD) {
|
||||
if (BuildConfig.IS_INTERNAL_BUILD || BuildConfig.LOAD_FLIPPER_EXPLICIT) {
|
||||
SoLoader.loadLibrary("flipper");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ public final class FlipperUtils {
|
||||
private FlipperUtils() {}
|
||||
|
||||
public static boolean shouldEnableFlipper(final Context context) {
|
||||
return BuildConfig.IS_INTERNAL_BUILD
|
||||
return (BuildConfig.IS_INTERNAL_BUILD || BuildConfig.LOAD_FLIPPER_EXPLICIT)
|
||||
&& !isEndToEndTest()
|
||||
&& isMainProcess(context)
|
||||
// Flipper has issue with ASAN build. They cannot be concurrently enabled.
|
||||
|
||||
Reference in New Issue
Block a user