@@ -159,7 +159,7 @@ public void startWithToken(String token, ArrayList<String> invocationEvents) {
159
159
InstabugInvocationEvent [] invocationEventsArray = new InstabugInvocationEvent [invocationEvents .size ()];
160
160
for (int i = 0 ; i < invocationEvents .size (); i ++) {
161
161
String key = invocationEvents .get (i );
162
- invocationEventsArray [i ] = ArgsRegistry .getDeserializedValue (key , InstabugInvocationEvent . class );
162
+ invocationEventsArray [i ] = ArgsRegistry .getDeserializedValue (key );
163
163
}
164
164
165
165
final Application application = (Application ) context ;
@@ -177,8 +177,7 @@ public void startWithToken(String token, ArrayList<String> invocationEvents) {
177
177
* beta.
178
178
*/
179
179
public void showWelcomeMessageWithMode (String welcomeMessageMode ) {
180
- WelcomeMessage .State resolvedWelcomeMessageMode = ArgsRegistry .getDeserializedValue (welcomeMessageMode ,
181
- WelcomeMessage .State .class );
180
+ WelcomeMessage .State resolvedWelcomeMessageMode = ArgsRegistry .getDeserializedValue (welcomeMessageMode );
182
181
Instabug .showWelcomeMessage (resolvedWelcomeMessageMode );
183
182
}
184
183
@@ -207,7 +206,7 @@ public void logOut() {
207
206
* @param instabugLocale
208
207
*/
209
208
public void setLocale (String instabugLocale ) {
210
- Locale resolvedLocale = ArgsRegistry .getDeserializedValue (instabugLocale , Locale . class );
209
+ Locale resolvedLocale = ArgsRegistry .getDeserializedValue (instabugLocale );
211
210
Instabug .setLocale (resolvedLocale );
212
211
}
213
212
@@ -279,7 +278,7 @@ public void clearAllLogs() {
279
278
* @param colorTheme an InstabugColorTheme to set the SDK's UI to.
280
279
*/
281
280
public void setColorTheme (String colorTheme ) {
282
- InstabugColorTheme resolvedTheme = ArgsRegistry .getDeserializedValue (colorTheme , InstabugColorTheme . class );
281
+ InstabugColorTheme resolvedTheme = ArgsRegistry .getDeserializedValue (colorTheme );
283
282
if (resolvedTheme != null ) {
284
283
Instabug .setColorTheme (resolvedTheme );
285
284
}
@@ -292,8 +291,7 @@ public void setColorTheme(String colorTheme) {
292
291
* @param floatingButtonOffset offset for the position on the y-axis.
293
292
*/
294
293
public void setFloatingButtonEdge (String floatingButtonEdge , int floatingButtonOffset ) {
295
- InstabugFloatingButtonEdge resolvedFloatingButtonEdge = ArgsRegistry .getDeserializedValue (floatingButtonEdge ,
296
- InstabugFloatingButtonEdge .class );
294
+ InstabugFloatingButtonEdge resolvedFloatingButtonEdge = ArgsRegistry .getDeserializedValue (floatingButtonEdge );
297
295
BugReporting .setFloatingButtonEdge (resolvedFloatingButtonEdge );
298
296
BugReporting .setFloatingButtonOffset (floatingButtonOffset );
299
297
}
@@ -304,7 +302,7 @@ public void setFloatingButtonEdge(String floatingButtonEdge, int floatingButtonO
304
302
* @param videoRecordingButtonPosition position of the video recording floating button on the screen.
305
303
*/
306
304
public void setVideoRecordingFloatingButtonPosition (String videoRecordingButtonPosition ) {
307
- InstabugVideoRecordingButtonPosition resolvedVideoRecordingButtonPosition = ArgsRegistry .getDeserializedValue (videoRecordingButtonPosition , InstabugVideoRecordingButtonPosition . class );
305
+ InstabugVideoRecordingButtonPosition resolvedVideoRecordingButtonPosition = ArgsRegistry .getDeserializedValue (videoRecordingButtonPosition );
308
306
BugReporting .setVideoRecordingFloatingButtonPosition (resolvedVideoRecordingButtonPosition );
309
307
}
310
308
@@ -432,8 +430,7 @@ public void logUserEventWithName(String name) {
432
430
* @param forStringWithKey Key of string to override.
433
431
*/
434
432
public void setValue (String value , String forStringWithKey ) {
435
- InstabugCustomTextPlaceHolder .Key key = ArgsRegistry .getDeserializedValue (forStringWithKey ,
436
- InstabugCustomTextPlaceHolder .Key .class );
433
+ InstabugCustomTextPlaceHolder .Key key = ArgsRegistry .getDeserializedValue (forStringWithKey );
437
434
placeHolder .set (key , value );
438
435
Instabug .setCustomTextPlaceHolders (placeHolder );
439
436
}
@@ -560,8 +557,7 @@ public void clearFileAttachments() {
560
557
* beta or disabled.
561
558
*/
562
559
public void setWelcomeMessageMode (String welcomeMessageMode ) {
563
- WelcomeMessage .State resolvedWelcomeMessageMode = ArgsRegistry .getDeserializedValue (welcomeMessageMode ,
564
- WelcomeMessage .State .class );
560
+ WelcomeMessage .State resolvedWelcomeMessageMode = ArgsRegistry .getDeserializedValue (welcomeMessageMode );
565
561
Instabug .setWelcomeMessageState (resolvedWelcomeMessageMode );
566
562
}
567
563
@@ -627,7 +623,7 @@ public void run() {
627
623
InstabugInvocationEvent [] invocationEventsArray = new InstabugInvocationEvent [invocationEvents .size ()];
628
624
for (int i = 0 ; i < invocationEvents .size (); i ++) {
629
625
String key = invocationEvents .get (i );
630
- invocationEventsArray [i ] = ArgsRegistry .getDeserializedValue (key , InstabugInvocationEvent . class );
626
+ invocationEventsArray [i ] = ArgsRegistry .getDeserializedValue (key );
631
627
}
632
628
BugReporting .setInvocationEvents (invocationEventsArray );
633
629
}
@@ -663,7 +659,7 @@ public void run() {
663
659
int [] reportTypesArray = new int [reportTypes .size ()];
664
660
for (int i = 0 ; i < reportTypes .size (); i ++) {
665
661
String key = reportTypes .get (i );
666
- reportTypesArray [i ] = ArgsRegistry .getDeserializedValue (key , Integer . class );
662
+ reportTypesArray [i ] = ArgsRegistry .getDeserializedValue (key );
667
663
}
668
664
BugReporting .setReportTypes (reportTypesArray );
669
665
}
@@ -677,8 +673,7 @@ public void run() {
677
673
* @param extendedBugReportMode
678
674
*/
679
675
public void setExtendedBugReportMode (String extendedBugReportMode ) {
680
- ExtendedBugReport .State extendedBugReport = ArgsRegistry .getDeserializedValue (extendedBugReportMode ,
681
- ExtendedBugReport .State .class );
676
+ ExtendedBugReport .State extendedBugReport = ArgsRegistry .getDeserializedValue (extendedBugReportMode );
682
677
BugReporting .setExtendedBugReportState (extendedBugReport );
683
678
}
684
679
@@ -690,7 +685,7 @@ public void setExtendedBugReportMode(String extendedBugReportMode) {
690
685
public void setInvocationOptions (List <String > invocationOptions ) {
691
686
int [] options = new int [invocationOptions .size ()];
692
687
for (int i = 0 ; i < invocationOptions .size (); i ++) {
693
- options [i ] = ArgsRegistry .getDeserializedValue (invocationOptions .get (i ), Integer . class );
688
+ options [i ] = ArgsRegistry .getDeserializedValue (invocationOptions .get (i ));
694
689
}
695
690
BugReporting .setOptions (options );
696
691
}
@@ -705,9 +700,9 @@ public void showBugReportingWithReportTypeAndOptions(final String reportType,
705
700
final List <String > invocationOptions ) {
706
701
int [] options = new int [invocationOptions .size ()];
707
702
for (int i = 0 ; i < invocationOptions .size (); i ++) {
708
- options [i ] = ArgsRegistry .getDeserializedValue (invocationOptions .get (i ), Integer . class );
703
+ options [i ] = ArgsRegistry .getDeserializedValue (invocationOptions .get (i ));
709
704
}
710
- int reportTypeInt = ArgsRegistry .getDeserializedValue (reportType , Integer . class );
705
+ int reportTypeInt = ArgsRegistry .getDeserializedValue (reportType );
711
706
BugReporting .show (reportTypeInt , options );
712
707
}
713
708
@@ -843,7 +838,7 @@ public void showFeatureRequests() {
843
838
public void setEmailFieldRequiredForFeatureRequests (final Boolean isEmailRequired , final List <String > actionTypes ) {
844
839
int [] actions = new int [actionTypes .size ()];
845
840
for (int i = 0 ; i < actionTypes .size (); i ++) {
846
- actions [i ] = ArgsRegistry .getDeserializedValue (actionTypes .get (i ), Integer . class );
841
+ actions [i ] = ArgsRegistry .getDeserializedValue (actionTypes .get (i ));
847
842
}
848
843
FeatureRequests .setEmailFieldRequired (isEmailRequired , actions );
849
844
}
@@ -1015,7 +1010,7 @@ public void setAPMLogLevel(final String logLevel) {
1015
1010
@ Override
1016
1011
public void run () {
1017
1012
try {
1018
- if (ArgsRegistry .getDeserializedValue (logLevel , Integer . class ) == null ) {
1013
+ if (ArgsRegistry .getDeserializedValue (logLevel ) == null ) {
1019
1014
return ;
1020
1015
}
1021
1016
APM .setLogLevel ((int ) ArgsRegistry .getRawValue (logLevel ));
@@ -1251,7 +1246,7 @@ public void reportScreenChange(String screenName) {
1251
1246
*/
1252
1247
public void setReproStepsMode (String reproStepsMode ) {
1253
1248
try {
1254
- Instabug .setReproStepsState (ArgsRegistry .getDeserializedValue (reproStepsMode , State . class ));
1249
+ Instabug .setReproStepsState (ArgsRegistry .getDeserializedValue (reproStepsMode ));
1255
1250
} catch (Exception e ) {
1256
1251
e .printStackTrace ();
1257
1252
}
0 commit comments