Picsart v24.6版本的 MD5 值为:21a61631d94e54da68d2ad9268b8b9d9
以下内容为反编译后的 g.java 源代码,内容仅作参考
package com.applovin.impl.adview.activity.b;
import android.app.Activity;
import android.graphics.Color;
import android.graphics.drawable.AnimatedVectorDrawable;
import android.os.SystemClock;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.applovin.impl.adview.p;
import com.applovin.impl.sdk.e.ab;
import com.applovin.impl.sdk.e.q;
import com.applovin.impl.sdk.n;
import com.applovin.impl.sdk.utils.ImageViewUtils;
import com.applovin.impl.sdk.utils.t;
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 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 ajH;
private long ajI;
private long ajJ;
private final com.applovin.impl.adview.activity.a.d ajV;
private double ajW;
private double ajX;
private final AtomicBoolean ajY;
private final com.applovin.impl.adview.a ajy;
private final p ajz;
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.ajz) {
g.this.tr();
} else if (view == g.this.muteButtonImageView) {
g.this.tl();
} else {
x xVar = g.this.logger;
if (x.FL()) {
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, n nVar, AppLovinAdClickListener appLovinAdClickListener, AppLovinAdDisplayListener appLovinAdDisplayListener, AppLovinAdVideoPlaybackListener appLovinAdVideoPlaybackListener) {
super(eVar, activity, map, nVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
this.ajV = new com.applovin.impl.adview.activity.a.d(this.aiO, this.ahP, this.sdk);
boolean Gj = this.aiO.Gj();
this.isVideoStream = Gj;
this.ajY = new AtomicBoolean();
this.ajH = new AtomicBoolean();
this.isVideoMuted = t.S(this.sdk);
this.ajI = -2L;
this.ajJ = 0L;
if (t.a(com.applovin.impl.sdk.c.b.aNG, nVar)) {
checkCachedAdResourcesAsync(false);
}
a aVar = new a();
if (eVar.GG() >= 0) {
p pVar = new p(eVar.GN(), activity);
this.ajz = pVar;
pVar.setVisibility(8);
pVar.setOnClickListener(aVar);
} else {
this.ajz = 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 (!Gj) {
this.ajy = null;
return;
}
com.applovin.impl.adview.a aVar2 = new com.applovin.impl.adview.a(activity, ((Integer) nVar.a(com.applovin.impl.sdk.c.b.aOT)).intValue(), 16842874);
this.ajy = aVar2;
aVar2.setColor(Color.parseColor("#75FFFFFF"));
aVar2.setBackgroundColor(Color.parseColor("#00000000"));
aVar2.setVisibility(8);
}
private static boolean a(boolean z, n nVar) {
if (((Boolean) nVar.a(com.applovin.impl.sdk.c.b.aOI)).booleanValue()) {
if (!((Boolean) nVar.a(com.applovin.impl.sdk.c.b.aOJ)).booleanValue() || z) {
return true;
}
return ((Boolean) nVar.a(com.applovin.impl.sdk.c.b.aOL)).booleanValue();
}
return false;
}
private void av(boolean z) {
if (com.applovin.impl.sdk.utils.h.LQ()) {
AnimatedVectorDrawable animatedVectorDrawable = (AnimatedVectorDrawable) this.ahP.getDrawable(z ? 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;
}
}
ImageViewUtils.setImageUri(this.muteButtonImageView, z ? this.aiO.Ir() : this.aiO.Is(), this.sdk);
}
public void tD() {
this.aiY = SystemClock.elapsedRealtime();
}
private void tc() {
this.ajV.a(this.aiV);
this.aiY = SystemClock.elapsedRealtime();
this.ajW = 100.0d;
}
public void th() {
ArrayList arrayList = new ArrayList();
p pVar = this.aiU;
if (pVar != null) {
arrayList.add(new com.applovin.impl.sdk.a.d(pVar, FriendlyObstructionPurpose.CLOSE_AD, "close button"));
}
com.applovin.impl.adview.x xVar = this.ago;
if (xVar != null && xVar.sp()) {
com.applovin.impl.adview.x xVar2 = this.ago;
arrayList.add(new com.applovin.impl.sdk.a.d(xVar2, FriendlyObstructionPurpose.NOT_VISIBLE, xVar2.getIdentifier()));
}
this.aiO.getAdEventTracker().a(this.aiT, arrayList);
}
private void ti() {
this.ajg++;
if (this.aiO.GO()) {
if (x.FL()) {
this.logger.f("AppLovinFullscreenActivity", "Dismissing ad on video skip...");
}
dismiss();
return;
}
if (x.FL()) {
this.logger.f("AppLovinFullscreenActivity", "Skipping video...");
}
tm();
}
public void to() {
if (this.ajH.compareAndSet(false, true)) {
a(this.ajz, this.aiO.GG(), new myobfuscated.q3.e(this, 5));
}
}
public void ty() {
this.ajI = -1L;
this.ajJ = SystemClock.elapsedRealtime();
}
@Override
public void a(double d) {
bv("javascript:al_setVideoMuted(" + this.isVideoMuted + ");");
com.applovin.impl.adview.a aVar = this.ajy;
if (aVar != null) {
aVar.qO();
}
if (this.ajz != null) {
to();
}
this.aiT.getController().qU();
this.ajX = d;
sT();
if (this.aiO.HL()) {
this.ajk.a(this.aiO, null);
}
}
@Override
public void a(ViewGroup viewGroup) {
this.ajV.a(this.muteButtonImageView, this.ajz, this.aiU, this.ajy, this.ago, this.aiT, viewGroup);
this.aiT.getController().a((com.applovin.impl.adview.g) this);
if (!t.a(com.applovin.impl.sdk.c.b.aNG, this.sdk)) {
checkCachedAdResourcesImmediately(false);
}
com.applovin.impl.adview.a aVar = this.ajy;
if (aVar != null) {
aVar.qN();
}
com.applovin.impl.adview.x xVar = this.ago;
if (xVar != null) {
xVar.so();
}
this.aiT.renderAd(this.aiO);
if (this.ajz != null) {
this.sdk.Cj().a(new ab(this.sdk, "scheduleSkipButton", new h(this, 3)), q.a.TIMEOUT, this.aiO.GH(), true);
}
this.sdk.Cj().a(new ab(this.sdk, "updateMainViewOM", new i(this, 3)), q.a.OTHER, 500L);
super.au(this.isVideoMuted);
}
@Override
public void b(double d) {
this.ajW = d;
}
@Override
public void bE(long j) {
}
@Override
public void dismiss() {
sL();
super.dismiss();
}
@Override
public void pauseVideo() {
}
@Override
public void rp() {
tm();
}
@Override
public void rq() {
com.applovin.impl.adview.a aVar = this.ajy;
if (aVar != null) {
aVar.qN();
}
}
@Override
public void rr() {
com.applovin.impl.adview.a aVar = this.ajy;
if (aVar != null) {
aVar.qO();
}
}
@Override
public void sI() {
a((ViewGroup) null);
}
@Override
public void sL() {
super.a((int) this.ajW, this.isVideoStream, sQ(), this.ajI);
}
@Override
public boolean sQ() {
return this.aiO.HF() ? this.ajm : this.ajW >= ((double) this.aiO.Hm());
}
@Override
public boolean sR() {
return sS() && !sQ();
}
@Override
public void sT() {
long HC;
long millis;
if (this.aiO.HB() >= 0 || this.aiO.HC() >= 0) {
if (this.aiO.HB() >= 0) {
HC = this.aiO.HB();
} else {
com.applovin.impl.sdk.ad.a aVar = (com.applovin.impl.sdk.ad.a) this.aiO;
double d = this.ajX;
long millis2 = d > 0.0d ? TimeUnit.SECONDS.toMillis((long) d) : 0L;
if (aVar.HD()) {
int Gq = (int) ((com.applovin.impl.sdk.ad.a) this.aiO).Gq();
if (Gq > 0) {
millis = TimeUnit.SECONDS.toMillis(Gq);
} else {
int GI = (int) aVar.GI();
if (GI > 0) {
millis = TimeUnit.SECONDS.toMillis(GI);
}
}
millis2 += millis;
}
HC = (long) ((this.aiO.HC() / 100.0d) * millis2);
}
bF(HC);
}
}
@Override
public void sV() {
super.sV();
tc();
}
@Override
public void sW() {
super.sW();
tc();
}
@Override
public void ta() {
if (x.FL()) {
this.logger.f("AppLovinFullscreenActivity", "Continue video from prompt - will resume in onWindowFocusChanged(true) when alert dismisses");
}
}
@Override
public void tb() {
if (x.FL()) {
this.logger.f("AppLovinFullscreenActivity", "Skipping video from prompt");
}
ti();
}
public void tl() {
this.isVideoMuted = !this.isVideoMuted;
bv("javascript:al_setVideoMuted(" + this.isVideoMuted + ");");
av(this.isVideoMuted);
d(this.isVideoMuted, 0L);
}
public void tm() {
if (this.ajY.compareAndSet(false, true)) {
if (x.FL()) {
this.logger.f("AppLovinFullscreenActivity", "Showing postitial...");
}
bv("javascript:al_showPostitial();");
p pVar = this.ajz;
if (pVar != null) {
pVar.setVisibility(8);
}
ImageView imageView = this.muteButtonImageView;
if (imageView != null) {
imageView.setVisibility(8);
}
com.applovin.impl.adview.a aVar = this.ajy;
if (aVar != null) {
aVar.qO();
}
if (this.aiU != null) {
if (this.aiO.GI() >= 0) {
a(this.aiU, this.aiO.GI(), new myobfuscated.e.b(this, 10));
} else {
this.aiU.setVisibility(0);
}
}
this.aiT.getController().qV();
sU();
}
}
public void tr() {
this.ajI = SystemClock.elapsedRealtime() - this.ajJ;
if (x.FL()) {
this.logger.f("AppLovinFullscreenActivity", com.appsflyer.internal.c.q(new StringBuilder("Attempting to skip video with skip time: "), this.ajI, "ms"));
}
if (!sR()) {
ti();
return;
}
sO();
if (x.FL()) {
this.logger.f("AppLovinFullscreenActivity", "Prompting incentivized ad close warning");
}
this.ajk.Kw();
}
}