From 2c09c06a4d6fafe77fca64763c0201c0eba31e4b Mon Sep 17 00:00:00 2001 From: Joshua Gross Date: Mon, 11 Feb 2019 16:36:27 -0800 Subject: [PATCH] Enable support for using new MobileConfigNativeModule in RN Core/Fabric C++ Summary: Enable support for using new MobileConfigNativeModule in RN Core/Fabric C++. Hack will be removed as part of T40273916 once MobileConfigNativeModule has rolled out to 100% of users and FbReactMobileConfigModule has been removed. Reviewed By: mdvacca Differential Revision: D14015962 fbshipit-source-id: 1b8ff0fb447040393a25fd03d9fb868877228ecc --- .../react/fabric/ReactNativeConfig.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/ReactNativeConfig.java b/ReactAndroid/src/main/java/com/facebook/react/fabric/ReactNativeConfig.java index ae180b5fb5e..d837df5c122 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/ReactNativeConfig.java +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/ReactNativeConfig.java @@ -8,8 +8,31 @@ package com.facebook.react.fabric; // This is a wrapper for the ReactNativeConfig object in C++ public interface ReactNativeConfig { + /** + * Get a boolean param by string name. Default should be false. + * + * @param param The string name of the parameter being requested. + */ boolean getBool(String param); + + /** + * Get an integer param by string name. Default should be 0. + * + * @param param The string name of the parameter being requested. + */ int getInt64(String param); + + /** + * Get a string param by string name. Default should be "", empty string. + * + * @param param The string name of the parameter being requested. + */ String getString(String param); + + /** + * Get a double param by string name. Default should be 0. + * + * @param param The string name of the parameter being requested. + */ double getDouble(String param); }