|
13 | 13 | import com.instabug.flutter.util.ArgsRegistry;
|
14 | 14 | import com.instabug.flutter.util.Reflection;
|
15 | 15 | import com.instabug.flutter.util.ThreadManager;
|
16 |
| -import com.instabug.library.*; |
| 16 | +import com.instabug.library.Feature; |
| 17 | +import com.instabug.library.Instabug; |
| 18 | +import com.instabug.library.InstabugColorTheme; |
| 19 | +import com.instabug.library.InstabugCustomTextPlaceHolder; |
| 20 | +import com.instabug.library.IssueType; |
| 21 | +import com.instabug.library.Platform; |
| 22 | +import com.instabug.library.ReproConfigurations; |
| 23 | +import com.instabug.library.featuresflags.model.IBGFeatureFlag; |
17 | 24 | import com.instabug.library.internal.module.InstabugLocale;
|
18 | 25 | import com.instabug.library.invocation.InstabugInvocationEvent;
|
19 | 26 | import com.instabug.library.model.NetworkLog;
|
|
28 | 35 | import java.io.IOException;
|
29 | 36 | import java.io.InputStream;
|
30 | 37 | import java.lang.reflect.Method;
|
| 38 | +import java.util.ArrayList; |
31 | 39 | import java.util.HashMap;
|
32 | 40 | import java.util.List;
|
33 | 41 | import java.util.Locale;
|
@@ -225,6 +233,37 @@ public void clearAllExperiments() {
|
225 | 233 | Instabug.clearAllExperiments();
|
226 | 234 | }
|
227 | 235 |
|
| 236 | + @Override |
| 237 | + public void addFeatureFlags(@NonNull Map<String, String> featureFlags) { |
| 238 | + try { |
| 239 | + List<IBGFeatureFlag> features = new ArrayList<>(); |
| 240 | + for (Map.Entry<String, String> entry : featureFlags.entrySet()) { |
| 241 | + features.add(new IBGFeatureFlag(entry.getKey(), entry.getValue().isEmpty() ? null : entry.getValue())); |
| 242 | + } |
| 243 | + Instabug.addFeatureFlags(features); |
| 244 | + } catch (Exception e) { |
| 245 | + e.printStackTrace(); |
| 246 | + } |
| 247 | + } |
| 248 | + |
| 249 | + @Override |
| 250 | + public void removeFeatureFlags(@NonNull List<String> featureFlags) { |
| 251 | + try { |
| 252 | + Instabug.removeFeatureFlag(featureFlags); |
| 253 | + } catch (Exception e) { |
| 254 | + e.printStackTrace(); |
| 255 | + } |
| 256 | + } |
| 257 | + |
| 258 | + @Override |
| 259 | + public void removeAllFeatureFlags() { |
| 260 | + try { |
| 261 | + Instabug.removeAllFeatureFlags(); |
| 262 | + } catch (Exception e) { |
| 263 | + e.printStackTrace(); |
| 264 | + } |
| 265 | + } |
| 266 | + |
228 | 267 | @Override
|
229 | 268 | public void setUserAttribute(@NonNull String value, @NonNull String key) {
|
230 | 269 | Instabug.setUserAttribute(key, value);
|
|
0 commit comments