|
26 | 26 | import com.facebook.react.bridge.WritableNativeMap; |
27 | 27 | import com.facebook.react.uimanager.UIManagerModule; |
28 | 28 | import com.instabug.apm.InternalAPM; |
29 | | -import com.instabug.apm.configuration.cp.APMFeature; |
30 | 29 | import com.instabug.library.Feature; |
31 | 30 | import com.instabug.library.Instabug; |
32 | 31 | import com.instabug.library.InstabugColorTheme; |
|
35 | 34 | import com.instabug.library.LogLevel; |
36 | 35 | import com.instabug.library.ReproConfigurations; |
37 | 36 | import com.instabug.library.core.InstabugCore; |
| 37 | +import com.instabug.library.featuresflags.model.IBGFeatureFlag; |
38 | 38 | import com.instabug.library.internal.crossplatform.CoreFeature; |
39 | 39 | import com.instabug.library.internal.crossplatform.CoreFeaturesState; |
40 | 40 | import com.instabug.library.internal.crossplatform.FeaturesStateListener; |
41 | 41 | import com.instabug.library.internal.crossplatform.InternalCore; |
42 | | -import com.instabug.library.featuresflags.model.IBGFeatureFlag; |
43 | | -import com.instabug.library.internal.crossplatform.InternalCore; |
44 | 42 | import com.instabug.library.internal.crossplatform.OnFeaturesUpdatedListener; |
45 | 43 | import com.instabug.library.internal.module.InstabugLocale; |
46 | 44 | import com.instabug.library.invocation.InstabugInvocationEvent; |
47 | 45 | import com.instabug.library.logging.InstabugLog; |
48 | 46 | import com.instabug.library.model.NetworkLog; |
49 | 47 | import com.instabug.library.model.Report; |
50 | 48 | import com.instabug.library.ui.onboarding.WelcomeMessage; |
51 | | -import com.instabug.library.util.InstabugSDKLogger; |
52 | 49 | import com.instabug.reactlibrary.utils.ArrayUtil; |
53 | 50 | import com.instabug.reactlibrary.utils.EventEmitterModule; |
54 | 51 | import com.instabug.reactlibrary.utils.MainThreadHandler; |
55 | | - |
56 | 52 | import com.instabug.reactlibrary.utils.RNTouchedViewExtractor; |
57 | 53 |
|
58 | 54 | import org.json.JSONException; |
@@ -115,6 +111,7 @@ public void removeListeners(Integer count) { |
115 | 111 |
|
116 | 112 | /** |
117 | 113 | * Enables or disables Instabug functionality. |
| 114 | + * |
118 | 115 | * @param isEnabled A boolean to enable/disable Instabug. |
119 | 116 | */ |
120 | 117 | @ReactMethod |
@@ -1175,7 +1172,7 @@ public void invoke(@NonNull CoreFeaturesState featuresState) { |
1175 | 1172 | params.putBoolean("isW3ExternalTraceIDEnabled", featuresState.isW3CExternalTraceIdEnabled()); |
1176 | 1173 | params.putBoolean("isW3ExternalGeneratedHeaderEnabled", featuresState.isAttachingGeneratedHeaderEnabled()); |
1177 | 1174 | params.putBoolean("isW3CaughtHeaderEnabled", featuresState.isAttachingCapturedHeaderEnabled()); |
1178 | | - params.putInt("networkBodyLimit",featuresState.getNetworkLogCharLimit()); |
| 1175 | + params.putInt("networkBodyLimit", featuresState.getNetworkLogCharLimit()); |
1179 | 1176 |
|
1180 | 1177 | sendEvent(Constants.IBG_ON_FEATURE_FLAGS_UPDATE_RECEIVED_CALLBACK, params); |
1181 | 1178 | } |
@@ -1259,7 +1256,7 @@ public void run() { |
1259 | 1256 | * Map between the exported JS constant and the arg key in {@link ArgsRegistry}. |
1260 | 1257 | * The constant name and the arg key should match to be able to resolve the |
1261 | 1258 | * constant with its actual value from the {@link ArgsRegistry} maps. |
1262 | | - * |
| 1259 | + * <p> |
1263 | 1260 | * This is a workaround, because RN cannot resolve enums in the constants map. |
1264 | 1261 | */ |
1265 | 1262 | @Override |
@@ -1290,23 +1287,25 @@ public void invoke() { |
1290 | 1287 | } |
1291 | 1288 | }); |
1292 | 1289 | } |
| 1290 | + |
1293 | 1291 | /** |
1294 | | - * Enables or disables capturing network body. |
1295 | | - * @param isEnabled A boolean to enable/disable capturing network body. |
1296 | | - */ |
1297 | | - @ReactMethod |
1298 | | - public void setNetworkLogBodyEnabled(final boolean isEnabled) { |
1299 | | - MainThreadHandler.runOnMainThread(new Runnable() { |
1300 | | - @Override |
1301 | | - public void run() { |
1302 | | - try { |
1303 | | - Instabug.setNetworkLogBodyEnabled(isEnabled); |
1304 | | - } catch (Exception e) { |
1305 | | - e.printStackTrace(); |
1306 | | - } |
1307 | | - } |
1308 | | - }); |
1309 | | - } |
| 1292 | + * Enables or disables capturing network body. |
| 1293 | + * |
| 1294 | + * @param isEnabled A boolean to enable/disable capturing network body. |
| 1295 | + */ |
| 1296 | + @ReactMethod |
| 1297 | + public void setNetworkLogBodyEnabled(final boolean isEnabled) { |
| 1298 | + MainThreadHandler.runOnMainThread(new Runnable() { |
| 1299 | + @Override |
| 1300 | + public void run() { |
| 1301 | + try { |
| 1302 | + Instabug.setNetworkLogBodyEnabled(isEnabled); |
| 1303 | + } catch (Exception e) { |
| 1304 | + e.printStackTrace(); |
| 1305 | + } |
| 1306 | + } |
| 1307 | + }); |
| 1308 | + } |
1310 | 1309 |
|
1311 | 1310 | /** |
1312 | 1311 | * Sets the auto mask screenshots types. |
|
0 commit comments