MyRecorder v1.01.90.0219版本的 MD5 值为:c361f51174a0bf833abfa72929caf8d3
以下内容为反编译后的 CmpServiceImpl.java 源代码,内容仅作参考
package com.applovin.impl.privacy.cmp;
import android.app.Activity;
import android.os.Bundle;
import com.applovin.impl.privacy.a.d;
import com.applovin.impl.privacy.cmp.b;
import com.applovin.impl.sdk.n;
import com.applovin.impl.sdk.utils.u;
import com.applovin.impl.sdk.x;
import com.applovin.sdk.AppLovinCmpError;
import com.applovin.sdk.AppLovinCmpService;
import com.applovin.sdk.AppLovinSdkUtils;
public class CmpServiceImpl implements b.a, AppLovinCmpService {
private final com.applovin.impl.privacy.cmp.a axw;
private com.applovin.impl.privacy.cmp.b axx = zR();
private a axy;
private b axz;
private final n sdk;
public interface a {
void c(AppLovinCmpError appLovinCmpError);
}
public interface b {
void d(AppLovinCmpError appLovinCmpError);
}
public CmpServiceImpl(n nVar) {
this.sdk = nVar;
this.axw = new com.applovin.impl.privacy.cmp.a(nVar.Cl().getDebugUserGeography());
}
private void a(AppLovinCmpError appLovinCmpError) {
a aVar = this.axy;
if (aVar == null) {
return;
}
aVar.c(appLovinCmpError);
this.axy = null;
}
private void b(AppLovinCmpError appLovinCmpError) {
b bVar = this.axz;
if (bVar == null) {
return;
}
bVar.d(appLovinCmpError);
this.axz = null;
}
private com.applovin.impl.privacy.cmp.b zR() {
if (u.dE("com.google.android.ump.ConsentForm")) {
return new com.applovin.impl.privacy.cmp.b(this.sdk);
}
if (this.sdk.Cl().isEnabled() && this.sdk.Cl().zX() == d.a.UNIFIED) {
x.H("AppLovinSdk", "Could not load Google UMP. Please add the Google User Messaging Platform SDK into your application. Instructions can be found here: https://dash.applovin.com/documentation/mediation/android/getting-started/terms-and-privacy-policy-flow#enabling-google-ump");
return null;
}
return null;
}
private void zS() {
if (hasSupportedCmp()) {
this.axx.zS();
}
}
private void zT() {
com.applovin.impl.privacy.cmp.b bVar = this.axx;
if (bVar == null) {
return;
}
bVar.destroy();
}
@Override
public boolean hasSupportedCmp() {
return this.axx != null;
}
public void loadCmp(final Activity activity, a aVar) {
if (!hasSupportedCmp()) {
aVar.c(new CmpErrorImpl(AppLovinCmpError.Code.INTEGRATION_ERROR, "A supported CMP is not integrated"));
return;
}
this.axy = aVar;
Runnable runnable = new Runnable() {
@Override
public void run() {
CmpServiceImpl.this.axx.a(activity, CmpServiceImpl.this.axw, CmpServiceImpl.this);
}
};
if (this.axx.zU()) {
AppLovinSdkUtils.runOnUiThread(runnable);
} else {
runnable.run();
}
}
@Override
public void onFlowHidden(Bundle bundle) {
b((AppLovinCmpError) null);
zT();
}
@Override
public void onFlowLoadFailed(CmpErrorImpl cmpErrorImpl) {
a(cmpErrorImpl);
zT();
}
@Override
public void onFlowLoaded(Bundle bundle) {
a((AppLovinCmpError) null);
}
@Override
public void onFlowShowFailed(CmpErrorImpl cmpErrorImpl) {
b(cmpErrorImpl);
zT();
}
public void showCmp(final Activity activity, b bVar) {
Runnable runnable = new Runnable() {
@Override
public void run() {
CmpServiceImpl.this.axx.b(activity, CmpServiceImpl.this.axw, CmpServiceImpl.this);
}
};
this.axz = bVar;
if (this.axx.zV()) {
AppLovinSdkUtils.runOnUiThread(runnable);
} else {
runnable.run();
}
}
@Override
public void showCmpForExistingUser(final Activity activity, final AppLovinCmpService.OnCompletedListener onCompletedListener) {
this.sdk.BN();
if (x.Fn()) {
x BN = this.sdk.BN();
BN.f("AppLovinCmpService", "showCmpForExistingUser(activity=" + activity + ", completedListener=" + onCompletedListener + ")");
}
if (!hasSupportedCmp()) {
onCompletedListener.onCompleted(new CmpErrorImpl(AppLovinCmpError.Code.INTEGRATION_ERROR, "A supported CMP is not integrated"));
return;
}
zS();
loadCmp(activity, new a() {
@Override
public void c(AppLovinCmpError appLovinCmpError) {
if (appLovinCmpError != null) {
onCompletedListener.onCompleted(appLovinCmpError);
} else {
CmpServiceImpl.this.showCmp(activity, new b() {
@Override
public void d(AppLovinCmpError appLovinCmpError2) {
onCompletedListener.onCompleted(appLovinCmpError2);
}
});
}
}
});
}
public String toString() {
return "[CmpService]";
}
}