|
8 | 8 | import android.util.Log; |
9 | 9 | import android.view.View; |
10 | 10 |
|
11 | | -import androidx.annotation.NonNull; |
12 | 11 | import androidx.annotation.UiThread; |
13 | 12 |
|
14 | 13 | import com.facebook.react.bridge.Arguments; |
|
23 | 22 | import com.facebook.react.bridge.WritableNativeArray; |
24 | 23 | import com.facebook.react.bridge.WritableNativeMap; |
25 | 24 | import com.facebook.react.uimanager.UIManagerModule; |
26 | | -import com.instabug.apm.InternalAPM; |
27 | | -import com.instabug.apm.configuration.cp.APMFeature; |
28 | 25 | import com.instabug.library.Feature; |
29 | 26 | import com.instabug.library.Instabug; |
30 | 27 | import com.instabug.library.InstabugColorTheme; |
|
33 | 30 | import com.instabug.library.LogLevel; |
34 | 31 | import com.instabug.library.ReproConfigurations; |
35 | 32 | import com.instabug.library.core.InstabugCore; |
36 | | -import com.instabug.library.internal.crossplatform.CoreFeature; |
37 | | -import com.instabug.library.internal.crossplatform.CoreFeaturesState; |
38 | | -import com.instabug.library.internal.crossplatform.FeaturesStateListener; |
39 | | -import com.instabug.library.internal.crossplatform.InternalCore; |
40 | 33 | import com.instabug.library.featuresflags.model.IBGFeatureFlag; |
41 | 34 | import com.instabug.library.internal.module.InstabugLocale; |
42 | 35 | import com.instabug.library.invocation.InstabugInvocationEvent; |
@@ -1035,7 +1028,7 @@ public void run() { |
1035 | 1028 | } |
1036 | 1029 |
|
1037 | 1030 | /** |
1038 | | - * @deprecated see @link #addFeatureFlags(ReadableArray) |
| 1031 | + * @deprecated see {@link #addFeatureFlags(ReadableArray)} |
1039 | 1032 | */ |
1040 | 1033 | @ReactMethod |
1041 | 1034 | public void addExperiments(final ReadableArray experiments) { |
@@ -1155,105 +1148,6 @@ public void run() { |
1155 | 1148 | } |
1156 | 1149 | }); |
1157 | 1150 | } |
1158 | | - /** |
1159 | | - * Register a listener for W3C flags value change |
1160 | | - */ |
1161 | | - @ReactMethod |
1162 | | - public void registerW3CFlagsChangeListener(){ |
1163 | | - |
1164 | | - MainThreadHandler.runOnMainThread(new Runnable() { |
1165 | | - @Override |
1166 | | - public void run() { |
1167 | | - try { |
1168 | | - InternalCore.INSTANCE._setFeaturesStateListener(new FeaturesStateListener() { |
1169 | | - @Override |
1170 | | - public void invoke(@NonNull CoreFeaturesState featuresState) { |
1171 | | - WritableMap params = Arguments.createMap(); |
1172 | | - params.putBoolean("isW3ExternalTraceIDEnabled", featuresState.isW3CExternalTraceIdEnabled()); |
1173 | | - params.putBoolean("isW3ExternalGeneratedHeaderEnabled", featuresState.isAttachingGeneratedHeaderEnabled()); |
1174 | | - params.putBoolean("isW3CaughtHeaderEnabled", featuresState.isAttachingCapturedHeaderEnabled()); |
1175 | | - |
1176 | | - sendEvent(Constants.IBG_ON_NEW_W3C_FLAGS_UPDATE_RECEIVED_CALLBACK, params); |
1177 | | - } |
1178 | | - }); |
1179 | | - } |
1180 | | - catch (Exception e) { |
1181 | | - e.printStackTrace(); |
1182 | | - } |
1183 | | - |
1184 | | - } |
1185 | | - |
1186 | | - }); |
1187 | | - } |
1188 | | - |
1189 | | - |
1190 | | - /** |
1191 | | - * Get first time Value of W3ExternalTraceID flag |
1192 | | - */ |
1193 | | - @ReactMethod |
1194 | | - public void isW3ExternalTraceIDEnabled(Promise promise){ |
1195 | | - |
1196 | | - MainThreadHandler.runOnMainThread(new Runnable() { |
1197 | | - @Override |
1198 | | - public void run() { |
1199 | | - try { |
1200 | | - promise.resolve(InternalCore.INSTANCE._isFeatureEnabled(CoreFeature.W3C_EXTERNAL_TRACE_ID)); |
1201 | | - } |
1202 | | - catch (Exception e) { |
1203 | | - e.printStackTrace(); |
1204 | | - promise.resolve(null); |
1205 | | - } |
1206 | | - |
1207 | | - } |
1208 | | - |
1209 | | - }); |
1210 | | - } |
1211 | | - |
1212 | | - |
1213 | | - /** |
1214 | | - * Get first time Value of W3ExternalGeneratedHeader flag |
1215 | | - */ |
1216 | | - @ReactMethod |
1217 | | - public void isW3ExternalGeneratedHeaderEnabled(Promise promise){ |
1218 | | - |
1219 | | - MainThreadHandler.runOnMainThread(new Runnable() { |
1220 | | - @Override |
1221 | | - public void run() { |
1222 | | - try { |
1223 | | - promise.resolve(InternalCore.INSTANCE._isFeatureEnabled(CoreFeature.W3C_ATTACHING_GENERATED_HEADER)); |
1224 | | - } |
1225 | | - catch (Exception e) { |
1226 | | - e.printStackTrace(); |
1227 | | - promise.resolve(null); |
1228 | | - } |
1229 | | - |
1230 | | - } |
1231 | | - |
1232 | | - }); |
1233 | | - } |
1234 | | - |
1235 | | - /** |
1236 | | - * Get first time Value of W3CaughtHeader flag |
1237 | | - */ |
1238 | | - @ReactMethod |
1239 | | - public void isW3CaughtHeaderEnabled(Promise promise){ |
1240 | | - |
1241 | | - MainThreadHandler.runOnMainThread(new Runnable() { |
1242 | | - @Override |
1243 | | - public void run() { |
1244 | | - try { |
1245 | | - promise.resolve(InternalCore.INSTANCE._isFeatureEnabled(CoreFeature.W3C_ATTACHING_CAPTURED_HEADER)); |
1246 | | - } |
1247 | | - catch (Exception e) { |
1248 | | - e.printStackTrace(); |
1249 | | - promise.resolve(null); |
1250 | | - } |
1251 | | - |
1252 | | - } |
1253 | | - |
1254 | | - }); |
1255 | | - } |
1256 | | - |
1257 | 1151 |
|
1258 | 1152 | /** |
1259 | 1153 | * Map between the exported JS constant and the arg key in {@link ArgsRegistry}. |
|
0 commit comments