Add option to allow debugging Android services as well (#4631)
Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/4631 In React Native for VR we use `FlipperUtils.shouldEnableFlipper()` to determine whether Flipper should be enabled for the given app build. The problem is that some of our apps are legitimately running as services (e.g. `com.oculus.explore:explore`), so the check added inside Flipper in D5126205 which only enables Flipper for "main application's process". This diff adds an ability to relax this requirement (as we do want to do it for the RN VR applications) Reviewed By: passy Differential Revision: D44511667 fbshipit-source-id: 673912b204391799a9e8821b737681d1f44bd6a8
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2a52656d0b
commit
aa6f04815b
@@ -16,14 +16,19 @@ public final class FlipperUtils {
|
||||
|
||||
private FlipperUtils() {}
|
||||
|
||||
public static boolean shouldEnableFlipper(final Context context) {
|
||||
public static boolean shouldEnableFlipper(
|
||||
final Context context, final boolean allowDebuggingServices) {
|
||||
return (BuildConfig.IS_INTERNAL_BUILD || BuildConfig.LOAD_FLIPPER_EXPLICIT)
|
||||
&& !isEndToEndTest()
|
||||
&& isMainProcess(context)
|
||||
&& (allowDebuggingServices || isMainProcess(context))
|
||||
// Flipper has issue with ASAN build. They cannot be concurrently enabled.
|
||||
&& !BuildConfig.IS_ASAN_BUILD;
|
||||
}
|
||||
|
||||
public static boolean shouldEnableFlipper(final Context context) {
|
||||
return shouldEnableFlipper(context, false);
|
||||
}
|
||||
|
||||
private static boolean isEndToEndTest() {
|
||||
final String value = System.getenv("BUDDY_SONAR_DISABLED");
|
||||
if (value == null || value.length() == 0) {
|
||||
|
||||
Reference in New Issue
Block a user