整点视频 v3.3.0版本的 MD5 值为:cba0457dc37421eed445b30f92de25d3
以下内容为反编译后的 g.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 com.od.OooO0OO.OooO0O0;
import java.lang.ref.SoftReference;
import java.lang.ref.WeakReference;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
public abstract class g {
private TTAdSdk.InitCallback g;
public static abstract class AbstractC0075g<T> {
private AbstractC0075g() {
}
abstract void g(zc<T> zcVar, int i);
}
public static abstract class i implements TTAdManager {
private volatile Manager g;
private List<WeakReference<zc<Manager>>> i = new CopyOnWriteArrayList();
private volatile boolean zc;
public class AnonymousClass1 extends AbstractC0075g<Loader> {
Loader g;
final SoftReference i;
final zc<Manager> zc;
AnonymousClass1(SoftReference softReference) {
super();
this.i = softReference;
this.zc = new zc<Manager>() {
@Override
public void g(Manager manager) {
AnonymousClass1 anonymousClass1 = AnonymousClass1.this;
anonymousClass1.g = manager.createLoader((Context) anonymousClass1.i.get());
}
};
}
@Override
public void g(final zc<Loader> zcVar, int i) {
Loader loader = this.g;
if (loader != null) {
zcVar.g(loader);
} else {
i.this.call(new zc<Manager>() {
@Override
public void g(Manager manager) {
AnonymousClass1 anonymousClass1 = AnonymousClass1.this;
i.this.g(anonymousClass1.zc);
AnonymousClass1 anonymousClass12 = AnonymousClass1.this;
anonymousClass12.g = manager.createLoader((Context) anonymousClass12.i.get());
zcVar.g(AnonymousClass1.this.g);
}
}, i + 10000);
}
}
}
public void call(final zc<Manager> zcVar, final int i) {
if (this.g != null) {
try {
zcVar.g(this.g);
} catch (Throwable th) {
com.bytedance.sdk.openadsdk.api.i.ql("_tt_ad_sdk_", "Unexpected manager call error: " + th.getMessage());
g(th);
}
} else if (!this.zc && i > 10000) {
throw new IllegalStateException("广告SDK未Ready, 请在load(请求广告)之前,先调用init and start方法,以避免无法请求广告");
} else {
com.bytedance.sdk.openadsdk.r.g.g().g(new Runnable() {
@Override
public void run() {
try {
if (i.this.g != null) {
zcVar.g(i.this.g);
return;
}
com.bytedance.sdk.openadsdk.api.i.ql("_tt_ad_sdk_", "Not ready, no manager: " + i);
} catch (Throwable th2) {
com.bytedance.sdk.openadsdk.api.i.ql("_tt_ad_sdk_", "Unexpected manager call error: " + th2.getMessage());
i.this.g(th2);
}
}
});
}
}
public static <T> T zc(Manager manager, Class<T> cls, Bundle bundle) {
OooO0O0 OooO0O0 = OooO0O0.OooO0O0(2);
OooO0O0.OooO0oO(9, cls);
OooO0O0.OooO0oO(10, bundle);
return (T) manager.getBridge(1).call(6, OooO0O0.OooOO0O(), cls);
}
@Override
public TTAdNative createAdNative(Context context) {
return new r(new AnonymousClass1(new SoftReference(context))).g();
}
protected Object g(Object obj) {
return obj;
}
protected void g(Throwable th) {
}
@Override
public String getBiddingToken(AdSlot adSlot) {
return getBiddingToken(adSlot, false, adSlot.getAdType() > 0 ? adSlot.getAdType() : adSlot.getNativeAdType());
}
@Override
public <T> T getExtra(final Class<T> cls, final Bundle bundle) {
if (this.g != null) {
return (T) zc(this.g, cls, bundle);
}
call(new zc<Manager>() {
@Override
public void g(Manager manager) {
i.zc(i.this.g, cls, bundle);
}
}, 6);
return null;
}
@Override
public String getPluginVersion() {
return this.g != null ? this.g.values().stringValue(12) : "";
}
@Override
public String getSDKVersion() {
return "5.8.0.7";
}
@Override
public int getThemeStatus() {
if (this.g != null) {
return this.g.values().intValue(11);
}
return 0;
}
@Override
public void register(final Object obj) {
call(new zc<Manager>() {
@Override
public void g(Manager manager) {
Object g = i.this.g(obj);
OooO0O0 OooO0O0 = OooO0O0.OooO0O0(1);
OooO0O0.OooO0oO(8, g);
manager.getBridge(1).call(4, OooO0O0.OooOO0O(), Void.class);
}
}, 4);
}
@Override
public void requestPermissionIfNecessary(final Context context) {
call(new zc<Manager>() {
@Override
public void g(Manager manager) {
OooO0O0 OooO0O0 = OooO0O0.OooO0O0(1);
OooO0O0.OooO0oO(7, context);
manager.getBridge(1).call(3, OooO0O0.OooOO0O(), Void.class);
}
}, 3);
}
@Override
public void setThemeStatus(final int i) {
call(new zc<Manager>() {
@Override
public void g(Manager manager) {
OooO0O0 OooO00o = OooO0O0.OooO00o();
OooO00o.OooO0o0(11, i);
manager.getBridge(1).call(1, OooO00o.OooOO0O(), Void.class);
}
}, 1);
}
@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);
Bridge downloadBridge = DownloadBridgeFactory.getDownloadBridge(TTAppContextHolder.getContext());
OooO0O0 OooO0O0 = OooO0O0.OooO0O0(1);
OooO0O0.OooO0oO(0, hashMap);
return ((Boolean) downloadBridge.call(0, OooO0O0.OooOO0O(), Boolean.class)).booleanValue();
}
@Override
public void unregister(final Object obj) {
call(new zc<Manager>() {
@Override
public void g(Manager manager) {
OooO0O0 OooO0O0 = OooO0O0.OooO0O0(1);
OooO0O0.OooO0oO(8, obj);
manager.getBridge(1).call(5, OooO0O0.OooOO0O(), Void.class);
}
}, 5);
}
@Override
public String getBiddingToken(AdSlot adSlot, boolean z, int i) {
if (i <= 0) {
i = adSlot.getAdType() > 0 ? adSlot.getAdType() : adSlot.getNativeAdType();
}
OooO0O0 OooOO0 = OooO0O0.OooOO0(com.bytedance.sdk.openadsdk.i.g.i.zc.zc(adSlot));
OooOO0.OooO(13, z);
OooOO0.OooO0o0(14, i);
ValueSet OooOO0O = OooOO0.OooOO0O();
if (this.g != null) {
return (String) this.g.getBridge(1).call(2, OooOO0O, String.class);
}
return null;
}
public void g(boolean z) {
this.zc = z;
}
public void g(Manager manager) {
this.g = manager;
if (this.g != null) {
Iterator<WeakReference<zc<Manager>>> it = this.i.iterator();
while (it.hasNext()) {
WeakReference<zc<Manager>> next = it.next();
zc<Manager> zcVar = next != null ? next.get() : null;
if (zcVar != null) {
zcVar.g(manager);
}
}
}
}
public void g(zc<Manager> zcVar) {
this.i.add(new WeakReference<>(zcVar));
}
}
private class ql implements EventListener {
private ql() {
}
@Override
public ValueSet onEvent(int i, Result result) {
g.this.zc(result);
return null;
}
}
public interface zc<T> {
void g(T t);
}
public void g(final Context context, AdConfig adConfig, TTAdSdk.InitCallback initCallback) {
com.bytedance.sdk.openadsdk.g.i.g().g(i());
this.g = initCallback;
if (zc(context, adConfig, initCallback)) {
final OooO0O0 OooOO0 = OooO0O0.OooOO0(com.bytedance.sdk.openadsdk.i.g.i.g.g(adConfig));
OooOO0.OooO0o(1, SystemClock.elapsedRealtime());
OooOO0.OooO0oo(5, "main");
OooOO0.OooO(4, true);
OooOO0.OooO0o0(6, 999);
OooOO0.OooO0o0(10, 5807);
OooOO0.OooO0oo(11, "5.8.0.7");
OooOO0.OooO0oo(12, "com.byted.pangle.m");
OooOO0.OooO(14, false);
OooOO0.OooO0oO(16, com.bytedance.sdk.openadsdk.g.i.g());
Thread currentThread = Thread.currentThread();
OooOO0.OooO0oo(2, currentThread.getName());
OooOO0.OooO0o0(3, currentThread.getPriority());
OooOO0.OooO0oO(15, new ql());
OooOO0.OooO0oO(8301, new MediationInitCLassLoader());
if (adConfig instanceof TTAdConfig) {
OooOO0.OooO0oO(8318, new MediationTTLiveTokenInjectionAuthImpl(((TTAdConfig) adConfig).getInjectionAuth()));
}
if (adConfig != null) {
MediationApiLog.setDebug(Boolean.valueOf(adConfig.isDebug()));
}
if (!g(context, OooOO0)) {
com.bytedance.sdk.openadsdk.r.g.g().g(new Runnable() {
@Override
public void run() {
g.this.zc(context, OooOO0);
}
});
}
zc().g(true);
}
}
protected void g(Result result) {
}
public abstract boolean g();
public abstract boolean g(Context context, OooO0O0 oooO0O0);
protected abstract com.bytedance.sdk.openadsdk.g.zc i();
public abstract i zc();
public abstract void zc(Context context, OooO0O0 oooO0O0);
public void zc(Result result) {
g(result);
if (result.isSuccess()) {
com.bytedance.sdk.openadsdk.api.i.zc("_tt_ad_sdk_", "init sdk success ");
TTAdSdk.InitCallback initCallback = this.g;
if (initCallback != null) {
initCallback.success();
return;
}
return;
}
com.bytedance.sdk.openadsdk.api.i.r("_tt_ad_sdk_", "int sdk failed, code: " + result.code() + ", message: " + result.message());
TTAdSdk.InitCallback initCallback2 = this.g;
if (initCallback2 != null) {
initCallback2.fail(result.code(), result.message() != null ? result.message() : "");
}
}
public boolean zc(Context context, AdConfig adConfig, TTAdSdk.InitCallback initCallback) {
return false;
}
private static class r extends com.bytedance.sdk.openadsdk.i.g.g {
private AbstractC0075g<Loader> g;
r(AbstractC0075g<Loader> abstractC0075g) {
this.g = abstractC0075g;
}
private void g(zc<Loader> zcVar, int i) {
com.bytedance.sdk.openadsdk.api.i.zc("_tt_ad_sdk_", "load ad slot type: ".concat(String.valueOf(i)));
this.g.g(zcVar, i);
}
@Override
public void e(final ValueSet valueSet, final Bridge bridge) {
g(new zc<Loader>() {
@Override
public void g(Loader loader) {
OooO0O0 OooOO0 = OooO0O0.OooOO0(valueSet);
OooOO0.OooO(2, true);
OooOO0.OooO0oO(1, bridge);
loader.load(5, OooOO0.OooOO0O(), null);
}
}, 5);
}
@Override
public void fy(final ValueSet valueSet, final Bridge bridge) {
g(new zc<Loader>() {
@Override
public void g(Loader loader) {
OooO0O0 OooOO0 = OooO0O0.OooOO0(valueSet);
OooOO0.OooO0oO(1, bridge);
loader.load(8, OooOO0.OooOO0O(), null);
}
}, 8);
}
@Override
public void gj(final ValueSet valueSet, final Bridge bridge) {
g(new zc<Loader>() {
@Override
public void g(Loader loader) {
OooO0O0 OooOO0 = OooO0O0.OooOO0(valueSet);
OooOO0.OooO(2, true);
OooOO0.OooO0oO(1, bridge);
loader.load(1, OooOO0.OooOO0O(), null);
}
}, 1);
}
@Override
public void i(final ValueSet valueSet, final Bridge bridge) {
g(new zc<Loader>() {
@Override
public void g(Loader loader) {
OooO0O0 OooOO0 = OooO0O0.OooOO0(valueSet);
OooOO0.OooO0oO(1, bridge);
loader.load(9, OooOO0.OooOO0O(), null);
}
}, 9);
}
@Override
public void ql(final ValueSet valueSet, final Bridge bridge) {
g(new zc<Loader>() {
@Override
public void g(Loader loader) {
OooO0O0 OooOO0 = OooO0O0.OooOO0(valueSet);
OooOO0.OooO0oO(1, bridge);
loader.load(1, OooOO0.OooOO0O(), null);
}
}, 1);
}
@Override
public void r(final ValueSet valueSet, final Bridge bridge) {
g(new zc<Loader>() {
@Override
public void g(Loader loader) {
OooO0O0 OooOO0 = OooO0O0.OooOO0(valueSet);
OooOO0.OooO0oO(1, bridge);
loader.load(7, OooOO0.OooOO0O(), null);
}
}, 7);
}
@Override
public void t(final ValueSet valueSet, final Bridge bridge) {
g(new zc<Loader>() {
@Override
public void g(Loader loader) {
OooO0O0 OooOO0 = OooO0O0.OooOO0(valueSet);
OooOO0.OooO(2, true);
OooOO0.OooO0oO(1, bridge);
loader.load(9, OooOO0.OooOO0O(), null);
}
}, 9);
}
@Override
public void zc(final ValueSet valueSet, final Bridge bridge) {
g(new zc<Loader>() {
@Override
public void g(Loader loader) {
OooO0O0 OooOO0 = OooO0O0.OooOO0(valueSet);
OooOO0.OooO0oO(1, bridge);
loader.load(6, OooOO0.OooOO0O(), null);
}
}, 6);
}
@Override
public void g(final ValueSet valueSet, final Bridge bridge) {
g(new zc<Loader>() {
@Override
public void g(Loader loader) {
OooO0O0 OooOO0 = OooO0O0.OooOO0(valueSet);
OooOO0.OooO0oO(1, bridge);
loader.load(5, OooOO0.OooOO0O(), null);
}
}, 5);
}
@Override
public void g(final ValueSet valueSet, final Bridge bridge, final int i) {
g(new zc<Loader>() {
@Override
public void g(Loader loader) {
OooO0O0 OooOO0 = OooO0O0.OooOO0(valueSet);
OooOO0.OooO0o0(3, i);
OooOO0.OooO0oO(1, bridge);
loader.load(3, OooOO0.OooOO0O(), null);
}
}, 3);
}
@Override
public Pair<Integer, String> g(Exception exc) {
com.bytedance.sdk.openadsdk.api.i.ql("_tt_ad_sdk_", "Load ad failed: " + exc.getMessage());
if ((exc instanceof IllegalStateException) && "广告SDK未Ready, 请在load(请求广告)之前,先调用init and start方法,以避免无法请求广告".equals(exc.getMessage())) {
return new Pair<>(4208, exc.getMessage());
}
Integer valueOf = Integer.valueOf((int) TTAdConstant.INIT_FAILED_CREATE_INVOKE_FAILED);
return new Pair<>(valueOf, "Load ad failed: " + exc.getMessage());
}
}
public void g(Manager manager) {
com.bytedance.sdk.openadsdk.api.i.zc("_tt_ad_sdk_", "update manager");
zc().g(manager);
zc().register(com.bytedance.sdk.openadsdk.g.i.g());
}
}