mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add @DoNotStrip to JavaScriptModule interfaces
Summary: Adding `DoNotStrip` to all the interfaces that extend `JavaScriptModule` to ensure they don't get stripped from release builds (because they have no Java implementors). Reviewed By: emma0303 Differential Revision: D17534719 fbshipit-source-id: a793764caf17040bf1252be7ec4c72176d6989d4
This commit is contained in:
committed by
Facebook Github Bot
parent
990c9ea5ec
commit
6464ef0a92
+2
@@ -9,6 +9,7 @@ package com.facebook.react.modules.core;
|
||||
import android.net.Uri;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
import com.facebook.react.bridge.Arguments;
|
||||
import com.facebook.react.bridge.JavaScriptModule;
|
||||
import com.facebook.react.bridge.ReactApplicationContext;
|
||||
@@ -23,6 +24,7 @@ import com.facebook.react.module.annotations.ReactModule;
|
||||
public class DeviceEventManagerModule extends ReactContextBaseJavaModule {
|
||||
public static final String NAME = "DeviceEventManager";
|
||||
|
||||
@DoNotStrip
|
||||
public interface RCTDeviceEventEmitter extends JavaScriptModule {
|
||||
void emit(@NonNull String eventName, @Nullable Object data);
|
||||
}
|
||||
|
||||
@@ -6,9 +6,11 @@
|
||||
*/
|
||||
package com.facebook.react.modules.core;
|
||||
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
import com.facebook.react.bridge.JavaScriptModule;
|
||||
import com.facebook.react.bridge.WritableArray;
|
||||
|
||||
@DoNotStrip
|
||||
public interface JSTimers extends JavaScriptModule {
|
||||
void callTimers(WritableArray timerIDs);
|
||||
|
||||
|
||||
+2
@@ -7,9 +7,11 @@
|
||||
package com.facebook.react.modules.core;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
import com.facebook.react.bridge.JavaScriptModule;
|
||||
|
||||
/** Module that handles global application events. */
|
||||
@DoNotStrip
|
||||
public interface RCTNativeAppEventEmitter extends JavaScriptModule {
|
||||
void emit(String eventName, @Nullable Object data);
|
||||
}
|
||||
|
||||
@@ -7,10 +7,12 @@
|
||||
package com.facebook.react.uimanager.events;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
import com.facebook.react.bridge.JavaScriptModule;
|
||||
import com.facebook.react.bridge.WritableArray;
|
||||
import com.facebook.react.bridge.WritableMap;
|
||||
|
||||
@DoNotStrip
|
||||
public interface RCTEventEmitter extends JavaScriptModule {
|
||||
void receiveEvent(int targetTag, String eventName, @Nullable WritableMap event);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user