@@ -159,7 +159,7 @@ public void startWithToken(String token, ArrayList<String> invocationEvents) {
159159 InstabugInvocationEvent [] invocationEventsArray = new InstabugInvocationEvent [invocationEvents .size ()];
160160 for (int i = 0 ; i < invocationEvents .size (); i ++) {
161161 String key = invocationEvents .get (i );
162- invocationEventsArray [i ] = ArgsRegistry .getDeserializedValue (key , InstabugInvocationEvent . class );
162+ invocationEventsArray [i ] = ArgsRegistry .getDeserializedValue (key );
163163 }
164164
165165 final Application application = (Application ) context ;
@@ -177,8 +177,7 @@ public void startWithToken(String token, ArrayList<String> invocationEvents) {
177177 * beta.
178178 */
179179 public void showWelcomeMessageWithMode (String welcomeMessageMode ) {
180- WelcomeMessage .State resolvedWelcomeMessageMode = ArgsRegistry .getDeserializedValue (welcomeMessageMode ,
181- WelcomeMessage .State .class );
180+ WelcomeMessage .State resolvedWelcomeMessageMode = ArgsRegistry .getDeserializedValue (welcomeMessageMode );
182181 Instabug .showWelcomeMessage (resolvedWelcomeMessageMode );
183182 }
184183
@@ -207,7 +206,7 @@ public void logOut() {
207206 * @param instabugLocale
208207 */
209208 public void setLocale (String instabugLocale ) {
210- Locale resolvedLocale = ArgsRegistry .getDeserializedValue (instabugLocale , Locale . class );
209+ Locale resolvedLocale = ArgsRegistry .getDeserializedValue (instabugLocale );
211210 Instabug .setLocale (resolvedLocale );
212211 }
213212
@@ -279,7 +278,7 @@ public void clearAllLogs() {
279278 * @param colorTheme an InstabugColorTheme to set the SDK's UI to.
280279 */
281280 public void setColorTheme (String colorTheme ) {
282- InstabugColorTheme resolvedTheme = ArgsRegistry .getDeserializedValue (colorTheme , InstabugColorTheme . class );
281+ InstabugColorTheme resolvedTheme = ArgsRegistry .getDeserializedValue (colorTheme );
283282 if (resolvedTheme != null ) {
284283 Instabug .setColorTheme (resolvedTheme );
285284 }
@@ -292,8 +291,7 @@ public void setColorTheme(String colorTheme) {
292291 * @param floatingButtonOffset offset for the position on the y-axis.
293292 */
294293 public void setFloatingButtonEdge (String floatingButtonEdge , int floatingButtonOffset ) {
295- InstabugFloatingButtonEdge resolvedFloatingButtonEdge = ArgsRegistry .getDeserializedValue (floatingButtonEdge ,
296- InstabugFloatingButtonEdge .class );
294+ InstabugFloatingButtonEdge resolvedFloatingButtonEdge = ArgsRegistry .getDeserializedValue (floatingButtonEdge );
297295 BugReporting .setFloatingButtonEdge (resolvedFloatingButtonEdge );
298296 BugReporting .setFloatingButtonOffset (floatingButtonOffset );
299297 }
@@ -304,7 +302,7 @@ public void setFloatingButtonEdge(String floatingButtonEdge, int floatingButtonO
304302 * @param videoRecordingButtonPosition position of the video recording floating button on the screen.
305303 */
306304 public void setVideoRecordingFloatingButtonPosition (String videoRecordingButtonPosition ) {
307- InstabugVideoRecordingButtonPosition resolvedVideoRecordingButtonPosition = ArgsRegistry .getDeserializedValue (videoRecordingButtonPosition , InstabugVideoRecordingButtonPosition . class );
305+ InstabugVideoRecordingButtonPosition resolvedVideoRecordingButtonPosition = ArgsRegistry .getDeserializedValue (videoRecordingButtonPosition );
308306 BugReporting .setVideoRecordingFloatingButtonPosition (resolvedVideoRecordingButtonPosition );
309307 }
310308
@@ -432,8 +430,7 @@ public void logUserEventWithName(String name) {
432430 * @param forStringWithKey Key of string to override.
433431 */
434432 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 );
437434 placeHolder .set (key , value );
438435 Instabug .setCustomTextPlaceHolders (placeHolder );
439436 }
@@ -560,8 +557,7 @@ public void clearFileAttachments() {
560557 * beta or disabled.
561558 */
562559 public void setWelcomeMessageMode (String welcomeMessageMode ) {
563- WelcomeMessage .State resolvedWelcomeMessageMode = ArgsRegistry .getDeserializedValue (welcomeMessageMode ,
564- WelcomeMessage .State .class );
560+ WelcomeMessage .State resolvedWelcomeMessageMode = ArgsRegistry .getDeserializedValue (welcomeMessageMode );
565561 Instabug .setWelcomeMessageState (resolvedWelcomeMessageMode );
566562 }
567563
@@ -627,7 +623,7 @@ public void run() {
627623 InstabugInvocationEvent [] invocationEventsArray = new InstabugInvocationEvent [invocationEvents .size ()];
628624 for (int i = 0 ; i < invocationEvents .size (); i ++) {
629625 String key = invocationEvents .get (i );
630- invocationEventsArray [i ] = ArgsRegistry .getDeserializedValue (key , InstabugInvocationEvent . class );
626+ invocationEventsArray [i ] = ArgsRegistry .getDeserializedValue (key );
631627 }
632628 BugReporting .setInvocationEvents (invocationEventsArray );
633629 }
@@ -663,7 +659,7 @@ public void run() {
663659 int [] reportTypesArray = new int [reportTypes .size ()];
664660 for (int i = 0 ; i < reportTypes .size (); i ++) {
665661 String key = reportTypes .get (i );
666- reportTypesArray [i ] = ArgsRegistry .getDeserializedValue (key , Integer . class );
662+ reportTypesArray [i ] = ArgsRegistry .getDeserializedValue (key );
667663 }
668664 BugReporting .setReportTypes (reportTypesArray );
669665 }
@@ -677,8 +673,7 @@ public void run() {
677673 * @param extendedBugReportMode
678674 */
679675 public void setExtendedBugReportMode (String extendedBugReportMode ) {
680- ExtendedBugReport .State extendedBugReport = ArgsRegistry .getDeserializedValue (extendedBugReportMode ,
681- ExtendedBugReport .State .class );
676+ ExtendedBugReport .State extendedBugReport = ArgsRegistry .getDeserializedValue (extendedBugReportMode );
682677 BugReporting .setExtendedBugReportState (extendedBugReport );
683678 }
684679
@@ -690,7 +685,7 @@ public void setExtendedBugReportMode(String extendedBugReportMode) {
690685 public void setInvocationOptions (List <String > invocationOptions ) {
691686 int [] options = new int [invocationOptions .size ()];
692687 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 ));
694689 }
695690 BugReporting .setOptions (options );
696691 }
@@ -705,9 +700,9 @@ public void showBugReportingWithReportTypeAndOptions(final String reportType,
705700 final List <String > invocationOptions ) {
706701 int [] options = new int [invocationOptions .size ()];
707702 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 ));
709704 }
710- int reportTypeInt = ArgsRegistry .getDeserializedValue (reportType , Integer . class );
705+ int reportTypeInt = ArgsRegistry .getDeserializedValue (reportType );
711706 BugReporting .show (reportTypeInt , options );
712707 }
713708
@@ -843,7 +838,7 @@ public void showFeatureRequests() {
843838 public void setEmailFieldRequiredForFeatureRequests (final Boolean isEmailRequired , final List <String > actionTypes ) {
844839 int [] actions = new int [actionTypes .size ()];
845840 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 ));
847842 }
848843 FeatureRequests .setEmailFieldRequired (isEmailRequired , actions );
849844 }
@@ -1015,7 +1010,7 @@ public void setAPMLogLevel(final String logLevel) {
10151010 @ Override
10161011 public void run () {
10171012 try {
1018- if (ArgsRegistry .getDeserializedValue (logLevel , Integer . class ) == null ) {
1013+ if (ArgsRegistry .getDeserializedValue (logLevel ) == null ) {
10191014 return ;
10201015 }
10211016 APM .setLogLevel ((int ) ArgsRegistry .getRawValue (logLevel ));
@@ -1251,7 +1246,7 @@ public void reportScreenChange(String screenName) {
12511246 */
12521247 public void setReproStepsMode (String reproStepsMode ) {
12531248 try {
1254- Instabug .setReproStepsState (ArgsRegistry .getDeserializedValue (reproStepsMode , State . class ));
1249+ Instabug .setReproStepsState (ArgsRegistry .getDeserializedValue (reproStepsMode ));
12551250 } catch (Exception e ) {
12561251 e .printStackTrace ();
12571252 }
0 commit comments