Skip to content

Commit e91149d

Browse files
salmamalialyezz
authored andcommitted
🐛 remove annotations causing build failure on AndroidX (#63)
## Summary of Changes Removed any reference to annotations `VisibleForTesting` and `Nullable` to fix issue with breaking build on using AndroidX.
1 parent d8b89e6 commit e91149d

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

android/src/main/java/com/instabug/instabugflutter/ArgsRegistry.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
package com.instabug.instabugflutter;
22

3-
import android.support.annotation.Nullable;
4-
import android.support.annotation.VisibleForTesting;
5-
63
import com.instabug.bug.BugReporting;
74
import com.instabug.bug.invocation.Option;
85
import com.instabug.library.ActionType;
@@ -48,7 +45,6 @@
4845
@SuppressWarnings({"SameParameterValue", "unchecked"})
4946
final class ArgsRegistry {
5047

51-
@VisibleForTesting
5248
static final Map<String, Object> ARGS = new HashMap<>();
5349

5450
static {
@@ -77,7 +73,6 @@ final class ArgsRegistry {
7773
* @param clazz the type in which the value should be deserialized to
7874
* @return the value deserialized if all the assertions were successful, null otherwise
7975
*/
80-
@Nullable
8176
static <T> T getDeserializedValue(String key, Class<T> clazz) {
8277
if (key != null && ARGS.containsKey(key)) {
8378
Object constant = ARGS.get(key);
@@ -98,15 +93,13 @@ static <T> T getDeserializedValue(String key, Class<T> clazz) {
9893
* @param key the key whose associated value is to be returned
9994
* @return the value if all the assertions were successful, null otherwise
10095
*/
101-
@Nullable
10296
static Object getRawValue(String key) {
10397
if (key != null) {
10498
return ARGS.get(key);
10599
}
106100
return null;
107101
}
108102

109-
@VisibleForTesting
110103
static void registerInstabugInvocationEventsArgs(Map<String, Object> args) {
111104
args.put("InvocationEvent.twoFingersSwipeLeft", TWO_FINGER_SWIPE_LEFT);
112105
args.put("InvocationEvent.floatingButton", FLOATING_BUTTON);
@@ -115,34 +108,29 @@ static void registerInstabugInvocationEventsArgs(Map<String, Object> args) {
115108
args.put("InvocationEvent.none", NONE);
116109
}
117110

118-
@VisibleForTesting
119111
static void registerWelcomeMessageArgs(Map<String, Object> args) {
120112
args.put("WelcomeMessageMode.disabled", DISABLED);
121113
args.put("WelcomeMessageMode.live", LIVE);
122114
args.put("WelcomeMessageMode.beta", BETA);
123115
}
124116

125-
@VisibleForTesting
126117
static void registerColorThemeArgs(Map<String, Object> args) {
127118
args.put("ColorTheme.light", InstabugColorTheme.InstabugColorThemeLight);
128119
args.put("ColorTheme.dark", InstabugColorTheme.InstabugColorThemeDark);
129120
}
130121

131-
@VisibleForTesting
132122
static void registerInvocationModeArgs(Map<String, Object> args) {
133123
args.put("InvocationMode.bug", BugReporting.ReportType.BUG);
134124
args.put("InvocationMode.feedback", BugReporting.ReportType.FEEDBACK);
135125
}
136126

137-
@VisibleForTesting
138127
static void registerInvocationOptionsArgs(Map<String, Object> args) {
139128
args.put("InvocationOption.commentFieldRequired", Option.COMMENT_FIELD_REQUIRED);
140129
args.put("InvocationOption.disablePostSendingDialog", Option.DISABLE_POST_SENDING_DIALOG);
141130
args.put("InvocationOption.emailFieldHidden", Option.EMAIL_FIELD_HIDDEN);
142131
args.put("InvocationOption.emailFieldOptional", Option.EMAIL_FIELD_OPTIONAL);
143132
}
144133

145-
@VisibleForTesting
146134
static void registerLocaleArgs(Map<String, Object> args) {
147135
args.put("Locale.chineseTraditional", new Locale(TRADITIONAL_CHINESE.getCode(), TRADITIONAL_CHINESE.getCountry()));
148136
args.put("Locale.portuguesePortugal", new Locale(PORTUGUESE_PORTUGAL.getCode(), PORTUGUESE_PORTUGAL.getCountry()));
@@ -168,7 +156,6 @@ static void registerLocaleArgs(Map<String, Object> args) {
168156
args.put("Locale.czech", new Locale(CZECH.getCode(), CZECH.getCountry()));
169157
}
170158

171-
@VisibleForTesting
172159
static void registerCustomTextPlaceHolderKeysArgs(Map<String, Object> args) {
173160
args.put("IBGCustomTextPlaceHolderKey.shakeHint", InstabugCustomTextPlaceHolder.Key.SHAKE_HINT);
174161
args.put("IBGCustomTextPlaceHolderKey.swipeHint", InstabugCustomTextPlaceHolder.Key.SWIPE_HINT);
@@ -204,20 +191,17 @@ static void registerCustomTextPlaceHolderKeysArgs(Map<String, Object> args) {
204191
args.put("IBGCustomTextPlaceHolderKey.liveWelcomeMessageContent", InstabugCustomTextPlaceHolder.Key.LIVE_WELCOME_MESSAGE_CONTENT);
205192
}
206193

207-
@VisibleForTesting
208194
static void registerInstabugReportTypesArgs(Map<String, Object> args) {
209195
args.put("ReportType.bug", BugReporting.ReportType.BUG);
210196
args.put("ReportType.feedback", BugReporting.ReportType.FEEDBACK);
211197
}
212198

213-
@VisibleForTesting
214199
static void registerInstabugExtendedBugReportModeArgs(Map<String, Object> args) {
215200
args.put("ExtendedBugReportMode.enabledWithRequiredFields", ExtendedBugReport.State.ENABLED_WITH_REQUIRED_FIELDS);
216201
args.put("ExtendedBugReportMode.enabledWithOptionalFields", ExtendedBugReport.State.ENABLED_WITH_OPTIONAL_FIELDS);
217202
args.put("ExtendedBugReportMode.disabled",ExtendedBugReport.State.DISABLED);
218203
}
219204

220-
@VisibleForTesting
221205
static void registerInstabugActionTypesArgs(Map<String, Object> args) {
222206
args.put("ActionType.allActions", ActionType.ALL_ACTIONS);
223207
args.put("ActionType.reportBug", ActionType.REPORT_BUG);

0 commit comments

Comments
 (0)