- 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
310 lines
12 KiB
Java
310 lines
12 KiB
Java
package com.ironsource.mediationsdk.ads.nativead;
|
|
|
|
import android.app.Activity;
|
|
import com.ironsource.environment.ContextProvider;
|
|
import com.ironsource.environment.thread.IronSourceThreadManager;
|
|
import com.ironsource.i9;
|
|
import com.ironsource.mediationsdk.ads.nativead.interfaces.NativeAdDataInterface;
|
|
import com.ironsource.mediationsdk.ads.nativead.interfaces.NativeAdInterface;
|
|
import com.ironsource.mediationsdk.ads.nativead.internal.InternalNativeAdListener;
|
|
import com.ironsource.mediationsdk.adunit.adapter.internal.nativead.AdapterNativeAdViewBinder;
|
|
import com.ironsource.mediationsdk.adunit.adapter.utility.AdInfo;
|
|
import com.ironsource.mediationsdk.logger.IronLog;
|
|
import com.ironsource.mediationsdk.logger.IronSourceError;
|
|
import com.ironsource.mediationsdk.model.Placement;
|
|
import com.ironsource.mediationsdk.p;
|
|
import com.ironsource.mediationsdk.utils.ErrorBuilder;
|
|
import com.ironsource.mediationsdk.utils.IronSourceConstants;
|
|
import com.ironsource.sl;
|
|
import com.ironsource.ul;
|
|
import java.util.UUID;
|
|
import java.util.concurrent.atomic.AtomicBoolean;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public final class LevelPlayNativeAd implements NativeAdInterface, NativeAdDataInterface, InternalNativeAdListener {
|
|
private String a;
|
|
private Placement b;
|
|
private LevelPlayNativeAdListener c;
|
|
private sl d;
|
|
private AdapterNativeAdData e;
|
|
private AdapterNativeAdViewBinder f;
|
|
private final AtomicBoolean g;
|
|
|
|
public static final class Builder {
|
|
private String a;
|
|
private LevelPlayNativeAdListener b;
|
|
|
|
public final LevelPlayNativeAd build() {
|
|
return new LevelPlayNativeAd(this, null);
|
|
}
|
|
|
|
public final LevelPlayNativeAdListener getMListener$mediationsdk_release() {
|
|
return this.b;
|
|
}
|
|
|
|
public final String getMPlacementName$mediationsdk_release() {
|
|
return this.a;
|
|
}
|
|
|
|
public final void setMListener$mediationsdk_release(LevelPlayNativeAdListener levelPlayNativeAdListener) {
|
|
this.b = levelPlayNativeAdListener;
|
|
}
|
|
|
|
public final void setMPlacementName$mediationsdk_release(String str) {
|
|
this.a = str;
|
|
}
|
|
|
|
public final Builder withActivity(Activity activity) {
|
|
ContextProvider.getInstance().updateActivity(activity);
|
|
IronLog ironLog = IronLog.INTERNAL;
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("activity is updated to: ");
|
|
sb.append(activity != null ? activity.hashCode() : 0);
|
|
ironLog.verbose(sb.toString());
|
|
return this;
|
|
}
|
|
|
|
public final Builder withListener(LevelPlayNativeAdListener listener) {
|
|
Intrinsics.checkNotNullParameter(listener, "listener");
|
|
this.b = listener;
|
|
return this;
|
|
}
|
|
|
|
public final Builder withPlacementName(String str) {
|
|
this.a = str;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
private LevelPlayNativeAd(Builder builder) {
|
|
this.g = new AtomicBoolean(false);
|
|
this.a = builder.getMPlacementName$mediationsdk_release();
|
|
this.c = builder.getMListener$mediationsdk_release();
|
|
}
|
|
|
|
public /* synthetic */ LevelPlayNativeAd(Builder builder, DefaultConstructorMarker defaultConstructorMarker) {
|
|
this(builder);
|
|
}
|
|
|
|
private final void a() {
|
|
LevelPlayNativeAdListener levelPlayNativeAdListener = this.c;
|
|
if (levelPlayNativeAdListener != null) {
|
|
levelPlayNativeAdListener.onAdLoadFailed(this, ErrorBuilder.buildInitFailedError("init() has failed", IronSourceConstants.NATIVE_AD_UNIT));
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static final void a(LevelPlayNativeAd this$0) {
|
|
Unit unit;
|
|
Intrinsics.checkNotNullParameter(this$0, "this$0");
|
|
this$0.b();
|
|
sl slVar = this$0.d;
|
|
if (slVar != null) {
|
|
slVar.a(this$0.b);
|
|
unit = Unit.INSTANCE;
|
|
} else {
|
|
unit = null;
|
|
}
|
|
if (unit == null) {
|
|
this$0.a();
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static final void a(LevelPlayNativeAd this$0, AdapterNativeAdData adapterNativeAdData, AdapterNativeAdViewBinder nativeAdViewBinder, AdInfo adInfo) {
|
|
Intrinsics.checkNotNullParameter(this$0, "this$0");
|
|
Intrinsics.checkNotNullParameter(adapterNativeAdData, "$adapterNativeAdData");
|
|
Intrinsics.checkNotNullParameter(nativeAdViewBinder, "$nativeAdViewBinder");
|
|
this$0.e = adapterNativeAdData;
|
|
this$0.f = nativeAdViewBinder;
|
|
LevelPlayNativeAdListener levelPlayNativeAdListener = this$0.c;
|
|
if (levelPlayNativeAdListener != null) {
|
|
levelPlayNativeAdListener.onAdLoaded(this$0, adInfo);
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static final void a(LevelPlayNativeAd this$0, AdInfo adInfo) {
|
|
Intrinsics.checkNotNullParameter(this$0, "this$0");
|
|
LevelPlayNativeAdListener levelPlayNativeAdListener = this$0.c;
|
|
if (levelPlayNativeAdListener != null) {
|
|
levelPlayNativeAdListener.onAdClicked(this$0, adInfo);
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static final void a(LevelPlayNativeAd this$0, IronSourceError ironSourceError) {
|
|
Intrinsics.checkNotNullParameter(this$0, "this$0");
|
|
LevelPlayNativeAdListener levelPlayNativeAdListener = this$0.c;
|
|
if (levelPlayNativeAdListener != null) {
|
|
levelPlayNativeAdListener.onAdLoadFailed(this$0, ironSourceError);
|
|
}
|
|
}
|
|
|
|
private final void b() {
|
|
if (this.g.compareAndSet(false, true)) {
|
|
sl f = p.m().f();
|
|
this.d = f;
|
|
if (f != null) {
|
|
f.a(this);
|
|
ul n = p.m().n(this.a);
|
|
Intrinsics.checkNotNullExpressionValue(n, "getInstance().getNativeAdPlacement(mPlacementName)");
|
|
this.b = new Placement(n);
|
|
}
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static final void b(LevelPlayNativeAd this$0, AdInfo adInfo) {
|
|
Intrinsics.checkNotNullParameter(this$0, "this$0");
|
|
LevelPlayNativeAdListener levelPlayNativeAdListener = this$0.c;
|
|
if (levelPlayNativeAdListener != null) {
|
|
levelPlayNativeAdListener.onAdImpression(this$0, adInfo);
|
|
}
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.ads.nativead.interfaces.NativeAdInterface
|
|
public void destroyAd() {
|
|
IronLog.API.info(String.valueOf(this));
|
|
try {
|
|
sl slVar = this.d;
|
|
if (slVar != null) {
|
|
slVar.M();
|
|
}
|
|
} catch (Throwable th) {
|
|
i9.d().a(th);
|
|
IronLog.API.error("destroyNativeAd()");
|
|
}
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.ads.nativead.interfaces.NativeAdDataInterface
|
|
public String getAdvertiser() {
|
|
AdapterNativeAdData adapterNativeAdData = this.e;
|
|
if (adapterNativeAdData != null) {
|
|
return adapterNativeAdData.getAdvertiser();
|
|
}
|
|
return null;
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.ads.nativead.interfaces.NativeAdDataInterface
|
|
public String getBody() {
|
|
AdapterNativeAdData adapterNativeAdData = this.e;
|
|
if (adapterNativeAdData != null) {
|
|
return adapterNativeAdData.getBody();
|
|
}
|
|
return null;
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.ads.nativead.interfaces.NativeAdDataInterface
|
|
public String getCallToAction() {
|
|
AdapterNativeAdData adapterNativeAdData = this.e;
|
|
if (adapterNativeAdData != null) {
|
|
return adapterNativeAdData.getCallToAction();
|
|
}
|
|
return null;
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.ads.nativead.interfaces.NativeAdDataInterface
|
|
public NativeAdDataInterface.Image getIcon() {
|
|
AdapterNativeAdData adapterNativeAdData = this.e;
|
|
if (adapterNativeAdData != null) {
|
|
return adapterNativeAdData.getIcon();
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public final AdapterNativeAdViewBinder getNativeAdViewBinder() {
|
|
return this.f;
|
|
}
|
|
|
|
public final UUID getObjectId() {
|
|
sl slVar = this.d;
|
|
if (slVar != null) {
|
|
return slVar.k();
|
|
}
|
|
return null;
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.ads.nativead.interfaces.NativeAdDataInterface
|
|
public String getTitle() {
|
|
AdapterNativeAdData adapterNativeAdData = this.e;
|
|
if (adapterNativeAdData != null) {
|
|
return adapterNativeAdData.getTitle();
|
|
}
|
|
return null;
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.ads.nativead.interfaces.NativeAdInterface
|
|
public void loadAd() {
|
|
IronLog.API.info(String.valueOf(this));
|
|
String initError = p.m().e();
|
|
Intrinsics.checkNotNullExpressionValue(initError, "initError");
|
|
if (initError.length() <= 0) {
|
|
IronSourceThreadManager.INSTANCE.getInitHandler().post(new Runnable() { // from class: com.ironsource.mediationsdk.ads.nativead.LevelPlayNativeAd$$ExternalSyntheticLambda0
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
LevelPlayNativeAd.a(LevelPlayNativeAd.this);
|
|
}
|
|
});
|
|
return;
|
|
}
|
|
LevelPlayNativeAdListener levelPlayNativeAdListener = this.c;
|
|
if (levelPlayNativeAdListener != null) {
|
|
levelPlayNativeAdListener.onAdLoadFailed(this, ErrorBuilder.buildInitFailedError("loadAd(): " + initError, IronSourceConstants.NATIVE_AD_UNIT));
|
|
}
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.ads.nativead.internal.InternalNativeAdListener
|
|
public void onNativeAdClicked(final AdInfo adInfo) {
|
|
IronLog.CALLBACK.info(String.valueOf(this));
|
|
IronSourceThreadManager.postOnUiThreadTask$default(IronSourceThreadManager.INSTANCE, new Runnable() { // from class: com.ironsource.mediationsdk.ads.nativead.LevelPlayNativeAd$$ExternalSyntheticLambda4
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
LevelPlayNativeAd.a(LevelPlayNativeAd.this, adInfo);
|
|
}
|
|
}, 0L, 2, null);
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.ads.nativead.internal.InternalNativeAdListener
|
|
public void onNativeAdImpression(final AdInfo adInfo) {
|
|
IronLog.CALLBACK.info(String.valueOf(this));
|
|
IronSourceThreadManager.postOnUiThreadTask$default(IronSourceThreadManager.INSTANCE, new Runnable() { // from class: com.ironsource.mediationsdk.ads.nativead.LevelPlayNativeAd$$ExternalSyntheticLambda1
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
LevelPlayNativeAd.b(LevelPlayNativeAd.this, adInfo);
|
|
}
|
|
}, 0L, 2, null);
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.ads.nativead.internal.InternalNativeAdListener
|
|
public void onNativeAdLoadFailed(final IronSourceError ironSourceError) {
|
|
IronLog.CALLBACK.info(String.valueOf(this));
|
|
IronSourceThreadManager.postOnUiThreadTask$default(IronSourceThreadManager.INSTANCE, new Runnable() { // from class: com.ironsource.mediationsdk.ads.nativead.LevelPlayNativeAd$$ExternalSyntheticLambda3
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
LevelPlayNativeAd.a(LevelPlayNativeAd.this, ironSourceError);
|
|
}
|
|
}, 0L, 2, null);
|
|
}
|
|
|
|
@Override // com.ironsource.mediationsdk.ads.nativead.internal.InternalNativeAdListener
|
|
public void onNativeAdLoaded(final AdInfo adInfo, final AdapterNativeAdData adapterNativeAdData, final AdapterNativeAdViewBinder nativeAdViewBinder) {
|
|
Intrinsics.checkNotNullParameter(adapterNativeAdData, "adapterNativeAdData");
|
|
Intrinsics.checkNotNullParameter(nativeAdViewBinder, "nativeAdViewBinder");
|
|
IronLog.CALLBACK.info(String.valueOf(this));
|
|
IronSourceThreadManager.postOnUiThreadTask$default(IronSourceThreadManager.INSTANCE, new Runnable() { // from class: com.ironsource.mediationsdk.ads.nativead.LevelPlayNativeAd$$ExternalSyntheticLambda2
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
LevelPlayNativeAd.a(LevelPlayNativeAd.this, adapterNativeAdData, nativeAdViewBinder, adInfo);
|
|
}
|
|
}, 0L, 2, null);
|
|
}
|
|
|
|
public final void setListener(LevelPlayNativeAdListener levelPlayNativeAdListener) {
|
|
this.c = levelPlayNativeAdListener;
|
|
}
|
|
}
|