MyRecorder v1.01.90.0219版本的 MD5 值为:c361f51174a0bf833abfa72929caf8d3
以下内容为反编译后的 PangleAdapter.java 源代码,内容仅作参考
package com.fyber.fairbid.sdk.mediation.adapter.pangle;
import ak.l;
import ak.m;
import android.content.Context;
import androidx.annotation.Keep;
import bk.o;
import bk.p;
import com.bytedance.sdk.openadsdk.api.banner.PAGBannerRequest;
import com.bytedance.sdk.openadsdk.api.banner.PAGBannerSize;
import com.bytedance.sdk.openadsdk.api.init.PAGConfig;
import com.bytedance.sdk.openadsdk.api.init.PAGSdk;
import com.bytedance.sdk.openadsdk.api.interstitial.PAGInterstitialRequest;
import com.bytedance.sdk.openadsdk.api.reward.PAGRewardedRequest;
import com.fyber.fairbid.ads.RequestFailure;
import com.fyber.fairbid.adtransparency.interceptors.AbstractInterceptor;
import com.fyber.fairbid.adtransparency.interceptors.pangle.PangleInterceptor;
import com.fyber.fairbid.bh;
import com.fyber.fairbid.common.concurrency.SettableFuture;
import com.fyber.fairbid.common.lifecycle.FetchFailure;
import com.fyber.fairbid.common.lifecycle.FetchOptions;
import com.fyber.fairbid.common.lifecycle.FetchResult;
import com.fyber.fairbid.common.lifecycle.OnScreenAdTracker;
import com.fyber.fairbid.dh;
import com.fyber.fairbid.eh;
import com.fyber.fairbid.fh;
import com.fyber.fairbid.hh;
import com.fyber.fairbid.ih;
import com.fyber.fairbid.internal.ActivityProvider;
import com.fyber.fairbid.internal.Constants;
import com.fyber.fairbid.internal.Logger;
import com.fyber.fairbid.internal.Utils;
import com.fyber.fairbid.internal.utils.DeviceUtils;
import com.fyber.fairbid.internal.utils.ScreenUtils;
import com.fyber.fairbid.ja;
import com.fyber.fairbid.jh;
import com.fyber.fairbid.mediation.LocationProvider;
import com.fyber.fairbid.mediation.Network;
import com.fyber.fairbid.mediation.abstr.AdapterException;
import com.fyber.fairbid.mediation.abstr.DisplayableFetchResult;
import com.fyber.fairbid.mediation.abstr.FetchConstraintsWhileOnScreen;
import com.fyber.fairbid.mediation.abstr.NetworkAdapter;
import com.fyber.fairbid.mediation.adapter.AdapterConfiguration;
import com.fyber.fairbid.mediation.analytics.IAdImageReporter;
import com.fyber.fairbid.mediation.display.NetworkModel;
import com.fyber.fairbid.mediation.pmn.ProgrammaticNetworkAdapter;
import com.fyber.fairbid.mediation.pmn.ProgrammaticSessionInfo;
import com.fyber.fairbid.mediation.request.MediationRequest;
import com.fyber.fairbid.q0;
import com.fyber.fairbid.r0;
import com.fyber.fairbid.sdk.R;
import com.fyber.fairbid.sdk.ads.PMNAd;
import com.fyber.fairbid.sdk.mediation.FairBidListenerHandler;
import com.fyber.fairbid.sdk.placements.IPlacementsHandler;
import com.fyber.fairbid.ug;
import com.fyber.fairbid.user.UserInfo;
import com.fyber.fairbid.wg;
import com.fyber.fairbid.xg;
import com.google.android.gms.common.internal.ServiceSpecificExtraArgs;
import java.util.EnumSet;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.ScheduledExecutorService;
import nk.s;
import nk.t;
public final class PangleAdapter extends NetworkAdapter implements ProgrammaticNetworkAdapter {
public static final EnumSet<Constants.AdType> D;
public final boolean A;
public final int B;
public final PangleInterceptor C;
public final jh f21382v;
public int f21383w;
public int f21384x;
public String f21385y;
public final l f21386z;
public class a {
public static final int[] f21387a;
static {
int[] iArr = new int[Constants.AdType.values().length];
try {
iArr[Constants.AdType.BANNER.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[Constants.AdType.INTERSTITIAL.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
iArr[Constants.AdType.REWARDED.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
f21387a = iArr;
}
}
public static final class b extends t implements mk.a<String> {
public b() {
super(0);
}
@Override
public final String invoke() {
PangleAdapter.this.f21382v.getClass();
String biddingToken = PAGSdk.getBiddingToken();
s.g(biddingToken, "getBiddingToken()");
return biddingToken;
}
}
public static final class c implements PAGSdk.PAGInitCallback {
public c() {
}
@Override
public final void fail(int i10, String str) {
PangleAdapter.this.getAdapterStarted().set(Boolean.FALSE);
}
@Override
public final void success() {
PangleAdapter.this.getAdapterStarted().set(Boolean.TRUE);
}
}
static {
EnumSet<Constants.AdType> of2 = EnumSet.of(Constants.AdType.REWARDED, Constants.AdType.INTERSTITIAL, Constants.AdType.BANNER);
s.g(of2, "of(AdType.REWARDED, AdTy…ERSTITIAL, AdType.BANNER)");
D = of2;
}
@Keep
public PangleAdapter(Context context, ActivityProvider activityProvider, Utils.ClockHelper clockHelper, FetchResult.Factory factory, IAdImageReporter iAdImageReporter, ScreenUtils screenUtils, ScheduledExecutorService scheduledExecutorService, ExecutorService executorService, LocationProvider locationProvider, Utils utils, DeviceUtils deviceUtils, FairBidListenerHandler fairBidListenerHandler, IPlacementsHandler iPlacementsHandler, OnScreenAdTracker onScreenAdTracker) {
super(context, activityProvider, clockHelper, factory, iAdImageReporter, screenUtils, scheduledExecutorService, executorService, locationProvider, utils, deviceUtils, fairBidListenerHandler, iPlacementsHandler, onScreenAdTracker);
s.h(context, "context");
s.h(activityProvider, "activityProvider");
s.h(clockHelper, "clockHelper");
s.h(factory, "fetchResultFactory");
s.h(iAdImageReporter, "adImageReporter");
s.h(screenUtils, "screenUtils");
s.h(scheduledExecutorService, "executorService");
s.h(executorService, "uiThreadExecutorService");
s.h(locationProvider, "locationProvider");
s.h(utils, "genericUtils");
s.h(deviceUtils, "deviceUtils");
s.h(fairBidListenerHandler, "fairBidListenerHandler");
s.h(iPlacementsHandler, "placementsHandler");
s.h(onScreenAdTracker, "onScreenAdTracker");
this.f21382v = jh.f20263a;
this.f21383w = -1;
this.f21384x = -1;
this.f21386z = m.b(new b());
this.A = true;
this.B = R.drawable.fb_ic_network_pangle;
this.C = PangleInterceptor.INSTANCE;
}
@Override
public final void cpraOptOut(boolean z7) {
super.cpraOptOut(z7);
this.f21384x = z7 ? 1 : 0;
}
@Override
public final List<String> getActivities() {
return p.l("com.bytedance.sdk.openadsdk.activity.TTLandingPageActivity", "com.bytedance.sdk.openadsdk.activity.TTPlayableLandingPageActivity", "com.bytedance.sdk.openadsdk.activity.TTRewardVideoActivity", "com.bytedance.sdk.openadsdk.activity.TTRewardExpressVideoActivity", "com.bytedance.sdk.openadsdk.activity.TTFullScreenVideoActivity", "com.bytedance.sdk.openadsdk.activity.TTFullScreenExpressVideoActivity", "com.bytedance.sdk.openadsdk.activity.TTDelegateActivity", "com.bytedance.sdk.openadsdk.activity.TTWebsiteActivity");
}
@Override
public final q0 getAdapterDisabledReason() {
if (ja.a("com.bytedance.sdk.openadsdk.api.init.PAGSdk", "classExists(expectedClassName)")) {
return null;
}
Logger.error("PangleAdapter - " + getCanonicalName() + " not 'on board': class com.bytedance.sdk.openadsdk.api.init.PAGSdk not found in the class path. Make sure you've declared the " + getMarketingName() + " dependency.");
return q0.f21018a;
}
@Override
public final EnumSet<Constants.AdType> getAllAdTypeCapabilities() {
return D;
}
@Override
public final EnumSet<Constants.AdType> getAllProgrammaticAdTypeCapabilities() {
return D;
}
@Override
public final boolean getAreCredentialsAvailable() {
return !isConfigEmpty("app_id");
}
@Override
public final List<String> getCredentialsInfo() {
return o.e("App id: " + this.f21385y);
}
@Override
public final int getIconResource() {
return this.B;
}
@Override
public final AbstractInterceptor getInterceptor() {
return this.C;
}
@Override
public final String getMarketingVersion() {
this.f21382v.getClass();
String sDKVersion = PAGSdk.getSDKVersion();
s.g(sDKVersion, "getSDKVersion()");
return sDKVersion;
}
@Override
public final String getMinimumSupportedVersion() {
return "5.4.1.1";
}
@Override
public final Network getNetwork() {
return Network.PANGLE;
}
@Override
public final List<String> getPermissions() {
return p.l("android.permission.INTERNET", "android.permission.ACCESS_NETWORK_STATE", "android.permission.WAKE_LOCK");
}
@Override
public final ProgrammaticSessionInfo getProgrammaticSessionInfo(NetworkModel networkModel, MediationRequest mediationRequest) {
s.h(networkModel, "network");
s.h(mediationRequest, "mediationRequest");
return new ProgrammaticSessionInfo(networkModel.getName(), this.f21385y, (String) this.f21386z.getValue());
}
@Override
public final boolean isAdapterStartAsync() {
return this.A;
}
@Override
public final boolean isOnBoard() {
return getAdapterDisabledReason() == null;
}
@Override
public final void muteAdsOnStart(boolean z7) {
}
@Override
public final void onInit() {
AdapterConfiguration configuration = getConfiguration();
String value = configuration != null ? configuration.getValue("app_id") : null;
this.f21385y = value;
if (value == null || value.length() == 0) {
r0 r0Var = r0.NOT_CONFIGURED;
throw new AdapterException(r0Var, getMarketingName() + "'s app id is not present.");
}
}
@Override
public final void onStart() {
int i10;
jh jhVar = this.f21382v;
Context context = getContext();
boolean z7 = false;
PAGConfig.Builder userData = new PAGConfig.Builder().appId(this.f21385y).supportMultiProcess(false).useTextureView(true).setUserData("[{\"name\":\"mediation\",\"value\":\"FairBid\"},{\"name\":\"adapter_version\",\"value\":\"3.46.1\"}]");
int i11 = this.f21383w;
Integer num = i11 != 0 ? i11 != 1 ? null : 0 : 1;
if (num != null) {
userData.setGDPRConsent(num.intValue());
}
boolean isChild = UserInfo.isChild();
Logger.debug("PangleAdapter - setting COPPA flag with the value of " + isChild);
if (isChild) {
i10 = 1;
} else if (isChild) {
throw new ak.o();
} else {
i10 = 0;
}
userData.setChildDirected(i10);
Integer valueOf = Integer.valueOf(this.f21384x);
int intValue = valueOf.intValue();
Integer num2 = (intValue == 0 || intValue == 1) ? true : true ? valueOf : null;
if (num2 != null) {
userData.setDoNotSell(num2.intValue());
}
PAGConfig build = userData.build();
s.g(build, "getPangleConfig()");
c cVar = new c();
jhVar.getClass();
s.h(context, "context");
s.h(build, "config");
s.h(cVar, "callback");
PAGSdk.init(context, build, cVar);
}
@Override
public final SettableFuture<DisplayableFetchResult> performNetworkFetch(FetchOptions fetchOptions) {
SettableFuture<DisplayableFetchResult> settableFuture;
s.h(fetchOptions, "fetchOptions");
SettableFuture<DisplayableFetchResult> create = SettableFuture.create();
Constants.AdType adType = fetchOptions.getAdType();
String networkInstanceId = fetchOptions.getNetworkInstanceId();
if (wk.o.y(networkInstanceId)) {
create.set(new DisplayableFetchResult(new FetchFailure(RequestFailure.CONFIGURATION_ERROR, "Slot Id not found.")));
s.g(create, "fetchResult");
return create;
}
int i10 = a.f21387a[adType.ordinal()];
if (i10 == 1) {
fetchOptions.isTablet();
wg wgVar = new wg(networkInstanceId, xg.f22110a);
s.h(fetchOptions, "fetchOptions");
Logger.debug("PangleBannerAdapter - load() called.");
PAGBannerRequest pAGBannerRequest = new PAGBannerRequest(new PAGBannerSize(Constants.BANNER_FALLBACK_AD_WIDTH, 50));
if (fetchOptions.getPmnAd() != null) {
pAGBannerRequest.setAdString(fetchOptions.getPmnAd().getMarkup());
}
xg xgVar = wgVar.f22028b;
String str = wgVar.f22027a;
ug ugVar = new ug(wgVar);
xgVar.getClass();
s.h(str, "instanceId");
s.h(pAGBannerRequest, "request");
s.h(ugVar, ServiceSpecificExtraArgs.CastExtraArgs.LISTENER);
return wgVar.f22029c;
}
if (i10 == 2) {
dh dhVar = new dh(networkInstanceId, getContext(), getActivityProvider(), getUiThreadExecutorService(), PangleInterceptor.INSTANCE, eh.f19689a);
if (fetchOptions.getPmnAd() != null) {
PMNAd pmnAd = fetchOptions.getPmnAd();
s.h(pmnAd, "pmnAd");
Logger.debug(dhVar.f19601j + " - loadPmn() called. PMN = " + pmnAd);
PAGInterstitialRequest pAGInterstitialRequest = new PAGInterstitialRequest();
pAGInterstitialRequest.setAdString(pmnAd.getMarkup());
eh ehVar = dhVar.f19600i;
String str2 = dhVar.f19244a;
bh bhVar = new bh(dhVar);
ehVar.getClass();
s.h(str2, "instanceId");
s.h(pAGInterstitialRequest, "request");
s.h(bhVar, ServiceSpecificExtraArgs.CastExtraArgs.LISTENER);
settableFuture = dhVar.f19250g;
}
Logger.debug(dhVar.f19601j + " - load() called.");
PAGInterstitialRequest pAGInterstitialRequest2 = new PAGInterstitialRequest();
eh ehVar2 = dhVar.f19600i;
String str3 = dhVar.f19244a;
bh bhVar2 = new bh(dhVar);
ehVar2.getClass();
s.h(str3, "instanceId");
s.h(pAGInterstitialRequest2, "request");
s.h(bhVar2, ServiceSpecificExtraArgs.CastExtraArgs.LISTENER);
return dhVar.f19250g;
} else if (i10 != 3) {
RequestFailure requestFailure = RequestFailure.UNKNOWN;
create.set(new DisplayableFetchResult(new FetchFailure(requestFailure, "Unknown ad type - " + adType)));
s.g(create, "fetchResult.also {\n … )\n }");
return create;
} else {
hh hhVar = new hh(networkInstanceId, getContext(), getActivityProvider(), getUiThreadExecutorService(), PangleInterceptor.INSTANCE, ih.f20073a);
if (fetchOptions.getPmnAd() != null) {
PMNAd pmnAd2 = fetchOptions.getPmnAd();
s.h(pmnAd2, "pmnAd");
Logger.debug(hhVar.f19944j + " - loadPmn() called. PMN = " + pmnAd2);
PAGRewardedRequest pAGRewardedRequest = new PAGRewardedRequest();
pAGRewardedRequest.setAdString(pmnAd2.getMarkup());
ih ihVar = hhVar.f19943i;
String str4 = hhVar.f19244a;
fh fhVar = new fh(hhVar);
ihVar.getClass();
s.h(str4, "instanceId");
s.h(pAGRewardedRequest, "request");
s.h(fhVar, ServiceSpecificExtraArgs.CastExtraArgs.LISTENER);
settableFuture = hhVar.f19250g;
}
Logger.debug(hhVar.f19944j + " - load() called.");
PAGRewardedRequest pAGRewardedRequest2 = new PAGRewardedRequest();
ih ihVar2 = hhVar.f19943i;
String str5 = hhVar.f19244a;
fh fhVar2 = new fh(hhVar);
ihVar2.getClass();
s.h(str5, "instanceId");
s.h(pAGRewardedRequest2, "request");
s.h(fhVar2, ServiceSpecificExtraArgs.CastExtraArgs.LISTENER);
return hhVar.f19250g;
}
return settableFuture;
}
@Override
public final FetchConstraintsWhileOnScreen programmaticFetchConstraintsWhileShowing() {
return ProgrammaticNetworkAdapter.DefaultImpls.programmaticFetchConstraintsWhileShowing(this);
}
@Override
public final void setGdprConsent(int i10) {
if (!((Boolean) com.fyber.fairbid.common.concurrency.a.a(getAdapterStarted(), Boolean.FALSE)).booleanValue()) {
this.f21383w = i10;
} else if (i10 == 0) {
PAGConfig.setGDPRConsent(1);
} else if (i10 != 1) {
} else {
PAGConfig.setGDPRConsent(0);
}
}
@Override
public final boolean supportsProgrammatic(String str, MediationRequest mediationRequest) {
return ProgrammaticNetworkAdapter.DefaultImpls.supportsProgrammatic(this, str, mediationRequest);
}
}