mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Introduce DefaultValuesReactNativeConfig constant
Summary: Introduce DefaultValuesReactNativeConfig constant that represents a ReactNativeConfig that always return default values I also use this constant in all the apps using fbaric that don't have a custom Mobile Config changelog: [internal] internal Reviewed By: RSNara Differential Revision: D34160478 fbshipit-source-id: 5730054fd4cc87e1fe5dc8247cc237194bf48981
This commit is contained in:
committed by
Facebook GitHub Bot
parent
189c2c8958
commit
5c9c901d0c
@@ -22,6 +22,30 @@ import com.facebook.proguard.annotations.DoNotStrip;
|
||||
*/
|
||||
@DoNotStrip
|
||||
public interface ReactNativeConfig {
|
||||
|
||||
public final ReactNativeConfig DefaultValuesReactNativeConfig =
|
||||
new ReactNativeConfig() {
|
||||
@Override
|
||||
public boolean getBool(@NonNull String param) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getInt64(@NonNull String param) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getString(@NonNull String param) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getDouble(@NonNull String param) {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Get a boolean param by string name. Default should be false.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user