我要上王者 v1.1版本的 MD5 值为:b7d3566522def961cabeb92cb17f5db9
以下内容为反编译后的 Cif.java 源代码,内容仅作参考
package com.bytedance.sdk.openadsdk.api;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.os.SystemClock;
import android.util.Pair;
import com.bykv.vk.openvk.api.proto.Bridge;
import com.bykv.vk.openvk.api.proto.EventListener;
import com.bykv.vk.openvk.api.proto.Loader;
import com.bykv.vk.openvk.api.proto.Manager;
import com.bykv.vk.openvk.api.proto.Result;
import com.bykv.vk.openvk.api.proto.ValueSet;
import com.bytedance.sdk.openadsdk.AdConfig;
import com.bytedance.sdk.openadsdk.AdSlot;
import com.bytedance.sdk.openadsdk.TTAdConfig;
import com.bytedance.sdk.openadsdk.TTAdConstant;
import com.bytedance.sdk.openadsdk.TTAdManager;
import com.bytedance.sdk.openadsdk.TTAdNative;
import com.bytedance.sdk.openadsdk.TTAdSdk;
import com.bytedance.sdk.openadsdk.TTAppContextHolder;
import com.bytedance.sdk.openadsdk.downloadnew.core.DownloadBridgeFactory;
import com.bytedance.sdk.openadsdk.downloadnew.core.ExitInstallListener;
import com.bytedance.sdk.openadsdk.downloadnew.core.TTDownloadField;
import com.bytedance.sdk.openadsdk.mediation.MediationApiLog;
import com.bytedance.sdk.openadsdk.mediation.MediationTTLiveTokenInjectionAuthImpl;
import com.bytedance.sdk.openadsdk.mediation.bridge.init.MediationInitCLassLoader;
import java.lang.ref.SoftReference;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
public abstract class Cif {
private static volatile boolean x;
private TTAdSdk.InitCallback f21if;
public interface x<T> {
void mo58if(T t);
}
protected void mo46if(Result result) {
}
public abstract boolean mo47if();
public abstract boolean mo48if(Context context, com.bykv.p000if.p001if.p002if.p003if.x xVar);
public abstract z x();
public abstract void x(Context context, com.bykv.p000if.p001if.p002if.p003if.x xVar);
public boolean x(Context context, AdConfig adConfig, TTAdSdk.InitCallback initCallback) {
return false;
}
protected abstract com.bytedance.sdk.openadsdk.p012if.x z();
public void m44if(final Context context, AdConfig adConfig, TTAdSdk.InitCallback initCallback) {
x = true;
com.bytedance.sdk.openadsdk.p012if.z.m191if().m193if(z());
this.f21if = initCallback;
if (x(context, adConfig, initCallback)) {
final com.bykv.p000if.p001if.p002if.p003if.x m15if = com.bykv.p000if.p001if.p002if.p003if.x.m15if(com.bytedance.sdk.openadsdk.z.p050if.z.Cif.m261if(adConfig));
m15if.m19if(1, SystemClock.elapsedRealtime());
m15if.m21if(5, "main");
m15if.m22if(4, true);
m15if.m18if(6, 999);
m15if.m18if(10, 5616);
m15if.m21if(11, "5.6.1.6");
m15if.m21if(12, "com.byted.pangle.m");
m15if.m22if(14, false);
m15if.m20if(16, com.bytedance.sdk.openadsdk.p012if.z.m191if());
Thread currentThread = Thread.currentThread();
m15if.m21if(2, currentThread.getName());
m15if.m18if(3, currentThread.getPriority());
m15if.m20if(15, new j());
m15if.m20if(8301, new MediationInitCLassLoader());
if (adConfig instanceof TTAdConfig) {
m15if.m20if(8318, new MediationTTLiveTokenInjectionAuthImpl(((TTAdConfig) adConfig).getInjectionAuth()));
}
if (adConfig != null) {
MediationApiLog.setDebug(Boolean.valueOf(adConfig.isDebug()));
}
if (mo48if(context, m15if)) {
return;
}
com.bytedance.sdk.openadsdk.tc.Cif.m250if().m255if(new Runnable() {
@Override
public void run() {
Cif.this.x(context, m15if);
}
});
}
}
public void m45if(Manager manager) {
com.bytedance.sdk.openadsdk.api.z.x("_tt_ad_sdk_", "update manager");
x().m66if(manager);
x().register(com.bytedance.sdk.openadsdk.p012if.z.m191if());
}
public void x(Result result) {
mo46if(result);
if (result.isSuccess()) {
com.bytedance.sdk.openadsdk.api.z.x("_tt_ad_sdk_", "init sdk success ");
TTAdSdk.InitCallback initCallback = this.f21if;
if (initCallback != null) {
initCallback.success();
return;
}
return;
}
com.bytedance.sdk.openadsdk.api.z.tc("_tt_ad_sdk_", "int sdk failed, code: " + result.code() + ", message: " + result.message());
TTAdSdk.InitCallback initCallback2 = this.f21if;
if (initCallback2 != null) {
initCallback2.fail(result.code(), result.message() != null ? result.message() : "");
}
}
private class j implements EventListener {
private j() {
}
@Override
public ValueSet onEvent(int i, Result result) {
Cif.this.x(result);
return null;
}
}
public static abstract class z implements TTAdManager {
private volatile Manager f39if;
private List<WeakReference<x<Manager>>> x = new ArrayList();
@Override
public String getSDKVersion() {
return "5.6.1.6";
}
protected Object mo71if(Object obj) {
return obj;
}
protected void mo72if(Throwable th) {
}
public void m66if(Manager manager) {
this.f39if = manager;
if (this.f39if != null) {
Iterator<WeakReference<x<Manager>>> it = this.x.iterator();
while (it.hasNext()) {
WeakReference<x<Manager>> next = it.next();
x<Manager> xVar = next != null ? next.get() : null;
if (xVar != null) {
xVar.mo58if(manager);
}
}
}
}
public void m67if(x<Manager> xVar) {
this.x.add(new WeakReference<>(xVar));
}
public class AnonymousClass1 extends AbstractC0190if<Loader> {
Loader f40if;
final x<Manager> x;
final SoftReference z;
AnonymousClass1(SoftReference softReference) {
super();
this.z = softReference;
this.x = new x<Manager>() {
@Override
public void mo58if(Manager manager) {
AnonymousClass1 anonymousClass1 = AnonymousClass1.this;
anonymousClass1.f40if = manager.createLoader((Context) anonymousClass1.z.get());
}
};
}
@Override
public void mo52if(final x<Loader> xVar, int i) {
Loader loader = this.f40if;
if (loader == null) {
z.this.call(new x<Manager>() {
@Override
public void mo58if(Manager manager) {
z.this.m67if(AnonymousClass1.this.x);
AnonymousClass1 anonymousClass1 = AnonymousClass1.this;
anonymousClass1.f40if = manager.createLoader((Context) anonymousClass1.z.get());
xVar.mo58if(AnonymousClass1.this.f40if);
}
}, i + 10000);
} else {
xVar.mo58if(loader);
}
}
}
@Override
public TTAdNative createAdNative(Context context) {
tc tcVar = new tc(new AnonymousClass1(new SoftReference(context)));
if (!Cif.x) {
throw new IllegalStateException("请在load(请求广告)之前,先调用 start 方法以采集广告预估所需参数,以避免必要参数缺失无法请求广告");
}
return tcVar.m257if();
}
@Override
public void register(final Object obj) {
call(new x<Manager>() {
@Override
public void mo58if(Manager manager) {
manager.getBridge(1).call(4, com.bykv.p000if.p001if.p002if.p003if.x.m14if(1).m20if(8, z.this.mo71if(obj)).x(), Void.class);
}
}, 4);
}
@Override
public void unregister(final Object obj) {
call(new x<Manager>() {
@Override
public void mo58if(Manager manager) {
manager.getBridge(1).call(5, com.bykv.p000if.p001if.p002if.p003if.x.m14if(1).m20if(8, obj).x(), Void.class);
}
}, 5);
}
@Override
public <T> T getExtra(final Class<T> cls, final Bundle bundle) {
if (this.f39if != null) {
return (T) x(this.f39if, cls, bundle);
}
call(new x<Manager>() {
@Override
public void mo58if(Manager manager) {
z.x(z.this.f39if, cls, bundle);
}
}, 6);
return null;
}
public static <T> T x(Manager manager, Class<T> cls, Bundle bundle) {
return (T) manager.getBridge(1).call(6, com.bykv.p000if.p001if.p002if.p003if.x.m14if(2).m20if(9, cls).m20if(10, bundle).x(), cls);
}
@Override
public void requestPermissionIfNecessary(final Context context) {
call(new x<Manager>() {
@Override
public void mo58if(Manager manager) {
manager.getBridge(1).call(3, com.bykv.p000if.p001if.p002if.p003if.x.m14if(1).m20if(7, context).x(), Void.class);
}
}, 3);
}
@Override
public boolean tryShowInstallDialogWhenExit(Activity activity, ExitInstallListener exitInstallListener) {
HashMap hashMap = new HashMap();
hashMap.put(TTDownloadField.TT_ACTIVITY, activity);
hashMap.put(TTDownloadField.TT_EXIT_INSTALL_LISTENER, exitInstallListener);
return ((Boolean) DownloadBridgeFactory.getDownloadBridge(TTAppContextHolder.getContext()).call(0, com.bykv.p000if.p001if.p002if.p003if.x.m14if(1).m20if(0, hashMap).x(), Boolean.class)).booleanValue();
}
@Override
public String getPluginVersion() {
return this.f39if != null ? this.f39if.values().stringValue(12) : "";
}
@Override
public String getBiddingToken(AdSlot adSlot) {
return getBiddingToken(adSlot, false, adSlot.getAdType() > 0 ? adSlot.getAdType() : adSlot.getNativeAdType());
}
@Override
public String getBiddingToken(AdSlot adSlot, boolean z, int i) {
if (i <= 0) {
i = adSlot.getAdType() > 0 ? adSlot.getAdType() : adSlot.getNativeAdType();
}
ValueSet x = com.bykv.p000if.p001if.p002if.p003if.x.m15if(com.bytedance.sdk.openadsdk.z.p050if.z.x.x(adSlot)).m22if(13, z).m18if(14, i).x();
if (this.f39if != null) {
return (String) this.f39if.getBridge(1).call(2, x, String.class);
}
return null;
}
@Override
public void setThemeStatus(final int i) {
call(new x<Manager>() {
@Override
public void mo58if(Manager manager) {
manager.getBridge(1).call(1, com.bykv.p000if.p001if.p002if.p003if.x.m13if().m18if(11, i).x(), Void.class);
}
}, 1);
}
@Override
public int getThemeStatus() {
if (this.f39if != null) {
return this.f39if.values().intValue(11);
}
return 0;
}
public void call(final x<Manager> xVar, final int i) {
if (this.f39if != null) {
try {
xVar.mo58if(this.f39if);
return;
} catch (Throwable th) {
com.bytedance.sdk.openadsdk.api.z.j("_tt_ad_sdk_", "Unexpected manager call error: " + th.getMessage());
mo72if(th);
return;
}
}
com.bytedance.sdk.openadsdk.tc.Cif.m250if().m255if(new Runnable() {
@Override
public void run() {
try {
if (z.this.f39if != null) {
xVar.mo58if(z.this.f39if);
return;
}
com.bytedance.sdk.openadsdk.api.z.j("_tt_ad_sdk_", "Not ready, no manager: " + i);
} catch (Throwable th2) {
com.bytedance.sdk.openadsdk.api.z.j("_tt_ad_sdk_", "Unexpected manager call error: " + th2.getMessage());
z.this.mo72if(th2);
}
}
});
}
}
private static class tc extends com.bytedance.sdk.openadsdk.z.p050if.Cif {
private AbstractC0190if<Loader> f26if;
tc(AbstractC0190if<Loader> abstractC0190if) {
this.f26if = abstractC0190if;
}
private void m54if(x<Loader> xVar, int i) {
com.bytedance.sdk.openadsdk.api.z.x("_tt_ad_sdk_", "load ad slot type: ".concat(String.valueOf(i)));
this.f26if.mo52if(xVar, i);
}
@Override
public void mo56if(final ValueSet valueSet, final Bridge bridge) {
m54if(new x<Loader>() {
@Override
public void mo58if(Loader loader) {
loader.load(5, com.bykv.p000if.p001if.p002if.p003if.x.m15if(valueSet).m20if(1, bridge).x(), null);
}
}, 5);
}
@Override
public void x(final ValueSet valueSet, final Bridge bridge) {
m54if(new x<Loader>() {
@Override
public void mo58if(Loader loader) {
loader.load(6, com.bykv.p000if.p001if.p002if.p003if.x.m15if(valueSet).m20if(1, bridge).x(), null);
}
}, 6);
}
@Override
public void z(final ValueSet valueSet, final Bridge bridge) {
m54if(new x<Loader>() {
@Override
public void mo58if(Loader loader) {
loader.load(9, com.bykv.p000if.p001if.p002if.p003if.x.m15if(valueSet).m20if(1, bridge).x(), null);
}
}, 9);
}
@Override
public void j(final ValueSet valueSet, final Bridge bridge) {
m54if(new x<Loader>() {
@Override
public void mo58if(Loader loader) {
loader.load(1, com.bykv.p000if.p001if.p002if.p003if.x.m15if(valueSet).m20if(1, bridge).x(), null);
}
}, 1);
}
@Override
public void mo57if(final ValueSet valueSet, final Bridge bridge, final int i) {
m54if(new x<Loader>() {
@Override
public void mo58if(Loader loader) {
loader.load(3, com.bykv.p000if.p001if.p002if.p003if.x.m15if(valueSet).m18if(3, i).m20if(1, bridge).x(), null);
}
}, 3);
}
@Override
public void tc(final ValueSet valueSet, final Bridge bridge) {
m54if(new x<Loader>() {
@Override
public void mo58if(Loader loader) {
loader.load(7, com.bykv.p000if.p001if.p002if.p003if.x.m15if(valueSet).m20if(1, bridge).x(), null);
}
}, 7);
}
@Override
public void r(final ValueSet valueSet, final Bridge bridge) {
m54if(new x<Loader>() {
@Override
public void mo58if(Loader loader) {
loader.load(8, com.bykv.p000if.p001if.p002if.p003if.x.m15if(valueSet).m20if(1, bridge).x(), null);
}
}, 8);
}
@Override
public void w(final ValueSet valueSet, final Bridge bridge) {
m54if(new x<Loader>() {
@Override
public void mo58if(Loader loader) {
loader.load(5, com.bykv.p000if.p001if.p002if.p003if.x.m15if(valueSet).m22if(2, true).m20if(1, bridge).x(), null);
}
}, 5);
}
@Override
public void k(final ValueSet valueSet, final Bridge bridge) {
m54if(new x<Loader>() {
@Override
public void mo58if(Loader loader) {
loader.load(9, com.bykv.p000if.p001if.p002if.p003if.x.m15if(valueSet).m22if(2, true).m20if(1, bridge).x(), null);
}
}, 9);
}
@Override
public void b(final ValueSet valueSet, final Bridge bridge) {
m54if(new x<Loader>() {
@Override
public void mo58if(Loader loader) {
loader.load(1, com.bykv.p000if.p001if.p002if.p003if.x.m15if(valueSet).m22if(2, true).m20if(1, bridge).x(), null);
}
}, 1);
}
@Override
public Pair<Integer, String> mo55if(Exception exc) {
com.bytedance.sdk.openadsdk.api.z.j("_tt_ad_sdk_", "Load ad failed: " + exc.getMessage());
Integer valueOf = Integer.valueOf((int) TTAdConstant.INIT_FAILED_CREATE_INVOKE_FAILED);
return new Pair<>(valueOf, "Load ad failed: " + exc.getMessage());
}
}
public static abstract class AbstractC0190if<T> {
abstract void mo52if(x<T> xVar, int i);
private AbstractC0190if() {
}
}
}