From 35bbb959454afec6df06ae56cdaff3148360dbe5 Mon Sep 17 00:00:00 2001 From: Alan Hughes Date: Tue, 15 Oct 2024 13:59:39 +0100 Subject: [PATCH] Update devInternalSettings --- .../facebook/react/devsupport/DevInternalSettings.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 44ca5cdc5ee8dd..6e019b3e05d9f0 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 @@ -22,7 +22,7 @@ import com.facebook.react.packagerconnection.PackagerConnectionSettings * [com.facebook.react.devsupport]. For accessing some of the settings by external modules this * class implements an external interface [DeveloperSettings]. */ -internal class DevInternalSettings(applicationContext: Context, private val listener: Listener?) : +public class DevInternalSettings(applicationContext: Context, private val listener: Listener?) : DeveloperSettings, OnSharedPreferenceChangeListener { private val preferences: SharedPreferences = PreferenceManager.getDefaultSharedPreferences(applicationContext) @@ -86,7 +86,7 @@ internal class DevInternalSettings(applicationContext: Context, private val list override var isStartSamplingProfilerOnInit: Boolean = false // Not supported. - override fun addMenuItem(title: String) = Unit + override fun addMenuItem(title: String): Unit = Unit override var isHotModuleReplacementEnabled: Boolean get() = preferences.getBoolean(PREFS_HOT_MODULE_REPLACEMENT_KEY, true) @@ -94,11 +94,11 @@ internal class DevInternalSettings(applicationContext: Context, private val list preferences.edit().putBoolean(PREFS_HOT_MODULE_REPLACEMENT_KEY, enabled).apply() } - interface Listener { - fun onInternalSettingsChanged() + public interface Listener { + public fun onInternalSettingsChanged() } - companion object { + public companion object { private const val PREFS_FPS_DEBUG_KEY = "fps_debug" private const val PREFS_JS_DEV_MODE_DEBUG_KEY = "js_dev_mode_debug" private const val PREFS_JS_MINIFY_DEBUG_KEY = "js_minify_debug"