- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
69 lines
2.6 KiB
Java
69 lines
2.6 KiB
Java
package com.fyber.inneractive.sdk.external;
|
|
|
|
import android.text.TextUtils;
|
|
import com.fyber.inneractive.sdk.config.IAConfigManager;
|
|
import com.fyber.inneractive.sdk.config.k;
|
|
import com.fyber.inneractive.sdk.network.q;
|
|
import com.fyber.inneractive.sdk.network.s;
|
|
import com.fyber.inneractive.sdk.util.IAlog;
|
|
import java.util.Locale;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class BidTokenProvider {
|
|
public static String getBidderToken() {
|
|
if (!InneractiveAdManager.wasInitialized()) {
|
|
IAlog.b("BidTokenProvider: Cannot generate token. Please init Fyber Marketplace SDK.", new Object[0]);
|
|
return null;
|
|
}
|
|
com.fyber.inneractive.sdk.bidder.a aVar = com.fyber.inneractive.sdk.bidder.a.h;
|
|
aVar.getClass();
|
|
if (IAConfigManager.g()) {
|
|
IAlog.a("%sTCF purpose 1 disabled, returning null", IAlog.a(aVar));
|
|
return null;
|
|
}
|
|
if (aVar.e.get() == null) {
|
|
synchronized (aVar.g) {
|
|
aVar.b();
|
|
}
|
|
} else {
|
|
aVar.d();
|
|
}
|
|
String str = aVar.e.get();
|
|
IAConfigManager iAConfigManager = IAConfigManager.L;
|
|
String str2 = iAConfigManager.l;
|
|
k kVar = iAConfigManager.t.b;
|
|
int a = kVar.a(kVar.a(4000, 1, "token_size_limit"), 1, TextUtils.isEmpty(str2) ? "token_size_limit" : String.format("%s_%s", "token_size_limit", str2.toLowerCase(Locale.US)));
|
|
if (str == null || str.getBytes().length <= a) {
|
|
IAlog.c("token = %s", str);
|
|
return str;
|
|
}
|
|
s.a aVar2 = new s.a(q.TOKEN_EXCEEDS_LIMIT);
|
|
JSONObject jSONObject = new JSONObject();
|
|
if (TextUtils.isEmpty(str2)) {
|
|
str2 = "unknown";
|
|
}
|
|
try {
|
|
jSONObject.put("mediator", str2);
|
|
} catch (Exception unused) {
|
|
IAlog.f("Got exception adding param to json object: %s, %s", "mediator", str2);
|
|
}
|
|
Integer valueOf = Integer.valueOf(str.getBytes().length);
|
|
try {
|
|
jSONObject.put("token_size", valueOf);
|
|
} catch (Exception unused2) {
|
|
IAlog.f("Got exception adding param to json object: %s, %s", "token_size", valueOf);
|
|
}
|
|
Integer valueOf2 = Integer.valueOf(a);
|
|
try {
|
|
jSONObject.put("token_limit", valueOf2);
|
|
} catch (Exception unused3) {
|
|
IAlog.f("Got exception adding param to json object: %s, %s", "token_limit", valueOf2);
|
|
}
|
|
aVar2.f.put(jSONObject);
|
|
aVar2.a((String) null);
|
|
IAlog.c("token exceeds the limit, returning null", new Object[0]);
|
|
return null;
|
|
}
|
|
}
|