From 52237838dc65fd97ec5498e2eac268808bd7fa9a Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Mon, 15 Jul 2024 12:16:33 -0700 Subject: [PATCH] Deprecate DeveloperSettings.isStartSamplingProfilerOnInit (#45442) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/45442 This deprecates also `DeveloperSettings.isStartSamplingProfilerOnInit` so we can remove it in a future version of React Native. This field is unused so you should not be using it at all. Changelog: [Android] [Changed] - Deprecate DeveloperSettings.isStartSamplingProfilerOnInit Reviewed By: blakef Differential Revision: D59757500 fbshipit-source-id: dc879ba46f2f937e5f259a4101646c2f060db548 --- .../java/com/facebook/react/devsupport/DevInternalSettings.kt | 3 ++- .../react/modules/debug/interfaces/DeveloperSettings.kt | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevInternalSettings.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevInternalSettings.kt index acc3bcb945a..4b50df0aa2b 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevInternalSettings.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevInternalSettings.kt @@ -81,7 +81,8 @@ internal class DevInternalSettings(applicationContext: Context, private val list preferences.edit().putBoolean(PREFS_REMOTE_JS_DEBUG_KEY, value).apply() } - @Deprecated("Legacy sampling profiler is no longer supported") + @Deprecated( + "Legacy sampling profiler is no longer supported - This field will be removed in React Native 0.77") override var isStartSamplingProfilerOnInit: Boolean = false // Not supported. diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/debug/interfaces/DeveloperSettings.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/debug/interfaces/DeveloperSettings.kt index 37ab1f1a1b0..fe91cec11a4 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/debug/interfaces/DeveloperSettings.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/debug/interfaces/DeveloperSettings.kt @@ -36,6 +36,8 @@ public interface DeveloperSettings { public var isRemoteJSDebugEnabled: Boolean /** Whether Start Sampling Profiler on App Start is enabled. */ + @Deprecated( + "Legacy sampling profiler is no longer supported - This field will be removed in React Native 0.77") public var isStartSamplingProfilerOnInit: Boolean /** Whether HMR is enabled. */