File tree Expand file tree Collapse file tree
android/src/main/java/com/appsflyer/reactnative Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4646import java .util .List ;
4747import java .util .Map ;
4848import java .util .Iterator ;
49+ import java .util .Locale ;
4950
5051import static com .appsflyer .reactnative .RNAppsFlyerConstants .*;
5152import static com .appsflyer .reactnative .RNAppsFlyerConstants .afOnDeepLinking ;
@@ -400,7 +401,14 @@ public void logAdRevenue(ReadableMap adRevenueDictionary) {
400401 return ;
401402 }
402403
403- MediationNetwork mediationNetwork = MediationNetwork .valueOf (mediationNetworkValue .toUpperCase ());
404+ MediationNetwork mediationNetwork ;
405+ try {
406+ mediationNetwork = MediationNetwork .valueOf (mediationNetworkValue .toUpperCase (Locale .ENGLISH ));
407+ } catch (IllegalArgumentException e ) {
408+ Log .d ("AppsFlyer" , "Invalid mediation network: " + mediationNetworkValue );
409+ return ;
410+ }
411+
404412 if (mediationNetwork == null ) {
405413 Log .d ("AppsFlyer" , "Invalid mediation network" );
406414 return ;
You can’t perform that action at this time.
0 commit comments