From 1e6945e19e306bec6bfc77063e9760567b4b1a97 Mon Sep 17 00:00:00 2001 From: Oleksandr Melnykov Date: Mon, 31 Oct 2022 23:01:40 -0700 Subject: [PATCH] Back out "Add perftest dev support manager" Summary: Changelog: [Internal] Reviewed By: NickGerleman Differential Revision: D40879099 fbshipit-source-id: ff302819829aa21a1dd7c19c06ed8c29821ba815 --- .../DefaultDevSupportManagerFactory.java | 4 -- .../devsupport/PerftestDevSupportManager.java | 56 ------------------- 2 files changed, 60 deletions(-) delete mode 100644 ReactAndroid/src/main/java/com/facebook/react/devsupport/PerftestDevSupportManager.java diff --git a/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.java b/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.java index 2a55a36c5b0..97862539f42 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.java +++ b/ReactAndroid/src/main/java/com/facebook/react/devsupport/DefaultDevSupportManagerFactory.java @@ -10,7 +10,6 @@ package com.facebook.react.devsupport; import android.content.Context; import androidx.annotation.Nullable; import com.facebook.react.common.SurfaceDelegateFactory; -import com.facebook.react.common.build.ReactBuildConfig; import com.facebook.react.devsupport.interfaces.DevBundleDownloadListener; import com.facebook.react.devsupport.interfaces.DevSupportManager; import com.facebook.react.devsupport.interfaces.RedBoxHandler; @@ -62,9 +61,6 @@ public class DefaultDevSupportManagerFactory implements DevSupportManagerFactory if (!enableOnCreate) { return new DisabledDevSupportManager(); } - if (!ReactBuildConfig.DEBUG) { - return new PerftestDevSupportManager(applicationContext); - } try { // ProGuard is surprisingly smart in this case and will keep a class if it detects a call to // Class.forName() with a static string. So instead we generate a quasi-dynamic string to diff --git a/ReactAndroid/src/main/java/com/facebook/react/devsupport/PerftestDevSupportManager.java b/ReactAndroid/src/main/java/com/facebook/react/devsupport/PerftestDevSupportManager.java deleted file mode 100644 index 2be621fc38f..00000000000 --- a/ReactAndroid/src/main/java/com/facebook/react/devsupport/PerftestDevSupportManager.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -package com.facebook.react.devsupport; - -import android.content.Context; - -/** - * Interface for accessing and interacting with development features related to performance testing. - * Communication is enabled via the Inspector, but everything else is disabled. - */ -public final class PerftestDevSupportManager extends DisabledDevSupportManager { - private final DevServerHelper mDevServerHelper; - private final DevInternalSettings mDevSettings; - private final InspectorPackagerConnection.BundleStatus mBundleStatus; - - public PerftestDevSupportManager(Context applicationContext) { - mDevSettings = - new DevInternalSettings( - applicationContext, - new DevInternalSettings.Listener() { - @Override - public void onInternalSettingsChanged() {} - }); - mBundleStatus = new InspectorPackagerConnection.BundleStatus(); - mDevServerHelper = - new DevServerHelper( - mDevSettings, - applicationContext.getPackageName(), - new InspectorPackagerConnection.BundleStatusProvider() { - @Override - public InspectorPackagerConnection.BundleStatus getBundleStatus() { - return mBundleStatus; - } - }); - } - - @Override - public DevInternalSettings getDevSettings() { - return mDevSettings; - } - - @Override - public void startInspector() { - mDevServerHelper.openInspectorConnection(); - } - - @Override - public void stopInspector() { - mDevServerHelper.closeInspectorConnection(); - } -}