Currency Plus v2.10.8版本的 MD5 值为:8586f74edd9ace5aa261a19c9da51484
以下内容为反编译后的 g.java 源代码,内容仅作参考
package com.applovin.impl.adview.activity.b;
import android.app.Activity;
import android.graphics.Color;
import android.graphics.drawable.AnimatedVectorDrawable;
import android.net.Uri;
import android.os.StrictMode;
import android.os.SystemClock;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.applovin.impl.adview.v;
import com.applovin.impl.sdk.e.ab;
import com.applovin.impl.sdk.e.q;
import com.applovin.impl.sdk.utils.u;
import com.applovin.impl.sdk.x;
import com.applovin.sdk.AppLovinAdClickListener;
import com.applovin.sdk.AppLovinAdDisplayListener;
import com.applovin.sdk.AppLovinAdVideoPlaybackListener;
import com.applovin.sdk.R;
import com.iab.omid.library.applovin.adsession.FriendlyObstructionPurpose;
import com.inmobi.commons.core.configs.TelemetryConfig;
import java.util.ArrayList;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
public class g extends com.applovin.impl.adview.activity.b.a implements com.applovin.impl.adview.g {
private final AtomicBoolean ajD;
private long ajE;
private long ajF;
private final com.applovin.impl.adview.activity.a.d ajR;
private double ajS;
private double ajT;
private final AtomicBoolean ajU;
private final com.applovin.impl.adview.a aju;
private final com.applovin.impl.adview.n ajv;
private boolean isVideoMuted;
private final boolean isVideoStream;
private final ImageView muteButtonImageView;
public class a implements View.OnClickListener {
private a() {
g.this = r1;
}
@Override
public void onClick(View view) {
if (view == g.this.ajv) {
g.this.th();
} else if (view == g.this.muteButtonImageView) {
g.this.tb();
} else {
x xVar = g.this.logger;
if (x.Fn()) {
x xVar2 = g.this.logger;
xVar2.i("AppLovinFullscreenActivity", "Unhandled click on widget: " + view);
}
}
}
}
public g(com.applovin.impl.sdk.ad.e eVar, Activity activity, Map<String, Object> map, com.applovin.impl.sdk.n nVar, AppLovinAdClickListener appLovinAdClickListener, AppLovinAdDisplayListener appLovinAdDisplayListener, AppLovinAdVideoPlaybackListener appLovinAdVideoPlaybackListener) {
super(eVar, activity, map, nVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
this.ajR = new com.applovin.impl.adview.activity.a.d(this.aiL, this.ahM, this.sdk);
boolean FF = this.aiL.FF();
this.isVideoStream = FF;
this.ajU = new AtomicBoolean();
this.ajD = new AtomicBoolean();
this.isVideoMuted = u.P(this.sdk);
this.ajE = -2L;
this.ajF = 0L;
if (u.a(com.applovin.impl.sdk.c.b.aMb, nVar)) {
checkCachedAdResourcesAsync(false);
}
a aVar = new a();
if (eVar.Gc() >= 0) {
com.applovin.impl.adview.n nVar2 = new com.applovin.impl.adview.n(eVar.Gj(), activity);
this.ajv = nVar2;
nVar2.setVisibility(8);
nVar2.setOnClickListener(aVar);
} else {
this.ajv = null;
}
if (a(this.isVideoMuted, nVar)) {
ImageView imageView = new ImageView(activity);
this.muteButtonImageView = imageView;
imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
imageView.setClickable(true);
imageView.setOnClickListener(aVar);
av(this.isVideoMuted);
} else {
this.muteButtonImageView = null;
}
if (!FF) {
this.aju = null;
return;
}
com.applovin.impl.adview.a aVar2 = new com.applovin.impl.adview.a(activity, ((Integer) nVar.a(com.applovin.impl.sdk.c.b.aNp)).intValue(), 16842874);
this.aju = aVar2;
aVar2.setColor(Color.parseColor("#75FFFFFF"));
aVar2.setBackgroundColor(Color.parseColor("#00000000"));
aVar2.setVisibility(8);
}
private static boolean a(boolean z10, com.applovin.impl.sdk.n nVar) {
if (((Boolean) nVar.a(com.applovin.impl.sdk.c.b.aNe)).booleanValue()) {
if (!((Boolean) nVar.a(com.applovin.impl.sdk.c.b.aNf)).booleanValue() || z10) {
return true;
}
return ((Boolean) nVar.a(com.applovin.impl.sdk.c.b.aNh)).booleanValue();
}
return false;
}
private void av(boolean z10) {
if (com.applovin.impl.sdk.utils.h.KX()) {
AnimatedVectorDrawable animatedVectorDrawable = (AnimatedVectorDrawable) this.ahM.getDrawable(z10 ? R.drawable.applovin_ic_unmute_to_mute : R.drawable.applovin_ic_mute_to_unmute);
if (animatedVectorDrawable != null) {
this.muteButtonImageView.setScaleType(ImageView.ScaleType.FIT_XY);
this.muteButtonImageView.setImageDrawable(animatedVectorDrawable);
animatedVectorDrawable.start();
return;
}
}
Uri Hv = z10 ? this.aiL.Hv() : this.aiL.Hw();
StrictMode.ThreadPolicy allowThreadDiskReads = StrictMode.allowThreadDiskReads();
this.muteButtonImageView.setImageURI(Hv);
StrictMode.setThreadPolicy(allowThreadDiskReads);
}
private void sT() {
this.ajR.a(this.aiS);
this.aiV = SystemClock.elapsedRealtime();
this.ajS = 100.0d;
}
public void sX() {
ArrayList arrayList = new ArrayList();
com.applovin.impl.adview.n nVar = this.aiR;
if (nVar != null) {
arrayList.add(new com.applovin.impl.sdk.a.d(nVar, FriendlyObstructionPurpose.CLOSE_AD, "close button"));
}
v vVar = this.agn;
if (vVar != null && vVar.sh()) {
v vVar2 = this.agn;
arrayList.add(new com.applovin.impl.sdk.a.d(vVar2, FriendlyObstructionPurpose.NOT_VISIBLE, vVar2.getIdentifier()));
}
this.aiL.getAdEventTracker().a(this.aiQ, arrayList);
}
private void sY() {
this.ajd++;
this.agj.JQ();
if (this.aiL.Gk()) {
if (x.Fn()) {
this.logger.f("AppLovinFullscreenActivity", "Dismissing ad on video skip...");
}
dismiss();
return;
}
if (x.Fn()) {
this.logger.f("AppLovinFullscreenActivity", "Skipping video...");
}
tc();
}
public void te() {
if (this.ajD.compareAndSet(false, true)) {
a(this.ajv, this.aiL.Gc(), new q(this, 0));
}
}
public void tn() {
this.ajE = -1L;
this.ajF = SystemClock.elapsedRealtime();
}
public void ts() {
this.aiV = SystemClock.elapsedRealtime();
}
@Override
public void a(double d10) {
bu("javascript:al_setVideoMuted(" + this.isVideoMuted + ");");
com.applovin.impl.adview.a aVar = this.aju;
if (aVar != null) {
aVar.qO();
}
if (this.ajv != null) {
te();
}
this.aiQ.getController().qV();
this.ajT = d10;
sL();
if (this.aiL.Hc()) {
this.ajh.a(this.aiL, null);
}
}
@Override
public void a(ViewGroup viewGroup) {
this.ajR.a(this.muteButtonImageView, this.ajv, this.aiR, this.aju, this.agn, this.aiQ, viewGroup);
this.aiQ.getController().a(this);
if (!u.a(com.applovin.impl.sdk.c.b.aMb, this.sdk)) {
checkCachedAdResourcesImmediately(false);
}
com.applovin.impl.adview.a aVar = this.aju;
if (aVar != null) {
aVar.qN();
}
v vVar = this.agn;
if (vVar != null) {
vVar.sg();
}
this.aiQ.renderAd(this.aiL);
if (this.ajv != null) {
this.sdk.BO().a(new ab(this.sdk, "scheduleSkipButton", new q(this, 1)), q.b.MAIN, this.aiL.Gd(), true);
}
this.sdk.BO().a(new ab(this.sdk, "updateMainViewOM", new q(this, 2)), q.b.MAIN, 500L);
super.au(this.isVideoMuted);
}
@Override
public void b(double d10) {
this.ajS = d10;
}
@Override
public void bE(long j10) {
}
@Override
public void dismiss() {
sD();
super.dismiss();
}
@Override
public void pauseVideo() {
}
@Override
public void rl() {
super.rl();
sT();
}
@Override
public void ru() {
tc();
}
@Override
public void rv() {
com.applovin.impl.adview.a aVar = this.aju;
if (aVar != null) {
aVar.qN();
}
}
@Override
public void rw() {
com.applovin.impl.adview.a aVar = this.aju;
if (aVar != null) {
aVar.qO();
}
}
@Override
public void sA() {
a((ViewGroup) null);
}
@Override
public void sD() {
super.a((int) this.ajS, this.isVideoStream, sI(), this.ajE);
}
@Override
public boolean sI() {
return this.ajS >= ((double) this.aiL.GE());
}
@Override
public boolean sJ() {
return sK() && !sI();
}
@Override
public void sL() {
long GU;
long millis;
if (this.aiL.GT() >= 0 || this.aiL.GU() >= 0) {
if (this.aiL.GT() >= 0) {
GU = this.aiL.GT();
} else {
com.applovin.impl.sdk.ad.a aVar = (com.applovin.impl.sdk.ad.a) this.aiL;
double d10 = this.ajT;
long millis2 = d10 > TelemetryConfig.DEFAULT_SAMPLING_FACTOR ? TimeUnit.SECONDS.toMillis((long) d10) : 0L;
if (aVar.GV()) {
int FM = (int) ((com.applovin.impl.sdk.ad.a) this.aiL).FM();
if (FM > 0) {
millis = TimeUnit.SECONDS.toMillis(FM);
} else {
int Ge = (int) aVar.Ge();
if (Ge > 0) {
millis = TimeUnit.SECONDS.toMillis(Ge);
}
}
millis2 += millis;
}
GU = (long) ((this.aiL.GU() / 100.0d) * millis2);
}
bF(GU);
}
}
@Override
public void sN() {
super.sN();
sT();
}
@Override
public void sR() {
if (x.Fn()) {
this.logger.f("AppLovinFullscreenActivity", "Continue video from prompt - will resume in onWindowFocusChanged(true) when alert dismisses");
}
}
@Override
public void sS() {
if (x.Fn()) {
this.logger.f("AppLovinFullscreenActivity", "Skipping video from prompt");
}
sY();
}
public void tb() {
this.isVideoMuted = !this.isVideoMuted;
bu("javascript:al_setVideoMuted(" + this.isVideoMuted + ");");
av(this.isVideoMuted);
d(this.isVideoMuted, 0L);
}
public void tc() {
if (this.ajU.compareAndSet(false, true)) {
if (x.Fn()) {
this.logger.f("AppLovinFullscreenActivity", "Showing postitial...");
}
bu("javascript:al_showPostitial();");
com.applovin.impl.adview.n nVar = this.ajv;
if (nVar != null) {
nVar.setVisibility(8);
}
ImageView imageView = this.muteButtonImageView;
if (imageView != null) {
imageView.setVisibility(8);
}
com.applovin.impl.adview.a aVar = this.aju;
if (aVar != null) {
aVar.qO();
}
if (this.aiR != null) {
if (this.aiL.Ge() >= 0) {
a(this.aiR, this.aiL.Ge(), new q(this, 3));
} else {
this.aiR.setVisibility(0);
}
}
this.aiQ.getController().qW();
sM();
}
}
public void th() {
this.ajE = SystemClock.elapsedRealtime() - this.ajF;
if (x.Fn()) {
this.logger.f("AppLovinFullscreenActivity", ag.a.q(new StringBuilder("Attempting to skip video with skip time: "), this.ajE, "ms"));
}
if (!sJ()) {
sY();
return;
}
sG();
if (x.Fn()) {
this.logger.f("AppLovinFullscreenActivity", "Prompting incentivized ad close warning");
}
this.ajh.Jx();
}
}