Mark override and dangerouslyReset in ReactNativeFeatureFlags as JVM static (#42908)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42908

Changelog: [internal]

Just a small ergonomic improvement to do `ReactNativeFeatureFlags.override` instead of `ReactNativeFeatureFlags.INSTANCE.override` in Java.

We already did this for the methods to access the feature flags in the same class.

Reviewed By: rshest

Differential Revision: D53516254

fbshipit-source-id: cdaa90b3baae4f780a42a96ebb07de78bd968019
This commit is contained in:
Rubén Norte
2024-02-07 12:27:15 -08:00
committed by Facebook GitHub Bot
parent 85257a993f
commit d1e7caa1d4
2 changed files with 5 additions and 1 deletions
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<f5d5bb65068bb515d33da8bff665dfd2>>
* @generated SignedSource<<435993f24b4bdc9740491d5540232a9c>>
*/
/**
@@ -84,6 +84,7 @@ object ReactNativeFeatureFlags {
* })
* ```
*/
@JvmStatic
fun override(provider: ReactNativeFeatureFlagsProvider) = accessor.override(provider)
/**
@@ -95,6 +96,7 @@ object ReactNativeFeatureFlags {
* call `dangerouslyReset` after destroying the runtime and `override`
* again before initializing the new one.
*/
@JvmStatic
fun dangerouslyReset() {
// This is necessary when the accessor interops with C++ and we need to
// remove the overrides set there.
@@ -61,6 +61,7 @@ ${Object.entries(definitions.common)
* })
* \`\`\`
*/
@JvmStatic
fun override(provider: ReactNativeFeatureFlagsProvider) = accessor.override(provider)
/**
@@ -72,6 +73,7 @@ ${Object.entries(definitions.common)
* call \`dangerouslyReset\` after destroying the runtime and \`override\`
* again before initializing the new one.
*/
@JvmStatic
fun dangerouslyReset() {
// This is necessary when the accessor interops with C++ and we need to
// remove the overrides set there.