@@ -66,7 +66,8 @@ public class RNInstabugReactnativeModule extends ReactContextBaseJavaModule {
66
66
* @param reactContext the react context
67
67
* @param mInstabug the m instabug
68
68
*/
69
- public RNInstabugReactnativeModule (ReactApplicationContext reactContext , Application androidApplication ) {
69
+ public RNInstabugReactnativeModule (ReactApplicationContext reactContext , Application
70
+ androidApplication ) {
70
71
super (reactContext );
71
72
this .androidApplication = androidApplication ;
72
73
}
@@ -168,7 +169,8 @@ public void changeLocale(String instabugLocale) {
168
169
}
169
170
170
171
/**
171
- * The file at filePath will be uploaded along upcoming reports with the name fileNameWithExtension
172
+ * The file at filePath will be uploaded along upcoming reports with the name
173
+ * fileNameWithExtension
172
174
*
173
175
* @param fileUri the file uri
174
176
* @param fileNameWithExtension the file name with extension
@@ -244,7 +246,8 @@ public void showIntroMessage() {
244
246
* Set the primary color that the SDK will use to tint certain UI elements in the SDK
245
247
*
246
248
* @param primaryColorValue The value of the primary color ,
247
- * whatever this color was parsed from a resource color or hex color or RGB color values
249
+ * whatever this color was parsed from a resource color or hex color
250
+ * or RGB color values
248
251
*/
249
252
@ ReactMethod
250
253
public void setPrimaryColor (int primaryColor ) {
@@ -265,9 +268,11 @@ public void setPrimaryColor(int primaryColor) {
265
268
* @param {boolean} screenRecording A boolean to enable or disable screen recording attachments.
266
269
*/
267
270
@ ReactMethod
268
- public void setAttachmentTypesEnabled (boolean screenshot , boolean extraScreenshot , boolean galleryImage , boolean voiceNote , boolean screenRecording ) {
271
+ public void setAttachmentTypesEnabled (boolean screenshot , boolean extraScreenshot , boolean
272
+ galleryImage , boolean voiceNote , boolean screenRecording ) {
269
273
try {
270
- mInstabug .setAttachmentTypesEnabled (screenshot , extraScreenshot , galleryImage , voiceNote , screenRecording );
274
+ mInstabug .setAttachmentTypesEnabled (screenshot , extraScreenshot , galleryImage ,
275
+ voiceNote , screenRecording );
271
276
} catch (Exception e ) {
272
277
e .printStackTrace ();
273
278
}
@@ -276,8 +281,10 @@ public void setAttachmentTypesEnabled(boolean screenshot, boolean extraScreensho
276
281
/**
277
282
* Appends a log message to Instabug internal log
278
283
* <p>
279
- * These logs are then sent along the next uploaded report. All log messages are timestamped <br/>
280
- * Logs aren't cleared per single application run. If you wish to reset the logs, use {@link #clearLog()}
284
+ * These logs are then sent along the next uploaded report. All log messages are timestamped
285
+ * <br/>
286
+ * Logs aren't cleared per single application run. If you wish to reset the logs, use
287
+ * {@link #clearLog()}
281
288
* </p>
282
289
* Note: logs passed to this method are <b>NOT</b> printed to Logcat
283
290
*
@@ -480,7 +487,8 @@ public void reportJsException(ReadableArray stack, String message, String errorI
480
487
String fileName = frame .getString ("file" );
481
488
int lineNumber = frame .getInt ("lineNumber" );
482
489
483
- stackTraceElements [i ] = new StackTraceElement (fileName , methodName , fileName , lineNumber );
490
+ stackTraceElements [i ] = new StackTraceElement (fileName , methodName , fileName ,
491
+ lineNumber );
484
492
}
485
493
Throwable throwable = new Throwable (message );
486
494
throwable .setStackTrace (stackTraceElements );
@@ -637,39 +645,56 @@ private Locale getLocaleByKey(String instabugLocale) {
637
645
String localeInLowerCase = instabugLocale .toLowerCase ();
638
646
switch (localeInLowerCase ) {
639
647
case LOCALE_ARABIC :
640
- return new Locale (InstabugLocale .ARABIC .getCode (), InstabugLocale .ARABIC .getCountry ());
648
+ return new Locale (InstabugLocale .ARABIC .getCode (), InstabugLocale .ARABIC
649
+ .getCountry ());
641
650
case LOCALE_ENGLISH :
642
- return new Locale (InstabugLocale .ENGLISH .getCode (), InstabugLocale .ENGLISH .getCountry ());
651
+ return new Locale (InstabugLocale .ENGLISH .getCode (), InstabugLocale .ENGLISH
652
+ .getCountry ());
643
653
case LOCALE_CZECH :
644
- return new Locale (InstabugLocale .CZECH .getCode (), InstabugLocale .CZECH .getCountry ());
654
+ return new Locale (InstabugLocale .CZECH .getCode (), InstabugLocale .CZECH .getCountry
655
+ ());
645
656
case LOCALE_FRENCH :
646
- return new Locale (InstabugLocale .FRENCH .getCode (), InstabugLocale .FRENCH .getCountry ());
657
+ return new Locale (InstabugLocale .FRENCH .getCode (), InstabugLocale .FRENCH
658
+ .getCountry ());
647
659
case LOCALE_GERMAN :
648
- return new Locale (InstabugLocale .GERMAN .getCode (), InstabugLocale .GERMAN .getCountry ());
660
+ return new Locale (InstabugLocale .GERMAN .getCode (), InstabugLocale .GERMAN
661
+ .getCountry ());
649
662
case LOCALE_ITALIAN :
650
- return new Locale (InstabugLocale .ITALIAN .getCode (), InstabugLocale .ITALIAN .getCountry ());
663
+ return new Locale (InstabugLocale .ITALIAN .getCode (), InstabugLocale .ITALIAN
664
+ .getCountry ());
651
665
case LOCALE_JAPANESE :
652
- return new Locale (InstabugLocale .JAPANESE .getCode (), InstabugLocale .JAPANESE .getCountry ());
666
+ return new Locale (InstabugLocale .JAPANESE .getCode (), InstabugLocale .JAPANESE
667
+ .getCountry ());
653
668
case LOCALE_POLISH :
654
- return new Locale (InstabugLocale .POLISH .getCode (), InstabugLocale .POLISH .getCountry ());
669
+ return new Locale (InstabugLocale .POLISH .getCode (), InstabugLocale .POLISH
670
+ .getCountry ());
655
671
case LOCALE_RUSSIAN :
656
- return new Locale (InstabugLocale .RUSSIAN .getCode (), InstabugLocale .RUSSIAN .getCountry ());
672
+ return new Locale (InstabugLocale .RUSSIAN .getCode (), InstabugLocale .RUSSIAN
673
+ .getCountry ());
657
674
case LOCALE_SPANISH :
658
- return new Locale (InstabugLocale .SPANISH .getCode (), InstabugLocale .SPANISH .getCountry ());
675
+ return new Locale (InstabugLocale .SPANISH .getCode (), InstabugLocale .SPANISH
676
+ .getCountry ());
659
677
case LOCALE_SWEDISH :
660
- return new Locale (InstabugLocale .SWEDISH .getCode (), InstabugLocale .SWEDISH .getCountry ());
678
+ return new Locale (InstabugLocale .SWEDISH .getCode (), InstabugLocale .SWEDISH
679
+ .getCountry ());
661
680
case LOCALE_TURKISH :
662
- return new Locale (InstabugLocale .TURKISH .getCode (), InstabugLocale .TURKISH .getCountry ());
681
+ return new Locale (InstabugLocale .TURKISH .getCode (), InstabugLocale .TURKISH
682
+ .getCountry ());
663
683
case LOCALE_PORTUGUESE_BRAZIL :
664
- return new Locale (InstabugLocale .PORTUGUESE_BRAZIL .getCode (), InstabugLocale .PORTUGUESE_BRAZIL .getCountry ());
684
+ return new Locale (InstabugLocale .PORTUGUESE_BRAZIL .getCode (), InstabugLocale
685
+ .PORTUGUESE_BRAZIL .getCountry ());
665
686
case LOCALE_CHINESE_SIMPLIFIED :
666
- return new Locale (InstabugLocale .SIMPLIFIED_CHINESE .getCode (), InstabugLocale .SIMPLIFIED_CHINESE .getCountry ());
687
+ return new Locale (InstabugLocale .SIMPLIFIED_CHINESE .getCode (), InstabugLocale
688
+ .SIMPLIFIED_CHINESE .getCountry ());
667
689
case LOCALE_CHINESE_TRADITIONAL :
668
- return new Locale (InstabugLocale .TRADITIONAL_CHINESE .getCode (), InstabugLocale .TRADITIONAL_CHINESE .getCountry ());
690
+ return new Locale (InstabugLocale .TRADITIONAL_CHINESE .getCode (), InstabugLocale
691
+ .TRADITIONAL_CHINESE .getCountry ());
669
692
case LOCALE_KOREAN :
670
- return new Locale (InstabugLocale .KOREAN .getCode (), InstabugLocale .KOREAN .getCountry ());
693
+ return new Locale (InstabugLocale .KOREAN .getCode (), InstabugLocale .KOREAN
694
+ .getCountry ());
671
695
default :
672
- return new Locale (InstabugLocale .ENGLISH .getCode (), InstabugLocale .ENGLISH .getCountry ());
696
+ return new Locale (InstabugLocale .ENGLISH .getCode (), InstabugLocale .ENGLISH
697
+ .getCountry ());
673
698
}
674
699
}
675
700
0 commit comments