MD5 校验值:d53ec1a251294bef920c76a08ee856d9
g.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package com.applovin.impl.adview.activity.b; import android.R; 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.n; 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.h; 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.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 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 n ajv; private boolean isVideoMuted; private final boolean isVideoStream; private final ImageView muteButtonImageView; public class a implements View.OnClickListener { private a() { } @Override public void onClick(View view) { if (view == g.this.ajv) { g.this.th(); return; } if (view == g.this.muteButtonImageView) { g.this.tb(); return; } x xVar = g.this.logger; if (x.Fk()) { g.this.logger.i("AppLovinFullscreenActivity", "Unhandled click on widget: " + view); } } public a(g gVar, AnonymousClass1 anonymousClass1) { this(); } } 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 FD = this.aiL.FD(); this.isVideoStream = FD; 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.aLW, nVar)) { checkCachedAdResourcesAsync(false); } a aVar = new a(); if (eVar.Ga() >= 0) { n nVar2 = new n(eVar.Gh(), 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 (FD) { com.applovin.impl.adview.a aVar2 = new com.applovin.impl.adview.a(activity, ((Integer) nVar.a(com.applovin.impl.sdk.c.b.aNk)).intValue(), R.attr.progressBarStyleLarge); this.aju = aVar2; aVar2.setColor(Color.parseColor("#75FFFFFF")); aVar2.setBackgroundColor(Color.parseColor("#00000000")); aVar2.setVisibility(8); return; } this.aju = null; } private void av(boolean z) { Uri Hu; int i; if (h.KV()) { Activity activity = this.ahM; if (z) { i = com.applovin.sdk.R.drawable.applovin_ic_unmute_to_mute; } else { i = com.applovin.sdk.R.drawable.applovin_ic_mute_to_unmute; } AnimatedVectorDrawable animatedVectorDrawable = (AnimatedVectorDrawable) activity.getDrawable(i); if (animatedVectorDrawable != null) { this.muteButtonImageView.setScaleType(ImageView.ScaleType.FIT_XY); this.muteButtonImageView.setImageDrawable(animatedVectorDrawable); animatedVectorDrawable.start(); return; } } if (z) { Hu = this.aiL.Ht(); } else { Hu = this.aiL.Hu(); } StrictMode.ThreadPolicy allowThreadDiskReads = StrictMode.allowThreadDiskReads(); this.muteButtonImageView.setImageURI(Hu); 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(); 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.JO(); if (this.aiL.Gi()) { if (x.Fk()) { this.logger.f("AppLovinFullscreenActivity", "Dismissing ad on video skip..."); } dismiss(); } else { if (x.Fk()) { this.logger.f("AppLovinFullscreenActivity", "Skipping video..."); } tc(); } } public void te() { if (this.ajD.compareAndSet(false, true)) { a(this.ajv, this.aiL.Ga(), new O9KF9KMx8LFwf2eqjN2w(this, 0)); } } public void tn() { this.ajE = -1L; this.ajF = SystemClock.elapsedRealtime(); } public void ts() { this.aiV = SystemClock.elapsedRealtime(); } @Override public void bE(long j) { } @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() { if (this.ajS >= this.aiL.GC()) { return true; } return false; } @Override public boolean sJ() { if (sK() && !sI()) { return true; } return false; } @Override public void sL() { long GS; long millis; long j = 0; if (this.aiL.GR() >= 0 || this.aiL.GS() >= 0) { if (this.aiL.GR() >= 0) { GS = this.aiL.GR(); } else { com.applovin.impl.sdk.ad.a aVar = (com.applovin.impl.sdk.ad.a) this.aiL; double d = this.ajT; if (d > 0.0d) { j = 0 + TimeUnit.SECONDS.toMillis((long) d); } if (aVar.GT()) { int FK = (int) ((com.applovin.impl.sdk.ad.a) this.aiL).FK(); if (FK > 0) { millis = TimeUnit.SECONDS.toMillis(FK); } else { int Gc = (int) aVar.Gc(); if (Gc > 0) { millis = TimeUnit.SECONDS.toMillis(Gc); } } j += millis; } GS = (long) ((this.aiL.GS() / 100.0d) * j); } bF(GS); } } @Override public void sN() { super.sN(); sT(); } @Override public void sR() { if (x.Fk()) { this.logger.f("AppLovinFullscreenActivity", "Continue video from prompt - will resume in onWindowFocusChanged(true) when alert dismisses"); } } @Override public void sS() { if (x.Fk()) { 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.Fk()) { this.logger.f("AppLovinFullscreenActivity", "Showing postitial..."); } bu("javascript:al_showPostitial();"); 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.Gc() >= 0) { a(this.aiR, this.aiL.Gc(), new O9KF9KMx8LFwf2eqjN2w(this, 3)); } else { this.aiR.setVisibility(0); } } this.aiQ.getController().qW(); sM(); } } public void th() { this.ajE = SystemClock.elapsedRealtime() - this.ajF; if (x.Fk()) { this.logger.f("AppLovinFullscreenActivity", "Attempting to skip video with skip time: " + this.ajE + "ms"); } if (sJ()) { sG(); if (x.Fk()) { this.logger.f("AppLovinFullscreenActivity", "Prompting incentivized ad close warning"); } this.ajh.Jv(); return; } sY(); } @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.aLW, 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.BM().a(new ab(this.sdk, "scheduleSkipButton", new O9KF9KMx8LFwf2eqjN2w(this, 1)), q.b.MAIN, this.aiL.Gb(), true); } this.sdk.BM().a(new ab(this.sdk, "updateMainViewOM", new O9KF9KMx8LFwf2eqjN2w(this, 2)), q.b.MAIN, 500L); super.au(this.isVideoMuted); } @Override public void b(double d) { this.ajS = d; } @Override public void a(double d) { 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 = d; sL(); if (this.aiL.Ha()) { this.ajh.a(this.aiL, null); } } private static boolean a(boolean z, com.applovin.impl.sdk.n nVar) { if (!((Boolean) nVar.a(com.applovin.impl.sdk.c.b.aMZ)).booleanValue()) { return false; } if (!((Boolean) nVar.a(com.applovin.impl.sdk.c.b.aNa)).booleanValue() || z) { return true; } return ((Boolean) nVar.a(com.applovin.impl.sdk.c.b.aNc)).booleanValue(); } }