MD5 校验值:d53ec1a251294bef920c76a08ee856d9
e.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package com.applovin.impl.adview.activity.b; import android.R; import android.app.Activity; import android.content.res.ColorStateList; import android.graphics.Color; import android.graphics.drawable.AnimatedVectorDrawable; import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.os.StrictMode; import android.os.SystemClock; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.ProgressBar; import com.applovin.adview.AppLovinAdView; import com.applovin.communicator.AppLovinCommunicator; import com.applovin.communicator.AppLovinCommunicatorMessage; import com.applovin.communicator.AppLovinCommunicatorSubscriber; import com.applovin.exoplayer2.ab; import com.applovin.exoplayer2.ak; import com.applovin.exoplayer2.an; import com.applovin.exoplayer2.aw; import com.applovin.exoplayer2.h.u; import com.applovin.exoplayer2.k.p; import com.applovin.exoplayer2.l.ai; import com.applovin.exoplayer2.ui.f; import com.applovin.impl.adview.AppLovinTouchToClickListener; import com.applovin.impl.adview.h; import com.applovin.impl.adview.k; import com.applovin.impl.adview.n; import com.applovin.impl.adview.w; import com.applovin.impl.adview.x; import com.applovin.impl.sdk.e.q; import com.applovin.impl.sdk.utils.StringUtils; import com.applovin.impl.sdk.utils.m; import com.applovin.impl.sdk.utils.s; import com.applovin.impl.sdk.utils.u; import com.applovin.impl.sdk.utils.v; import com.applovin.sdk.AppLovinAdClickListener; import com.applovin.sdk.AppLovinAdDisplayListener; import com.applovin.sdk.AppLovinAdVideoPlaybackListener; import com.applovin.sdk.AppLovinSdkUtils; import com.iab.omid.library.applovin.adsession.FriendlyObstructionPurpose; import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; public class e extends com.applovin.impl.adview.activity.b.a implements AppLovinCommunicatorSubscriber { protected final ProgressBar agb; private final Handler ajA; protected final k ajB; protected boolean ajC; private final AtomicBoolean ajD; private long ajE; private long ajF; private final com.applovin.impl.adview.activity.a.c ajt; protected final com.applovin.impl.adview.a aju; protected final n ajv; protected h ajw; protected w ajx; protected ProgressBar ajy; private final a ajz; private final Handler countdownHandler; protected final k countdownManager; protected boolean isVideoMuted; private final boolean isVideoStream; private long lastVideoPositionFromPauseMillis; private final AtomicBoolean mediaErrorHandled; protected final aw mediaPlayer; protected final ImageView muteButtonImageView; protected int savedVideoPercentViewed; protected long videoDurationMillis; protected final com.applovin.exoplayer2.ui.g videoView; protected boolean videoWasCompleted; public class AnonymousClass1 implements k.a { final int ajG; public AnonymousClass1(int i) { r2 = i; } @Override public void rB() { e eVar = e.this; if (eVar.ajw != null) { long seconds = r2 - TimeUnit.MILLISECONDS.toSeconds(eVar.videoView.getPlayer().aN()); if (seconds <= 0) { e.this.aja = true; } else if (e.this.tg()) { e.this.ajw.setProgress((int) seconds); } } } @Override public boolean rC() { return e.this.tg(); } } public class AnonymousClass2 implements k.a { final Integer ajI; public AnonymousClass2(Integer num) { r2 = num; } @Override public void rB() { e eVar = e.this; if (eVar.ajC) { eVar.agb.setVisibility(8); } else { e.this.agb.setProgress((int) ((((float) eVar.mediaPlayer.aN()) / ((float) e.this.videoDurationMillis)) * r2.intValue())); } } @Override public boolean rC() { return !e.this.ajC; } } public class AnonymousClass3 implements k.a { final Integer ajI; final long ajJ; final Long ajK; public AnonymousClass3(long j, Integer num, Long l) { r2 = j; r4 = num; r5 = l; } @Override public void rB() { e.this.ajy.setProgress((int) ((((float) e.this.aiW) / ((float) r2)) * r4.intValue())); e eVar = e.this; eVar.aiW = r5.longValue() + eVar.aiW; } @Override public boolean rC() { if (e.this.aiW < r2) { return true; } return false; } } public class a implements x.a { private a() { } @Override public void a(w wVar) { com.applovin.impl.sdk.x xVar = e.this.logger; if (com.applovin.impl.sdk.x.Fk()) { e.this.logger.f("AppLovinFullscreenActivity", "Clicking through from video button..."); } e.this.a(wVar.getAndClearLastClickEvent(), (Bundle) null); } @Override public void b(w wVar) { com.applovin.impl.sdk.x xVar = e.this.logger; if (com.applovin.impl.sdk.x.Fk()) { e.this.logger.f("AppLovinFullscreenActivity", "Closing ad from video button..."); } e.this.dismiss(); } @Override public void c(w wVar) { com.applovin.impl.sdk.x xVar = e.this.logger; if (com.applovin.impl.sdk.x.Fk()) { e.this.logger.f("AppLovinFullscreenActivity", "Skipping video from video button..."); } e.this.th(); } public a(e eVar, AnonymousClass1 anonymousClass1) { this(); } @Override public void a(w wVar, Bundle bundle) { com.applovin.impl.sdk.x xVar = e.this.logger; if (com.applovin.impl.sdk.x.Fk()) { e.this.logger.f("AppLovinFullscreenActivity", "Attempting to launch Direct Download from video button..."); } e.this.a(wVar.getAndClearLastClickEvent(), bundle); } @Override public void b(Uri uri, w wVar) { com.applovin.impl.sdk.x xVar = e.this.logger; if (com.applovin.impl.sdk.x.Fk()) { e.this.logger.f("AppLovinFullscreenActivity", "Attempting to report a template error from video button..."); } s.b(uri, e.this.aiQ.getController().getCurrentAd(), e.this.sdk); } @Override public void a(Uri uri, w wVar) { com.applovin.impl.sdk.x xVar = e.this.logger; if (com.applovin.impl.sdk.x.Fk()) { e.this.logger.f("AppLovinFullscreenActivity", "Attempting to load a url from video button..."); } s.a(uri, e.this.aiQ.getController(), e.this.sdk); } } public class b implements an.b, f.d, AppLovinTouchToClickListener.OnClickListener { private b() { } @Override public void Z(int i) { com.applovin.impl.sdk.x xVar = e.this.logger; if (com.applovin.impl.sdk.x.Fk()) { com.applovin.impl.sdk.x xVar2 = e.this.logger; StringBuilder MGiy7ImOtTWSOvMYlaRLqKq5Ea = AeD4S2V0JTkFNNCat.MhXFz4O2fao0frTdgvSgsROV.MGiy7ImOtTWSOvMYlaRLqKq5Ea("Player state changed to state ", i, " and will play when ready: "); MGiy7ImOtTWSOvMYlaRLqKq5Ea.append(e.this.mediaPlayer.aE()); xVar2.f("AppLovinFullscreenActivity", MGiy7ImOtTWSOvMYlaRLqKq5Ea.toString()); } if (i == 2) { e.this.sZ(); e.this.agj.JP(); return; } if (i == 3) { e eVar = e.this; eVar.mediaPlayer.h(!eVar.isVideoMuted ? 1 : 0); e eVar2 = e.this; eVar2.aiZ = (int) TimeUnit.MILLISECONDS.toSeconds(eVar2.mediaPlayer.aM()); e eVar3 = e.this; eVar3.bG(eVar3.mediaPlayer.aM()); e.this.sL(); com.applovin.impl.sdk.x xVar3 = e.this.logger; if (com.applovin.impl.sdk.x.Fk()) { e.this.logger.f("AppLovinFullscreenActivity", "MediaPlayer prepared: " + e.this.mediaPlayer); } e.this.countdownManager.start(); e eVar4 = e.this; if (eVar4.ajv != null) { eVar4.te(); } e.this.ta(); if (e.this.ajh.Jw()) { e.this.pauseVideo(); return; } return; } if (i == 4) { com.applovin.impl.sdk.x xVar4 = e.this.logger; if (com.applovin.impl.sdk.x.Fk()) { e.this.logger.f("AppLovinFullscreenActivity", "Video completed"); } e eVar5 = e.this; eVar5.videoWasCompleted = true; if (!eVar5.aiY) { eVar5.tc(); } else if (eVar5.sK()) { e.this.sT(); } } } @Override public void a(ak akVar) { e.this.handleMediaError("Video view error (" + u.a(akVar, e.this.sdk) + ")"); e.this.dismiss(); } @Override public void eZ(int i) { if (i == 0) { e.this.videoView.nG(); } } @Override public void onClick(View view, MotionEvent motionEvent) { e.this.a(motionEvent, (Bundle) null); } public b(e eVar, AnonymousClass1 anonymousClass1) { this(); } } public class c implements View.OnClickListener { private c() { } @Override public void onClick(View view) { e eVar = e.this; if (view == eVar.ajv) { eVar.th(); return; } if (view == eVar.muteButtonImageView) { eVar.tb(); return; } com.applovin.impl.sdk.x xVar = eVar.logger; if (com.applovin.impl.sdk.x.Fk()) { e.this.logger.i("AppLovinFullscreenActivity", "Unhandled click on widget: " + view); } } public c(e eVar, AnonymousClass1 anonymousClass1) { this(); } } public e(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.ajt = new com.applovin.impl.adview.activity.a.c(this.aiL, this.ahM, this.sdk); a aVar = new a(); this.ajz = aVar; Handler handler = new Handler(Looper.getMainLooper()); this.countdownHandler = handler; Handler handler2 = new Handler(Looper.getMainLooper()); this.ajA = handler2; k kVar = new k(handler, this.sdk); this.countdownManager = kVar; this.ajB = new k(handler2, this.sdk); boolean FD = this.aiL.FD(); this.isVideoStream = FD; this.isVideoMuted = u.P(this.sdk); this.lastVideoPositionFromPauseMillis = -1L; this.mediaErrorHandled = new AtomicBoolean(); this.ajD = new AtomicBoolean(); this.ajE = -2L; this.ajF = 0L; if (eVar.hasVideoUrl()) { if (u.a(com.applovin.impl.sdk.c.b.aLW, nVar)) { checkCachedAdResourcesAsync(!FD); } c cVar = new c(); if (eVar.Ga() >= 0) { n nVar2 = new n(eVar.Gh(), activity); this.ajv = nVar2; nVar2.setVisibility(8); nVar2.setOnClickListener(cVar); } 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(cVar); av(this.isVideoMuted); } else { this.muteButtonImageView = null; } String Gm = eVar.Gm(); if (StringUtils.isValidString(Gm)) { x xVar = new x(nVar); xVar.a(new WeakReference<>(aVar)); w wVar = new w(xVar, activity); this.ajx = wVar; wVar.bs(Gm); } else { this.ajx = 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); AppLovinCommunicator.getInstance(activity).subscribe(this, "video_caching_failed"); } else { this.aju = null; } int sC = sC(); boolean z = ((Boolean) nVar.a(com.applovin.impl.sdk.c.b.aMU)).booleanValue() && sC > 0; if (this.ajw == null && z) { this.ajw = new h(activity); int Gs = eVar.Gs(); this.ajw.setTextColor(Gs); this.ajw.setTextSize(((Integer) nVar.a(com.applovin.impl.sdk.c.b.aMT)).intValue()); this.ajw.setFinishedStrokeColor(Gs); this.ajw.setFinishedStrokeWidth(((Integer) nVar.a(com.applovin.impl.sdk.c.b.aMS)).intValue()); this.ajw.setMax(sC); this.ajw.setProgress(sC); kVar.a("COUNTDOWN_CLOCK", TimeUnit.SECONDS.toMillis(1L), new k.a() { final int ajG; public AnonymousClass1(int sC2) { r2 = sC2; } @Override public void rB() { e eVar2 = e.this; if (eVar2.ajw != null) { long seconds = r2 - TimeUnit.MILLISECONDS.toSeconds(eVar2.videoView.getPlayer().aN()); if (seconds <= 0) { e.this.aja = true; } else if (e.this.tg()) { e.this.ajw.setProgress((int) seconds); } } } @Override public boolean rC() { return e.this.tg(); } }); } if (eVar.GA()) { Long l = (Long) nVar.a(com.applovin.impl.sdk.c.b.aNh); Integer num = (Integer) nVar.a(com.applovin.impl.sdk.c.b.aNi); ProgressBar progressBar = new ProgressBar(activity, null, R.attr.progressBarStyleHorizontal); this.agb = progressBar; a(progressBar, eVar.GB(), num.intValue()); kVar.a("PROGRESS_BAR", l.longValue(), new k.a() { final Integer ajI; public AnonymousClass2(Integer num2) { r2 = num2; } @Override public void rB() { e eVar2 = e.this; if (eVar2.ajC) { eVar2.agb.setVisibility(8); } else { e.this.agb.setProgress((int) ((((float) eVar2.mediaPlayer.aN()) / ((float) e.this.videoDurationMillis)) * r2.intValue())); } } @Override public boolean rC() { return !e.this.ajC; } }); } else { this.agb = null; } aw cY = new aw.a(activity).cY(); this.mediaPlayer = cY; b bVar = new b(); cY.f(bVar); cY.u(0); com.applovin.exoplayer2.ui.g gVar = new com.applovin.exoplayer2.ui.g(activity); this.videoView = gVar; gVar.nG(); gVar.setControllerVisibilityListener(bVar); gVar.setPlayer(cY); gVar.setOnTouchListener(new AppLovinTouchToClickListener(nVar, com.applovin.impl.sdk.c.b.aLh, activity, bVar)); prepareMediaPlayer(); return; } throw new IllegalStateException("Attempting to use fullscreen video ad presenter for non-video ad"); } public void e(boolean z, long j) { if (z) { v.a(this.ajx, j, null); } else { v.b(this.ajx, j, null); } } public void sT() { this.ajt.a(this.aiS); this.aiV = SystemClock.elapsedRealtime(); } public void sX() { bE(250L); } private void tf() { w wVar; boolean z; com.applovin.impl.adview.u Gn = this.aiL.Gn(); if (Gn != null && Gn.sa() && !this.ajC && (wVar = this.ajx) != null) { if (wVar.getVisibility() == 4) { z = true; } else { z = false; } AppLovinSdkUtils.runOnUiThread(new V4UL8fNzd(this, z, Gn.sb(), 0)); } } public void tk() { this.aiV = SystemClock.elapsedRealtime(); } public void tl() { com.applovin.impl.adview.a aVar = this.aju; if (aVar != null) { aVar.qO(); } } public void tm() { com.applovin.impl.adview.a aVar = this.aju; if (aVar != null) { aVar.qN(); } } public void tn() { this.ajE = -1L; this.ajF = SystemClock.elapsedRealtime(); } public void av(boolean z) { Uri Hu; int i; if (com.applovin.impl.sdk.utils.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); } @Override public void bE(long j) { a(new d6tPitE3DTk1erIZXx(this, 2), j); } public void bG(long j) { this.videoDurationMillis = j; } @Override public void dismiss() { this.countdownManager.rA(); this.ajB.rA(); this.countdownHandler.removeCallbacksAndMessages(null); this.ajA.removeCallbacksAndMessages(null); sD(); super.dismiss(); } @Override public String getCommunicatorId() { return "FullscreenVideoAdExoPlayerPresenter"; } public int getVideoPercentViewed() { aw awVar = this.mediaPlayer; if (awVar == null) { return 0; } long aN = awVar.aN(); if (this.videoWasCompleted) { return 100; } if (aN > 0) { return (int) ((((float) aN) / ((float) this.videoDurationMillis)) * 100.0f); } return this.savedVideoPercentViewed; } public void handleMediaError(String str) { if (com.applovin.impl.sdk.x.Fk()) { com.applovin.impl.sdk.x xVar = this.logger; StringBuilder A75bpaYM06AVd = AeD4S2V0JTkFNNCat.MhXFz4O2fao0frTdgvSgsROV.A75bpaYM06AVd("Encountered media error: ", str, " for ad: "); A75bpaYM06AVd.append(this.aiL); xVar.i("AppLovinFullscreenActivity", A75bpaYM06AVd.toString()); } if (this.mediaErrorHandled.compareAndSet(false, true)) { if (u.a(com.applovin.impl.sdk.c.b.aLQ, this.sdk)) { this.sdk.Ca().c(this.aiL, com.applovin.impl.sdk.n.getApplicationContext()); } AppLovinAdDisplayListener appLovinAdDisplayListener = this.agA; if (appLovinAdDisplayListener instanceof com.applovin.impl.sdk.ad.h) { ((com.applovin.impl.sdk.ad.h) appLovinAdDisplayListener).onAdDisplayFailed(str); } dismiss(); } } @Override public void onDestroy() { if (((Boolean) this.sdk.a(com.applovin.impl.sdk.c.b.aQH)).booleanValue()) { com.applovin.impl.sdk.utils.x.m(this.ajx); this.ajx = null; } this.mediaPlayer.release(); if (this.isVideoStream) { AppLovinCommunicator.getInstance(this.ahM).unsubscribe(this, "video_caching_failed"); } super.onDestroy(); } @Override public void onMessageReceived(AppLovinCommunicatorMessage appLovinCommunicatorMessage) { if ("video_caching_failed".equals(appLovinCommunicatorMessage.getTopic())) { Bundle messageData = appLovinCommunicatorMessage.getMessageData(); if (messageData.getLong("ad_id") == this.aiL.getAdIdNumber() && this.isVideoStream) { int i = messageData.getInt("load_response_code"); String string = messageData.getString("load_exception_message"); if ((string != null || i < 200 || i >= 300) && !this.videoWasCompleted && !this.mediaPlayer.v()) { handleMediaError("Video cache error during stream. ResponseCode=" + i + ", exception=" + string); } } } } @Override public void onWindowFocusChanged(boolean z) { super.onWindowFocusChanged(z); if (z) { bE(0L); if (this.ajC) { this.ajB.start(); return; } return; } if (this.ajC) { this.ajB.W(); } else { pauseVideo(); } } @Override public void pauseVideo() { if (com.applovin.impl.sdk.x.Fk()) { this.logger.f("AppLovinFullscreenActivity", "Pausing video"); } if (this.mediaPlayer.v()) { this.lastVideoPositionFromPauseMillis = this.mediaPlayer.aN(); this.mediaPlayer.k(false); this.countdownManager.W(); if (com.applovin.impl.sdk.x.Fk()) { this.logger.f("AppLovinFullscreenActivity", "Paused video at position " + this.lastVideoPositionFromPauseMillis + "ms"); return; } return; } if (com.applovin.impl.sdk.x.Fk()) { this.logger.f("AppLovinFullscreenActivity", "Nothing to pause"); } } public void prepareMediaPlayer() { if (!u.a(com.applovin.impl.sdk.c.b.aLW, this.sdk)) { checkCachedAdResourcesImmediately(!this.isVideoStream); } Activity activity = this.ahM; com.applovin.exoplayer2.h.u c2 = new u.a(new p(activity, ai.a(activity, "com.applovin.sdk"))).c(ab.a(this.aiL.FG())); this.mediaPlayer.h(!this.isVideoMuted ? 1 : 0); this.mediaPlayer.a(c2); this.mediaPlayer.aD(); this.mediaPlayer.k(false); } @Override public void rl() { super.rl(); sT(); } @Override public void sA() { a((ViewGroup) null); } @Override public void sD() { super.a(getVideoPercentViewed(), this.isVideoStream, sI(), this.ajE); } @Override public boolean sI() { if (this.aiL == null || getVideoPercentViewed() < this.aiL.GC()) { return false; } return true; } @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; long j2 = this.videoDurationMillis; if (j2 > 0) { j = 0 + j2; } 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(); this.ajt.k(this.ajx); this.ajt.k(this.ajv); if (!sK() || this.ajC) { sT(); } } @Override public void sR() { if (com.applovin.impl.sdk.x.Fk()) { this.logger.f("AppLovinFullscreenActivity", "Continue video from prompt - will resume in onWindowFocusChanged(true) when alert dismisses"); } } @Override public void sS() { if (com.applovin.impl.sdk.x.Fk()) { this.logger.f("AppLovinFullscreenActivity", "Skipping video from prompt"); } sY(); } public void sY() { this.ajd++; this.agj.JO(); if (this.aiL.Gi()) { if (com.applovin.impl.sdk.x.Fk()) { this.logger.f("AppLovinFullscreenActivity", "Dismissing ad on video skip..."); } dismiss(); } else { if (com.applovin.impl.sdk.x.Fk()) { this.logger.f("AppLovinFullscreenActivity", "Skipping video..."); } tc(); } } public void sZ() { AppLovinSdkUtils.runOnUiThread(new d6tPitE3DTk1erIZXx(this, 4)); } public void ta() { AppLovinSdkUtils.runOnUiThread(new d6tPitE3DTk1erIZXx(this, 1)); } public void tb() { boolean z = !this.isVideoMuted; this.isVideoMuted = z; this.mediaPlayer.h(!z ? 1 : 0); av(this.isVideoMuted); d(this.isVideoMuted, 0L); } public void tc() { ti(); long GF = this.aiL.GF(); if (GF > 0) { this.aiW = 0L; Long l = (Long) this.sdk.a(com.applovin.impl.sdk.c.b.aNq); Integer num = (Integer) this.sdk.a(com.applovin.impl.sdk.c.b.aNt); ProgressBar progressBar = new ProgressBar(this.ahM, null, R.attr.progressBarStyleHorizontal); this.ajy = progressBar; a(progressBar, this.aiL.GE(), num.intValue()); this.ajB.a("POSTITIAL_PROGRESS_BAR", l.longValue(), new k.a() { final Integer ajI; final long ajJ; final Long ajK; public AnonymousClass3(long GF2, Integer num2, Long l2) { r2 = GF2; r4 = num2; r5 = l2; } @Override public void rB() { e.this.ajy.setProgress((int) ((((float) e.this.aiW) / ((float) r2)) * r4.intValue())); e eVar = e.this; eVar.aiW = r5.longValue() + eVar.aiW; } @Override public boolean rC() { if (e.this.aiW < r2) { return true; } return false; } }); this.ajB.start(); } this.ajt.a(this.aiR, this.agn, this.aiQ, this.ajy); StringBuilder sb = new StringBuilder("javascript:al_onPoststitialShow("); sb.append(this.ajd); sb.append(","); d(AeD4S2V0JTkFNNCat.MhXFz4O2fao0frTdgvSgsROV.n4PQOBD9XmtL4DDReRQ(sb, this.aje, ");"), this.aiL.GG()); if (this.aiR != null) { if (this.aiL.Gc() >= 0) { a(this.aiR, this.aiL.Gc(), new d6tPitE3DTk1erIZXx(this, 3)); } else { this.aiR.setVisibility(0); } } 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")); } com.applovin.impl.adview.v vVar = this.agn; if (vVar != null && vVar.sh()) { com.applovin.impl.adview.v vVar2 = this.agn; arrayList.add(new com.applovin.impl.sdk.a.d(vVar2, FriendlyObstructionPurpose.NOT_VISIBLE, vVar2.getIdentifier())); } ProgressBar progressBar2 = this.ajy; if (progressBar2 != null) { arrayList.add(new com.applovin.impl.sdk.a.d(progressBar2, FriendlyObstructionPurpose.OTHER, "postitial progress bar")); } this.aiL.getAdEventTracker().a(this.aiQ, arrayList); sM(); this.ajC = true; } public void te() { if (this.ajD.compareAndSet(false, true)) { a(this.ajv, this.aiL.Ga(), new d6tPitE3DTk1erIZXx(this, 0)); } } public boolean tg() { if (!this.aja && !this.ajC && this.videoView.getPlayer().v()) { return true; } return false; } public void th() { this.ajE = SystemClock.elapsedRealtime() - this.ajF; if (com.applovin.impl.sdk.x.Fk()) { this.logger.f("AppLovinFullscreenActivity", "Attempting to skip video with skip time: " + this.ajE + "ms"); } if (sJ()) { pauseVideo(); sG(); if (com.applovin.impl.sdk.x.Fk()) { this.logger.f("AppLovinFullscreenActivity", "Prompting incentivized ad close warning"); } this.ajh.Jv(); return; } sY(); } public void ti() { this.savedVideoPercentViewed = getVideoPercentViewed(); this.mediaPlayer.k(false); } public void tj() { if (this.ajC) { if (com.applovin.impl.sdk.x.Fk()) { this.logger.h("AppLovinFullscreenActivity", "Skip video resume - postitial shown"); return; } return; } if (this.sdk.Cc().isApplicationPaused()) { if (com.applovin.impl.sdk.x.Fk()) { this.logger.h("AppLovinFullscreenActivity", "Skip video resume - app paused"); return; } return; } long j = this.lastVideoPositionFromPauseMillis; if (j >= 0) { if (com.applovin.impl.sdk.x.Fk()) { com.applovin.impl.sdk.x xVar = this.logger; StringBuilder NuA3cq48IXLTICW = AeD4S2V0JTkFNNCat.MhXFz4O2fao0frTdgvSgsROV.NuA3cq48IXLTICW("Resuming video at position ", j, "ms for MediaPlayer: "); NuA3cq48IXLTICW.append(this.mediaPlayer); xVar.f("AppLovinFullscreenActivity", NuA3cq48IXLTICW.toString()); } this.mediaPlayer.k(true); this.countdownManager.start(); this.lastVideoPositionFromPauseMillis = -1L; if (!this.mediaPlayer.v()) { sZ(); return; } return; } if (com.applovin.impl.sdk.x.Fk()) { this.logger.f("AppLovinFullscreenActivity", "Invalid last video position, isVideoPlaying=" + this.mediaPlayer.v()); } } @Override public void a(ViewGroup viewGroup) { this.ajt.a(this.muteButtonImageView, this.ajv, this.ajx, this.aju, this.agb, this.ajw, this.videoView, this.aiQ, this.agn, null, viewGroup); com.applovin.impl.adview.v vVar = this.agn; if (vVar != null) { vVar.sg(); } this.mediaPlayer.k(true); if (this.aiL.Ha()) { this.ajh.a(this.aiL, new d6tPitE3DTk1erIZXx(this, 5)); } if (this.isVideoStream) { sZ(); } this.aiQ.renderAd(this.aiL); this.agj.bT(this.isVideoStream ? 1L : 0L); if (this.ajv != null) { this.sdk.BM().a(new com.applovin.impl.sdk.e.ab(this.sdk, "scheduleSkipButton", new d6tPitE3DTk1erIZXx(this, 6)), q.b.MAIN, this.aiL.Gb(), true); } super.au(this.isVideoMuted); } private void a(ProgressBar progressBar, int i, int i2) { progressBar.setMax(i2); progressBar.setPadding(0, 0, 0, 0); if (com.applovin.impl.sdk.utils.h.KV()) { progressBar.setProgressTintList(ColorStateList.valueOf(i)); } } public void a(MotionEvent motionEvent, Bundle bundle) { if (this.aiL.Go()) { if (com.applovin.impl.sdk.x.Fk()) { this.logger.f("AppLovinFullscreenActivity", "Clicking through video"); } Uri FJ = this.aiL.FJ(); if (FJ != null) { AppLovinAdView appLovinAdView = this.aiQ; this.sdk.BB().trackAndLaunchVideoClick(this.aiL, FJ, motionEvent, bundle, this, appLovinAdView != null ? appLovinAdView.getContext() : com.applovin.impl.sdk.n.getApplicationContext()); m.a(this.agC, this.aiL); this.agj.JL(); this.aje++; return; } return; } tf(); } 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(); } }