Files
rr3-apk/decompiled/sources/com/ironsource/sdk/IronSourceNetwork.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

187 lines
5.3 KiB
Java

package com.ironsource.sdk;
import android.app.Activity;
import android.content.Context;
import android.text.TextUtils;
import com.ironsource.fn;
import com.ironsource.i9;
import com.ironsource.mi;
import com.ironsource.pb;
import com.ironsource.qi;
import com.ironsource.rf;
import com.ironsource.sdk.controller.e;
import com.ironsource.sdk.utils.Logger;
import com.ironsource.sdk.utils.SDKUtils;
import com.ironsource.wi;
import com.ironsource.xf;
import com.ironsource.yf;
import com.ironsource.zi;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.json.JSONObject;
/* loaded from: classes4.dex */
public class IronSourceNetwork {
static final String a = "IronSourceNetwork";
private static wi b;
private static List<fn> c = new ArrayList();
private static zi d;
private static synchronized void a() throws Exception {
synchronized (IronSourceNetwork.class) {
if (b == null) {
throw new NullPointerException("Call initSDK first");
}
}
}
private static void a(Context context, JSONObject jSONObject, String str, String str2, Map<String, String> map) throws Exception {
if (jSONObject != null) {
pb a2 = yf.a(jSONObject);
if (a2.a()) {
xf.a(a2, yf.a(context, str, str2, map));
}
}
}
public static synchronized void addInitListener(fn fnVar) {
synchronized (IronSourceNetwork.class) {
zi ziVar = d;
if (ziVar == null) {
c.add(fnVar);
} else if (ziVar.b()) {
fnVar.onSuccess();
} else {
fnVar.onFail(d.a());
}
}
}
public static synchronized void destroyAd(mi miVar) throws Exception {
synchronized (IronSourceNetwork.class) {
a();
b.b(miVar);
}
}
public static synchronized e getControllerManager() {
e a2;
synchronized (IronSourceNetwork.class) {
a2 = b.a();
}
return a2;
}
public static String getVersion() {
return SDKUtils.getSDKVersion();
}
public static synchronized void initSDK(Context context, String str, String str2, Map<String, String> map) {
synchronized (IronSourceNetwork.class) {
if (TextUtils.isEmpty(str)) {
Logger.e(a, "applicationKey is NULL");
return;
}
if (b == null) {
SDKUtils.setInitSDKParams(map);
try {
a(context, SDKUtils.getNetworkConfiguration().optJSONObject("events"), str2, str, map);
} catch (Exception e) {
i9.d().a(e);
Logger.e(a, "Failed to init event tracker: " + e.getMessage());
}
b = qi.a(context, str, str2);
}
}
}
public static synchronized boolean isAdAvailableForInstance(mi miVar) {
synchronized (IronSourceNetwork.class) {
wi wiVar = b;
if (wiVar == null) {
return false;
}
return wiVar.a(miVar);
}
}
public static synchronized void loadAd(mi miVar, Map<String, String> map) throws Exception {
synchronized (IronSourceNetwork.class) {
a();
b.a(miVar, map);
}
}
public static synchronized void loadAdView(Activity activity, mi miVar, Map<String, String> map) throws Exception {
synchronized (IronSourceNetwork.class) {
a();
b.b(activity, miVar, map);
}
}
public static void onPause(Activity activity) {
wi wiVar = b;
if (wiVar == null) {
return;
}
wiVar.onPause(activity);
}
public static void onResume(Activity activity) {
wi wiVar = b;
if (wiVar == null) {
return;
}
wiVar.onResume(activity);
}
public static synchronized void release(Activity activity) {
synchronized (IronSourceNetwork.class) {
wi wiVar = b;
if (wiVar == null) {
return;
}
wiVar.a(activity);
}
}
public static synchronized void showAd(Activity activity, mi miVar, Map<String, String> map) throws Exception {
synchronized (IronSourceNetwork.class) {
a();
b.a(activity, miVar, map);
}
}
public static synchronized void updateInitFailed(rf rfVar) {
synchronized (IronSourceNetwork.class) {
try {
d = new zi(rfVar);
Iterator<fn> it = c.iterator();
while (it.hasNext()) {
it.next().onFail(rfVar);
}
c.clear();
} catch (Throwable th) {
throw th;
}
}
}
public static synchronized void updateInitSucceeded() {
synchronized (IronSourceNetwork.class) {
try {
d = new zi();
Iterator<fn> it = c.iterator();
while (it.hasNext()) {
it.next().onSuccess();
}
c.clear();
} catch (Throwable th) {
throw th;
}
}
}
}