mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Protect methods from proguard
Summary: These methods were being striped from proguard, which causes release builds to instacrash Changelog: [Internal] Protect methods from Proguard Reviewed By: RSNara Differential Revision: D25314933 fbshipit-source-id: 173160eab953b7c24e02f5e6ef3bf335c1f85526
This commit is contained in:
committed by
Facebook GitHub Bot
parent
7f16ff8a05
commit
7008ffb663
@@ -10,12 +10,14 @@ package com.facebook.react.bridge;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcelable;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.proguard.annotations.DoNotStrip;
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.AbstractList;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@DoNotStrip
|
||||
public class Arguments {
|
||||
private static Object makeNativeObject(Object object) {
|
||||
if (object == null) {
|
||||
@@ -122,6 +124,7 @@ public class Arguments {
|
||||
* The best way to think of this is a way to generate a Java representation of a json object, from
|
||||
* Java types which have a natural representation in json.
|
||||
*/
|
||||
@DoNotStrip
|
||||
public static WritableNativeMap makeNativeMap(Map<String, Object> objects) {
|
||||
WritableNativeMap nativeMap = new WritableNativeMap();
|
||||
if (objects == null) {
|
||||
@@ -134,6 +137,7 @@ public class Arguments {
|
||||
}
|
||||
|
||||
/** Like the above, but takes a Bundle instead of a Map. */
|
||||
@DoNotStrip
|
||||
public static WritableNativeMap makeNativeMap(Bundle bundle) {
|
||||
WritableNativeMap nativeMap = new WritableNativeMap();
|
||||
if (bundle == null) {
|
||||
|
||||
Reference in New Issue
Block a user