Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,193 @@
package com.applovin.adview;
import android.content.Context;
import android.graphics.Color;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.view.ViewCompat;
import com.applovin.impl.adview.a;
import com.applovin.impl.sdk.n;
import com.applovin.sdk.AppLovinAd;
import com.applovin.sdk.AppLovinAdClickListener;
import com.applovin.sdk.AppLovinAdDisplayListener;
import com.applovin.sdk.AppLovinAdLoadListener;
import com.applovin.sdk.AppLovinAdSize;
import com.applovin.sdk.AppLovinSdk;
/* loaded from: classes.dex */
public class AppLovinAdView extends RelativeLayout {
public static final String NAMESPACE = "http://schemas.applovin.com/android/1.0";
private a a;
public AppLovinAdView(AppLovinAdSize appLovinAdSize, Context context) {
this(appLovinAdSize, (String) null, context);
}
private void a(AppLovinAdSize appLovinAdSize, String str, AppLovinSdk appLovinSdk, Context context, AttributeSet attributeSet) {
if (isInEditMode()) {
a(attributeSet, context);
return;
}
a aVar = new a();
this.a = aVar;
aVar.a(this, context, appLovinAdSize, str, appLovinSdk, attributeSet);
}
public a getController() {
return this.a;
}
@Override // android.view.ViewGroup, android.view.View
public void onAttachedToWindow() {
super.onAttachedToWindow();
a aVar = this.a;
if (aVar != null) {
aVar.B();
}
}
@Override // android.view.View
public String toString() {
return "AppLovinAdView{zoneId='" + getZoneId() + "\", size=" + getSize() + '}';
}
public AppLovinAdView(AppLovinAdSize appLovinAdSize, String str, Context context) {
super(context);
a(appLovinAdSize, str, null, context, null);
}
public void destroy() {
a aVar = this.a;
if (aVar != null) {
aVar.b();
}
}
public AppLovinAdSize getSize() {
a aVar = this.a;
if (aVar != null) {
return aVar.m();
}
return null;
}
public String getZoneId() {
a aVar = this.a;
if (aVar != null) {
return aVar.n();
}
return null;
}
public void loadNextAd() {
a aVar = this.a;
if (aVar != null) {
aVar.v();
} else {
n.i("AppLovinSdk", "Unable to load next ad: AppLovinAdView is not initialized.");
}
}
@Override // android.view.ViewGroup, android.view.View
public void onDetachedFromWindow() {
a aVar = this.a;
if (aVar != null) {
aVar.C();
}
super.onDetachedFromWindow();
}
public void pause() {
a aVar = this.a;
if (aVar != null) {
aVar.F();
}
}
public void renderAd(AppLovinAd appLovinAd) {
a aVar = this.a;
if (aVar != null) {
aVar.c(appLovinAd);
}
}
public void resume() {
a aVar = this.a;
if (aVar != null) {
aVar.H();
}
}
public void setAdClickListener(AppLovinAdClickListener appLovinAdClickListener) {
a aVar = this.a;
if (aVar != null) {
aVar.a(appLovinAdClickListener);
}
}
public void setAdDisplayListener(AppLovinAdDisplayListener appLovinAdDisplayListener) {
a aVar = this.a;
if (aVar != null) {
aVar.a(appLovinAdDisplayListener);
}
}
public void setAdLoadListener(AppLovinAdLoadListener appLovinAdLoadListener) {
a aVar = this.a;
if (aVar != null) {
aVar.a(appLovinAdLoadListener);
}
}
public void setAdViewEventListener(AppLovinAdViewEventListener appLovinAdViewEventListener) {
a aVar = this.a;
if (aVar != null) {
aVar.a(appLovinAdViewEventListener);
}
}
public void setExtraInfo(@NonNull String str, @Nullable Object obj) {
if (str == null) {
throw new IllegalArgumentException("No key specified");
}
a aVar = this.a;
if (aVar != null) {
aVar.a(str, obj);
}
}
public AppLovinAdView(AppLovinSdk appLovinSdk, AppLovinAdSize appLovinAdSize, Context context) {
this(appLovinSdk, appLovinAdSize, null, context);
}
public AppLovinAdView(AppLovinSdk appLovinSdk, AppLovinAdSize appLovinAdSize, String str, Context context) {
super(context.getApplicationContext());
a(appLovinAdSize, str, appLovinSdk, context, null);
}
public AppLovinAdView(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public AppLovinAdView(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
a(null, null, null, context, attributeSet);
}
private void a(AttributeSet attributeSet, Context context) {
DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();
int i = displayMetrics.widthPixels;
int applyDimension = (int) TypedValue.applyDimension(1, 50.0f, displayMetrics);
TextView textView = new TextView(context);
textView.setBackgroundColor(Color.rgb(220, 220, 220));
textView.setTextColor(ViewCompat.MEASURED_STATE_MASK);
textView.setText("AppLovin Ad");
textView.setGravity(17);
addView(textView, i, applyDimension);
}
}

View File

@@ -0,0 +1,7 @@
package com.applovin.adview;
/* loaded from: classes.dex */
public enum AppLovinAdViewDisplayErrorCode {
UNSPECIFIED,
WEBVIEW_NOT_FOUND
}

View File

@@ -0,0 +1,14 @@
package com.applovin.adview;
import com.applovin.sdk.AppLovinAd;
/* loaded from: classes.dex */
public interface AppLovinAdViewEventListener {
void adClosedFullscreen(AppLovinAd appLovinAd, AppLovinAdView appLovinAdView);
void adFailedToDisplay(AppLovinAd appLovinAd, AppLovinAdView appLovinAdView, AppLovinAdViewDisplayErrorCode appLovinAdViewDisplayErrorCode);
void adLeftApplication(AppLovinAd appLovinAd, AppLovinAdView appLovinAdView);
void adOpenedFullscreen(AppLovinAd appLovinAd, AppLovinAdView appLovinAdView);
}

View File

@@ -0,0 +1,326 @@
package com.applovin.adview;
import android.R;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.os.Process;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.View;
import android.webkit.WebView;
import android.window.OnBackInvokedCallback;
import android.window.OnBackInvokedDispatcher;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.view.ViewCompat;
import com.applovin.impl.adview.activity.FullscreenAdService;
import com.applovin.impl.ma;
import com.applovin.impl.p9;
import com.applovin.impl.r;
import com.applovin.impl.s;
import com.applovin.impl.sdk.j;
import com.applovin.impl.sdk.n;
import com.applovin.impl.sdk.utils.CollectionUtils;
import com.applovin.impl.sdk.utils.JsonUtils;
import com.applovin.impl.sdk.utils.StringUtils;
import com.applovin.impl.sj;
import com.applovin.impl.t6;
import com.applovin.impl.tb;
import com.applovin.impl.u9;
import com.applovin.impl.uj;
import com.applovin.impl.x1;
import com.applovin.impl.yp;
import com.applovin.impl.z3;
import com.applovin.sdk.AppLovinSdk;
import com.applovin.sdk.AppLovinSdkSettings;
import com.ironsource.v8;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import org.json.JSONObject;
/* loaded from: classes.dex */
public class AppLovinFullscreenActivity extends Activity implements t6 {
@SuppressLint({"StaticFieldLeak"})
public static tb parentInterstitialWrapper;
private j a;
private p9 b;
private final AtomicBoolean c = new AtomicBoolean(true);
private com.applovin.impl.adview.activity.a d;
private b f;
private boolean g;
private x1 h;
private long i;
public static class b implements OnBackInvokedCallback {
private final Runnable a;
public b(Runnable runnable) {
this.a = runnable;
}
public void onBackInvoked() {
this.a.run();
}
}
private void b() {
j jVar = this.a;
if (jVar == null || !((Boolean) jVar.a(sj.v2)).booleanValue()) {
return;
}
final Long l = (Long) this.a.a(sj.w2);
this.h = x1.a(l.longValue(), true, this.a, new Runnable() { // from class: com.applovin.adview.AppLovinFullscreenActivity$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
AppLovinFullscreenActivity.this.a(l);
}
});
}
@Override // com.applovin.impl.t6
public void dismiss() {
OnBackInvokedDispatcher onBackInvokedDispatcher;
if (z3.l() && this.f != null) {
onBackInvokedDispatcher = getOnBackInvokedDispatcher();
onBackInvokedDispatcher.unregisterOnBackInvokedCallback(this.f);
this.f = null;
}
p9 p9Var = this.b;
if (p9Var != null) {
p9Var.f();
} else {
finish();
}
}
@Override // android.app.Activity
public void onBackPressed() {
c();
}
@Override // android.app.Activity, android.content.ComponentCallbacks
public void onConfigurationChanged(@NonNull Configuration configuration) {
super.onConfigurationChanged(configuration);
p9 p9Var = this.b;
if (p9Var != null) {
p9Var.a(configuration);
}
}
@Override // android.app.Activity
public void onCreate(@Nullable Bundle bundle) {
OnBackInvokedDispatcher onBackInvokedDispatcher;
super.onCreate(bundle);
if (bundle != null && parentInterstitialWrapper == null) {
n.j("AppLovinFullscreenActivity", "Dismissing ad. Activity was destroyed while in background.");
dismiss();
return;
}
try {
requestWindowFeature(1);
} catch (Throwable th) {
n.c("AppLovinFullscreenActivity", "Failed to request window feature", th);
}
getWindow().setFlags(1024, 1024);
getWindow().addFlags(16777216);
getWindow().addFlags(128);
View findViewById = findViewById(R.id.content);
findViewById.setBackgroundColor(ViewCompat.MEASURED_STATE_MASK);
String stringExtra = getIntent().getStringExtra("com.applovin.interstitial.sdk_key");
if (TextUtils.isEmpty(stringExtra)) {
tb tbVar = parentInterstitialWrapper;
if (tbVar != null && tbVar.f() != null) {
tb.a(parentInterstitialWrapper.f(), parentInterstitialWrapper.c(), "Empty SDK key", null, this);
}
finish();
return;
}
j a2 = AppLovinSdk.getInstance(stringExtra, new AppLovinSdkSettings(this), this).a();
this.a = a2;
this.g = ((Boolean) a2.a(sj.N2)).booleanValue();
findViewById.setFitsSystemWindows(true);
r.a(this.g, this);
if (z3.l() && ((Boolean) this.a.a(sj.c6)).booleanValue()) {
this.f = new b(new Runnable() { // from class: com.applovin.adview.AppLovinFullscreenActivity$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
AppLovinFullscreenActivity.this.c();
}
});
onBackInvokedDispatcher = getOnBackInvokedDispatcher();
onBackInvokedDispatcher.registerOnBackInvokedCallback(0, this.f);
}
a();
b();
tb tbVar2 = parentInterstitialWrapper;
if (tbVar2 != null) {
p9.a(tbVar2.f(), parentInterstitialWrapper.b(), parentInterstitialWrapper.c(), parentInterstitialWrapper.d(), parentInterstitialWrapper.h(), this.a, this, new a());
return;
}
Intent intent = new Intent(this, (Class<?>) FullscreenAdService.class);
com.applovin.impl.adview.activity.a aVar = new com.applovin.impl.adview.activity.a(this, this.a);
this.d = aVar;
bindService(intent, aVar, 1);
if (z3.j()) {
String str = this.a.g0().getExtraParameters().get("disable_set_data_dir_suffix");
if (StringUtils.isValidString(str) && Boolean.parseBoolean(str)) {
return;
}
try {
WebView.setDataDirectorySuffix(String.valueOf(Process.myPid()));
} catch (Throwable unused) {
}
}
}
@Override // android.app.Activity
public void onDestroy() {
j jVar = this.a;
if (jVar != null && ((Boolean) jVar.a(sj.u2)).booleanValue()) {
this.a.i0().b(uj.L);
this.a.i0().b(uj.N);
this.a.i0().b(uj.O);
}
if (this.h != null) {
this.a.i0().b(uj.M);
this.h.a();
this.h = null;
}
com.applovin.impl.adview.activity.a aVar = this.d;
if (aVar != null) {
try {
unbindService(aVar);
} catch (Throwable unused) {
}
}
p9 p9Var = this.b;
if (p9Var != null) {
if (!p9Var.j()) {
this.b.f();
}
this.b.t();
}
parentInterstitialWrapper = null;
super.onDestroy();
}
@Override // android.app.Activity
public void onPause() {
super.onPause();
p9 p9Var = this.b;
if (p9Var != null) {
p9Var.u();
}
}
@Override // android.app.Activity
public void onResume() {
p9 p9Var;
try {
super.onResume();
if (this.c.get() || (p9Var = this.b) == null) {
return;
}
p9Var.v();
} catch (IllegalArgumentException e) {
this.a.J();
if (n.a()) {
this.a.J().a("AppLovinFullscreenActivity", "Error was encountered in onResume().", e);
}
this.a.E().a("AppLovinFullscreenActivity", v8.h.u0, e);
dismiss();
}
}
@Override // android.app.Activity
public void onStop() {
super.onStop();
p9 p9Var = this.b;
if (p9Var != null) {
p9Var.w();
}
}
public void setPresenter(@Nullable p9 p9Var) {
this.b = p9Var;
}
/* JADX INFO: Access modifiers changed from: private */
public void c() {
p9 p9Var = this.b;
if (p9Var != null) {
p9Var.s();
}
if (yp.e(getApplicationContext())) {
super.onBackPressed();
}
}
@Override // android.app.Activity, android.view.KeyEvent.Callback
public boolean onKeyDown(int i, KeyEvent keyEvent) {
p9 p9Var = this.b;
if (p9Var != null) {
p9Var.a(i, keyEvent);
}
return super.onKeyDown(i, keyEvent);
}
@Override // android.app.Activity, android.view.Window.Callback
public void onWindowFocusChanged(boolean z) {
if (this.b != null) {
if (!this.c.getAndSet(false) || (this.b instanceof u9)) {
this.b.b(z);
}
if (z) {
r.a(this.g, this);
}
}
super.onWindowFocusChanged(z);
}
private void a() {
tb tbVar;
j jVar = this.a;
if (jVar == null || !((Boolean) jVar.a(sj.u2)).booleanValue() || (tbVar = parentInterstitialWrapper) == null || tbVar.f() == null) {
return;
}
com.applovin.impl.sdk.ad.b f = parentInterstitialWrapper.f();
List f2 = f.f();
if (CollectionUtils.isEmpty(f2)) {
return;
}
s sVar = (s) f2.get(0);
JSONObject jSONObject = new JSONObject();
JsonUtils.putStringIfValid(jSONObject, "app_killed_postback_url", sVar.c());
JsonUtils.putStringIfValid(jSONObject, "app_killed_postback_backup_url", sVar.a());
this.a.i0().b(uj.N, jSONObject.toString());
this.a.i0().b(uj.L, Long.valueOf(System.currentTimeMillis()));
this.a.i0().b(uj.O, CollectionUtils.toJsonString(ma.a(f), JsonUtils.EMPTY_JSON));
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void a(Long l) {
this.i += l.longValue();
this.a.i0().b(uj.M, Long.valueOf(this.i));
}
public class a implements p9.d {
public a() {
}
@Override // com.applovin.impl.p9.d
public void a(p9 p9Var) {
AppLovinFullscreenActivity.this.b = p9Var;
p9Var.y();
}
@Override // com.applovin.impl.p9.d
public void a(String str, Throwable th) {
tb.a(AppLovinFullscreenActivity.parentInterstitialWrapper.f(), AppLovinFullscreenActivity.parentInterstitialWrapper.c(), str, th, AppLovinFullscreenActivity.this);
}
}
}

View File

@@ -0,0 +1,69 @@
package com.applovin.adview;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleObserver;
import androidx.lifecycle.OnLifecycleEvent;
import com.applovin.impl.p9;
import com.applovin.impl.sdk.j;
import com.applovin.impl.tb;
import java.util.concurrent.atomic.AtomicBoolean;
/* loaded from: classes.dex */
public class AppLovinFullscreenAdViewObserver implements LifecycleObserver {
private final j a;
private final AtomicBoolean b = new AtomicBoolean(true);
private p9 c;
private tb d;
@OnLifecycleEvent(Lifecycle.Event.ON_RESUME)
public void onResume() {
p9 p9Var;
if (this.b.getAndSet(false) || (p9Var = this.c) == null) {
return;
}
p9Var.v();
this.c.a(0L);
}
public void setPresenter(p9 p9Var) {
this.c = p9Var;
}
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
public void onDestroy() {
tb tbVar = this.d;
if (tbVar != null) {
tbVar.a();
this.d = null;
}
p9 p9Var = this.c;
if (p9Var != null) {
p9Var.f();
this.c.t();
this.c = null;
}
}
@OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
public void onPause() {
p9 p9Var = this.c;
if (p9Var != null) {
p9Var.u();
this.c.x();
}
}
@OnLifecycleEvent(Lifecycle.Event.ON_STOP)
public void onStop() {
p9 p9Var = this.c;
if (p9Var != null) {
p9Var.w();
}
}
public AppLovinFullscreenAdViewObserver(Lifecycle lifecycle, tb tbVar, j jVar) {
this.d = tbVar;
this.a = jVar;
lifecycle.addObserver(this);
}
}

View File

@@ -0,0 +1,107 @@
package com.applovin.adview;
import android.content.Context;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.lifecycle.Lifecycle;
import com.applovin.impl.jb;
import com.applovin.impl.sdk.n;
import com.applovin.sdk.AppLovinAd;
import com.applovin.sdk.AppLovinAdClickListener;
import com.applovin.sdk.AppLovinAdDisplayListener;
import com.applovin.sdk.AppLovinAdLoadListener;
import com.applovin.sdk.AppLovinAdRewardListener;
import com.applovin.sdk.AppLovinAdVideoPlaybackListener;
import com.applovin.sdk.AppLovinSdk;
/* loaded from: classes.dex */
public class AppLovinIncentivizedInterstitial {
private final jb a;
public AppLovinIncentivizedInterstitial(Context context) {
this(AppLovinSdk.getInstance(context));
}
public static AppLovinIncentivizedInterstitial create(Context context) {
return create(AppLovinSdk.getInstance(context));
}
public jb createIncentivizedAdController(String str, AppLovinSdk appLovinSdk) {
return new jb(str, appLovinSdk);
}
public String getZoneId() {
return this.a.c();
}
public boolean isAdReadyToDisplay() {
return this.a.d();
}
public void preload(AppLovinAdLoadListener appLovinAdLoadListener) {
if (appLovinAdLoadListener == null) {
n.i("AppLovinIncentivizedInterstitial", "AppLovinAdLoadListener was null when preloading incentivized interstitials; using a listener is highly recommended.");
}
this.a.b(appLovinAdLoadListener);
}
public void setExtraInfo(@NonNull String str, @Nullable Object obj) {
if (str == null) {
throw new IllegalArgumentException("No key specified");
}
this.a.a(str, obj);
}
public void show(Context context) {
show(context, null, null);
}
public String toString() {
return "AppLovinIncentivizedInterstitial{zoneId='" + getZoneId() + "', isAdReadyToDisplay=" + isAdReadyToDisplay() + '}';
}
public AppLovinIncentivizedInterstitial(AppLovinSdk appLovinSdk) {
this(null, appLovinSdk);
}
public static AppLovinIncentivizedInterstitial create(AppLovinSdk appLovinSdk) {
return create(null, appLovinSdk);
}
public void show(Context context, AppLovinAdRewardListener appLovinAdRewardListener) {
show(context, appLovinAdRewardListener, null);
}
public AppLovinIncentivizedInterstitial(String str, AppLovinSdk appLovinSdk) {
if (appLovinSdk != null) {
this.a = createIncentivizedAdController(str, appLovinSdk);
return;
}
throw new IllegalArgumentException("No sdk specified");
}
public static AppLovinIncentivizedInterstitial create(String str, AppLovinSdk appLovinSdk) {
return new AppLovinIncentivizedInterstitial(str, appLovinSdk);
}
public void show(Context context, AppLovinAdRewardListener appLovinAdRewardListener, AppLovinAdVideoPlaybackListener appLovinAdVideoPlaybackListener) {
show(context, appLovinAdRewardListener, appLovinAdVideoPlaybackListener, null);
}
public void show(Context context, AppLovinAdRewardListener appLovinAdRewardListener, AppLovinAdVideoPlaybackListener appLovinAdVideoPlaybackListener, AppLovinAdDisplayListener appLovinAdDisplayListener) {
show(context, appLovinAdRewardListener, appLovinAdVideoPlaybackListener, appLovinAdDisplayListener, null);
}
public void show(Context context, AppLovinAdRewardListener appLovinAdRewardListener, AppLovinAdVideoPlaybackListener appLovinAdVideoPlaybackListener, AppLovinAdDisplayListener appLovinAdDisplayListener, AppLovinAdClickListener appLovinAdClickListener) {
show(null, context, appLovinAdRewardListener, appLovinAdVideoPlaybackListener, appLovinAdDisplayListener, appLovinAdClickListener);
}
public void show(AppLovinAd appLovinAd, Context context, AppLovinAdRewardListener appLovinAdRewardListener, AppLovinAdVideoPlaybackListener appLovinAdVideoPlaybackListener, AppLovinAdDisplayListener appLovinAdDisplayListener, AppLovinAdClickListener appLovinAdClickListener) {
this.a.a(appLovinAd, context, null, appLovinAdRewardListener, appLovinAdVideoPlaybackListener, appLovinAdDisplayListener, appLovinAdClickListener);
}
public void show(AppLovinAd appLovinAd, ViewGroup viewGroup, Lifecycle lifecycle, Context context, AppLovinAdRewardListener appLovinAdRewardListener, AppLovinAdVideoPlaybackListener appLovinAdVideoPlaybackListener, AppLovinAdDisplayListener appLovinAdDisplayListener, AppLovinAdClickListener appLovinAdClickListener) {
this.a.b(appLovinAd, viewGroup, lifecycle, context, appLovinAdRewardListener, appLovinAdVideoPlaybackListener, appLovinAdDisplayListener, appLovinAdClickListener);
}
}

View File

@@ -0,0 +1,22 @@
package com.applovin.adview;
import android.content.Context;
import com.applovin.impl.tb;
import com.applovin.sdk.AppLovinSdk;
/* loaded from: classes.dex */
public class AppLovinInterstitialAd {
public static AppLovinInterstitialAdDialog create(AppLovinSdk appLovinSdk, Context context) {
if (appLovinSdk == null) {
throw new IllegalArgumentException("No sdk specified");
}
if (context != null) {
return new tb(appLovinSdk, context);
}
throw new IllegalArgumentException("No context specified");
}
public String toString() {
return "AppLovinInterstitialAd{}";
}
}

View File

@@ -0,0 +1,30 @@
package com.applovin.adview;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.lifecycle.Lifecycle;
import com.applovin.sdk.AppLovinAd;
import com.applovin.sdk.AppLovinAdClickListener;
import com.applovin.sdk.AppLovinAdDisplayListener;
import com.applovin.sdk.AppLovinAdLoadListener;
import com.applovin.sdk.AppLovinAdVideoPlaybackListener;
/* loaded from: classes.dex */
public interface AppLovinInterstitialAdDialog {
void setAdClickListener(AppLovinAdClickListener appLovinAdClickListener);
void setAdDisplayListener(AppLovinAdDisplayListener appLovinAdDisplayListener);
void setAdLoadListener(AppLovinAdLoadListener appLovinAdLoadListener);
void setAdVideoPlaybackListener(AppLovinAdVideoPlaybackListener appLovinAdVideoPlaybackListener);
void setExtraInfo(@NonNull String str, @Nullable Object obj);
void show();
void showAndRender(AppLovinAd appLovinAd);
void showAndRender(AppLovinAd appLovinAd, ViewGroup viewGroup, Lifecycle lifecycle);
}

View File

@@ -0,0 +1,157 @@
package com.applovin.array.apphub.aidl;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.RemoteException;
/* loaded from: classes.dex */
public interface IAppHubDirectDownloadServiceCallback extends IInterface {
public static final String DESCRIPTOR = "com.applovin.array.apphub.aidl.IAppHubDirectDownloadServiceCallback";
public static class Default implements IAppHubDirectDownloadServiceCallback {
@Override // android.os.IInterface
public IBinder asBinder() {
return null;
}
@Override // com.applovin.array.apphub.aidl.IAppHubDirectDownloadServiceCallback
public void onAppDetailsDismissed(String str) throws RemoteException {
}
@Override // com.applovin.array.apphub.aidl.IAppHubDirectDownloadServiceCallback
public void onAppDetailsShown(String str) throws RemoteException {
}
@Override // com.applovin.array.apphub.aidl.IAppHubDirectDownloadServiceCallback
public void onDownloadStarted(String str) throws RemoteException {
}
@Override // com.applovin.array.apphub.aidl.IAppHubDirectDownloadServiceCallback
public void onError(String str, String str2) throws RemoteException {
}
}
void onAppDetailsDismissed(String str) throws RemoteException;
void onAppDetailsShown(String str) throws RemoteException;
void onDownloadStarted(String str) throws RemoteException;
void onError(String str, String str2) throws RemoteException;
public static abstract class Stub extends Binder implements IAppHubDirectDownloadServiceCallback {
static final int TRANSACTION_onAppDetailsDismissed = 2;
static final int TRANSACTION_onAppDetailsShown = 1;
static final int TRANSACTION_onDownloadStarted = 3;
static final int TRANSACTION_onError = 4;
public static class Proxy implements IAppHubDirectDownloadServiceCallback {
private IBinder mRemote;
public Proxy(IBinder iBinder) {
this.mRemote = iBinder;
}
@Override // android.os.IInterface
public IBinder asBinder() {
return this.mRemote;
}
public String getInterfaceDescriptor() {
return IAppHubDirectDownloadServiceCallback.DESCRIPTOR;
}
@Override // com.applovin.array.apphub.aidl.IAppHubDirectDownloadServiceCallback
public void onAppDetailsDismissed(String str) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(IAppHubDirectDownloadServiceCallback.DESCRIPTOR);
obtain.writeString(str);
this.mRemote.transact(2, obtain, null, 1);
} finally {
obtain.recycle();
}
}
@Override // com.applovin.array.apphub.aidl.IAppHubDirectDownloadServiceCallback
public void onAppDetailsShown(String str) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(IAppHubDirectDownloadServiceCallback.DESCRIPTOR);
obtain.writeString(str);
this.mRemote.transact(1, obtain, null, 1);
} finally {
obtain.recycle();
}
}
@Override // com.applovin.array.apphub.aidl.IAppHubDirectDownloadServiceCallback
public void onDownloadStarted(String str) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(IAppHubDirectDownloadServiceCallback.DESCRIPTOR);
obtain.writeString(str);
this.mRemote.transact(3, obtain, null, 1);
} finally {
obtain.recycle();
}
}
@Override // com.applovin.array.apphub.aidl.IAppHubDirectDownloadServiceCallback
public void onError(String str, String str2) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(IAppHubDirectDownloadServiceCallback.DESCRIPTOR);
obtain.writeString(str);
obtain.writeString(str2);
this.mRemote.transact(4, obtain, null, 1);
} finally {
obtain.recycle();
}
}
}
public Stub() {
attachInterface(this, IAppHubDirectDownloadServiceCallback.DESCRIPTOR);
}
public static IAppHubDirectDownloadServiceCallback asInterface(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface(IAppHubDirectDownloadServiceCallback.DESCRIPTOR);
return (queryLocalInterface == null || !(queryLocalInterface instanceof IAppHubDirectDownloadServiceCallback)) ? new Proxy(iBinder) : (IAppHubDirectDownloadServiceCallback) queryLocalInterface;
}
@Override // android.os.IInterface
public IBinder asBinder() {
return this;
}
@Override // android.os.Binder
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
if (i >= 1 && i <= 16777215) {
parcel.enforceInterface(IAppHubDirectDownloadServiceCallback.DESCRIPTOR);
}
if (i == 1598968902) {
parcel2.writeString(IAppHubDirectDownloadServiceCallback.DESCRIPTOR);
return true;
}
if (i == 1) {
onAppDetailsShown(parcel.readString());
} else if (i == 2) {
onAppDetailsDismissed(parcel.readString());
} else if (i == 3) {
onDownloadStarted(parcel.readString());
} else {
if (i != 4) {
return super.onTransact(i, parcel, parcel2, i2);
}
onError(parcel.readString(), parcel.readString());
}
return true;
}
}
}

View File

@@ -0,0 +1,275 @@
package com.applovin.array.apphub.aidl;
import android.os.Binder;
import android.os.Bundle;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
import com.applovin.array.apphub.aidl.IAppHubDirectDownloadServiceCallback;
/* loaded from: classes.dex */
public interface IAppHubService extends IInterface {
public static final String DESCRIPTOR = "com.applovin.array.apphub.aidl.IAppHubService";
public static class Default implements IAppHubService {
@Override // android.os.IInterface
public IBinder asBinder() {
return null;
}
@Override // com.applovin.array.apphub.aidl.IAppHubService
public void directInstall(String str, Bundle bundle, IAppHubDirectDownloadServiceCallback iAppHubDirectDownloadServiceCallback) throws RemoteException {
}
@Override // com.applovin.array.apphub.aidl.IAppHubService
public void dismissDirectDownloadAppDetails(String str) throws RemoteException {
}
@Override // com.applovin.array.apphub.aidl.IAppHubService
public long getAppHubVersionCode() throws RemoteException {
return 0L;
}
@Override // com.applovin.array.apphub.aidl.IAppHubService
public Bundle getEnabledFeatures() throws RemoteException {
return null;
}
@Override // com.applovin.array.apphub.aidl.IAppHubService
public String getRandomUserToken() throws RemoteException {
return null;
}
@Override // com.applovin.array.apphub.aidl.IAppHubService
public void showDirectDownloadAppDetails(String str, IAppHubDirectDownloadServiceCallback iAppHubDirectDownloadServiceCallback) throws RemoteException {
}
@Override // com.applovin.array.apphub.aidl.IAppHubService
public void showDirectDownloadAppDetailsWithExtra(String str, Bundle bundle, IAppHubDirectDownloadServiceCallback iAppHubDirectDownloadServiceCallback) throws RemoteException {
}
}
public static class _Parcel {
/* JADX INFO: Access modifiers changed from: private */
public static <T> T readTypedObject(Parcel parcel, Parcelable.Creator<T> creator) {
if (parcel.readInt() != 0) {
return creator.createFromParcel(parcel);
}
return null;
}
/* JADX INFO: Access modifiers changed from: private */
public static <T extends Parcelable> void writeTypedObject(Parcel parcel, T t, int i) {
if (t == null) {
parcel.writeInt(0);
} else {
parcel.writeInt(1);
t.writeToParcel(parcel, i);
}
}
}
void directInstall(String str, Bundle bundle, IAppHubDirectDownloadServiceCallback iAppHubDirectDownloadServiceCallback) throws RemoteException;
void dismissDirectDownloadAppDetails(String str) throws RemoteException;
long getAppHubVersionCode() throws RemoteException;
Bundle getEnabledFeatures() throws RemoteException;
String getRandomUserToken() throws RemoteException;
void showDirectDownloadAppDetails(String str, IAppHubDirectDownloadServiceCallback iAppHubDirectDownloadServiceCallback) throws RemoteException;
void showDirectDownloadAppDetailsWithExtra(String str, Bundle bundle, IAppHubDirectDownloadServiceCallback iAppHubDirectDownloadServiceCallback) throws RemoteException;
public static abstract class Stub extends Binder implements IAppHubService {
static final int TRANSACTION_directInstall = 7;
static final int TRANSACTION_dismissDirectDownloadAppDetails = 5;
static final int TRANSACTION_getAppHubVersionCode = 2;
static final int TRANSACTION_getEnabledFeatures = 3;
static final int TRANSACTION_getRandomUserToken = 1;
static final int TRANSACTION_showDirectDownloadAppDetails = 4;
static final int TRANSACTION_showDirectDownloadAppDetailsWithExtra = 6;
public static class Proxy implements IAppHubService {
private IBinder mRemote;
public Proxy(IBinder iBinder) {
this.mRemote = iBinder;
}
@Override // android.os.IInterface
public IBinder asBinder() {
return this.mRemote;
}
@Override // com.applovin.array.apphub.aidl.IAppHubService
public void directInstall(String str, Bundle bundle, IAppHubDirectDownloadServiceCallback iAppHubDirectDownloadServiceCallback) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(IAppHubService.DESCRIPTOR);
obtain.writeString(str);
_Parcel.writeTypedObject(obtain, bundle, 0);
obtain.writeStrongInterface(iAppHubDirectDownloadServiceCallback);
this.mRemote.transact(7, obtain, null, 1);
} finally {
obtain.recycle();
}
}
@Override // com.applovin.array.apphub.aidl.IAppHubService
public void dismissDirectDownloadAppDetails(String str) throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(IAppHubService.DESCRIPTOR);
obtain.writeString(str);
this.mRemote.transact(5, obtain, obtain2, 0);
obtain2.readException();
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // com.applovin.array.apphub.aidl.IAppHubService
public long getAppHubVersionCode() throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(IAppHubService.DESCRIPTOR);
this.mRemote.transact(2, obtain, obtain2, 0);
obtain2.readException();
return obtain2.readLong();
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // com.applovin.array.apphub.aidl.IAppHubService
public Bundle getEnabledFeatures() throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(IAppHubService.DESCRIPTOR);
this.mRemote.transact(3, obtain, obtain2, 0);
obtain2.readException();
return (Bundle) _Parcel.readTypedObject(obtain2, Bundle.CREATOR);
} finally {
obtain2.recycle();
obtain.recycle();
}
}
public String getInterfaceDescriptor() {
return IAppHubService.DESCRIPTOR;
}
@Override // com.applovin.array.apphub.aidl.IAppHubService
public String getRandomUserToken() throws RemoteException {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(IAppHubService.DESCRIPTOR);
this.mRemote.transact(1, obtain, obtain2, 0);
obtain2.readException();
return obtain2.readString();
} finally {
obtain2.recycle();
obtain.recycle();
}
}
@Override // com.applovin.array.apphub.aidl.IAppHubService
public void showDirectDownloadAppDetails(String str, IAppHubDirectDownloadServiceCallback iAppHubDirectDownloadServiceCallback) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(IAppHubService.DESCRIPTOR);
obtain.writeString(str);
obtain.writeStrongInterface(iAppHubDirectDownloadServiceCallback);
this.mRemote.transact(4, obtain, null, 1);
} finally {
obtain.recycle();
}
}
@Override // com.applovin.array.apphub.aidl.IAppHubService
public void showDirectDownloadAppDetailsWithExtra(String str, Bundle bundle, IAppHubDirectDownloadServiceCallback iAppHubDirectDownloadServiceCallback) throws RemoteException {
Parcel obtain = Parcel.obtain();
try {
obtain.writeInterfaceToken(IAppHubService.DESCRIPTOR);
obtain.writeString(str);
_Parcel.writeTypedObject(obtain, bundle, 0);
obtain.writeStrongInterface(iAppHubDirectDownloadServiceCallback);
this.mRemote.transact(6, obtain, null, 1);
} finally {
obtain.recycle();
}
}
}
public Stub() {
attachInterface(this, IAppHubService.DESCRIPTOR);
}
public static IAppHubService asInterface(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface(IAppHubService.DESCRIPTOR);
return (queryLocalInterface == null || !(queryLocalInterface instanceof IAppHubService)) ? new Proxy(iBinder) : (IAppHubService) queryLocalInterface;
}
@Override // android.os.IInterface
public IBinder asBinder() {
return this;
}
@Override // android.os.Binder
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
if (i >= 1 && i <= 16777215) {
parcel.enforceInterface(IAppHubService.DESCRIPTOR);
}
if (i != 1598968902) {
switch (i) {
case 1:
String randomUserToken = getRandomUserToken();
parcel2.writeNoException();
parcel2.writeString(randomUserToken);
return true;
case 2:
long appHubVersionCode = getAppHubVersionCode();
parcel2.writeNoException();
parcel2.writeLong(appHubVersionCode);
return true;
case 3:
Bundle enabledFeatures = getEnabledFeatures();
parcel2.writeNoException();
_Parcel.writeTypedObject(parcel2, enabledFeatures, 1);
return true;
case 4:
showDirectDownloadAppDetails(parcel.readString(), IAppHubDirectDownloadServiceCallback.Stub.asInterface(parcel.readStrongBinder()));
return true;
case 5:
dismissDirectDownloadAppDetails(parcel.readString());
parcel2.writeNoException();
return true;
case 6:
showDirectDownloadAppDetailsWithExtra(parcel.readString(), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR), IAppHubDirectDownloadServiceCallback.Stub.asInterface(parcel.readStrongBinder()));
return true;
case 7:
directInstall(parcel.readString(), (Bundle) _Parcel.readTypedObject(parcel, Bundle.CREATOR), IAppHubDirectDownloadServiceCallback.Stub.asInterface(parcel.readStrongBinder()));
return true;
default:
return super.onTransact(i, parcel, parcel2, i2);
}
}
parcel2.writeString(IAppHubService.DESCRIPTOR);
return true;
}
}
}

View File

@@ -0,0 +1,84 @@
package com.applovin.communicator;
import android.content.Context;
import com.applovin.impl.communicator.MessagingServiceImpl;
import com.applovin.impl.ll;
import com.applovin.impl.sdk.j;
import com.applovin.impl.sdk.n;
import java.util.Collections;
import java.util.List;
/* loaded from: classes.dex */
public final class AppLovinCommunicator {
private static AppLovinCommunicator e;
private static final Object f = new Object();
private j a;
private n b;
private final ll c = new ll();
private final MessagingServiceImpl d = new MessagingServiceImpl();
public static AppLovinCommunicator getInstance(Context context) {
synchronized (f) {
try {
if (e == null) {
e = new AppLovinCommunicator();
}
} catch (Throwable th) {
throw th;
}
}
return e;
}
public AppLovinCommunicatorMessagingService getMessagingService() {
return this.d;
}
public boolean hasSubscriber(String str) {
return this.c.a(str);
}
public boolean respondsToTopic(String str) {
return this.a.p().a(str);
}
public void subscribe(AppLovinCommunicatorSubscriber appLovinCommunicatorSubscriber, String str) {
subscribe(appLovinCommunicatorSubscriber, Collections.singletonList(str));
}
public String toString() {
return "AppLovinCommunicator{sdk=" + this.a + '}';
}
public void unsubscribe(AppLovinCommunicatorSubscriber appLovinCommunicatorSubscriber, String str) {
unsubscribe(appLovinCommunicatorSubscriber, Collections.singletonList(str));
}
public void a(j jVar) {
this.a = jVar;
this.b = jVar.J();
a("Attached SDK instance: " + jVar + "...");
}
public void subscribe(AppLovinCommunicatorSubscriber appLovinCommunicatorSubscriber, List<String> list) {
for (String str : list) {
if (!this.c.a(appLovinCommunicatorSubscriber, str)) {
a("Unable to subscribe " + appLovinCommunicatorSubscriber + " to topic: " + str);
}
}
}
public void unsubscribe(AppLovinCommunicatorSubscriber appLovinCommunicatorSubscriber, List<String> list) {
for (String str : list) {
a("Unsubscribing " + appLovinCommunicatorSubscriber + " from topic: " + str);
this.c.b(appLovinCommunicatorSubscriber, str);
}
}
private void a(String str) {
if (this.b == null || !n.a()) {
return;
}
this.b.a("AppLovinCommunicator", str);
}
}

View File

@@ -0,0 +1,6 @@
package com.applovin.communicator;
/* loaded from: classes.dex */
public interface AppLovinCommunicatorEntity {
String getCommunicatorId();
}

View File

@@ -0,0 +1,27 @@
package com.applovin.communicator;
import android.os.Bundle;
import com.applovin.impl.communicator.CommunicatorMessageImpl;
/* loaded from: classes.dex */
public class AppLovinCommunicatorMessage extends CommunicatorMessageImpl {
public AppLovinCommunicatorMessage(Bundle bundle, String str, AppLovinCommunicatorPublisher appLovinCommunicatorPublisher) {
super(bundle, str, appLovinCommunicatorPublisher);
}
@Override // com.applovin.impl.communicator.CommunicatorMessageImpl
public Bundle getMessageData() {
return this.data;
}
@Override // com.applovin.impl.communicator.CommunicatorMessageImpl
public String getPublisherId() {
AppLovinCommunicatorPublisher appLovinCommunicatorPublisher = this.publisherRef.get();
return appLovinCommunicatorPublisher != null ? appLovinCommunicatorPublisher.getCommunicatorId() : "";
}
@Override // com.applovin.impl.communicator.CommunicatorMessageImpl
public String getTopic() {
return getAction();
}
}

View File

@@ -0,0 +1,6 @@
package com.applovin.communicator;
/* loaded from: classes.dex */
public interface AppLovinCommunicatorMessagingService {
void publish(AppLovinCommunicatorMessage appLovinCommunicatorMessage);
}

View File

@@ -0,0 +1,5 @@
package com.applovin.communicator;
/* loaded from: classes.dex */
public interface AppLovinCommunicatorPublisher extends AppLovinCommunicatorEntity {
}

View File

@@ -0,0 +1,6 @@
package com.applovin.communicator;
/* loaded from: classes.dex */
public interface AppLovinCommunicatorSubscriber extends AppLovinCommunicatorEntity {
void onMessageReceived(AppLovinCommunicatorMessage appLovinCommunicatorMessage);
}

View File

@@ -0,0 +1,7 @@
package com.applovin.creative;
import com.applovin.impl.w4;
/* loaded from: classes.dex */
public final class MaxCreativeDebuggerActivity extends w4 {
}

View File

@@ -0,0 +1,7 @@
package com.applovin.creative;
import com.applovin.impl.u6;
/* loaded from: classes.dex */
public final class MaxCreativeDebuggerDisplayedAdActivity extends u6 {
}

View File

@@ -0,0 +1,172 @@
package com.applovin.exoplayer2.common.base;
/* loaded from: classes.dex */
public final class Ascii {
public static final byte ACK = 6;
public static final byte BEL = 7;
public static final byte BS = 8;
public static final byte CAN = 24;
private static final char CASE_MASK = ' ';
public static final byte CR = 13;
public static final byte DC1 = 17;
public static final byte DC2 = 18;
public static final byte DC3 = 19;
public static final byte DC4 = 20;
public static final byte DEL = Byte.MAX_VALUE;
public static final byte DLE = 16;
public static final byte EM = 25;
public static final byte ENQ = 5;
public static final byte EOT = 4;
public static final byte ESC = 27;
public static final byte ETB = 23;
public static final byte ETX = 3;
public static final byte FF = 12;
public static final byte FS = 28;
public static final byte GS = 29;
public static final byte HT = 9;
public static final byte LF = 10;
public static final char MAX = 127;
public static final char MIN = 0;
public static final byte NAK = 21;
public static final byte NL = 10;
public static final byte NUL = 0;
public static final byte RS = 30;
public static final byte SI = 15;
public static final byte SO = 14;
public static final byte SOH = 1;
public static final byte SP = 32;
public static final byte SPACE = 32;
public static final byte STX = 2;
public static final byte SUB = 26;
public static final byte SYN = 22;
public static final byte US = 31;
public static final byte VT = 11;
public static final byte XOFF = 19;
public static final byte XON = 17;
private Ascii() {
}
public static boolean equalsIgnoreCase(CharSequence charSequence, CharSequence charSequence2) {
int alphaIndex;
int length = charSequence.length();
if (charSequence == charSequence2) {
return true;
}
if (length != charSequence2.length()) {
return false;
}
for (int i = 0; i < length; i++) {
char charAt = charSequence.charAt(i);
char charAt2 = charSequence2.charAt(i);
if (charAt != charAt2 && ((alphaIndex = getAlphaIndex(charAt)) >= 26 || alphaIndex != getAlphaIndex(charAt2))) {
return false;
}
}
return true;
}
private static int getAlphaIndex(char c) {
return (char) ((c | CASE_MASK) - 97);
}
public static boolean isLowerCase(char c) {
return c >= 'a' && c <= 'z';
}
public static boolean isUpperCase(char c) {
return c >= 'A' && c <= 'Z';
}
public static String toLowerCase(String str) {
int length = str.length();
int i = 0;
while (i < length) {
if (isUpperCase(str.charAt(i))) {
char[] charArray = str.toCharArray();
while (i < length) {
char c = charArray[i];
if (isUpperCase(c)) {
charArray[i] = (char) (c ^ CASE_MASK);
}
i++;
}
return String.valueOf(charArray);
}
i++;
}
return str;
}
public static String toUpperCase(String str) {
int length = str.length();
int i = 0;
while (i < length) {
if (isLowerCase(str.charAt(i))) {
char[] charArray = str.toCharArray();
while (i < length) {
char c = charArray[i];
if (isLowerCase(c)) {
charArray[i] = (char) (c ^ CASE_MASK);
}
i++;
}
return String.valueOf(charArray);
}
i++;
}
return str;
}
public static String truncate(CharSequence charSequence, int i, String str) {
Preconditions.checkNotNull(charSequence);
int length = i - str.length();
Preconditions.checkArgument(length >= 0, "maxLength (%s) must be >= length of the truncation indicator (%s)", i, str.length());
int length2 = charSequence.length();
String str2 = charSequence;
if (length2 <= i) {
String charSequence2 = charSequence.toString();
int length3 = charSequence2.length();
str2 = charSequence2;
if (length3 <= i) {
return charSequence2;
}
}
StringBuilder sb = new StringBuilder(i);
sb.append((CharSequence) str2, 0, length);
sb.append(str);
return sb.toString();
}
public static String toLowerCase(CharSequence charSequence) {
if (charSequence instanceof String) {
return toLowerCase((String) charSequence);
}
int length = charSequence.length();
char[] cArr = new char[length];
for (int i = 0; i < length; i++) {
cArr[i] = toLowerCase(charSequence.charAt(i));
}
return String.valueOf(cArr);
}
public static String toUpperCase(CharSequence charSequence) {
if (charSequence instanceof String) {
return toUpperCase((String) charSequence);
}
int length = charSequence.length();
char[] cArr = new char[length];
for (int i = 0; i < length; i++) {
cArr[i] = toUpperCase(charSequence.charAt(i));
}
return String.valueOf(cArr);
}
public static char toLowerCase(char c) {
return isUpperCase(c) ? (char) (c ^ CASE_MASK) : c;
}
public static char toUpperCase(char c) {
return isLowerCase(c) ? (char) (c ^ CASE_MASK) : c;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,16 @@
package com.applovin.exoplayer2.common.base;
import java.nio.charset.Charset;
/* loaded from: classes.dex */
public final class Charsets {
public static final Charset US_ASCII = Charset.forName("US-ASCII");
public static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1");
public static final Charset UTF_8 = Charset.forName("UTF-8");
public static final Charset UTF_16BE = Charset.forName("UTF-16BE");
public static final Charset UTF_16LE = Charset.forName("UTF-16LE");
public static final Charset UTF_16 = Charset.forName("UTF-16");
private Charsets() {
}
}

View File

@@ -0,0 +1,304 @@
package com.applovin.exoplayer2.common.base;
import java.io.Serializable;
import java.util.Iterator;
import org.checkerframework.checker.nullness.compatqual.MonotonicNonNullDecl;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
/* loaded from: classes.dex */
public abstract class Converter<A, B> implements Function<A, B> {
private final boolean handleNullAutomatically;
@MonotonicNonNullDecl
private transient Converter<B, A> reverse;
public class a implements Iterable {
final /* synthetic */ Iterable a;
/* renamed from: com.applovin.exoplayer2.common.base.Converter$a$a, reason: collision with other inner class name */
public class C0007a implements Iterator {
private final Iterator a;
public C0007a() {
this.a = a.this.a.iterator();
}
@Override // java.util.Iterator
public boolean hasNext() {
return this.a.hasNext();
}
/* JADX WARN: Multi-variable type inference failed */
@Override // java.util.Iterator
public Object next() {
return Converter.this.convert(this.a.next());
}
@Override // java.util.Iterator
public void remove() {
this.a.remove();
}
}
public a(Iterable iterable) {
this.a = iterable;
}
@Override // java.lang.Iterable
public Iterator iterator() {
return new C0007a();
}
}
public static final class b extends Converter implements Serializable {
final Converter a;
final Converter b;
public b(Converter converter, Converter converter2) {
this.a = converter;
this.b = converter2;
}
/* JADX WARN: Multi-variable type inference failed */
@Override // com.applovin.exoplayer2.common.base.Converter
public Object correctedDoBackward(Object obj) {
return this.a.correctedDoBackward(this.b.correctedDoBackward(obj));
}
/* JADX WARN: Multi-variable type inference failed */
@Override // com.applovin.exoplayer2.common.base.Converter
public Object correctedDoForward(Object obj) {
return this.b.correctedDoForward(this.a.correctedDoForward(obj));
}
@Override // com.applovin.exoplayer2.common.base.Converter
public Object doBackward(Object obj) {
throw new AssertionError();
}
@Override // com.applovin.exoplayer2.common.base.Converter
public Object doForward(Object obj) {
throw new AssertionError();
}
@Override // com.applovin.exoplayer2.common.base.Converter, com.applovin.exoplayer2.common.base.Function
public boolean equals(Object obj) {
if (!(obj instanceof b)) {
return false;
}
b bVar = (b) obj;
return this.a.equals(bVar.a) && this.b.equals(bVar.b);
}
public int hashCode() {
return (this.a.hashCode() * 31) + this.b.hashCode();
}
public String toString() {
return this.a + ".andThen(" + this.b + ")";
}
}
public static final class c extends Converter implements Serializable {
private final Function a;
private final Function b;
public /* synthetic */ c(Function function, Function function2, a aVar) {
this(function, function2);
}
@Override // com.applovin.exoplayer2.common.base.Converter
public Object doBackward(Object obj) {
return this.b.apply(obj);
}
@Override // com.applovin.exoplayer2.common.base.Converter
public Object doForward(Object obj) {
return this.a.apply(obj);
}
@Override // com.applovin.exoplayer2.common.base.Converter, com.applovin.exoplayer2.common.base.Function
public boolean equals(Object obj) {
if (!(obj instanceof c)) {
return false;
}
c cVar = (c) obj;
return this.a.equals(cVar.a) && this.b.equals(cVar.b);
}
public int hashCode() {
return (this.a.hashCode() * 31) + this.b.hashCode();
}
public String toString() {
return "Converter.from(" + this.a + ", " + this.b + ")";
}
private c(Function function, Function function2) {
this.a = (Function) Preconditions.checkNotNull(function);
this.b = (Function) Preconditions.checkNotNull(function2);
}
}
public static final class d extends Converter implements Serializable {
static final d a = new d();
private d() {
}
@Override // com.applovin.exoplayer2.common.base.Converter
public Converter doAndThen(Converter converter) {
return (Converter) Preconditions.checkNotNull(converter, "otherConverter");
}
@Override // com.applovin.exoplayer2.common.base.Converter
public Object doBackward(Object obj) {
return obj;
}
@Override // com.applovin.exoplayer2.common.base.Converter
public Object doForward(Object obj) {
return obj;
}
@Override // com.applovin.exoplayer2.common.base.Converter
public d reverse() {
return this;
}
public String toString() {
return "Converter.identity()";
}
}
public static final class e extends Converter implements Serializable {
final Converter a;
public e(Converter converter) {
this.a = converter;
}
@Override // com.applovin.exoplayer2.common.base.Converter
public Object correctedDoBackward(Object obj) {
return this.a.correctedDoForward(obj);
}
@Override // com.applovin.exoplayer2.common.base.Converter
public Object correctedDoForward(Object obj) {
return this.a.correctedDoBackward(obj);
}
@Override // com.applovin.exoplayer2.common.base.Converter
public Object doBackward(Object obj) {
throw new AssertionError();
}
@Override // com.applovin.exoplayer2.common.base.Converter
public Object doForward(Object obj) {
throw new AssertionError();
}
@Override // com.applovin.exoplayer2.common.base.Converter, com.applovin.exoplayer2.common.base.Function
public boolean equals(Object obj) {
if (obj instanceof e) {
return this.a.equals(((e) obj).a);
}
return false;
}
public int hashCode() {
return ~this.a.hashCode();
}
@Override // com.applovin.exoplayer2.common.base.Converter
public Converter reverse() {
return this.a;
}
public String toString() {
return this.a + ".reverse()";
}
}
public Converter() {
this(true);
}
public static <A, B> Converter<A, B> from(Function<? super A, ? extends B> function, Function<? super B, ? extends A> function2) {
return new c(function, function2, null);
}
public static <T> Converter<T, T> identity() {
return d.a;
}
public final <C> Converter<A, C> andThen(Converter<B, C> converter) {
return doAndThen(converter);
}
@Override // com.applovin.exoplayer2.common.base.Function
@NullableDecl
@Deprecated
public final B apply(@NullableDecl A a2) {
return convert(a2);
}
@NullableDecl
public final B convert(@NullableDecl A a2) {
return correctedDoForward(a2);
}
public Iterable<B> convertAll(Iterable<? extends A> iterable) {
Preconditions.checkNotNull(iterable, "fromIterable");
return new a(iterable);
}
public <C> Converter<A, C> doAndThen(Converter<B, C> converter) {
return new b(this, (Converter) Preconditions.checkNotNull(converter));
}
public abstract A doBackward(B b2);
public abstract B doForward(A a2);
@Override // com.applovin.exoplayer2.common.base.Function
public boolean equals(@NullableDecl Object obj) {
return super.equals(obj);
}
public Converter(boolean z) {
this.handleNullAutomatically = z;
}
public Converter<B, A> reverse() {
Converter<B, A> converter = this.reverse;
if (converter != null) {
return converter;
}
e eVar = new e(this);
this.reverse = eVar;
return eVar;
}
@NullableDecl
public A correctedDoBackward(@NullableDecl B b2) {
if (!this.handleNullAutomatically) {
return doBackward(b2);
}
if (b2 == null) {
return null;
}
return (A) Preconditions.checkNotNull(doBackward(b2));
}
@NullableDecl
public B correctedDoForward(@NullableDecl A a2) {
if (!this.handleNullAutomatically) {
return doForward(a2);
}
if (a2 == null) {
return null;
}
return (B) Preconditions.checkNotNull(doForward(a2));
}
}

View File

@@ -0,0 +1,149 @@
package com.applovin.exoplayer2.common.base;
import java.io.Serializable;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
/* loaded from: classes.dex */
public abstract class Equivalence<T> {
public static final class Wrapper<T> implements Serializable {
private static final long serialVersionUID = 0;
private final Equivalence<? super T> equivalence;
@NullableDecl
private final T reference;
public boolean equals(@NullableDecl Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof Wrapper)) {
return false;
}
Wrapper wrapper = (Wrapper) obj;
if (this.equivalence.equals(wrapper.equivalence)) {
return this.equivalence.equivalent(this.reference, wrapper.reference);
}
return false;
}
@NullableDecl
public T get() {
return this.reference;
}
public int hashCode() {
return this.equivalence.hash(this.reference);
}
public String toString() {
return this.equivalence + ".wrap(" + this.reference + ")";
}
private Wrapper(Equivalence<? super T> equivalence, @NullableDecl T t) {
this.equivalence = (Equivalence) Preconditions.checkNotNull(equivalence);
this.reference = t;
}
}
public static final class b extends Equivalence implements Serializable {
static final b a = new b();
@Override // com.applovin.exoplayer2.common.base.Equivalence
public boolean doEquivalent(Object obj, Object obj2) {
return obj.equals(obj2);
}
@Override // com.applovin.exoplayer2.common.base.Equivalence
public int doHash(Object obj) {
return obj.hashCode();
}
}
public static final class c implements Predicate, Serializable {
private final Equivalence a;
private final Object b;
public c(Equivalence equivalence, Object obj) {
this.a = (Equivalence) Preconditions.checkNotNull(equivalence);
this.b = obj;
}
/* JADX WARN: Multi-variable type inference failed */
@Override // com.applovin.exoplayer2.common.base.Predicate
public boolean apply(Object obj) {
return this.a.equivalent(obj, this.b);
}
@Override // com.applovin.exoplayer2.common.base.Predicate
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof c)) {
return false;
}
c cVar = (c) obj;
return this.a.equals(cVar.a) && Objects.equal(this.b, cVar.b);
}
public int hashCode() {
return Objects.hashCode(this.a, this.b);
}
public String toString() {
return this.a + ".equivalentTo(" + this.b + ")";
}
}
public static final class d extends Equivalence implements Serializable {
static final d a = new d();
@Override // com.applovin.exoplayer2.common.base.Equivalence
public boolean doEquivalent(Object obj, Object obj2) {
return false;
}
@Override // com.applovin.exoplayer2.common.base.Equivalence
public int doHash(Object obj) {
return System.identityHashCode(obj);
}
}
public static Equivalence<Object> equals() {
return b.a;
}
public static Equivalence<Object> identity() {
return d.a;
}
public abstract boolean doEquivalent(T t, T t2);
public abstract int doHash(T t);
public final boolean equivalent(@NullableDecl T t, @NullableDecl T t2) {
if (t == t2) {
return true;
}
if (t == null || t2 == null) {
return false;
}
return doEquivalent(t, t2);
}
public final Predicate<T> equivalentTo(@NullableDecl T t) {
return new c(this, t);
}
public final int hash(@NullableDecl T t) {
if (t == null) {
return 0;
}
return doHash(t);
}
public final <S extends T> Wrapper<S> wrap(@NullableDecl S s) {
return new Wrapper<>(s);
}
}

View File

@@ -0,0 +1,11 @@
package com.applovin.exoplayer2.common.base;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
/* loaded from: classes.dex */
public interface Function<F, T> {
@NullableDecl
T apply(@NullableDecl F f);
boolean equals(@NullableDecl Object obj);
}

View File

@@ -0,0 +1,166 @@
package com.applovin.exoplayer2.common.base;
import com.ironsource.nb;
import java.util.Arrays;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
/* loaded from: classes.dex */
public final class MoreObjects {
public static final class ToStringHelper {
private final String className;
private final a holderHead;
private a holderTail;
private boolean omitNullValues;
public static final class a {
String a;
Object b;
a c;
private a() {
}
}
private a addHolder() {
a aVar = new a();
this.holderTail.c = aVar;
this.holderTail = aVar;
return aVar;
}
public ToStringHelper add(String str, @NullableDecl Object obj) {
return addHolder(str, obj);
}
public ToStringHelper addValue(@NullableDecl Object obj) {
return addHolder(obj);
}
public ToStringHelper omitNullValues() {
this.omitNullValues = true;
return this;
}
private ToStringHelper(String str) {
a aVar = new a();
this.holderHead = aVar;
this.holderTail = aVar;
this.omitNullValues = false;
this.className = (String) Preconditions.checkNotNull(str);
}
public ToStringHelper add(String str, boolean z) {
return addHolder(str, String.valueOf(z));
}
public ToStringHelper addValue(boolean z) {
return addHolder(String.valueOf(z));
}
private ToStringHelper addHolder(@NullableDecl Object obj) {
addHolder().b = obj;
return this;
}
public ToStringHelper add(String str, char c) {
return addHolder(str, String.valueOf(c));
}
public ToStringHelper addValue(char c) {
return addHolder(String.valueOf(c));
}
public String toString() {
boolean z = this.omitNullValues;
StringBuilder sb = new StringBuilder(32);
sb.append(this.className);
sb.append('{');
String str = "";
for (a aVar = this.holderHead.c; aVar != null; aVar = aVar.c) {
Object obj = aVar.b;
if (!z || obj != null) {
sb.append(str);
String str2 = aVar.a;
if (str2 != null) {
sb.append(str2);
sb.append(nb.T);
}
if (obj != null && obj.getClass().isArray()) {
String deepToString = Arrays.deepToString(new Object[]{obj});
sb.append((CharSequence) deepToString, 1, deepToString.length() - 1);
} else {
sb.append(obj);
}
str = ", ";
}
}
sb.append('}');
return sb.toString();
}
public ToStringHelper add(String str, double d) {
return addHolder(str, String.valueOf(d));
}
public ToStringHelper addValue(double d) {
return addHolder(String.valueOf(d));
}
private ToStringHelper addHolder(String str, @NullableDecl Object obj) {
a addHolder = addHolder();
addHolder.b = obj;
addHolder.a = (String) Preconditions.checkNotNull(str);
return this;
}
public ToStringHelper add(String str, float f) {
return addHolder(str, String.valueOf(f));
}
public ToStringHelper addValue(float f) {
return addHolder(String.valueOf(f));
}
public ToStringHelper add(String str, int i) {
return addHolder(str, String.valueOf(i));
}
public ToStringHelper addValue(int i) {
return addHolder(String.valueOf(i));
}
public ToStringHelper add(String str, long j) {
return addHolder(str, String.valueOf(j));
}
public ToStringHelper addValue(long j) {
return addHolder(String.valueOf(j));
}
}
private MoreObjects() {
}
public static <T> T firstNonNull(@NullableDecl T t, @NullableDecl T t2) {
if (t != null) {
return t;
}
if (t2 != null) {
return t2;
}
throw new NullPointerException("Both parameters are null");
}
public static ToStringHelper toStringHelper(Object obj) {
return new ToStringHelper(obj.getClass().getSimpleName());
}
public static ToStringHelper toStringHelper(Class<?> cls) {
return new ToStringHelper(cls.getSimpleName());
}
public static ToStringHelper toStringHelper(String str) {
return new ToStringHelper(str);
}
}

View File

@@ -0,0 +1,17 @@
package com.applovin.exoplayer2.common.base;
import java.util.Arrays;
/* loaded from: classes.dex */
public final class Objects extends c {
private Objects() {
}
public static boolean equal(Object obj, Object obj2) {
return obj == obj2 || (obj != null && obj.equals(obj2));
}
public static int hashCode(Object... objArr) {
return Arrays.hashCode(objArr);
}
}

View File

@@ -0,0 +1,84 @@
package com.applovin.exoplayer2.common.base;
import java.io.Serializable;
import java.util.Iterator;
import java.util.Set;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
/* loaded from: classes.dex */
public abstract class Optional<T> implements Serializable {
private static final long serialVersionUID = 0;
public class a implements Iterable {
final /* synthetic */ Iterable a;
/* renamed from: com.applovin.exoplayer2.common.base.Optional$a$a, reason: collision with other inner class name */
public class C0008a extends b {
private final Iterator c;
public C0008a() {
this.c = (Iterator) Preconditions.checkNotNull(a.this.a.iterator());
}
@Override // com.applovin.exoplayer2.common.base.b
public Object a() {
while (this.c.hasNext()) {
Optional optional = (Optional) this.c.next();
if (optional.isPresent()) {
return optional.get();
}
}
return b();
}
}
public a(Iterable iterable) {
this.a = iterable;
}
@Override // java.lang.Iterable
public Iterator iterator() {
return new C0008a();
}
}
public static <T> Optional<T> absent() {
return com.applovin.exoplayer2.common.base.a.a();
}
public static <T> Optional<T> fromNullable(@NullableDecl T t) {
return t == null ? absent() : new d(t);
}
public static <T> Optional<T> of(T t) {
return new d(Preconditions.checkNotNull(t));
}
public static <T> Iterable<T> presentInstances(Iterable<? extends Optional<? extends T>> iterable) {
Preconditions.checkNotNull(iterable);
return new a(iterable);
}
public abstract Set<T> asSet();
public abstract boolean equals(@NullableDecl Object obj);
public abstract T get();
public abstract int hashCode();
public abstract boolean isPresent();
public abstract Optional<T> or(Optional<? extends T> optional);
public abstract T or(Supplier<? extends T> supplier);
public abstract T or(T t);
@NullableDecl
public abstract T orNull();
public abstract String toString();
public abstract <V> Optional<V> transform(Function<? super T, V> function);
}

View File

@@ -0,0 +1,560 @@
package com.applovin.exoplayer2.common.base;
import org.checkerframework.checker.nullness.compatqual.NonNullDecl;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
/* loaded from: classes.dex */
public final class Preconditions {
private Preconditions() {
}
private static String badElementIndex(int i, int i2, @NullableDecl String str) {
if (i < 0) {
return Strings.lenientFormat("%s (%s) must not be negative", str, Integer.valueOf(i));
}
if (i2 >= 0) {
return Strings.lenientFormat("%s (%s) must be less than size (%s)", str, Integer.valueOf(i), Integer.valueOf(i2));
}
throw new IllegalArgumentException("negative size: " + i2);
}
private static String badPositionIndex(int i, int i2, @NullableDecl String str) {
if (i < 0) {
return Strings.lenientFormat("%s (%s) must not be negative", str, Integer.valueOf(i));
}
if (i2 >= 0) {
return Strings.lenientFormat("%s (%s) must not be greater than size (%s)", str, Integer.valueOf(i), Integer.valueOf(i2));
}
throw new IllegalArgumentException("negative size: " + i2);
}
private static String badPositionIndexes(int i, int i2, int i3) {
return (i < 0 || i > i3) ? badPositionIndex(i, i3, "start index") : (i2 < 0 || i2 > i3) ? badPositionIndex(i2, i3, "end index") : Strings.lenientFormat("end index (%s) must not be less than start index (%s)", Integer.valueOf(i2), Integer.valueOf(i));
}
public static void checkArgument(boolean z) {
if (!z) {
throw new IllegalArgumentException();
}
}
public static int checkElementIndex(int i, int i2) {
return checkElementIndex(i, i2, "index");
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t) {
t.getClass();
return t;
}
public static int checkPositionIndex(int i, int i2) {
return checkPositionIndex(i, i2, "index");
}
public static void checkPositionIndexes(int i, int i2, int i3) {
if (i < 0 || i2 < i || i2 > i3) {
throw new IndexOutOfBoundsException(badPositionIndexes(i, i2, i3));
}
}
public static void checkState(boolean z) {
if (!z) {
throw new IllegalStateException();
}
}
public static void checkArgument(boolean z, @NullableDecl Object obj) {
if (!z) {
throw new IllegalArgumentException(String.valueOf(obj));
}
}
public static int checkElementIndex(int i, int i2, @NullableDecl String str) {
if (i < 0 || i >= i2) {
throw new IndexOutOfBoundsException(badElementIndex(i, i2, str));
}
return i;
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl Object obj) {
if (t != null) {
return t;
}
throw new NullPointerException(String.valueOf(obj));
}
public static int checkPositionIndex(int i, int i2, @NullableDecl String str) {
if (i < 0 || i > i2) {
throw new IndexOutOfBoundsException(badPositionIndex(i, i2, str));
}
return i;
}
public static void checkState(boolean z, @NullableDecl Object obj) {
if (!z) {
throw new IllegalStateException(String.valueOf(obj));
}
}
public static void checkArgument(boolean z, @NullableDecl String str, @NullableDecl Object... objArr) {
if (!z) {
throw new IllegalArgumentException(Strings.lenientFormat(str, objArr));
}
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl String str, @NullableDecl Object... objArr) {
if (t != null) {
return t;
}
throw new NullPointerException(Strings.lenientFormat(str, objArr));
}
public static void checkState(boolean z, @NullableDecl String str, @NullableDecl Object... objArr) {
if (!z) {
throw new IllegalStateException(Strings.lenientFormat(str, objArr));
}
}
public static void checkArgument(boolean z, @NullableDecl String str, char c) {
if (!z) {
throw new IllegalArgumentException(Strings.lenientFormat(str, Character.valueOf(c)));
}
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl String str, char c) {
if (t != null) {
return t;
}
throw new NullPointerException(Strings.lenientFormat(str, Character.valueOf(c)));
}
public static void checkState(boolean z, @NullableDecl String str, char c) {
if (!z) {
throw new IllegalStateException(Strings.lenientFormat(str, Character.valueOf(c)));
}
}
public static void checkArgument(boolean z, @NullableDecl String str, int i) {
if (!z) {
throw new IllegalArgumentException(Strings.lenientFormat(str, Integer.valueOf(i)));
}
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl String str, int i) {
if (t != null) {
return t;
}
throw new NullPointerException(Strings.lenientFormat(str, Integer.valueOf(i)));
}
public static void checkState(boolean z, @NullableDecl String str, int i) {
if (!z) {
throw new IllegalStateException(Strings.lenientFormat(str, Integer.valueOf(i)));
}
}
public static void checkArgument(boolean z, @NullableDecl String str, long j) {
if (!z) {
throw new IllegalArgumentException(Strings.lenientFormat(str, Long.valueOf(j)));
}
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl String str, long j) {
if (t != null) {
return t;
}
throw new NullPointerException(Strings.lenientFormat(str, Long.valueOf(j)));
}
public static void checkState(boolean z, @NullableDecl String str, long j) {
if (!z) {
throw new IllegalStateException(Strings.lenientFormat(str, Long.valueOf(j)));
}
}
public static void checkArgument(boolean z, @NullableDecl String str, @NullableDecl Object obj) {
if (!z) {
throw new IllegalArgumentException(Strings.lenientFormat(str, obj));
}
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl String str, @NullableDecl Object obj) {
if (t != null) {
return t;
}
throw new NullPointerException(Strings.lenientFormat(str, obj));
}
public static void checkState(boolean z, @NullableDecl String str, @NullableDecl Object obj) {
if (!z) {
throw new IllegalStateException(Strings.lenientFormat(str, obj));
}
}
public static void checkArgument(boolean z, @NullableDecl String str, char c, char c2) {
if (!z) {
throw new IllegalArgumentException(Strings.lenientFormat(str, Character.valueOf(c), Character.valueOf(c2)));
}
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl String str, char c, char c2) {
if (t != null) {
return t;
}
throw new NullPointerException(Strings.lenientFormat(str, Character.valueOf(c), Character.valueOf(c2)));
}
public static void checkState(boolean z, @NullableDecl String str, char c, char c2) {
if (!z) {
throw new IllegalStateException(Strings.lenientFormat(str, Character.valueOf(c), Character.valueOf(c2)));
}
}
public static void checkArgument(boolean z, @NullableDecl String str, char c, int i) {
if (!z) {
throw new IllegalArgumentException(Strings.lenientFormat(str, Character.valueOf(c), Integer.valueOf(i)));
}
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl String str, char c, int i) {
if (t != null) {
return t;
}
throw new NullPointerException(Strings.lenientFormat(str, Character.valueOf(c), Integer.valueOf(i)));
}
public static void checkState(boolean z, @NullableDecl String str, char c, int i) {
if (!z) {
throw new IllegalStateException(Strings.lenientFormat(str, Character.valueOf(c), Integer.valueOf(i)));
}
}
public static void checkArgument(boolean z, @NullableDecl String str, char c, long j) {
if (!z) {
throw new IllegalArgumentException(Strings.lenientFormat(str, Character.valueOf(c), Long.valueOf(j)));
}
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl String str, char c, long j) {
if (t != null) {
return t;
}
throw new NullPointerException(Strings.lenientFormat(str, Character.valueOf(c), Long.valueOf(j)));
}
public static void checkState(boolean z, @NullableDecl String str, char c, long j) {
if (!z) {
throw new IllegalStateException(Strings.lenientFormat(str, Character.valueOf(c), Long.valueOf(j)));
}
}
public static void checkArgument(boolean z, @NullableDecl String str, char c, @NullableDecl Object obj) {
if (!z) {
throw new IllegalArgumentException(Strings.lenientFormat(str, Character.valueOf(c), obj));
}
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl String str, char c, @NullableDecl Object obj) {
if (t != null) {
return t;
}
throw new NullPointerException(Strings.lenientFormat(str, Character.valueOf(c), obj));
}
public static void checkState(boolean z, @NullableDecl String str, char c, @NullableDecl Object obj) {
if (!z) {
throw new IllegalStateException(Strings.lenientFormat(str, Character.valueOf(c), obj));
}
}
public static void checkArgument(boolean z, @NullableDecl String str, int i, char c) {
if (!z) {
throw new IllegalArgumentException(Strings.lenientFormat(str, Integer.valueOf(i), Character.valueOf(c)));
}
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl String str, int i, char c) {
if (t != null) {
return t;
}
throw new NullPointerException(Strings.lenientFormat(str, Integer.valueOf(i), Character.valueOf(c)));
}
public static void checkState(boolean z, @NullableDecl String str, int i, char c) {
if (!z) {
throw new IllegalStateException(Strings.lenientFormat(str, Integer.valueOf(i), Character.valueOf(c)));
}
}
public static void checkArgument(boolean z, @NullableDecl String str, int i, int i2) {
if (!z) {
throw new IllegalArgumentException(Strings.lenientFormat(str, Integer.valueOf(i), Integer.valueOf(i2)));
}
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl String str, int i, int i2) {
if (t != null) {
return t;
}
throw new NullPointerException(Strings.lenientFormat(str, Integer.valueOf(i), Integer.valueOf(i2)));
}
public static void checkState(boolean z, @NullableDecl String str, int i, int i2) {
if (!z) {
throw new IllegalStateException(Strings.lenientFormat(str, Integer.valueOf(i), Integer.valueOf(i2)));
}
}
public static void checkArgument(boolean z, @NullableDecl String str, int i, long j) {
if (!z) {
throw new IllegalArgumentException(Strings.lenientFormat(str, Integer.valueOf(i), Long.valueOf(j)));
}
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl String str, int i, long j) {
if (t != null) {
return t;
}
throw new NullPointerException(Strings.lenientFormat(str, Integer.valueOf(i), Long.valueOf(j)));
}
public static void checkState(boolean z, @NullableDecl String str, int i, long j) {
if (!z) {
throw new IllegalStateException(Strings.lenientFormat(str, Integer.valueOf(i), Long.valueOf(j)));
}
}
public static void checkArgument(boolean z, @NullableDecl String str, int i, @NullableDecl Object obj) {
if (!z) {
throw new IllegalArgumentException(Strings.lenientFormat(str, Integer.valueOf(i), obj));
}
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl String str, int i, @NullableDecl Object obj) {
if (t != null) {
return t;
}
throw new NullPointerException(Strings.lenientFormat(str, Integer.valueOf(i), obj));
}
public static void checkState(boolean z, @NullableDecl String str, int i, @NullableDecl Object obj) {
if (!z) {
throw new IllegalStateException(Strings.lenientFormat(str, Integer.valueOf(i), obj));
}
}
public static void checkArgument(boolean z, @NullableDecl String str, long j, char c) {
if (!z) {
throw new IllegalArgumentException(Strings.lenientFormat(str, Long.valueOf(j), Character.valueOf(c)));
}
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl String str, long j, char c) {
if (t != null) {
return t;
}
throw new NullPointerException(Strings.lenientFormat(str, Long.valueOf(j), Character.valueOf(c)));
}
public static void checkState(boolean z, @NullableDecl String str, long j, char c) {
if (!z) {
throw new IllegalStateException(Strings.lenientFormat(str, Long.valueOf(j), Character.valueOf(c)));
}
}
public static void checkArgument(boolean z, @NullableDecl String str, long j, int i) {
if (!z) {
throw new IllegalArgumentException(Strings.lenientFormat(str, Long.valueOf(j), Integer.valueOf(i)));
}
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl String str, long j, int i) {
if (t != null) {
return t;
}
throw new NullPointerException(Strings.lenientFormat(str, Long.valueOf(j), Integer.valueOf(i)));
}
public static void checkState(boolean z, @NullableDecl String str, long j, int i) {
if (!z) {
throw new IllegalStateException(Strings.lenientFormat(str, Long.valueOf(j), Integer.valueOf(i)));
}
}
public static void checkArgument(boolean z, @NullableDecl String str, long j, long j2) {
if (!z) {
throw new IllegalArgumentException(Strings.lenientFormat(str, Long.valueOf(j), Long.valueOf(j2)));
}
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl String str, long j, long j2) {
if (t != null) {
return t;
}
throw new NullPointerException(Strings.lenientFormat(str, Long.valueOf(j), Long.valueOf(j2)));
}
public static void checkState(boolean z, @NullableDecl String str, long j, long j2) {
if (!z) {
throw new IllegalStateException(Strings.lenientFormat(str, Long.valueOf(j), Long.valueOf(j2)));
}
}
public static void checkArgument(boolean z, @NullableDecl String str, long j, @NullableDecl Object obj) {
if (!z) {
throw new IllegalArgumentException(Strings.lenientFormat(str, Long.valueOf(j), obj));
}
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl String str, long j, @NullableDecl Object obj) {
if (t != null) {
return t;
}
throw new NullPointerException(Strings.lenientFormat(str, Long.valueOf(j), obj));
}
public static void checkState(boolean z, @NullableDecl String str, long j, @NullableDecl Object obj) {
if (!z) {
throw new IllegalStateException(Strings.lenientFormat(str, Long.valueOf(j), obj));
}
}
public static void checkArgument(boolean z, @NullableDecl String str, @NullableDecl Object obj, char c) {
if (!z) {
throw new IllegalArgumentException(Strings.lenientFormat(str, obj, Character.valueOf(c)));
}
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl String str, @NullableDecl Object obj, char c) {
if (t != null) {
return t;
}
throw new NullPointerException(Strings.lenientFormat(str, obj, Character.valueOf(c)));
}
public static void checkState(boolean z, @NullableDecl String str, @NullableDecl Object obj, char c) {
if (!z) {
throw new IllegalStateException(Strings.lenientFormat(str, obj, Character.valueOf(c)));
}
}
public static void checkArgument(boolean z, @NullableDecl String str, @NullableDecl Object obj, int i) {
if (!z) {
throw new IllegalArgumentException(Strings.lenientFormat(str, obj, Integer.valueOf(i)));
}
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl String str, @NullableDecl Object obj, int i) {
if (t != null) {
return t;
}
throw new NullPointerException(Strings.lenientFormat(str, obj, Integer.valueOf(i)));
}
public static void checkState(boolean z, @NullableDecl String str, @NullableDecl Object obj, int i) {
if (!z) {
throw new IllegalStateException(Strings.lenientFormat(str, obj, Integer.valueOf(i)));
}
}
public static void checkArgument(boolean z, @NullableDecl String str, @NullableDecl Object obj, long j) {
if (!z) {
throw new IllegalArgumentException(Strings.lenientFormat(str, obj, Long.valueOf(j)));
}
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl String str, @NullableDecl Object obj, long j) {
if (t != null) {
return t;
}
throw new NullPointerException(Strings.lenientFormat(str, obj, Long.valueOf(j)));
}
public static void checkState(boolean z, @NullableDecl String str, @NullableDecl Object obj, long j) {
if (!z) {
throw new IllegalStateException(Strings.lenientFormat(str, obj, Long.valueOf(j)));
}
}
public static void checkArgument(boolean z, @NullableDecl String str, @NullableDecl Object obj, @NullableDecl Object obj2) {
if (!z) {
throw new IllegalArgumentException(Strings.lenientFormat(str, obj, obj2));
}
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl String str, @NullableDecl Object obj, @NullableDecl Object obj2) {
if (t != null) {
return t;
}
throw new NullPointerException(Strings.lenientFormat(str, obj, obj2));
}
public static void checkState(boolean z, @NullableDecl String str, @NullableDecl Object obj, @NullableDecl Object obj2) {
if (!z) {
throw new IllegalStateException(Strings.lenientFormat(str, obj, obj2));
}
}
public static void checkArgument(boolean z, @NullableDecl String str, @NullableDecl Object obj, @NullableDecl Object obj2, @NullableDecl Object obj3) {
if (!z) {
throw new IllegalArgumentException(Strings.lenientFormat(str, obj, obj2, obj3));
}
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl String str, @NullableDecl Object obj, @NullableDecl Object obj2, @NullableDecl Object obj3) {
if (t != null) {
return t;
}
throw new NullPointerException(Strings.lenientFormat(str, obj, obj2, obj3));
}
public static void checkState(boolean z, @NullableDecl String str, @NullableDecl Object obj, @NullableDecl Object obj2, @NullableDecl Object obj3) {
if (!z) {
throw new IllegalStateException(Strings.lenientFormat(str, obj, obj2, obj3));
}
}
public static void checkArgument(boolean z, @NullableDecl String str, @NullableDecl Object obj, @NullableDecl Object obj2, @NullableDecl Object obj3, @NullableDecl Object obj4) {
if (!z) {
throw new IllegalArgumentException(Strings.lenientFormat(str, obj, obj2, obj3, obj4));
}
}
@NonNullDecl
public static <T> T checkNotNull(@NonNullDecl T t, @NullableDecl String str, @NullableDecl Object obj, @NullableDecl Object obj2, @NullableDecl Object obj3, @NullableDecl Object obj4) {
if (t != null) {
return t;
}
throw new NullPointerException(Strings.lenientFormat(str, obj, obj2, obj3, obj4));
}
public static void checkState(boolean z, @NullableDecl String str, @NullableDecl Object obj, @NullableDecl Object obj2, @NullableDecl Object obj3, @NullableDecl Object obj4) {
if (!z) {
throw new IllegalStateException(Strings.lenientFormat(str, obj, obj2, obj3, obj4));
}
}
}

View File

@@ -0,0 +1,10 @@
package com.applovin.exoplayer2.common.base;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
/* loaded from: classes.dex */
public interface Predicate<T> {
boolean apply(@NullableDecl T t);
boolean equals(@NullableDecl Object obj);
}

View File

@@ -0,0 +1,452 @@
package com.applovin.exoplayer2.common.base;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
/* loaded from: classes.dex */
public final class Predicates {
public static class b implements Predicate, Serializable {
private final List a;
@Override // com.applovin.exoplayer2.common.base.Predicate
public boolean apply(Object obj) {
for (int i = 0; i < this.a.size(); i++) {
if (!((Predicate) this.a.get(i)).apply(obj)) {
return false;
}
}
return true;
}
@Override // com.applovin.exoplayer2.common.base.Predicate
public boolean equals(Object obj) {
if (obj instanceof b) {
return this.a.equals(((b) obj).a);
}
return false;
}
public int hashCode() {
return this.a.hashCode() + 306654252;
}
public String toString() {
return Predicates.toStringHelper("and", this.a);
}
private b(List list) {
this.a = list;
}
}
public static class c implements Predicate, Serializable {
final Predicate a;
final Function b;
@Override // com.applovin.exoplayer2.common.base.Predicate
public boolean apply(Object obj) {
return this.a.apply(this.b.apply(obj));
}
@Override // com.applovin.exoplayer2.common.base.Predicate
public boolean equals(Object obj) {
if (!(obj instanceof c)) {
return false;
}
c cVar = (c) obj;
return this.b.equals(cVar.b) && this.a.equals(cVar.a);
}
public int hashCode() {
return this.b.hashCode() ^ this.a.hashCode();
}
public String toString() {
return this.a + "(" + this.b + ")";
}
private c(Predicate predicate, Function function) {
this.a = (Predicate) Preconditions.checkNotNull(predicate);
this.b = (Function) Preconditions.checkNotNull(function);
}
}
public static class d implements Predicate, Serializable {
private final Collection a;
@Override // com.applovin.exoplayer2.common.base.Predicate
public boolean apply(Object obj) {
try {
return this.a.contains(obj);
} catch (ClassCastException | NullPointerException unused) {
return false;
}
}
@Override // com.applovin.exoplayer2.common.base.Predicate
public boolean equals(Object obj) {
if (obj instanceof d) {
return this.a.equals(((d) obj).a);
}
return false;
}
public int hashCode() {
return this.a.hashCode();
}
public String toString() {
return "Predicates.in(" + this.a + ")";
}
private d(Collection collection) {
this.a = (Collection) Preconditions.checkNotNull(collection);
}
}
public static class e implements Predicate, Serializable {
private final Class a;
@Override // com.applovin.exoplayer2.common.base.Predicate
public boolean apply(Object obj) {
return this.a.isInstance(obj);
}
@Override // com.applovin.exoplayer2.common.base.Predicate
public boolean equals(Object obj) {
return (obj instanceof e) && this.a == ((e) obj).a;
}
public int hashCode() {
return this.a.hashCode();
}
public String toString() {
return "Predicates.instanceOf(" + this.a.getName() + ")";
}
private e(Class cls) {
this.a = (Class) Preconditions.checkNotNull(cls);
}
}
public static class f implements Predicate, Serializable {
private final Object a;
@Override // com.applovin.exoplayer2.common.base.Predicate
public boolean apply(Object obj) {
return this.a.equals(obj);
}
@Override // com.applovin.exoplayer2.common.base.Predicate
public boolean equals(Object obj) {
if (obj instanceof f) {
return this.a.equals(((f) obj).a);
}
return false;
}
public int hashCode() {
return this.a.hashCode();
}
public String toString() {
return "Predicates.equalTo(" + this.a + ")";
}
private f(Object obj) {
this.a = obj;
}
}
public static class g implements Predicate, Serializable {
final Predicate a;
public g(Predicate predicate) {
this.a = (Predicate) Preconditions.checkNotNull(predicate);
}
@Override // com.applovin.exoplayer2.common.base.Predicate
public boolean apply(Object obj) {
return !this.a.apply(obj);
}
@Override // com.applovin.exoplayer2.common.base.Predicate
public boolean equals(Object obj) {
if (obj instanceof g) {
return this.a.equals(((g) obj).a);
}
return false;
}
public int hashCode() {
return ~this.a.hashCode();
}
public String toString() {
return "Predicates.not(" + this.a + ")";
}
}
/* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
/* JADX WARN: Unknown enum class pattern. Please report as an issue! */
public static abstract class h implements Predicate {
public static final h a = new a("ALWAYS_TRUE", 0);
public static final h b = new b("ALWAYS_FALSE", 1);
public static final h c = new c("IS_NULL", 2);
public static final h d = new d("NOT_NULL", 3);
private static final /* synthetic */ h[] f = a();
public enum a extends h {
public a(String str, int i) {
super(str, i);
}
@Override // com.applovin.exoplayer2.common.base.Predicate
public boolean apply(Object obj) {
return true;
}
@Override // java.lang.Enum
public String toString() {
return "Predicates.alwaysTrue()";
}
}
public enum b extends h {
public b(String str, int i) {
super(str, i);
}
@Override // com.applovin.exoplayer2.common.base.Predicate
public boolean apply(Object obj) {
return false;
}
@Override // java.lang.Enum
public String toString() {
return "Predicates.alwaysFalse()";
}
}
public enum c extends h {
public c(String str, int i) {
super(str, i);
}
@Override // com.applovin.exoplayer2.common.base.Predicate
public boolean apply(Object obj) {
return obj == null;
}
@Override // java.lang.Enum
public String toString() {
return "Predicates.isNull()";
}
}
public enum d extends h {
public d(String str, int i) {
super(str, i);
}
@Override // com.applovin.exoplayer2.common.base.Predicate
public boolean apply(Object obj) {
return obj != null;
}
@Override // java.lang.Enum
public String toString() {
return "Predicates.notNull()";
}
}
private h(String str, int i) {
}
private static /* synthetic */ h[] a() {
return new h[]{a, b, c, d};
}
public static h valueOf(String str) {
return (h) Enum.valueOf(h.class, str);
}
public static h[] values() {
return (h[]) f.clone();
}
public Predicate b() {
return this;
}
}
public static class i implements Predicate, Serializable {
private final List a;
@Override // com.applovin.exoplayer2.common.base.Predicate
public boolean apply(Object obj) {
for (int i = 0; i < this.a.size(); i++) {
if (((Predicate) this.a.get(i)).apply(obj)) {
return true;
}
}
return false;
}
@Override // com.applovin.exoplayer2.common.base.Predicate
public boolean equals(Object obj) {
if (obj instanceof i) {
return this.a.equals(((i) obj).a);
}
return false;
}
public int hashCode() {
return this.a.hashCode() + 87855567;
}
public String toString() {
return Predicates.toStringHelper("or", this.a);
}
private i(List list) {
this.a = list;
}
}
public static class j implements Predicate, Serializable {
private final Class a;
@Override // com.applovin.exoplayer2.common.base.Predicate
public boolean equals(Object obj) {
return (obj instanceof j) && this.a == ((j) obj).a;
}
public int hashCode() {
return this.a.hashCode();
}
public String toString() {
return "Predicates.subtypeOf(" + this.a.getName() + ")";
}
private j(Class cls) {
this.a = (Class) Preconditions.checkNotNull(cls);
}
@Override // com.applovin.exoplayer2.common.base.Predicate
public boolean apply(Class cls) {
return this.a.isAssignableFrom(cls);
}
}
private Predicates() {
}
public static <T> Predicate<T> alwaysFalse() {
return h.b.b();
}
public static <T> Predicate<T> alwaysTrue() {
return h.a.b();
}
public static <T> Predicate<T> and(Iterable<? extends Predicate<? super T>> iterable) {
return new b(defensiveCopy(iterable));
}
private static <T> List<Predicate<? super T>> asList(Predicate<? super T> predicate, Predicate<? super T> predicate2) {
return Arrays.asList(predicate, predicate2);
}
public static <A, B> Predicate<A> compose(Predicate<B> predicate, Function<A, ? extends B> function) {
return new c(predicate, function);
}
private static <T> List<T> defensiveCopy(T... tArr) {
return defensiveCopy(Arrays.asList(tArr));
}
public static <T> Predicate<T> equalTo(@NullableDecl T t) {
return t == null ? isNull() : new f(t);
}
public static <T> Predicate<T> in(Collection<? extends T> collection) {
return new d(collection);
}
public static Predicate<Object> instanceOf(Class<?> cls) {
return new e(cls);
}
public static <T> Predicate<T> isNull() {
return h.c.b();
}
public static <T> Predicate<T> not(Predicate<T> predicate) {
return new g(predicate);
}
public static <T> Predicate<T> notNull() {
return h.d.b();
}
public static <T> Predicate<T> or(Iterable<? extends Predicate<? super T>> iterable) {
return new i(defensiveCopy(iterable));
}
public static Predicate<Class<?>> subtypeOf(Class<?> cls) {
return new j(cls);
}
/* JADX INFO: Access modifiers changed from: private */
public static String toStringHelper(String str, Iterable<?> iterable) {
StringBuilder sb = new StringBuilder("Predicates.");
sb.append(str);
sb.append('(');
boolean z = true;
for (Object obj : iterable) {
if (!z) {
sb.append(',');
}
sb.append(obj);
z = false;
}
sb.append(')');
return sb.toString();
}
@SafeVarargs
public static <T> Predicate<T> and(Predicate<? super T>... predicateArr) {
return new b(defensiveCopy(predicateArr));
}
public static <T> List<T> defensiveCopy(Iterable<T> iterable) {
ArrayList arrayList = new ArrayList();
Iterator<T> it = iterable.iterator();
while (it.hasNext()) {
arrayList.add(Preconditions.checkNotNull(it.next()));
}
return arrayList;
}
@SafeVarargs
public static <T> Predicate<T> or(Predicate<? super T>... predicateArr) {
return new i(defensiveCopy(predicateArr));
}
public static <T> Predicate<T> and(Predicate<? super T> predicate, Predicate<? super T> predicate2) {
return new b(asList((Predicate) Preconditions.checkNotNull(predicate), (Predicate) Preconditions.checkNotNull(predicate2)));
}
public static <T> Predicate<T> or(Predicate<? super T> predicate, Predicate<? super T> predicate2) {
return new i(asList((Predicate) Preconditions.checkNotNull(predicate), (Predicate) Preconditions.checkNotNull(predicate2)));
}
}

View File

@@ -0,0 +1,287 @@
package com.applovin.exoplayer2.common.base;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
/* loaded from: classes.dex */
public final class Splitter {
private final int limit;
private final boolean omitEmptyStrings;
private final e strategy;
private final CharMatcher trimmer;
public class a implements e {
final /* synthetic */ CharMatcher a;
/* renamed from: com.applovin.exoplayer2.common.base.Splitter$a$a, reason: collision with other inner class name */
public class C0009a extends d {
public C0009a(Splitter splitter, CharSequence charSequence) {
super(splitter, charSequence);
}
@Override // com.applovin.exoplayer2.common.base.Splitter.d
public int a(int i) {
return i + 1;
}
@Override // com.applovin.exoplayer2.common.base.Splitter.d
public int b(int i) {
return a.this.a.indexIn(this.c, i);
}
}
public a(CharMatcher charMatcher) {
this.a = charMatcher;
}
@Override // com.applovin.exoplayer2.common.base.Splitter.e
/* renamed from: b, reason: merged with bridge method [inline-methods] */
public d a(Splitter splitter, CharSequence charSequence) {
return new C0009a(splitter, charSequence);
}
}
public class b implements e {
final /* synthetic */ String a;
public class a extends d {
public a(Splitter splitter, CharSequence charSequence) {
super(splitter, charSequence);
}
@Override // com.applovin.exoplayer2.common.base.Splitter.d
public int a(int i) {
return i + b.this.a.length();
}
/* JADX WARN: Code restructure failed: missing block: B:9:0x0026, code lost:
r6 = r6 + 1;
*/
@Override // com.applovin.exoplayer2.common.base.Splitter.d
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public int b(int r6) {
/*
r5 = this;
com.applovin.exoplayer2.common.base.Splitter$b r0 = com.applovin.exoplayer2.common.base.Splitter.b.this
java.lang.String r0 = r0.a
int r0 = r0.length()
java.lang.CharSequence r1 = r5.c
int r1 = r1.length()
int r1 = r1 - r0
Lf:
if (r6 > r1) goto L2d
r2 = 0
L12:
if (r2 >= r0) goto L2c
java.lang.CharSequence r3 = r5.c
int r4 = r2 + r6
char r3 = r3.charAt(r4)
com.applovin.exoplayer2.common.base.Splitter$b r4 = com.applovin.exoplayer2.common.base.Splitter.b.this
java.lang.String r4 = r4.a
char r4 = r4.charAt(r2)
if (r3 == r4) goto L29
int r6 = r6 + 1
goto Lf
L29:
int r2 = r2 + 1
goto L12
L2c:
return r6
L2d:
r6 = -1
return r6
*/
throw new UnsupportedOperationException("Method not decompiled: com.applovin.exoplayer2.common.base.Splitter.b.a.b(int):int");
}
}
public b(String str) {
this.a = str;
}
@Override // com.applovin.exoplayer2.common.base.Splitter.e
/* renamed from: b, reason: merged with bridge method [inline-methods] */
public d a(Splitter splitter, CharSequence charSequence) {
return new a(splitter, charSequence);
}
}
public class c implements e {
final /* synthetic */ int a;
public class a extends d {
public a(Splitter splitter, CharSequence charSequence) {
super(splitter, charSequence);
}
@Override // com.applovin.exoplayer2.common.base.Splitter.d
public int a(int i) {
return i;
}
@Override // com.applovin.exoplayer2.common.base.Splitter.d
public int b(int i) {
int i2 = i + c.this.a;
if (i2 < this.c.length()) {
return i2;
}
return -1;
}
}
public c(int i) {
this.a = i;
}
@Override // com.applovin.exoplayer2.common.base.Splitter.e
/* renamed from: b, reason: merged with bridge method [inline-methods] */
public d a(Splitter splitter, CharSequence charSequence) {
return new a(splitter, charSequence);
}
}
public interface e {
Iterator a(Splitter splitter, CharSequence charSequence);
}
private Splitter(e eVar) {
this(eVar, false, CharMatcher.none(), Integer.MAX_VALUE);
}
public static Splitter fixedLength(int i) {
Preconditions.checkArgument(i > 0, "The length may not be less than 1");
return new Splitter(new c(i));
}
public static Splitter on(char c2) {
return on(CharMatcher.is(c2));
}
private Iterator<String> splittingIterator(CharSequence charSequence) {
return this.strategy.a(this, charSequence);
}
public Splitter limit(int i) {
Preconditions.checkArgument(i > 0, "must be greater than zero: %s", i);
return new Splitter(this.strategy, this.omitEmptyStrings, this.trimmer, i);
}
public Splitter omitEmptyStrings() {
return new Splitter(this.strategy, true, this.trimmer, this.limit);
}
public List<String> splitToList(CharSequence charSequence) {
Preconditions.checkNotNull(charSequence);
Iterator<String> splittingIterator = splittingIterator(charSequence);
ArrayList arrayList = new ArrayList();
while (splittingIterator.hasNext()) {
arrayList.add(splittingIterator.next());
}
return Collections.unmodifiableList(arrayList);
}
public Splitter trimResults() {
return trimResults(CharMatcher.whitespace());
}
private Splitter(e eVar, boolean z, CharMatcher charMatcher, int i) {
this.strategy = eVar;
this.omitEmptyStrings = z;
this.trimmer = charMatcher;
this.limit = i;
}
public static Splitter on(CharMatcher charMatcher) {
Preconditions.checkNotNull(charMatcher);
return new Splitter(new a(charMatcher));
}
public Splitter trimResults(CharMatcher charMatcher) {
Preconditions.checkNotNull(charMatcher);
return new Splitter(this.strategy, this.omitEmptyStrings, charMatcher, this.limit);
}
public static abstract class d extends com.applovin.exoplayer2.common.base.b {
final CharSequence c;
final CharMatcher d;
final boolean f;
int g = 0;
int h;
public d(Splitter splitter, CharSequence charSequence) {
this.d = splitter.trimmer;
this.f = splitter.omitEmptyStrings;
this.h = splitter.limit;
this.c = charSequence;
}
public abstract int a(int i);
public abstract int b(int i);
@Override // com.applovin.exoplayer2.common.base.b
/* renamed from: d, reason: merged with bridge method [inline-methods] */
public String a() {
int b;
int i = this.g;
while (true) {
int i2 = this.g;
if (i2 != -1) {
b = b(i2);
if (b == -1) {
b = this.c.length();
this.g = -1;
} else {
this.g = a(b);
}
int i3 = this.g;
if (i3 == i) {
int i4 = i3 + 1;
this.g = i4;
if (i4 > this.c.length()) {
this.g = -1;
}
} else {
while (i < b && this.d.matches(this.c.charAt(i))) {
i++;
}
while (b > i && this.d.matches(this.c.charAt(b - 1))) {
b--;
}
if (!this.f || i != b) {
break;
}
i = this.g;
}
} else {
return (String) b();
}
}
int i5 = this.h;
if (i5 == 1) {
b = this.c.length();
this.g = -1;
while (b > i && this.d.matches(this.c.charAt(b - 1))) {
b--;
}
} else {
this.h = i5 - 1;
}
return this.c.subSequence(i, b).toString();
}
}
public static Splitter on(String str) {
Preconditions.checkArgument(str.length() != 0, "The separator may not be the empty string.");
if (str.length() == 1) {
return on(str.charAt(0));
}
return new Splitter(new b(str));
}
}

View File

@@ -0,0 +1,137 @@
package com.applovin.exoplayer2.common.base;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
/* loaded from: classes.dex */
public final class Strings {
private Strings() {
}
public static String commonPrefix(CharSequence charSequence, CharSequence charSequence2) {
Preconditions.checkNotNull(charSequence);
Preconditions.checkNotNull(charSequence2);
int min = Math.min(charSequence.length(), charSequence2.length());
int i = 0;
while (i < min && charSequence.charAt(i) == charSequence2.charAt(i)) {
i++;
}
int i2 = i - 1;
if (validSurrogatePairAt(charSequence, i2) || validSurrogatePairAt(charSequence2, i2)) {
i--;
}
return charSequence.subSequence(0, i).toString();
}
public static String commonSuffix(CharSequence charSequence, CharSequence charSequence2) {
Preconditions.checkNotNull(charSequence);
Preconditions.checkNotNull(charSequence2);
int min = Math.min(charSequence.length(), charSequence2.length());
int i = 0;
while (i < min && charSequence.charAt((charSequence.length() - i) - 1) == charSequence2.charAt((charSequence2.length() - i) - 1)) {
i++;
}
if (validSurrogatePairAt(charSequence, (charSequence.length() - i) - 1) || validSurrogatePairAt(charSequence2, (charSequence2.length() - i) - 1)) {
i--;
}
return charSequence.subSequence(charSequence.length() - i, charSequence.length()).toString();
}
public static String lenientFormat(@NullableDecl String str, @NullableDecl Object... objArr) {
int indexOf;
String valueOf = String.valueOf(str);
int i = 0;
if (objArr == null) {
objArr = new Object[]{"(Object[])null"};
} else {
for (int i2 = 0; i2 < objArr.length; i2++) {
objArr[i2] = lenientToString(objArr[i2]);
}
}
StringBuilder sb = new StringBuilder(valueOf.length() + (objArr.length * 16));
int i3 = 0;
while (i < objArr.length && (indexOf = valueOf.indexOf("%s", i3)) != -1) {
sb.append((CharSequence) valueOf, i3, indexOf);
sb.append(objArr[i]);
i3 = indexOf + 2;
i++;
}
sb.append((CharSequence) valueOf, i3, valueOf.length());
if (i < objArr.length) {
sb.append(" [");
sb.append(objArr[i]);
for (int i4 = i + 1; i4 < objArr.length; i4++) {
sb.append(", ");
sb.append(objArr[i4]);
}
sb.append(']');
}
return sb.toString();
}
private static String lenientToString(@NullableDecl Object obj) {
try {
return String.valueOf(obj);
} catch (Exception e) {
String str = obj.getClass().getName() + '@' + Integer.toHexString(System.identityHashCode(obj));
Logger.getLogger("com.applovin.exoplayer2.common.base.Strings").log(Level.WARNING, "Exception during lenientFormat for " + str, (Throwable) e);
return "<" + str + " threw " + e.getClass().getName() + ">";
}
}
public static String padEnd(String str, int i, char c) {
Preconditions.checkNotNull(str);
if (str.length() >= i) {
return str;
}
StringBuilder sb = new StringBuilder(i);
sb.append(str);
for (int length = str.length(); length < i; length++) {
sb.append(c);
}
return sb.toString();
}
public static String padStart(String str, int i, char c) {
Preconditions.checkNotNull(str);
if (str.length() >= i) {
return str;
}
StringBuilder sb = new StringBuilder(i);
for (int length = str.length(); length < i; length++) {
sb.append(c);
}
sb.append(str);
return sb.toString();
}
public static String repeat(String str, int i) {
Preconditions.checkNotNull(str);
if (i <= 1) {
Preconditions.checkArgument(i >= 0, "invalid count: %s", i);
return i == 0 ? "" : str;
}
int length = str.length();
long j = length * i;
int i2 = (int) j;
if (i2 != j) {
throw new ArrayIndexOutOfBoundsException("Required array size too large: " + j);
}
char[] cArr = new char[i2];
str.getChars(0, length, cArr, 0);
while (true) {
int i3 = i2 - length;
if (length >= i3) {
System.arraycopy(cArr, 0, cArr, length, i3);
return new String(cArr);
}
System.arraycopy(cArr, 0, cArr, length, length);
length <<= 1;
}
}
public static boolean validSurrogatePairAt(CharSequence charSequence, int i) {
return i >= 0 && i <= charSequence.length() + (-2) && Character.isHighSurrogate(charSequence.charAt(i)) && Character.isLowSurrogate(charSequence.charAt(i + 1));
}
}

View File

@@ -0,0 +1,6 @@
package com.applovin.exoplayer2.common.base;
/* loaded from: classes.dex */
public interface Supplier<T> {
T get();
}

View File

@@ -0,0 +1,213 @@
package com.applovin.exoplayer2.common.base;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.AbstractList;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
/* loaded from: classes.dex */
public final class Throwables {
private static final String JAVA_LANG_ACCESS_CLASSNAME = "sun.misc.JavaLangAccess";
static final String SHARED_SECRETS_CLASSNAME = "sun.misc.SharedSecrets";
private static final Method getStackTraceDepthMethod;
private static final Method getStackTraceElementMethod;
private static final Object jla;
public class a extends AbstractList {
final /* synthetic */ Throwable a;
public a(Throwable th) {
this.a = th;
}
@Override // java.util.AbstractCollection, java.util.Collection, java.util.List
public int size() {
return ((Integer) Throwables.invokeAccessibleNonThrowingMethod(Throwables.getStackTraceDepthMethod, Throwables.jla, this.a)).intValue();
}
@Override // java.util.AbstractList, java.util.List
public StackTraceElement get(int i) {
return (StackTraceElement) Throwables.invokeAccessibleNonThrowingMethod(Throwables.getStackTraceElementMethod, Throwables.jla, this.a, Integer.valueOf(i));
}
}
static {
Object jla2 = getJLA();
jla = jla2;
getStackTraceElementMethod = jla2 == null ? null : getGetMethod();
getStackTraceDepthMethod = jla2 != null ? getSizeMethod() : null;
}
private Throwables() {
}
public static List<Throwable> getCausalChain(Throwable th) {
Preconditions.checkNotNull(th);
ArrayList arrayList = new ArrayList(4);
arrayList.add(th);
boolean z = false;
Throwable th2 = th;
while (true) {
th = th.getCause();
if (th == null) {
return Collections.unmodifiableList(arrayList);
}
arrayList.add(th);
if (th == th2) {
throw new IllegalArgumentException("Loop in causal chain detected.", th);
}
if (z) {
th2 = th2.getCause();
}
z = !z;
}
}
public static <X extends Throwable> X getCauseAs(Throwable th, Class<X> cls) {
try {
return cls.cast(th.getCause());
} catch (ClassCastException e) {
e.initCause(th);
throw e;
}
}
private static Method getGetMethod() {
return getJlaMethod("getStackTraceElement", Throwable.class, Integer.TYPE);
}
private static Object getJLA() {
try {
return Class.forName(SHARED_SECRETS_CLASSNAME, false, null).getMethod("getJavaLangAccess", new Class[0]).invoke(null, new Object[0]);
} catch (ThreadDeath e) {
throw e;
} catch (Throwable unused) {
return null;
}
}
private static Method getJlaMethod(String str, Class<?>... clsArr) throws ThreadDeath {
try {
return Class.forName(JAVA_LANG_ACCESS_CLASSNAME, false, null).getMethod(str, clsArr);
} catch (ThreadDeath e) {
throw e;
} catch (Throwable unused) {
return null;
}
}
public static Throwable getRootCause(Throwable th) {
boolean z = false;
Throwable th2 = th;
while (true) {
Throwable cause = th.getCause();
if (cause == null) {
return th;
}
if (cause == th2) {
throw new IllegalArgumentException("Loop in causal chain detected.", cause);
}
if (z) {
th2 = th2.getCause();
}
z = !z;
th = cause;
}
}
private static Method getSizeMethod() {
try {
Method jlaMethod = getJlaMethod("getStackTraceDepth", Throwable.class);
if (jlaMethod == null) {
return null;
}
jlaMethod.invoke(getJLA(), new Throwable());
return jlaMethod;
} catch (IllegalAccessException | UnsupportedOperationException | InvocationTargetException unused) {
return null;
}
}
public static String getStackTraceAsString(Throwable th) {
StringWriter stringWriter = new StringWriter();
th.printStackTrace(new PrintWriter(stringWriter));
return stringWriter.toString();
}
/* JADX INFO: Access modifiers changed from: private */
public static Object invokeAccessibleNonThrowingMethod(Method method, Object obj, Object... objArr) {
try {
return method.invoke(obj, objArr);
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
} catch (InvocationTargetException e2) {
throw propagate(e2.getCause());
}
}
private static List<StackTraceElement> jlaStackTrace(Throwable th) {
Preconditions.checkNotNull(th);
return new a(th);
}
public static List<StackTraceElement> lazyStackTrace(Throwable th) {
return lazyStackTraceIsLazy() ? jlaStackTrace(th) : Collections.unmodifiableList(Arrays.asList(th.getStackTrace()));
}
public static boolean lazyStackTraceIsLazy() {
return (getStackTraceElementMethod == null || getStackTraceDepthMethod == null) ? false : true;
}
@Deprecated
public static RuntimeException propagate(Throwable th) {
throwIfUnchecked(th);
throw new RuntimeException(th);
}
@Deprecated
public static <X extends Throwable> void propagateIfInstanceOf(Throwable th, Class<X> cls) throws Throwable {
if (th != null) {
throwIfInstanceOf(th, cls);
}
}
@Deprecated
public static void propagateIfPossible(Throwable th) {
if (th != null) {
throwIfUnchecked(th);
}
}
public static <X extends Throwable> void throwIfInstanceOf(Throwable th, Class<X> cls) throws Throwable {
Preconditions.checkNotNull(th);
if (cls.isInstance(th)) {
throw cls.cast(th);
}
}
public static void throwIfUnchecked(Throwable th) {
Preconditions.checkNotNull(th);
if (th instanceof RuntimeException) {
throw ((RuntimeException) th);
}
if (th instanceof Error) {
throw ((Error) th);
}
}
public static <X extends Throwable> void propagateIfPossible(Throwable th, Class<X> cls) throws Throwable {
propagateIfInstanceOf(th, cls);
propagateIfPossible(th);
}
public static <X1 extends Throwable, X2 extends Throwable> void propagateIfPossible(Throwable th, Class<X1> cls, Class<X2> cls2) throws Throwable, Throwable {
Preconditions.checkNotNull(cls2);
propagateIfInstanceOf(th, cls);
propagateIfPossible(th, cls2);
}
}

View File

@@ -0,0 +1,72 @@
package com.applovin.exoplayer2.common.base;
import java.util.Collections;
import java.util.Set;
/* loaded from: classes.dex */
final class a extends Optional {
static final a a = new a();
private a() {
}
public static Optional a() {
return a;
}
@Override // com.applovin.exoplayer2.common.base.Optional
public Set asSet() {
return Collections.emptySet();
}
@Override // com.applovin.exoplayer2.common.base.Optional
public boolean equals(Object obj) {
return obj == this;
}
@Override // com.applovin.exoplayer2.common.base.Optional
public Object get() {
throw new IllegalStateException("Optional.get() cannot be called on an absent value");
}
@Override // com.applovin.exoplayer2.common.base.Optional
public int hashCode() {
return 2040732332;
}
@Override // com.applovin.exoplayer2.common.base.Optional
public boolean isPresent() {
return false;
}
@Override // com.applovin.exoplayer2.common.base.Optional
public Object or(Object obj) {
return Preconditions.checkNotNull(obj, "use Optional.orNull() instead of Optional.or(null)");
}
@Override // com.applovin.exoplayer2.common.base.Optional
public Object orNull() {
return null;
}
@Override // com.applovin.exoplayer2.common.base.Optional
public String toString() {
return "Optional.absent()";
}
@Override // com.applovin.exoplayer2.common.base.Optional
public Optional transform(Function function) {
Preconditions.checkNotNull(function);
return Optional.absent();
}
@Override // com.applovin.exoplayer2.common.base.Optional
public Optional or(Optional optional) {
return (Optional) Preconditions.checkNotNull(optional);
}
@Override // com.applovin.exoplayer2.common.base.Optional
public Object or(Supplier supplier) {
return Preconditions.checkNotNull(supplier.get(), "use Optional.orNull() instead of a Supplier that returns null");
}
}

View File

@@ -0,0 +1,81 @@
package com.applovin.exoplayer2.common.base;
import java.util.Iterator;
import java.util.NoSuchElementException;
/* loaded from: classes.dex */
abstract class b implements Iterator {
private EnumC0010b a = EnumC0010b.NOT_READY;
private Object b;
public static /* synthetic */ class a {
static final /* synthetic */ int[] a;
static {
int[] iArr = new int[EnumC0010b.values().length];
a = iArr;
try {
iArr[EnumC0010b.READY.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
a[EnumC0010b.DONE.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
}
}
/* renamed from: com.applovin.exoplayer2.common.base.b$b, reason: collision with other inner class name */
public enum EnumC0010b {
READY,
NOT_READY,
DONE,
FAILED
}
private boolean c() {
this.a = EnumC0010b.FAILED;
this.b = a();
if (this.a == EnumC0010b.DONE) {
return false;
}
this.a = EnumC0010b.READY;
return true;
}
public abstract Object a();
public final Object b() {
this.a = EnumC0010b.DONE;
return null;
}
@Override // java.util.Iterator
public final boolean hasNext() {
Preconditions.checkState(this.a != EnumC0010b.FAILED);
int i = a.a[this.a.ordinal()];
if (i == 1) {
return true;
}
if (i != 2) {
return c();
}
return false;
}
@Override // java.util.Iterator
public final Object next() {
if (!hasNext()) {
throw new NoSuchElementException();
}
this.a = EnumC0010b.NOT_READY;
Object obj = this.b;
this.b = null;
return obj;
}
@Override // java.util.Iterator
public final void remove() {
throw new UnsupportedOperationException();
}
}

View File

@@ -0,0 +1,5 @@
package com.applovin.exoplayer2.common.base;
/* loaded from: classes.dex */
abstract class c {
}

View File

@@ -0,0 +1,74 @@
package com.applovin.exoplayer2.common.base;
import java.util.Collections;
import java.util.Set;
/* loaded from: classes.dex */
final class d extends Optional {
private final Object a;
public d(Object obj) {
this.a = obj;
}
@Override // com.applovin.exoplayer2.common.base.Optional
public Set asSet() {
return Collections.singleton(this.a);
}
@Override // com.applovin.exoplayer2.common.base.Optional
public boolean equals(Object obj) {
if (obj instanceof d) {
return this.a.equals(((d) obj).a);
}
return false;
}
@Override // com.applovin.exoplayer2.common.base.Optional
public Object get() {
return this.a;
}
@Override // com.applovin.exoplayer2.common.base.Optional
public int hashCode() {
return this.a.hashCode() + 1502476572;
}
@Override // com.applovin.exoplayer2.common.base.Optional
public boolean isPresent() {
return true;
}
@Override // com.applovin.exoplayer2.common.base.Optional
public Object or(Object obj) {
Preconditions.checkNotNull(obj, "use Optional.orNull() instead of Optional.or(null)");
return this.a;
}
@Override // com.applovin.exoplayer2.common.base.Optional
public Object orNull() {
return this.a;
}
@Override // com.applovin.exoplayer2.common.base.Optional
public String toString() {
return "Optional.of(" + this.a + ")";
}
@Override // com.applovin.exoplayer2.common.base.Optional
public Optional transform(Function function) {
return new d(Preconditions.checkNotNull(function.apply(this.a), "the Function passed to Optional.transform() must not return null."));
}
@Override // com.applovin.exoplayer2.common.base.Optional
public Optional or(Optional optional) {
Preconditions.checkNotNull(optional);
return this;
}
@Override // com.applovin.exoplayer2.common.base.Optional
public Object or(Supplier supplier) {
Preconditions.checkNotNull(supplier);
return this.a;
}
}

View File

@@ -0,0 +1,136 @@
package com.applovin.exoplayer2.ui;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.View;
import android.widget.FrameLayout;
import androidx.annotation.Nullable;
import com.applovin.sdk.R;
/* loaded from: classes.dex */
public final class AspectRatioFrameLayout extends FrameLayout {
private final c a;
private float b;
private int c;
public interface b {
}
public final class c implements Runnable {
private float a;
private float b;
private boolean c;
private boolean d;
private c() {
}
@Override // java.lang.Runnable
public void run() {
this.d = false;
AspectRatioFrameLayout.a(AspectRatioFrameLayout.this);
}
public void a(float f, float f2, boolean z) {
this.a = f;
this.b = f2;
this.c = z;
if (this.d) {
return;
}
this.d = true;
AspectRatioFrameLayout.this.post(this);
}
}
public AspectRatioFrameLayout(Context context) {
this(context, null);
}
public static /* synthetic */ b a(AspectRatioFrameLayout aspectRatioFrameLayout) {
aspectRatioFrameLayout.getClass();
return null;
}
public int getResizeMode() {
return this.c;
}
@Override // android.widget.FrameLayout, android.view.View
public void onMeasure(int i, int i2) {
float f;
float f2;
super.onMeasure(i, i2);
if (this.b <= 0.0f) {
return;
}
int measuredWidth = getMeasuredWidth();
int measuredHeight = getMeasuredHeight();
float f3 = measuredWidth;
float f4 = measuredHeight;
float f5 = f3 / f4;
float f6 = (this.b / f5) - 1.0f;
if (Math.abs(f6) <= 0.01f) {
this.a.a(this.b, f5, false);
return;
}
int i3 = this.c;
if (i3 != 0) {
if (i3 != 1) {
if (i3 == 2) {
f = this.b;
} else if (i3 == 4) {
if (f6 > 0.0f) {
f = this.b;
} else {
f2 = this.b;
}
}
measuredWidth = (int) (f4 * f);
} else {
f2 = this.b;
}
measuredHeight = (int) (f3 / f2);
} else if (f6 > 0.0f) {
f2 = this.b;
measuredHeight = (int) (f3 / f2);
} else {
f = this.b;
measuredWidth = (int) (f4 * f);
}
this.a.a(this.b, f5, true);
super.onMeasure(View.MeasureSpec.makeMeasureSpec(measuredWidth, 1073741824), View.MeasureSpec.makeMeasureSpec(measuredHeight, 1073741824));
}
public void setAspectRatioListener(@Nullable b bVar) {
}
public AspectRatioFrameLayout(Context context, @Nullable AttributeSet attributeSet) {
super(context, attributeSet);
this.c = 0;
if (attributeSet != null) {
TypedArray obtainStyledAttributes = context.getTheme().obtainStyledAttributes(attributeSet, R.styleable.AppLovinAspectRatioFrameLayout, 0, 0);
try {
this.c = obtainStyledAttributes.getInt(R.styleable.AppLovinAspectRatioFrameLayout_al_resize_mode, 0);
} finally {
obtainStyledAttributes.recycle();
}
}
this.a = new c();
}
public void setAspectRatio(float f) {
if (this.b != f) {
this.b = f;
requestLayout();
}
}
public void setResizeMode(int i) {
if (this.c != i) {
this.c = i;
requestLayout();
}
}
}

View File

@@ -0,0 +1,174 @@
package com.applovin.exoplayer2.ui;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.accessibility.CaptioningManager;
import android.widget.FrameLayout;
import androidx.annotation.Nullable;
import com.applovin.impl.b5;
import com.applovin.impl.qh;
import com.applovin.impl.x2;
import com.applovin.impl.xp;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/* loaded from: classes.dex */
public final class SubtitleView extends FrameLayout implements qh.e {
private List a;
private x2 b;
private int c;
private float d;
private float f;
private boolean g;
private boolean h;
private int i;
private a j;
private View k;
public interface a {
void a(List list, x2 x2Var, float f, int i, float f2);
}
public SubtitleView(Context context) {
this(context, null);
}
private float getUserCaptionFontScale() {
CaptioningManager captioningManager;
if (xp.a < 19 || isInEditMode() || (captioningManager = (CaptioningManager) getContext().getSystemService("captioning")) == null || !captioningManager.isEnabled()) {
return 1.0f;
}
return captioningManager.getFontScale();
}
private x2 getUserCaptionStyle() {
if (xp.a < 19 || isInEditMode()) {
return x2.g;
}
CaptioningManager captioningManager = (CaptioningManager) getContext().getSystemService("captioning");
return (captioningManager == null || !captioningManager.isEnabled()) ? x2.g : x2.a(captioningManager.getUserStyle());
}
private <T extends View & a> void setView(T t) {
removeView(this.k);
View view = this.k;
if (view instanceof j) {
((j) view).a();
}
this.k = t;
this.j = t;
addView(t);
}
public void c() {
setStyle(getUserCaptionStyle());
}
public void d() {
setFractionalTextSize(getUserCaptionFontScale() * 0.0533f);
}
public void setCues(@Nullable List<b5> list) {
if (list == null) {
list = Collections.emptyList();
}
this.a = list;
e();
}
public void setFractionalTextSize(float f) {
a(f, false);
}
public SubtitleView(Context context, @Nullable AttributeSet attributeSet) {
super(context, attributeSet);
this.a = Collections.emptyList();
this.b = x2.g;
this.c = 0;
this.d = 0.0533f;
this.f = 0.08f;
this.g = true;
this.h = true;
com.applovin.exoplayer2.ui.a aVar = new com.applovin.exoplayer2.ui.a(context);
this.j = aVar;
this.k = aVar;
addView(aVar);
this.i = 1;
}
private void e() {
this.j.a(getCuesWithStylingPreferencesApplied(), this.b, this.d, this.c, this.f);
}
public void setApplyEmbeddedFontSizes(boolean z) {
this.h = z;
e();
}
public void setApplyEmbeddedStyles(boolean z) {
this.g = z;
e();
}
public void setBottomPaddingFraction(float f) {
this.f = f;
e();
}
private List<b5> getCuesWithStylingPreferencesApplied() {
if (this.g && this.h) {
return this.a;
}
ArrayList arrayList = new ArrayList(this.a.size());
for (int i = 0; i < this.a.size(); i++) {
arrayList.add(a((b5) this.a.get(i)));
}
return arrayList;
}
public void setViewType(int i) {
if (this.i == i) {
return;
}
if (i == 1) {
setView(new com.applovin.exoplayer2.ui.a(getContext()));
} else if (i == 2) {
setView(new j(getContext()));
} else {
throw new IllegalArgumentException();
}
this.i = i;
}
public void setStyle(x2 x2Var) {
this.b = x2Var;
e();
}
private b5 a(b5 b5Var) {
b5.b a2 = b5Var.a();
if (!this.g) {
h.a(a2);
} else if (!this.h) {
h.b(a2);
}
return a2.a();
}
@Override // com.applovin.impl.qh.e
public void a(List list) {
setCues(list);
}
public void a(float f, boolean z) {
a(z ? 1 : 0, f);
}
private void a(int i, float f) {
this.c = i;
this.d = f;
e();
}
}

View File

@@ -0,0 +1,103 @@
package com.applovin.exoplayer2.ui;
import android.content.Context;
import android.graphics.Canvas;
import android.text.Layout;
import android.util.AttributeSet;
import android.view.View;
import com.applovin.exoplayer2.ui.SubtitleView;
import com.applovin.impl.b5;
import com.applovin.impl.x2;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/* loaded from: classes.dex */
final class a extends View implements SubtitleView.a {
private final List a;
private List b;
private int c;
private float d;
private x2 f;
private float g;
public a(Context context) {
this(context, null);
}
public a(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.a = new ArrayList();
this.b = Collections.emptyList();
this.c = 0;
this.d = 0.0533f;
this.f = x2.g;
this.g = 0.08f;
}
@Override // android.view.View
public void dispatchDraw(Canvas canvas) {
List list = this.b;
if (list.isEmpty()) {
return;
}
int height = getHeight();
int paddingLeft = getPaddingLeft();
int paddingTop = getPaddingTop();
int width = getWidth() - getPaddingRight();
int paddingBottom = height - getPaddingBottom();
if (paddingBottom <= paddingTop || width <= paddingLeft) {
return;
}
int i = paddingBottom - paddingTop;
float a = h.a(this.c, this.d, height, i);
if (a <= 0.0f) {
return;
}
int size = list.size();
int i2 = 0;
while (i2 < size) {
b5 b5Var = (b5) list.get(i2);
if (b5Var.q != Integer.MIN_VALUE) {
b5Var = a(b5Var);
}
b5 b5Var2 = b5Var;
int i3 = paddingBottom;
((g) this.a.get(i2)).a(b5Var2, this.f, a, h.a(b5Var2.o, b5Var2.p, height, i), this.g, canvas, paddingLeft, paddingTop, width, i3);
i2++;
size = size;
i = i;
paddingBottom = i3;
width = width;
}
}
private static b5 a(b5 b5Var) {
b5.b b = b5Var.a().b(-3.4028235E38f).b(Integer.MIN_VALUE).b((Layout.Alignment) null);
if (b5Var.g == 0) {
b.a(1.0f - b5Var.f, 0);
} else {
b.a((-b5Var.f) - 1.0f, 1);
}
int i = b5Var.h;
if (i == 0) {
b.a(2);
} else if (i == 2) {
b.a(0);
}
return b.a();
}
@Override // com.applovin.exoplayer2.ui.SubtitleView.a
public void a(List list, x2 x2Var, float f, int i, float f2) {
this.b = list;
this.f = x2Var;
this.d = f;
this.c = i;
this.g = f2;
while (this.a.size() < list.size()) {
this.a.add(new g(getContext()));
}
invalidate();
}
}

View File

@@ -0,0 +1,5 @@
package com.applovin.exoplayer2.ui;
/* loaded from: classes.dex */
public abstract /* synthetic */ class b$$ExternalSyntheticApiModelOutline0 {
}

View File

@@ -0,0 +1,783 @@
package com.applovin.exoplayer2.ui;
import android.animation.ValueAnimator;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewParent;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import androidx.annotation.ColorInt;
import com.applovin.exoplayer2.ui.i;
import com.applovin.impl.b1;
import com.applovin.impl.xp;
import com.applovin.sdk.R;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import java.util.Collections;
import java.util.Formatter;
import java.util.Iterator;
import java.util.Locale;
import java.util.concurrent.CopyOnWriteArraySet;
/* loaded from: classes.dex */
public class b extends View implements i {
private final float A;
private int B;
private long C;
private int D;
private Rect E;
private ValueAnimator F;
private float G;
private boolean H;
private boolean I;
private long J;
private long K;
private long L;
private long M;
private int N;
private long[] O;
private boolean[] P;
private final Rect a;
private final Rect b;
private final Rect c;
private final Rect d;
private final Paint f;
private final Paint g;
private final Paint h;
private final Paint i;
private final Paint j;
private final Paint k;
private final Drawable l;
private final int m;
private final int n;
private final int o;
private final int p;
private final int q;
private final int r;
private final int s;
private final int t;
private final int u;
private final StringBuilder v;
private final Formatter w;
private final Runnable x;
private final CopyOnWriteArraySet y;
private final Point z;
public b(Context context, AttributeSet attributeSet, int i, AttributeSet attributeSet2) {
this(context, attributeSet, i, attributeSet2, 0);
}
private static int a(float f, int i) {
return (int) ((i * f) + 0.5f);
}
private static int b(float f, int i) {
return (int) (i / f);
}
private String getProgressText() {
return xp.a(this.v, this.w, this.L);
}
private long getScrubberPosition() {
if (this.b.width() <= 0 || this.K == C.TIME_UNSET) {
return 0L;
}
return (this.d.width() * this.K) / this.b.width();
}
@Override // android.view.View
public void drawableStateChanged() {
super.drawableStateChanged();
c();
}
@Override // com.applovin.exoplayer2.ui.i
public long getPreferredUpdateDelay() {
int b = b(this.A, this.b.width());
if (b != 0) {
long j = this.K;
if (j != 0 && j != C.TIME_UNSET) {
return j / b;
}
}
return Long.MAX_VALUE;
}
@Override // android.view.View
public void jumpDrawablesToCurrentState() {
super.jumpDrawablesToCurrentState();
Drawable drawable = this.l;
if (drawable != null) {
drawable.jumpToCurrentState();
}
}
@Override // android.view.View
public void onDraw(Canvas canvas) {
canvas.save();
b(canvas);
a(canvas);
canvas.restore();
}
@Override // android.view.View
public void onFocusChanged(boolean z, int i, Rect rect) {
super.onFocusChanged(z, i, rect);
if (!this.I || z) {
return;
}
a(false);
}
@Override // android.view.View
public void onInitializeAccessibilityEvent(AccessibilityEvent accessibilityEvent) {
super.onInitializeAccessibilityEvent(accessibilityEvent);
if (accessibilityEvent.getEventType() == 4) {
accessibilityEvent.getText().add(getProgressText());
}
accessibilityEvent.setClassName("android.widget.SeekBar");
}
@Override // android.view.View
public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo accessibilityNodeInfo) {
super.onInitializeAccessibilityNodeInfo(accessibilityNodeInfo);
accessibilityNodeInfo.setClassName("android.widget.SeekBar");
accessibilityNodeInfo.setContentDescription(getProgressText());
if (this.K <= 0) {
return;
}
if (xp.a >= 21) {
accessibilityNodeInfo.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_FORWARD);
accessibilityNodeInfo.addAction(AccessibilityNodeInfo.AccessibilityAction.ACTION_SCROLL_BACKWARD);
} else {
accessibilityNodeInfo.addAction(4096);
accessibilityNodeInfo.addAction(8192);
}
}
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
/* JADX WARN: Removed duplicated region for block: B:9:0x001a */
@Override // android.view.View, android.view.KeyEvent.Callback
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public boolean onKeyDown(int r5, android.view.KeyEvent r6) {
/*
r4 = this;
boolean r0 = r4.isEnabled()
if (r0 == 0) goto L30
long r0 = r4.getPositionIncrement()
r2 = 66
r3 = 1
if (r5 == r2) goto L27
switch(r5) {
case 21: goto L13;
case 22: goto L14;
case 23: goto L27;
default: goto L12;
}
L12:
goto L30
L13:
long r0 = -r0
L14:
boolean r0 = r4.a(r0)
if (r0 == 0) goto L30
java.lang.Runnable r5 = r4.x
r4.removeCallbacks(r5)
java.lang.Runnable r5 = r4.x
r0 = 1000(0x3e8, double:4.94E-321)
r4.postDelayed(r5, r0)
return r3
L27:
boolean r0 = r4.I
if (r0 == 0) goto L30
r5 = 0
r4.a(r5)
return r3
L30:
boolean r5 = super.onKeyDown(r5, r6)
return r5
*/
throw new UnsupportedOperationException("Method not decompiled: com.applovin.exoplayer2.ui.b.onKeyDown(int, android.view.KeyEvent):boolean");
}
@Override // android.view.View
public void onLayout(boolean z, int i, int i2, int i3, int i4) {
int i5;
int i6;
int i7 = i3 - i;
int i8 = i4 - i2;
int paddingLeft = getPaddingLeft();
int paddingRight = i7 - getPaddingRight();
int i9 = this.H ? 0 : this.t;
if (this.o == 1) {
i5 = (i8 - getPaddingBottom()) - this.n;
int paddingBottom = i8 - getPaddingBottom();
int i10 = this.m;
i6 = (paddingBottom - i10) - Math.max(i9 - (i10 / 2), 0);
} else {
i5 = (i8 - this.n) / 2;
i6 = (i8 - this.m) / 2;
}
this.a.set(paddingLeft, i5, paddingRight, this.n + i5);
Rect rect = this.b;
Rect rect2 = this.a;
rect.set(rect2.left + i9, i6, rect2.right - i9, this.m + i6);
if (xp.a >= 29) {
a(i7, i8);
}
b();
}
@Override // android.view.View
public void onMeasure(int i, int i2) {
int mode = View.MeasureSpec.getMode(i2);
int size = View.MeasureSpec.getSize(i2);
if (mode == 0) {
size = this.n;
} else if (mode != 1073741824) {
size = Math.min(this.n, size);
}
setMeasuredDimension(View.MeasureSpec.getSize(i), size);
c();
}
@Override // android.view.View
public void onRtlPropertiesChanged(int i) {
Drawable drawable = this.l;
if (drawable == null || !a(drawable, i)) {
return;
}
invalidate();
}
/* JADX WARN: Code restructure failed: missing block: B:11:0x0025, code lost:
if (r3 != 3) goto L34;
*/
@Override // android.view.View
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public boolean onTouchEvent(android.view.MotionEvent r8) {
/*
r7 = this;
boolean r0 = r7.isEnabled()
r1 = 0
if (r0 == 0) goto L76
long r2 = r7.K
r4 = 0
int r0 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1))
if (r0 > 0) goto L10
goto L76
L10:
android.graphics.Point r0 = r7.a(r8)
int r2 = r0.x
int r0 = r0.y
int r3 = r8.getAction()
r4 = 1
if (r3 == 0) goto L5d
r5 = 3
if (r3 == r4) goto L4e
r6 = 2
if (r3 == r6) goto L28
if (r3 == r5) goto L4e
goto L76
L28:
boolean r8 = r7.I
if (r8 == 0) goto L76
int r8 = r7.u
if (r0 >= r8) goto L3a
int r8 = r7.D
int r2 = r2 - r8
int r2 = r2 / r5
int r8 = r8 + r2
float r8 = (float) r8
r7.a(r8)
goto L40
L3a:
r7.D = r2
float r8 = (float) r2
r7.a(r8)
L40:
long r0 = r7.getScrubberPosition()
r7.c(r0)
r7.b()
r7.invalidate()
return r4
L4e:
boolean r0 = r7.I
if (r0 == 0) goto L76
int r8 = r8.getAction()
if (r8 != r5) goto L59
r1 = r4
L59:
r7.a(r1)
return r4
L5d:
float r8 = (float) r2
float r0 = (float) r0
boolean r0 = r7.a(r8, r0)
if (r0 == 0) goto L76
r7.a(r8)
long r0 = r7.getScrubberPosition()
r7.b(r0)
r7.b()
r7.invalidate()
return r4
L76:
return r1
*/
throw new UnsupportedOperationException("Method not decompiled: com.applovin.exoplayer2.ui.b.onTouchEvent(android.view.MotionEvent):boolean");
}
@Override // android.view.View
public boolean performAccessibilityAction(int i, Bundle bundle) {
if (super.performAccessibilityAction(i, bundle)) {
return true;
}
if (this.K <= 0) {
return false;
}
if (i == 8192) {
if (a(-getPositionIncrement())) {
a(false);
}
} else {
if (i != 4096) {
return false;
}
if (a(getPositionIncrement())) {
a(false);
}
}
sendAccessibilityEvent(4);
return true;
}
public void setAdMarkerColor(@ColorInt int i) {
this.i.setColor(i);
invalidate(this.a);
}
public void setBufferedColor(@ColorInt int i) {
this.g.setColor(i);
invalidate(this.a);
}
@Override // android.view.View, com.applovin.exoplayer2.ui.i
public void setEnabled(boolean z) {
super.setEnabled(z);
if (!this.I || z) {
return;
}
a(true);
}
public void setKeyCountIncrement(int i) {
b1.a(i > 0);
this.B = i;
this.C = C.TIME_UNSET;
}
public void setKeyTimeIncrement(long j) {
b1.a(j > 0);
this.B = -1;
this.C = j;
}
public void setPlayedAdMarkerColor(@ColorInt int i) {
this.j.setColor(i);
invalidate(this.a);
}
public void setPlayedColor(@ColorInt int i) {
this.f.setColor(i);
invalidate(this.a);
}
public void setScrubberColor(@ColorInt int i) {
this.k.setColor(i);
invalidate(this.a);
}
public void setUnplayedColor(@ColorInt int i) {
this.h.setColor(i);
invalidate(this.a);
}
public b(Context context, AttributeSet attributeSet, int i, AttributeSet attributeSet2, int i2) {
super(context, attributeSet, i);
this.a = new Rect();
this.b = new Rect();
this.c = new Rect();
this.d = new Rect();
Paint paint = new Paint();
this.f = paint;
Paint paint2 = new Paint();
this.g = paint2;
Paint paint3 = new Paint();
this.h = paint3;
Paint paint4 = new Paint();
this.i = paint4;
Paint paint5 = new Paint();
this.j = paint5;
Paint paint6 = new Paint();
this.k = paint6;
paint6.setAntiAlias(true);
this.y = new CopyOnWriteArraySet();
this.z = new Point();
float f = context.getResources().getDisplayMetrics().density;
this.A = f;
this.u = a(f, -50);
int a = a(f, 4);
int a2 = a(f, 26);
int a3 = a(f, 4);
int a4 = a(f, 12);
int a5 = a(f, 0);
int a6 = a(f, 16);
if (attributeSet2 != null) {
TypedArray obtainStyledAttributes = context.getTheme().obtainStyledAttributes(attributeSet2, R.styleable.AppLovinDefaultTimeBar, i, i2);
try {
Drawable drawable = obtainStyledAttributes.getDrawable(R.styleable.AppLovinDefaultTimeBar_al_scrubber_drawable);
this.l = drawable;
if (drawable != null) {
a(drawable);
a2 = Math.max(drawable.getMinimumHeight(), a2);
}
this.m = obtainStyledAttributes.getDimensionPixelSize(R.styleable.AppLovinDefaultTimeBar_al_bar_height, a);
this.n = obtainStyledAttributes.getDimensionPixelSize(R.styleable.AppLovinDefaultTimeBar_al_touch_target_height, a2);
this.o = obtainStyledAttributes.getInt(R.styleable.AppLovinDefaultTimeBar_al_bar_gravity, 0);
this.p = obtainStyledAttributes.getDimensionPixelSize(R.styleable.AppLovinDefaultTimeBar_al_ad_marker_width, a3);
this.q = obtainStyledAttributes.getDimensionPixelSize(R.styleable.AppLovinDefaultTimeBar_al_scrubber_enabled_size, a4);
this.r = obtainStyledAttributes.getDimensionPixelSize(R.styleable.AppLovinDefaultTimeBar_al_scrubber_disabled_size, a5);
this.s = obtainStyledAttributes.getDimensionPixelSize(R.styleable.AppLovinDefaultTimeBar_al_scrubber_dragged_size, a6);
int i3 = obtainStyledAttributes.getInt(R.styleable.AppLovinDefaultTimeBar_al_played_color, -1);
int i4 = obtainStyledAttributes.getInt(R.styleable.AppLovinDefaultTimeBar_al_scrubber_color, -1);
int i5 = obtainStyledAttributes.getInt(R.styleable.AppLovinDefaultTimeBar_al_buffered_color, -855638017);
int i6 = obtainStyledAttributes.getInt(R.styleable.AppLovinDefaultTimeBar_al_unplayed_color, 872415231);
int i7 = obtainStyledAttributes.getInt(R.styleable.AppLovinDefaultTimeBar_al_ad_marker_color, -1291845888);
int i8 = obtainStyledAttributes.getInt(R.styleable.AppLovinDefaultTimeBar_al_played_ad_marker_color, 872414976);
paint.setColor(i3);
paint6.setColor(i4);
paint2.setColor(i5);
paint3.setColor(i6);
paint4.setColor(i7);
paint5.setColor(i8);
obtainStyledAttributes.recycle();
} catch (Throwable th) {
obtainStyledAttributes.recycle();
throw th;
}
} else {
this.m = a;
this.n = a2;
this.o = 0;
this.p = a3;
this.q = a4;
this.r = a5;
this.s = a6;
paint.setColor(-1);
paint6.setColor(-1);
paint2.setColor(-855638017);
paint3.setColor(872415231);
paint4.setColor(-1291845888);
paint5.setColor(872414976);
this.l = null;
}
StringBuilder sb = new StringBuilder();
this.v = sb;
this.w = new Formatter(sb, Locale.getDefault());
this.x = new Runnable() { // from class: com.applovin.exoplayer2.ui.b$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
b.this.a();
}
};
Drawable drawable2 = this.l;
if (drawable2 != null) {
this.t = (drawable2.getMinimumWidth() + 1) / 2;
} else {
this.t = (Math.max(this.r, Math.max(this.q, this.s)) + 1) / 2;
}
this.G = 1.0f;
ValueAnimator valueAnimator = new ValueAnimator();
this.F = valueAnimator;
valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { // from class: com.applovin.exoplayer2.ui.b$$ExternalSyntheticLambda2
@Override // android.animation.ValueAnimator.AnimatorUpdateListener
public final void onAnimationUpdate(ValueAnimator valueAnimator2) {
b.this.a(valueAnimator2);
}
});
this.K = C.TIME_UNSET;
this.C = C.TIME_UNSET;
this.B = 20;
setFocusable(true);
if (getImportantForAccessibility() == 0) {
setImportantForAccessibility(1);
}
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void a() {
a(false);
}
private long getPositionIncrement() {
long j = this.C;
if (j != C.TIME_UNSET) {
return j;
}
long j2 = this.K;
if (j2 == C.TIME_UNSET) {
return 0L;
}
return j2 / this.B;
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void a(ValueAnimator valueAnimator) {
this.G = ((Float) valueAnimator.getAnimatedValue()).floatValue();
invalidate(this.a);
}
private void b(long j) {
this.J = j;
this.I = true;
setPressed(true);
ViewParent parent = getParent();
if (parent != null) {
parent.requestDisallowInterceptTouchEvent(true);
}
Iterator it = this.y.iterator();
while (it.hasNext()) {
((i.a) it.next()).a(this, j);
}
}
private void c(long j) {
if (this.J == j) {
return;
}
this.J = j;
Iterator it = this.y.iterator();
while (it.hasNext()) {
((i.a) it.next()).b(this, j);
}
}
@Override // com.applovin.exoplayer2.ui.i
public void a(i.a aVar) {
b1.a(aVar);
this.y.add(aVar);
}
@Override // com.applovin.exoplayer2.ui.i
public void setBufferedPosition(long j) {
if (this.M == j) {
return;
}
this.M = j;
b();
}
@Override // com.applovin.exoplayer2.ui.i
public void setPosition(long j) {
if (this.L == j) {
return;
}
this.L = j;
setContentDescription(getProgressText());
b();
}
@Override // com.applovin.exoplayer2.ui.i
public void setDuration(long j) {
if (this.K == j) {
return;
}
this.K = j;
if (this.I && j == C.TIME_UNSET) {
a(true);
}
b();
}
@Override // com.applovin.exoplayer2.ui.i
public void a(long[] jArr, boolean[] zArr, int i) {
b1.a(i == 0 || !(jArr == null || zArr == null));
this.N = i;
this.O = jArr;
this.P = zArr;
b();
}
private void c() {
Drawable drawable = this.l;
if (drawable != null && drawable.isStateful() && this.l.setState(getDrawableState())) {
invalidate();
}
}
private void b() {
this.c.set(this.b);
this.d.set(this.b);
long j = this.I ? this.J : this.L;
if (this.K > 0) {
int width = (int) ((this.b.width() * this.M) / this.K);
Rect rect = this.c;
Rect rect2 = this.b;
rect.right = Math.min(rect2.left + width, rect2.right);
int width2 = (int) ((this.b.width() * j) / this.K);
Rect rect3 = this.d;
Rect rect4 = this.b;
rect3.right = Math.min(rect4.left + width2, rect4.right);
} else {
Rect rect5 = this.c;
int i = this.b.left;
rect5.right = i;
this.d.right = i;
}
invalidate(this.a);
}
private void a(boolean z) {
removeCallbacks(this.x);
this.I = false;
setPressed(false);
ViewParent parent = getParent();
if (parent != null) {
parent.requestDisallowInterceptTouchEvent(false);
}
invalidate();
Iterator it = this.y.iterator();
while (it.hasNext()) {
((i.a) it.next()).a(this, this.J, z);
}
}
private void b(Canvas canvas) {
int height = this.b.height();
int centerY = this.b.centerY() - (height / 2);
int i = height + centerY;
if (this.K <= 0) {
Rect rect = this.b;
canvas.drawRect(rect.left, centerY, rect.right, i, this.h);
return;
}
Rect rect2 = this.c;
int i2 = rect2.left;
int i3 = rect2.right;
int max = Math.max(Math.max(this.b.left, i3), this.d.right);
int i4 = this.b.right;
if (max < i4) {
canvas.drawRect(max, centerY, i4, i, this.h);
}
int max2 = Math.max(i2, this.d.right);
if (i3 > max2) {
canvas.drawRect(max2, centerY, i3, i, this.g);
}
if (this.d.width() > 0) {
Rect rect3 = this.d;
canvas.drawRect(rect3.left, centerY, rect3.right, i, this.f);
}
if (this.N == 0) {
return;
}
long[] jArr = (long[]) b1.a(this.O);
boolean[] zArr = (boolean[]) b1.a(this.P);
int i5 = this.p / 2;
for (int i6 = 0; i6 < this.N; i6++) {
int width = ((int) ((this.b.width() * xp.b(jArr[i6], 0L, this.K)) / this.K)) - i5;
Rect rect4 = this.b;
canvas.drawRect(rect4.left + Math.min(rect4.width() - this.p, Math.max(0, width)), centerY, r10 + this.p, i, zArr[i6] ? this.j : this.i);
}
}
private boolean a(long j) {
long j2 = this.K;
if (j2 <= 0) {
return false;
}
long j3 = this.I ? this.J : this.L;
long b = xp.b(j3 + j, 0L, j2);
if (b == j3) {
return false;
}
if (!this.I) {
b(b);
} else {
c(b);
}
b();
return true;
}
private void a(float f) {
Rect rect = this.d;
Rect rect2 = this.b;
rect.right = xp.a((int) f, rect2.left, rect2.right);
}
private Point a(MotionEvent motionEvent) {
this.z.set((int) motionEvent.getX(), (int) motionEvent.getY());
return this.z;
}
private boolean a(float f, float f2) {
return this.a.contains((int) f, (int) f2);
}
private void a(Canvas canvas) {
int i;
if (this.K <= 0) {
return;
}
Rect rect = this.d;
int a = xp.a(rect.right, rect.left, this.b.right);
int centerY = this.d.centerY();
if (this.l == null) {
if (this.I || isFocused()) {
i = this.s;
} else {
i = isEnabled() ? this.q : this.r;
}
canvas.drawCircle(a, centerY, (int) ((i * this.G) / 2.0f), this.k);
return;
}
int intrinsicWidth = ((int) (r2.getIntrinsicWidth() * this.G)) / 2;
int intrinsicHeight = ((int) (this.l.getIntrinsicHeight() * this.G)) / 2;
this.l.setBounds(a - intrinsicWidth, centerY - intrinsicHeight, a + intrinsicWidth, centerY + intrinsicHeight);
this.l.draw(canvas);
}
private void a(int i, int i2) {
Rect rect = this.E;
if (rect != null && rect.width() == i && this.E.height() == i2) {
return;
}
Rect rect2 = new Rect(0, 0, i, i2);
this.E = rect2;
setSystemGestureExclusionRects(Collections.singletonList(rect2));
}
private boolean a(Drawable drawable) {
return xp.a >= 23 && a(drawable, getLayoutDirection());
}
private static boolean a(Drawable drawable, int i) {
return xp.a >= 23 && drawable.setLayoutDirection(i);
}
}

View File

@@ -0,0 +1,16 @@
package com.applovin.exoplayer2.ui;
import android.graphics.Color;
import com.applovin.impl.xp;
import csdk.gluads.Consts;
/* loaded from: classes.dex */
abstract class c {
public static String a(int i) {
return xp.a("rgba(%d,%d,%d,%.3f)", Integer.valueOf(Color.red(i)), Integer.valueOf(Color.green(i)), Integer.valueOf(Color.blue(i)), Double.valueOf(Color.alpha(i) / 255.0d));
}
public static String a(String str) {
return Consts.STRING_PERIOD + str + ",." + str + " *";
}
}

View File

@@ -0,0 +1,986 @@
package com.applovin.exoplayer2.ui;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.os.Looper;
import android.os.SystemClock;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.Nullable;
import com.applovin.exoplayer2.ui.i;
import com.applovin.impl.b1;
import com.applovin.impl.f8;
import com.applovin.impl.fo;
import com.applovin.impl.qh;
import com.applovin.impl.t2;
import com.applovin.impl.t4;
import com.applovin.impl.u5;
import com.applovin.impl.ui;
import com.applovin.impl.xp;
import com.applovin.sdk.R;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import java.util.Arrays;
import java.util.Formatter;
import java.util.Iterator;
import java.util.Locale;
import java.util.concurrent.CopyOnWriteArrayList;
/* loaded from: classes.dex */
public class d extends FrameLayout {
private final String A;
private final Drawable B;
private final Drawable C;
private final float D;
private final float E;
private final String F;
private final String G;
private qh H;
private t4 I;
private boolean J;
private boolean K;
private boolean L;
private boolean M;
private int N;
private int O;
private int P;
private boolean Q;
private boolean R;
private boolean S;
private boolean T;
private boolean U;
private long V;
private long[] W;
private final c a;
private boolean[] a0;
private final CopyOnWriteArrayList b;
private long[] b0;
private final View c;
private boolean[] c0;
private final View d;
private long d0;
private long e0;
private final View f;
private long f0;
private final View g;
private final View h;
private final View i;
private final ImageView j;
private final ImageView k;
private final View l;
private final TextView m;
private final TextView n;
private final i o;
private final StringBuilder p;
private final Formatter q;
private final fo.b r;
private final fo.d s;
private final Runnable t;
private final Runnable u;
private final Drawable v;
private final Drawable w;
private final Drawable x;
private final String y;
private final String z;
public static final class b {
public static boolean a(View view) {
return view.isAccessibilityFocused();
}
}
/* renamed from: com.applovin.exoplayer2.ui.d$d, reason: collision with other inner class name */
public interface InterfaceC0011d {
}
public interface e {
void d(int i);
}
static {
f8.a("goog.exo.ui");
}
public d(Context context, AttributeSet attributeSet, int i, AttributeSet attributeSet2) {
super(context, attributeSet, i);
int i2 = R.layout.applovin_exo_player_control_view;
this.N = 5000;
this.P = 0;
this.O = 200;
this.V = C.TIME_UNSET;
this.Q = true;
this.R = true;
this.S = true;
this.T = true;
this.U = false;
if (attributeSet2 != null) {
TypedArray obtainStyledAttributes = context.getTheme().obtainStyledAttributes(attributeSet2, R.styleable.AppLovinPlayerControlView, i, 0);
try {
this.N = obtainStyledAttributes.getInt(R.styleable.AppLovinPlayerControlView_al_show_timeout, this.N);
i2 = obtainStyledAttributes.getResourceId(R.styleable.AppLovinPlayerControlView_al_controller_layout_id, i2);
this.P = a(obtainStyledAttributes, this.P);
this.Q = obtainStyledAttributes.getBoolean(R.styleable.AppLovinPlayerControlView_al_show_rewind_button, this.Q);
this.R = obtainStyledAttributes.getBoolean(R.styleable.AppLovinPlayerControlView_al_show_fastforward_button, this.R);
this.S = obtainStyledAttributes.getBoolean(R.styleable.AppLovinPlayerControlView_al_show_previous_button, this.S);
this.T = obtainStyledAttributes.getBoolean(R.styleable.AppLovinPlayerControlView_al_show_next_button, this.T);
this.U = obtainStyledAttributes.getBoolean(R.styleable.AppLovinPlayerControlView_al_show_shuffle_button, this.U);
setTimeBarMinUpdateInterval(obtainStyledAttributes.getInt(R.styleable.AppLovinPlayerControlView_al_time_bar_min_update_interval, this.O));
} finally {
obtainStyledAttributes.recycle();
}
}
this.b = new CopyOnWriteArrayList();
this.r = new fo.b();
this.s = new fo.d();
StringBuilder sb = new StringBuilder();
this.p = sb;
this.q = new Formatter(sb, Locale.getDefault());
this.W = new long[0];
this.a0 = new boolean[0];
this.b0 = new long[0];
this.c0 = new boolean[0];
c cVar = new c();
this.a = cVar;
this.I = new u5();
this.t = new Runnable() { // from class: com.applovin.exoplayer2.ui.d$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
d.this.k();
}
};
this.u = new Runnable() { // from class: com.applovin.exoplayer2.ui.d$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
d.this.a();
}
};
LayoutInflater.from(context).inflate(i2, this);
setDescendantFocusability(262144);
i iVar = (i) findViewById(R.id.al_exo_progress);
View findViewById = findViewById(R.id.al_exo_progress_placeholder);
if (iVar != null) {
this.o = iVar;
} else if (findViewById != null) {
com.applovin.exoplayer2.ui.b bVar = new com.applovin.exoplayer2.ui.b(context, null, 0, attributeSet2);
bVar.setId(R.id.al_exo_progress);
bVar.setLayoutParams(findViewById.getLayoutParams());
ViewGroup viewGroup = (ViewGroup) findViewById.getParent();
int indexOfChild = viewGroup.indexOfChild(findViewById);
viewGroup.removeView(findViewById);
viewGroup.addView(bVar, indexOfChild);
this.o = bVar;
} else {
this.o = null;
}
this.m = (TextView) findViewById(R.id.al_exo_duration);
this.n = (TextView) findViewById(R.id.al_exo_position);
i iVar2 = this.o;
if (iVar2 != null) {
iVar2.a(cVar);
}
View findViewById2 = findViewById(R.id.al_exo_play);
this.f = findViewById2;
if (findViewById2 != null) {
findViewById2.setOnClickListener(cVar);
}
View findViewById3 = findViewById(R.id.al_exo_pause);
this.g = findViewById3;
if (findViewById3 != null) {
findViewById3.setOnClickListener(cVar);
}
View findViewById4 = findViewById(R.id.al_exo_prev);
this.c = findViewById4;
if (findViewById4 != null) {
findViewById4.setOnClickListener(cVar);
}
View findViewById5 = findViewById(R.id.al_exo_next);
this.d = findViewById5;
if (findViewById5 != null) {
findViewById5.setOnClickListener(cVar);
}
View findViewById6 = findViewById(R.id.al_exo_rew);
this.i = findViewById6;
if (findViewById6 != null) {
findViewById6.setOnClickListener(cVar);
}
View findViewById7 = findViewById(R.id.al_exo_ffwd);
this.h = findViewById7;
if (findViewById7 != null) {
findViewById7.setOnClickListener(cVar);
}
ImageView imageView = (ImageView) findViewById(R.id.al_exo_repeat_toggle);
this.j = imageView;
if (imageView != null) {
imageView.setOnClickListener(cVar);
}
ImageView imageView2 = (ImageView) findViewById(R.id.al_exo_shuffle);
this.k = imageView2;
if (imageView2 != null) {
imageView2.setOnClickListener(cVar);
}
View findViewById8 = findViewById(R.id.al_exo_vr);
this.l = findViewById8;
setShowVrButton(false);
a(false, false, findViewById8);
Resources resources = context.getResources();
this.D = resources.getInteger(R.integer.al_exo_media_button_opacity_percentage_enabled) / 100.0f;
this.E = resources.getInteger(R.integer.al_exo_media_button_opacity_percentage_disabled) / 100.0f;
this.v = resources.getDrawable(R.drawable.al_exo_controls_repeat_off);
this.w = resources.getDrawable(R.drawable.al_exo_controls_repeat_one);
this.x = resources.getDrawable(R.drawable.al_exo_controls_repeat_all);
this.B = resources.getDrawable(R.drawable.al_exo_controls_shuffle_on);
this.C = resources.getDrawable(R.drawable.al_exo_controls_shuffle_off);
this.y = resources.getString(R.string.al_exo_controls_repeat_off_description);
this.z = resources.getString(R.string.al_exo_controls_repeat_one_description);
this.A = resources.getString(R.string.al_exo_controls_repeat_all_description);
this.F = resources.getString(R.string.al_exo_controls_shuffle_on_description);
this.G = resources.getString(R.string.al_exo_controls_shuffle_off_description);
}
private static boolean a(int i) {
return i == 90 || i == 89 || i == 85 || i == 79 || i == 126 || i == 127 || i == 87 || i == 88;
}
@Override // android.view.ViewGroup, android.view.View
public boolean dispatchKeyEvent(KeyEvent keyEvent) {
return a(keyEvent) || super.dispatchKeyEvent(keyEvent);
}
@Override // android.view.ViewGroup, android.view.View
public final boolean dispatchTouchEvent(MotionEvent motionEvent) {
if (motionEvent.getAction() == 0) {
removeCallbacks(this.u);
} else if (motionEvent.getAction() == 1) {
b();
}
return super.dispatchTouchEvent(motionEvent);
}
@Nullable
public qh getPlayer() {
return this.H;
}
public int getRepeatToggleModes() {
return this.P;
}
public boolean getShowShuffleButton() {
return this.U;
}
public int getShowTimeoutMs() {
return this.N;
}
public boolean getShowVrButton() {
View view = this.l;
return view != null && view.getVisibility() == 0;
}
@Override // android.view.ViewGroup, android.view.View
public void onAttachedToWindow() {
super.onAttachedToWindow();
this.J = true;
long j = this.V;
if (j != C.TIME_UNSET) {
long uptimeMillis = j - SystemClock.uptimeMillis();
if (uptimeMillis <= 0) {
a();
} else {
postDelayed(this.u, uptimeMillis);
}
} else if (c()) {
b();
}
h();
}
@Override // android.view.ViewGroup, android.view.View
public void onDetachedFromWindow() {
super.onDetachedFromWindow();
this.J = false;
removeCallbacks(this.t);
removeCallbacks(this.u);
}
public void setPlayer(@Nullable qh qhVar) {
b1.b(Looper.myLooper() == Looper.getMainLooper());
b1.a(qhVar == null || qhVar.p() == Looper.getMainLooper());
qh qhVar2 = this.H;
if (qhVar2 == qhVar) {
return;
}
if (qhVar2 != null) {
qhVar2.a(this.a);
}
this.H = qhVar;
if (qhVar != null) {
qhVar.b(this.a);
}
h();
}
public void setProgressUpdateListener(@Nullable InterfaceC0011d interfaceC0011d) {
}
public void setTimeBarMinUpdateInterval(int i) {
this.O = xp.a(i, 16, 1000);
}
private void d() {
View view;
View view2;
boolean f = f();
if (!f && (view2 = this.f) != null) {
view2.sendAccessibilityEvent(8);
} else {
if (!f || (view = this.g) == null) {
return;
}
view.sendAccessibilityEvent(8);
}
}
private void h() {
j();
i();
l();
m();
n();
}
/* JADX INFO: Access modifiers changed from: private */
public void i() {
boolean z;
boolean z2;
boolean z3;
boolean z4;
if (c() && this.J) {
qh qhVar = this.H;
boolean z5 = false;
if (qhVar != null) {
boolean b2 = qhVar.b(4);
boolean b3 = qhVar.b(6);
z4 = qhVar.b(10) && this.I.b();
if (qhVar.b(11) && this.I.a()) {
z5 = true;
}
z2 = qhVar.b(8);
z = z5;
z5 = b3;
z3 = b2;
} else {
z = false;
z2 = false;
z3 = false;
z4 = false;
}
a(this.S, z5, this.c);
a(this.Q, z4, this.i);
a(this.R, z, this.h);
a(this.T, z2, this.d);
i iVar = this.o;
if (iVar != null) {
iVar.setEnabled(z3);
}
}
}
/* JADX INFO: Access modifiers changed from: private */
public void j() {
boolean z;
boolean z2;
if (c() && this.J) {
boolean f = f();
View view = this.f;
boolean z3 = true;
if (view != null) {
z = f && view.isFocused();
z2 = xp.a < 21 ? z : f && b.a(this.f);
this.f.setVisibility(f ? 8 : 0);
} else {
z = false;
z2 = false;
}
View view2 = this.g;
if (view2 != null) {
z |= !f && view2.isFocused();
if (xp.a < 21) {
z3 = z;
} else if (f || !b.a(this.g)) {
z3 = false;
}
z2 |= z3;
this.g.setVisibility(f ? 0 : 8);
}
if (z) {
e();
}
if (z2) {
d();
}
}
}
/* JADX INFO: Access modifiers changed from: private */
public void k() {
long j;
long j2;
if (c() && this.J) {
qh qhVar = this.H;
if (qhVar != null) {
j = this.d0 + qhVar.g();
j2 = this.d0 + qhVar.s();
} else {
j = 0;
j2 = 0;
}
boolean z = j != this.e0;
this.e0 = j;
this.f0 = j2;
TextView textView = this.n;
if (textView != null && !this.M && z) {
textView.setText(xp.a(this.p, this.q, j));
}
i iVar = this.o;
if (iVar != null) {
iVar.setPosition(j);
this.o.setBufferedPosition(j2);
}
removeCallbacks(this.t);
int o = qhVar == null ? 1 : qhVar.o();
if (qhVar == null || !qhVar.isPlaying()) {
if (o == 4 || o == 1) {
return;
}
postDelayed(this.t, 1000L);
return;
}
i iVar2 = this.o;
long min = Math.min(iVar2 != null ? iVar2.getPreferredUpdateDelay() : 1000L, 1000 - (j % 1000));
float f = qhVar.a().a;
postDelayed(this.t, xp.b(f > 0.0f ? (long) (min / f) : 1000L, this.O, 1000L));
}
}
/* JADX INFO: Access modifiers changed from: private */
public void l() {
ImageView imageView;
if (c() && this.J && (imageView = this.j) != null) {
if (this.P == 0) {
a(false, false, (View) imageView);
return;
}
qh qhVar = this.H;
if (qhVar == null) {
a(true, false, (View) imageView);
this.j.setImageDrawable(this.v);
this.j.setContentDescription(this.y);
return;
}
a(true, true, (View) imageView);
int m = qhVar.m();
if (m == 0) {
this.j.setImageDrawable(this.v);
this.j.setContentDescription(this.y);
} else if (m == 1) {
this.j.setImageDrawable(this.w);
this.j.setContentDescription(this.z);
} else if (m == 2) {
this.j.setImageDrawable(this.x);
this.j.setContentDescription(this.A);
}
this.j.setVisibility(0);
}
}
/* JADX INFO: Access modifiers changed from: private */
public void m() {
ImageView imageView;
if (c() && this.J && (imageView = this.k) != null) {
qh qhVar = this.H;
if (!this.U) {
a(false, false, (View) imageView);
return;
}
if (qhVar == null) {
a(true, false, (View) imageView);
this.k.setImageDrawable(this.C);
this.k.setContentDescription(this.G);
} else {
a(true, true, (View) imageView);
this.k.setImageDrawable(qhVar.r() ? this.B : this.C);
this.k.setContentDescription(qhVar.r() ? this.F : this.G);
}
}
}
public void g() {
if (!c()) {
setVisibility(0);
Iterator it = this.b.iterator();
while (it.hasNext()) {
((e) it.next()).d(getVisibility());
}
h();
e();
d();
}
b();
}
public void setShowFastForwardButton(boolean z) {
this.R = z;
i();
}
public void setShowMultiWindowTimeBar(boolean z) {
this.K = z;
n();
}
public void setShowNextButton(boolean z) {
this.T = z;
i();
}
public void setShowPreviousButton(boolean z) {
this.S = z;
i();
}
public void setShowRewindButton(boolean z) {
this.Q = z;
i();
}
public void setShowShuffleButton(boolean z) {
this.U = z;
m();
}
public void setShowTimeoutMs(int i) {
this.N = i;
if (c()) {
b();
}
}
public void setShowVrButton(boolean z) {
View view = this.l;
if (view != null) {
view.setVisibility(z ? 0 : 8);
}
}
public void setVrButtonListener(@Nullable View.OnClickListener onClickListener) {
View view = this.l;
if (view != null) {
view.setOnClickListener(onClickListener);
a(getShowVrButton(), onClickListener != null, this.l);
}
}
private boolean f() {
qh qhVar = this.H;
return (qhVar == null || qhVar.o() == 4 || this.H.o() == 1 || !this.H.l()) ? false : true;
}
public void setRepeatToggleModes(int i) {
this.P = i;
qh qhVar = this.H;
if (qhVar != null) {
int m = qhVar.m();
if (i == 0 && m != 0) {
this.I.a(this.H, 0);
} else if (i == 1 && m == 2) {
this.I.a(this.H, 1);
} else if (i == 2 && m == 1) {
this.I.a(this.H, 2);
}
}
l();
}
/* JADX INFO: Access modifiers changed from: private */
public void n() {
int i;
fo.d dVar;
qh qhVar = this.H;
if (qhVar == null) {
return;
}
boolean z = true;
this.L = this.K && a(qhVar.n(), this.s);
long j = 0;
this.d0 = 0L;
fo n = qhVar.n();
if (n.c()) {
i = 0;
} else {
int t = qhVar.t();
boolean z2 = this.L;
int i2 = z2 ? 0 : t;
int b2 = z2 ? n.b() - 1 : t;
long j2 = 0;
i = 0;
while (true) {
if (i2 > b2) {
break;
}
if (i2 == t) {
this.d0 = t2.b(j2);
}
n.a(i2, this.s);
fo.d dVar2 = this.s;
if (dVar2.o == C.TIME_UNSET) {
b1.b(this.L ^ z);
break;
}
int i3 = dVar2.p;
while (true) {
dVar = this.s;
if (i3 <= dVar.q) {
n.a(i3, this.r);
int a2 = this.r.a();
for (int f = this.r.f(); f < a2; f++) {
long b3 = this.r.b(f);
if (b3 == Long.MIN_VALUE) {
long j3 = this.r.d;
if (j3 != C.TIME_UNSET) {
b3 = j3;
}
}
long e2 = b3 + this.r.e();
if (e2 >= 0) {
long[] jArr = this.W;
if (i == jArr.length) {
int length = jArr.length == 0 ? 1 : jArr.length * 2;
this.W = Arrays.copyOf(jArr, length);
this.a0 = Arrays.copyOf(this.a0, length);
}
this.W[i] = t2.b(j2 + e2);
this.a0[i] = this.r.e(f);
i++;
}
}
i3++;
}
}
j2 += dVar.o;
i2++;
z = true;
}
j = j2;
}
long b4 = t2.b(j);
TextView textView = this.m;
if (textView != null) {
textView.setText(xp.a(this.p, this.q, b4));
}
i iVar = this.o;
if (iVar != null) {
iVar.setDuration(b4);
int length2 = this.b0.length;
int i4 = i + length2;
long[] jArr2 = this.W;
if (i4 > jArr2.length) {
this.W = Arrays.copyOf(jArr2, i4);
this.a0 = Arrays.copyOf(this.a0, i4);
}
System.arraycopy(this.b0, 0, this.W, i, length2);
System.arraycopy(this.c0, 0, this.a0, i, length2);
this.o.a(this.W, this.a0, i4);
}
k();
}
private void e() {
View view;
View view2;
boolean f = f();
if (!f && (view2 = this.f) != null) {
view2.requestFocus();
} else {
if (!f || (view = this.g) == null) {
return;
}
view.requestFocus();
}
}
@Deprecated
public void setControlDispatcher(t4 t4Var) {
if (this.I != t4Var) {
this.I = t4Var;
i();
}
}
public final class c implements qh.e, i.a, View.OnClickListener {
private c() {
}
@Override // com.applovin.exoplayer2.ui.i.a
public void b(i iVar, long j) {
if (d.this.n != null) {
d.this.n.setText(xp.a(d.this.p, d.this.q, j));
}
}
@Override // android.view.View.OnClickListener
public void onClick(View view) {
qh qhVar = d.this.H;
if (qhVar == null) {
return;
}
if (d.this.d == view) {
d.this.I.a(qhVar);
return;
}
if (d.this.c == view) {
d.this.I.e(qhVar);
return;
}
if (d.this.h == view) {
if (qhVar.o() != 4) {
d.this.I.d(qhVar);
return;
}
return;
}
if (d.this.i == view) {
d.this.I.c(qhVar);
return;
}
if (d.this.f == view) {
d.this.b(qhVar);
return;
}
if (d.this.g == view) {
d.this.a(qhVar);
} else if (d.this.j == view) {
d.this.I.a(qhVar, ui.a(qhVar.m(), d.this.P));
} else if (d.this.k == view) {
d.this.I.a(qhVar, !qhVar.r());
}
}
@Override // com.applovin.impl.qh.e, com.applovin.impl.qh.c
public void a(qh qhVar, qh.d dVar) {
if (dVar.a(4, 5)) {
d.this.j();
}
if (dVar.a(4, 5, 7)) {
d.this.k();
}
if (dVar.a(8)) {
d.this.l();
}
if (dVar.a(9)) {
d.this.m();
}
if (dVar.a(8, 9, 11, 0, 13)) {
d.this.i();
}
if (dVar.a(11, 0)) {
d.this.n();
}
}
@Override // com.applovin.exoplayer2.ui.i.a
public void a(i iVar, long j) {
d.this.M = true;
if (d.this.n != null) {
d.this.n.setText(xp.a(d.this.p, d.this.q, j));
}
}
@Override // com.applovin.exoplayer2.ui.i.a
public void a(i iVar, long j, boolean z) {
d.this.M = false;
if (z || d.this.H == null) {
return;
}
d dVar = d.this;
dVar.a(dVar.H, j);
}
}
private void c(qh qhVar) {
int o = qhVar.o();
if (o != 1 && o != 4 && qhVar.l()) {
a(qhVar);
} else {
b(qhVar);
}
}
public boolean c() {
return getVisibility() == 0;
}
/* JADX INFO: Access modifiers changed from: private */
public void b(qh qhVar) {
int o = qhVar.o();
if (o == 1) {
this.I.b(qhVar);
} else if (o == 4) {
a(qhVar, qhVar.t(), C.TIME_UNSET);
}
this.I.b(qhVar, true);
}
public void b(e eVar) {
this.b.remove(eVar);
}
private void b() {
removeCallbacks(this.u);
if (this.N <= 0) {
this.V = C.TIME_UNSET;
return;
}
long uptimeMillis = SystemClock.uptimeMillis();
long j = this.N;
this.V = uptimeMillis + j;
if (this.J) {
postDelayed(this.u, j);
}
}
private static boolean a(fo foVar, fo.d dVar) {
if (foVar.b() > 100) {
return false;
}
int b2 = foVar.b();
for (int i = 0; i < b2; i++) {
if (foVar.a(i, dVar).o == C.TIME_UNSET) {
return false;
}
}
return true;
}
/* JADX INFO: Access modifiers changed from: private */
public void a(qh qhVar) {
this.I.b(qhVar, false);
}
private boolean a(qh qhVar, int i, long j) {
return this.I.a(qhVar, i, j);
}
/* JADX INFO: Access modifiers changed from: private */
public void a(qh qhVar, long j) {
int t;
fo n = qhVar.n();
if (this.L && !n.c()) {
int b2 = n.b();
t = 0;
while (true) {
long d = n.a(t, this.s).d();
if (j < d) {
break;
}
if (t == b2 - 1) {
j = d;
break;
} else {
j -= d;
t++;
}
}
} else {
t = qhVar.t();
}
a(qhVar, t, j);
k();
}
public void a(e eVar) {
b1.a(eVar);
this.b.add(eVar);
}
public void a() {
if (c()) {
setVisibility(8);
Iterator it = this.b.iterator();
while (it.hasNext()) {
((e) it.next()).d(getVisibility());
}
removeCallbacks(this.t);
removeCallbacks(this.u);
this.V = C.TIME_UNSET;
}
}
private void a(boolean z, boolean z2, View view) {
if (view == null) {
return;
}
view.setEnabled(z2);
view.setAlpha(z2 ? this.D : this.E);
view.setVisibility(z ? 0 : 8);
}
public boolean a(KeyEvent keyEvent) {
int keyCode = keyEvent.getKeyCode();
qh qhVar = this.H;
if (qhVar == null || !a(keyCode)) {
return false;
}
if (keyEvent.getAction() != 0) {
return true;
}
if (keyCode == 90) {
if (qhVar.o() == 4) {
return true;
}
this.I.d(qhVar);
return true;
}
if (keyCode == 89) {
this.I.c(qhVar);
return true;
}
if (keyEvent.getRepeatCount() != 0) {
return true;
}
if (keyCode == 79 || keyCode == 85) {
c(qhVar);
return true;
}
if (keyCode == 87) {
this.I.a(qhVar);
return true;
}
if (keyCode == 88) {
this.I.e(qhVar);
return true;
}
if (keyCode == 126) {
b(qhVar);
return true;
}
if (keyCode != 127) {
return true;
}
a(qhVar);
return true;
}
private static int a(TypedArray typedArray, int i) {
return typedArray.getInt(R.styleable.AppLovinPlayerControlView_al_repeat_toggle_modes, i);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,299 @@
package com.applovin.exoplayer2.ui;
import android.text.Html;
import android.text.Spanned;
import android.text.style.AbsoluteSizeSpan;
import android.text.style.BackgroundColorSpan;
import android.text.style.ForegroundColorSpan;
import android.text.style.RelativeSizeSpan;
import android.text.style.StrikethroughSpan;
import android.text.style.StyleSpan;
import android.text.style.TypefaceSpan;
import android.text.style.UnderlineSpan;
import android.util.SparseArray;
import com.applovin.exoplayer2.ui.f;
import com.applovin.impl.b1;
import com.applovin.impl.gb;
import com.applovin.impl.pa;
import com.applovin.impl.xp;
import com.applovin.impl.yn;
import com.applovin.impl.zi;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
/* loaded from: classes.dex */
abstract class f {
private static final Pattern a = Pattern.compile("(&#13;)?&#10;");
public static class b {
public final String a;
public final Map b;
private b(String str, Map map) {
this.a = str;
this.b = map;
}
}
public static final class c {
private static final Comparator e = new Comparator() { // from class: com.applovin.exoplayer2.ui.f$c$$ExternalSyntheticLambda0
@Override // java.util.Comparator
public final int compare(Object obj, Object obj2) {
int a;
a = f.c.a((f.c) obj, (f.c) obj2);
return a;
}
};
private static final Comparator f = new Comparator() { // from class: com.applovin.exoplayer2.ui.f$c$$ExternalSyntheticLambda1
@Override // java.util.Comparator
public final int compare(Object obj, Object obj2) {
int b;
b = f.c.b((f.c) obj, (f.c) obj2);
return b;
}
};
public final int a;
public final int b;
public final String c;
public final String d;
private c(int i, int i2, String str, String str2) {
this.a = i;
this.b = i2;
this.c = str;
this.d = str2;
}
/* JADX INFO: Access modifiers changed from: private */
public static /* synthetic */ int a(c cVar, c cVar2) {
int compare = Integer.compare(cVar2.b, cVar.b);
if (compare != 0) {
return compare;
}
int compareTo = cVar.c.compareTo(cVar2.c);
return compareTo != 0 ? compareTo : cVar.d.compareTo(cVar2.d);
}
/* JADX INFO: Access modifiers changed from: private */
public static /* synthetic */ int b(c cVar, c cVar2) {
int compare = Integer.compare(cVar2.a, cVar.a);
if (compare != 0) {
return compare;
}
int compareTo = cVar2.c.compareTo(cVar.c);
return compareTo != 0 ? compareTo : cVar2.d.compareTo(cVar.d);
}
}
public static final class d {
private final List a = new ArrayList();
private final List b = new ArrayList();
}
public static b a(CharSequence charSequence, float f) {
if (charSequence == null) {
return new b("", gb.h());
}
if (!(charSequence instanceof Spanned)) {
return new b(a(charSequence), gb.h());
}
Spanned spanned = (Spanned) charSequence;
HashSet hashSet = new HashSet();
int i = 0;
for (BackgroundColorSpan backgroundColorSpan : (BackgroundColorSpan[]) spanned.getSpans(0, spanned.length(), BackgroundColorSpan.class)) {
hashSet.add(Integer.valueOf(backgroundColorSpan.getBackgroundColor()));
}
HashMap hashMap = new HashMap();
Iterator it = hashSet.iterator();
while (it.hasNext()) {
int intValue = ((Integer) it.next()).intValue();
hashMap.put(com.applovin.exoplayer2.ui.c.a("bg_" + intValue), xp.a("background-color:%s;", com.applovin.exoplayer2.ui.c.a(intValue)));
}
SparseArray a2 = a(spanned, f);
StringBuilder sb = new StringBuilder(spanned.length());
int i2 = 0;
while (i < a2.size()) {
int keyAt = a2.keyAt(i);
sb.append(a(spanned.subSequence(i2, keyAt)));
d dVar = (d) a2.get(keyAt);
Collections.sort(dVar.b, c.f);
Iterator it2 = dVar.b.iterator();
while (it2.hasNext()) {
sb.append(((c) it2.next()).d);
}
Collections.sort(dVar.a, c.e);
Iterator it3 = dVar.a.iterator();
while (it3.hasNext()) {
sb.append(((c) it3.next()).c);
}
i++;
i2 = keyAt;
}
sb.append(a(spanned.subSequence(i2, spanned.length())));
return new b(sb.toString(), hashMap);
}
private static String a(int i) {
return i != 2 ? "over right" : "under left";
}
private static SparseArray a(Spanned spanned, float f) {
SparseArray sparseArray = new SparseArray();
for (Object obj : spanned.getSpans(0, spanned.length(), Object.class)) {
String a2 = a(obj, f);
String a3 = a(obj);
int spanStart = spanned.getSpanStart(obj);
int spanEnd = spanned.getSpanEnd(obj);
if (a2 != null) {
b1.a((Object) a3);
c cVar = new c(spanStart, spanEnd, a2, a3);
a(sparseArray, spanStart).a.add(cVar);
a(sparseArray, spanEnd).b.add(cVar);
}
}
return sparseArray;
}
private static String a(Object obj, float f) {
float size;
if (obj instanceof StrikethroughSpan) {
return "<span style='text-decoration:line-through;'>";
}
if (obj instanceof ForegroundColorSpan) {
return xp.a("<span style='color:%s;'>", com.applovin.exoplayer2.ui.c.a(((ForegroundColorSpan) obj).getForegroundColor()));
}
if (obj instanceof BackgroundColorSpan) {
return xp.a("<span class='bg_%s'>", Integer.valueOf(((BackgroundColorSpan) obj).getBackgroundColor()));
}
if (obj instanceof pa) {
return "<span style='text-combine-upright:all;'>";
}
if (obj instanceof AbsoluteSizeSpan) {
AbsoluteSizeSpan absoluteSizeSpan = (AbsoluteSizeSpan) obj;
if (absoluteSizeSpan.getDip()) {
size = absoluteSizeSpan.getSize();
} else {
size = absoluteSizeSpan.getSize() / f;
}
return xp.a("<span style='font-size:%.2fpx;'>", Float.valueOf(size));
}
if (obj instanceof RelativeSizeSpan) {
return xp.a("<span style='font-size:%.2f%%;'>", Float.valueOf(((RelativeSizeSpan) obj).getSizeChange() * 100.0f));
}
if (obj instanceof TypefaceSpan) {
String family = ((TypefaceSpan) obj).getFamily();
if (family != null) {
return xp.a("<span style='font-family:\"%s\";'>", family);
}
return null;
}
if (obj instanceof StyleSpan) {
int style = ((StyleSpan) obj).getStyle();
if (style == 1) {
return "<b>";
}
if (style == 2) {
return "<i>";
}
if (style != 3) {
return null;
}
return "<b><i>";
}
if (obj instanceof zi) {
int i = ((zi) obj).b;
if (i == -1) {
return "<ruby style='ruby-position:unset;'>";
}
if (i == 1) {
return "<ruby style='ruby-position:over;'>";
}
if (i != 2) {
return null;
}
return "<ruby style='ruby-position:under;'>";
}
if (obj instanceof UnderlineSpan) {
return "<u>";
}
if (!(obj instanceof yn)) {
return null;
}
yn ynVar = (yn) obj;
return xp.a("<span style='-webkit-text-emphasis-style:%1$s;text-emphasis-style:%1$s;-webkit-text-emphasis-position:%2$s;text-emphasis-position:%2$s;display:inline-block;'>", a(ynVar.a, ynVar.b), a(ynVar.c));
}
private static String a(Object obj) {
if ((obj instanceof StrikethroughSpan) || (obj instanceof ForegroundColorSpan) || (obj instanceof BackgroundColorSpan) || (obj instanceof pa) || (obj instanceof AbsoluteSizeSpan) || (obj instanceof RelativeSizeSpan) || (obj instanceof yn)) {
return "</span>";
}
if (obj instanceof TypefaceSpan) {
if (((TypefaceSpan) obj).getFamily() != null) {
return "</span>";
}
return null;
}
if (obj instanceof StyleSpan) {
int style = ((StyleSpan) obj).getStyle();
if (style == 1) {
return "</b>";
}
if (style == 2) {
return "</i>";
}
if (style == 3) {
return "</i></b>";
}
} else {
if (obj instanceof zi) {
return "<rt>" + a((CharSequence) ((zi) obj).a) + "</rt></ruby>";
}
if (obj instanceof UnderlineSpan) {
return "</u>";
}
}
return null;
}
private static String a(int i, int i2) {
StringBuilder sb = new StringBuilder();
if (i2 == 1) {
sb.append("filled ");
} else if (i2 == 2) {
sb.append("open ");
}
if (i == 0) {
sb.append("none");
} else if (i == 1) {
sb.append("circle");
} else if (i == 2) {
sb.append("dot");
} else if (i != 3) {
sb.append("unset");
} else {
sb.append("sesame");
}
return sb.toString();
}
private static d a(SparseArray sparseArray, int i) {
d dVar = (d) sparseArray.get(i);
if (dVar != null) {
return dVar;
}
d dVar2 = new d();
sparseArray.put(i, dVar2);
return dVar2;
}
private static String a(CharSequence charSequence) {
return a.matcher(Html.escapeHtml(charSequence)).replaceAll("<br>");
}
}

View File

@@ -0,0 +1,288 @@
package com.applovin.exoplayer2.ui;
import android.R;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.text.Layout;
import android.text.StaticLayout;
import android.text.TextPaint;
import android.text.TextUtils;
import androidx.core.view.ViewCompat;
import com.applovin.impl.b1;
import com.applovin.impl.b5;
import com.applovin.impl.x2;
import com.applovin.impl.xp;
/* loaded from: classes.dex */
final class g {
private int A;
private int B;
private int C;
private int D;
private StaticLayout E;
private StaticLayout F;
private int G;
private int H;
private int I;
private Rect J;
private final float a;
private final float b;
private final float c;
private final float d;
private final float e;
private final TextPaint f;
private final Paint g;
private final Paint h;
private CharSequence i;
private Layout.Alignment j;
private Bitmap k;
private float l;
private int m;
private int n;
private float o;
private int p;
private float q;
private float r;
private int s;
private int t;
private int u;
private int v;
private int w;
private float x;
private float y;
private float z;
public g(Context context) {
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(null, new int[]{R.attr.lineSpacingExtra, R.attr.lineSpacingMultiplier}, 0, 0);
this.e = obtainStyledAttributes.getDimensionPixelSize(0, 0);
this.d = obtainStyledAttributes.getFloat(1, 1.0f);
obtainStyledAttributes.recycle();
float round = Math.round((context.getResources().getDisplayMetrics().densityDpi * 2.0f) / 160.0f);
this.a = round;
this.b = round;
this.c = round;
TextPaint textPaint = new TextPaint();
this.f = textPaint;
textPaint.setAntiAlias(true);
textPaint.setSubpixelText(true);
Paint paint = new Paint();
this.g = paint;
paint.setAntiAlias(true);
paint.setStyle(Paint.Style.FILL);
Paint paint2 = new Paint();
this.h = paint2;
paint2.setAntiAlias(true);
paint2.setFilterBitmap(true);
}
/* JADX WARN: Removed duplicated region for block: B:58:0x019f */
/* JADX WARN: Removed duplicated region for block: B:62:0x01a3 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private void b() {
/*
Method dump skipped, instructions count: 489
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.applovin.exoplayer2.ui.g.b():void");
}
public void a(b5 b5Var, x2 x2Var, float f, float f2, float f3, Canvas canvas, int i, int i2, int i3, int i4) {
int i5;
boolean z = b5Var.d == null;
if (!z) {
i5 = ViewCompat.MEASURED_STATE_MASK;
} else if (TextUtils.isEmpty(b5Var.a)) {
return;
} else {
i5 = b5Var.m ? b5Var.n : x2Var.c;
}
if (a(this.i, b5Var.a) && xp.a(this.j, b5Var.b) && this.k == b5Var.d && this.l == b5Var.f && this.m == b5Var.g && xp.a(Integer.valueOf(this.n), Integer.valueOf(b5Var.h)) && this.o == b5Var.i && xp.a(Integer.valueOf(this.p), Integer.valueOf(b5Var.j)) && this.q == b5Var.k && this.r == b5Var.l && this.s == x2Var.a && this.t == x2Var.b && this.u == i5 && this.w == x2Var.d && this.v == x2Var.e && xp.a(this.f.getTypeface(), x2Var.f) && this.x == f && this.y == f2 && this.z == f3 && this.A == i && this.B == i2 && this.C == i3 && this.D == i4) {
a(canvas, z);
return;
}
this.i = b5Var.a;
this.j = b5Var.b;
this.k = b5Var.d;
this.l = b5Var.f;
this.m = b5Var.g;
this.n = b5Var.h;
this.o = b5Var.i;
this.p = b5Var.j;
this.q = b5Var.k;
this.r = b5Var.l;
this.s = x2Var.a;
this.t = x2Var.b;
this.u = i5;
this.w = x2Var.d;
this.v = x2Var.e;
this.f.setTypeface(x2Var.f);
this.x = f;
this.y = f2;
this.z = f3;
this.A = i;
this.B = i2;
this.C = i3;
this.D = i4;
if (z) {
b1.a(this.i);
b();
} else {
b1.a(this.k);
a();
}
a(canvas, z);
}
private void b(Canvas canvas) {
StaticLayout staticLayout = this.E;
StaticLayout staticLayout2 = this.F;
if (staticLayout == null || staticLayout2 == null) {
return;
}
int save = canvas.save();
canvas.translate(this.G, this.H);
if (Color.alpha(this.u) > 0) {
this.g.setColor(this.u);
canvas.drawRect(-this.I, 0.0f, staticLayout.getWidth() + this.I, staticLayout.getHeight(), this.g);
}
int i = this.w;
if (i == 1) {
this.f.setStrokeJoin(Paint.Join.ROUND);
this.f.setStrokeWidth(this.a);
this.f.setColor(this.v);
this.f.setStyle(Paint.Style.FILL_AND_STROKE);
staticLayout2.draw(canvas);
} else if (i == 2) {
TextPaint textPaint = this.f;
float f = this.b;
float f2 = this.c;
textPaint.setShadowLayer(f, f2, f2, this.v);
} else if (i == 3 || i == 4) {
boolean z = i == 3;
int i2 = z ? -1 : this.v;
int i3 = z ? this.v : -1;
float f3 = this.b / 2.0f;
this.f.setColor(this.s);
this.f.setStyle(Paint.Style.FILL);
float f4 = -f3;
this.f.setShadowLayer(this.b, f4, f4, i2);
staticLayout2.draw(canvas);
this.f.setShadowLayer(this.b, f3, f3, i3);
}
this.f.setColor(this.s);
this.f.setStyle(Paint.Style.FILL);
staticLayout.draw(canvas);
this.f.setShadowLayer(0.0f, 0.0f, 0.0f, 0);
canvas.restoreToCount(save);
}
/* JADX WARN: Removed duplicated region for block: B:10:0x0056 */
/* JADX WARN: Removed duplicated region for block: B:15:0x0059 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private void a() {
/*
r7 = this;
android.graphics.Bitmap r0 = r7.k
int r1 = r7.C
int r2 = r7.A
int r1 = r1 - r2
int r3 = r7.D
int r4 = r7.B
int r3 = r3 - r4
float r2 = (float) r2
float r1 = (float) r1
float r5 = r7.o
float r5 = r5 * r1
float r2 = r2 + r5
float r4 = (float) r4
float r3 = (float) r3
float r5 = r7.l
float r5 = r5 * r3
float r4 = r4 + r5
float r5 = r7.q
float r1 = r1 * r5
int r1 = java.lang.Math.round(r1)
float r5 = r7.r
r6 = -8388609(0xffffffffff7fffff, float:-3.4028235E38)
int r6 = (r5 > r6 ? 1 : (r5 == r6 ? 0 : -1))
if (r6 == 0) goto L2e
float r3 = r3 * r5
int r0 = java.lang.Math.round(r3)
goto L3f
L2e:
float r3 = (float) r1
int r5 = r0.getHeight()
float r5 = (float) r5
int r0 = r0.getWidth()
float r0 = (float) r0
float r5 = r5 / r0
float r3 = r3 * r5
int r0 = java.lang.Math.round(r3)
L3f:
int r3 = r7.p
r5 = 1
r6 = 2
if (r3 != r6) goto L48
float r3 = (float) r1
L46:
float r2 = r2 - r3
goto L4e
L48:
if (r3 != r5) goto L4e
int r3 = r1 / 2
float r3 = (float) r3
goto L46
L4e:
int r2 = java.lang.Math.round(r2)
int r3 = r7.n
if (r3 != r6) goto L59
float r3 = (float) r0
L57:
float r4 = r4 - r3
goto L5f
L59:
if (r3 != r5) goto L5f
int r3 = r0 / 2
float r3 = (float) r3
goto L57
L5f:
int r3 = java.lang.Math.round(r4)
android.graphics.Rect r4 = new android.graphics.Rect
int r1 = r1 + r2
int r0 = r0 + r3
r4.<init>(r2, r3, r1, r0)
r7.J = r4
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.applovin.exoplayer2.ui.g.a():void");
}
private void a(Canvas canvas, boolean z) {
if (z) {
b(canvas);
return;
}
b1.a(this.J);
b1.a(this.k);
a(canvas);
}
private void a(Canvas canvas) {
canvas.drawBitmap(this.k, (Rect) null, this.J, this.h);
}
private static boolean a(CharSequence charSequence, CharSequence charSequence2) {
return charSequence == charSequence2 || (charSequence != null && charSequence.equals(charSequence2));
}
}

View File

@@ -0,0 +1,86 @@
package com.applovin.exoplayer2.ui;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.style.AbsoluteSizeSpan;
import android.text.style.RelativeSizeSpan;
import com.applovin.exoplayer2.common.base.Predicate;
import com.applovin.impl.ac;
import com.applovin.impl.b1;
import com.applovin.impl.b5;
/* loaded from: classes.dex */
abstract class h {
public static float a(int i, float f, int i2, int i3) {
float f2;
if (f == -3.4028235E38f) {
return -3.4028235E38f;
}
if (i == 0) {
f2 = i3;
} else {
if (i != 1) {
if (i != 2) {
return -3.4028235E38f;
}
return f;
}
f2 = i2;
}
return f * f2;
}
public static void a(b5.b bVar) {
bVar.b();
if (bVar.e() instanceof Spanned) {
if (!(bVar.e() instanceof Spannable)) {
bVar.a(SpannableString.valueOf(bVar.e()));
}
a((Spannable) b1.a(bVar.e()), new Predicate() { // from class: com.applovin.exoplayer2.ui.h$$ExternalSyntheticLambda1
@Override // com.applovin.exoplayer2.common.base.Predicate
public final boolean apply(Object obj) {
boolean a;
a = h.a(obj);
return a;
}
});
}
b(bVar);
}
/* JADX INFO: Access modifiers changed from: private */
public static /* synthetic */ boolean a(Object obj) {
return !(obj instanceof ac);
}
private static void a(Spannable spannable, Predicate predicate) {
for (Object obj : spannable.getSpans(0, spannable.length(), Object.class)) {
if (predicate.apply(obj)) {
spannable.removeSpan(obj);
}
}
}
public static void b(b5.b bVar) {
bVar.b(-3.4028235E38f, Integer.MIN_VALUE);
if (bVar.e() instanceof Spanned) {
if (!(bVar.e() instanceof Spannable)) {
bVar.a(SpannableString.valueOf(bVar.e()));
}
a((Spannable) b1.a(bVar.e()), new Predicate() { // from class: com.applovin.exoplayer2.ui.h$$ExternalSyntheticLambda0
@Override // com.applovin.exoplayer2.common.base.Predicate
public final boolean apply(Object obj) {
boolean b;
b = h.b(obj);
return b;
}
});
}
}
/* JADX INFO: Access modifiers changed from: private */
public static /* synthetic */ boolean b(Object obj) {
return (obj instanceof AbsoluteSizeSpan) || (obj instanceof RelativeSizeSpan);
}
}

View File

@@ -0,0 +1,27 @@
package com.applovin.exoplayer2.ui;
/* loaded from: classes.dex */
public interface i {
public interface a {
void a(i iVar, long j);
void a(i iVar, long j, boolean z);
void b(i iVar, long j);
}
void a(a aVar);
void a(long[] jArr, boolean[] zArr, int i);
long getPreferredUpdateDelay();
void setBufferedPosition(long j);
void setDuration(long j);
void setEnabled(boolean z);
void setPosition(long j);
}

View File

@@ -0,0 +1,208 @@
package com.applovin.exoplayer2.ui;
import android.content.Context;
import android.text.Layout;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.webkit.WebView;
import android.widget.FrameLayout;
import com.applovin.exoplayer2.ui.SubtitleView;
import com.applovin.impl.b5;
import com.applovin.impl.x2;
import com.applovin.impl.xp;
import com.mbridge.msdk.playercommon.exoplayer2.text.ttml.TtmlNode;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/* loaded from: classes.dex */
final class j extends FrameLayout implements SubtitleView.a {
private final com.applovin.exoplayer2.ui.a a;
private final WebView b;
private List c;
private x2 d;
private float f;
private int g;
private float h;
public class a extends WebView {
public a(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}
@Override // android.webkit.WebView, android.view.View
public boolean onTouchEvent(MotionEvent motionEvent) {
super.onTouchEvent(motionEvent);
return false;
}
@Override // android.view.View
public boolean performClick() {
super.performClick();
return false;
}
}
public static /* synthetic */ class b {
static final /* synthetic */ int[] a;
static {
int[] iArr = new int[Layout.Alignment.values().length];
a = iArr;
try {
iArr[Layout.Alignment.ALIGN_NORMAL.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
a[Layout.Alignment.ALIGN_OPPOSITE.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
a[Layout.Alignment.ALIGN_CENTER.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
}
}
public j(Context context) {
this(context, null);
}
private static int a(int i) {
if (i != 1) {
return i != 2 ? 0 : -100;
}
return -50;
}
private static String b(int i) {
return i != 1 ? i != 2 ? "horizontal-tb" : "vertical-lr" : "vertical-rl";
}
/* JADX WARN: Code restructure failed: missing block: B:53:0x013b, code lost:
if (r8 != false) goto L42;
*/
/* JADX WARN: Code restructure failed: missing block: B:54:0x013e, code lost:
r10 = "left";
*/
/* JADX WARN: Code restructure failed: missing block: B:55:0x013f, code lost:
r19 = r10;
r17 = "top";
*/
/* JADX WARN: Code restructure failed: missing block: B:56:0x0144, code lost:
if (r8 != false) goto L41;
*/
/* JADX WARN: Removed duplicated region for block: B:17:0x00ee */
/* JADX WARN: Removed duplicated region for block: B:21:0x0119 */
/* JADX WARN: Removed duplicated region for block: B:24:0x0130 */
/* JADX WARN: Removed duplicated region for block: B:35:0x017d */
/* JADX WARN: Removed duplicated region for block: B:47:0x01d7 */
/* JADX WARN: Removed duplicated region for block: B:50:0x01f1 */
/* JADX WARN: Removed duplicated region for block: B:56:0x0144 */
/* JADX WARN: Removed duplicated region for block: B:57:0x011c */
/* JADX WARN: Removed duplicated region for block: B:58:0x00fe */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private void b() {
/*
Method dump skipped, instructions count: 613
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.applovin.exoplayer2.ui.j.b():void");
}
@Override // android.widget.FrameLayout, android.view.ViewGroup, android.view.View
public void onLayout(boolean z, int i, int i2, int i3, int i4) {
super.onLayout(z, i, i2, i3, i4);
if (!z || this.c.isEmpty()) {
return;
}
b();
}
public j(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.c = Collections.emptyList();
this.d = x2.g;
this.f = 0.0533f;
this.g = 0;
this.h = 0.08f;
com.applovin.exoplayer2.ui.a aVar = new com.applovin.exoplayer2.ui.a(context, attributeSet);
this.a = aVar;
a aVar2 = new a(context, attributeSet);
this.b = aVar2;
aVar2.setBackgroundColor(0);
addView(aVar);
addView(aVar2);
}
private static String a(x2 x2Var) {
int i = x2Var.d;
if (i == 1) {
return xp.a("1px 1px 0 %1$s, 1px -1px 0 %1$s, -1px 1px 0 %1$s, -1px -1px 0 %1$s", c.a(x2Var.e));
}
if (i == 2) {
return xp.a("0.1em 0.12em 0.15em %s", c.a(x2Var.e));
}
if (i != 3) {
return i != 4 ? "unset" : xp.a("-0.05em -0.05em 0.15em %s", c.a(x2Var.e));
}
return xp.a("0.06em 0.08em 0.15em %s", c.a(x2Var.e));
}
private static String a(b5 b5Var) {
float f = b5Var.r;
if (f == 0.0f) {
return "";
}
int i = b5Var.q;
return xp.a("%s(%.2fdeg)", (i == 2 || i == 1) ? "skewY" : "skewX", Float.valueOf(f));
}
@Override // com.applovin.exoplayer2.ui.SubtitleView.a
public void a(List list, x2 x2Var, float f, int i, float f2) {
this.d = x2Var;
this.f = f;
this.g = i;
this.h = f2;
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
for (int i2 = 0; i2 < list.size(); i2++) {
b5 b5Var = (b5) list.get(i2);
if (b5Var.d != null) {
arrayList.add(b5Var);
} else {
arrayList2.add(b5Var);
}
}
if (!this.c.isEmpty() || !arrayList2.isEmpty()) {
this.c = arrayList2;
b();
}
this.a.a(arrayList, x2Var, f, i, f2);
invalidate();
}
public void a() {
this.b.destroy();
}
private String a(int i, float f) {
float a2 = h.a(i, f, getHeight(), (getHeight() - getPaddingTop()) - getPaddingBottom());
return a2 == -3.4028235E38f ? "unset" : xp.a("%.2fpx", Float.valueOf(a2 / getContext().getResources().getDisplayMetrics().density));
}
private static String a(Layout.Alignment alignment) {
if (alignment == null) {
return "center";
}
int i = b.a[alignment.ordinal()];
return i != 1 ? i != 2 ? "center" : TtmlNode.END : "start";
}
}

View File

@@ -0,0 +1,53 @@
package com.applovin.impl;
import android.os.Parcel;
import android.os.Parcelable;
import com.mbridge.msdk.playercommon.exoplayer2.C;
/* renamed from: com.applovin.impl.do, reason: invalid class name */
/* loaded from: classes.dex */
public final class Cdo extends sk {
public static final Parcelable.Creator<Cdo> CREATOR = new a();
public final long a;
public final long b;
private Cdo(long j, long j2) {
this.a = j;
this.b = j2;
}
public static Cdo a(bh bhVar, long j, ho hoVar) {
long a2 = a(bhVar, j);
return new Cdo(a2, hoVar.b(a2));
}
public /* synthetic */ Cdo(long j, long j2, a aVar) {
this(j, j2);
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
parcel.writeLong(this.a);
parcel.writeLong(this.b);
}
/* renamed from: com.applovin.impl.do$a */
public class a implements Parcelable.Creator {
@Override // android.os.Parcelable.Creator
/* renamed from: a, reason: merged with bridge method [inline-methods] */
public Cdo[] newArray(int i) {
return new Cdo[i];
}
@Override // android.os.Parcelable.Creator
/* renamed from: a, reason: merged with bridge method [inline-methods] */
public Cdo createFromParcel(Parcel parcel) {
return new Cdo(parcel.readLong(), parcel.readLong(), null);
}
}
public static long a(bh bhVar, long j) {
long w = bhVar.w();
return (128 & w) != 0 ? 8589934591L & ((((w & 1) << 32) | bhVar.y()) + j) : C.TIME_UNSET;
}
}

View File

@@ -0,0 +1,275 @@
package com.applovin.impl;
import android.text.TextUtils;
import com.applovin.exoplayer2.common.base.Ascii;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
import com.vungle.ads.internal.signals.SignalKey;
import java.util.ArrayList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/* renamed from: com.applovin.impl.if, reason: invalid class name */
/* loaded from: classes.dex */
public abstract class Cif {
private static final ArrayList a = new ArrayList();
private static final Pattern b = Pattern.compile("^mp4a\\.([a-zA-Z0-9]{2})(?:\\.([0-9]{1,2}))?$");
public static String a(int i) {
if (i == 32) {
return MimeTypes.VIDEO_MP4V;
}
if (i == 33) {
return "video/avc";
}
if (i == 35) {
return "video/hevc";
}
if (i == 64) {
return MimeTypes.AUDIO_AAC;
}
if (i == 163) {
return MimeTypes.VIDEO_VC1;
}
if (i == 177) {
return MimeTypes.VIDEO_VP9;
}
if (i == 165) {
return MimeTypes.AUDIO_AC3;
}
if (i == 166) {
return MimeTypes.AUDIO_E_AC3;
}
switch (i) {
case 96:
case 97:
case 98:
case 99:
case 100:
case 101:
return MimeTypes.VIDEO_MPEG2;
case 102:
case 103:
case 104:
return MimeTypes.AUDIO_AAC;
case 105:
case SignalKey.EVENT_ID /* 107 */:
return MimeTypes.AUDIO_MPEG;
case 106:
return MimeTypes.VIDEO_MPEG;
default:
switch (i) {
case 169:
case 172:
return MimeTypes.AUDIO_DTS;
case 170:
case 171:
return MimeTypes.AUDIO_DTS_HD;
case 173:
return MimeTypes.AUDIO_OPUS;
case 174:
return "audio/ac4";
default:
return null;
}
}
}
public static a c(String str) {
Matcher matcher = b.matcher(str);
if (!matcher.matches()) {
return null;
}
String str2 = (String) b1.a((Object) matcher.group(1));
String group = matcher.group(2);
try {
return new a(Integer.parseInt(str2, 16), group != null ? Integer.parseInt(group) : 0);
} catch (NumberFormatException unused) {
return null;
}
}
private static int f(String str) {
ArrayList arrayList = a;
if (arrayList.size() <= 0) {
return -1;
}
d8.a(arrayList.get(0));
throw null;
}
public static boolean g(String str) {
return "audio".equals(d(str));
}
public static boolean i(String str) {
return "video".equals(d(str));
}
public static boolean h(String str) {
return "text".equals(d(str)) || MimeTypes.APPLICATION_CEA608.equals(str) || MimeTypes.APPLICATION_CEA708.equals(str) || MimeTypes.APPLICATION_MP4CEA608.equals(str) || MimeTypes.APPLICATION_SUBRIP.equals(str) || MimeTypes.APPLICATION_TTML.equals(str) || MimeTypes.APPLICATION_TX3G.equals(str) || MimeTypes.APPLICATION_MP4VTT.equals(str) || MimeTypes.APPLICATION_RAWCC.equals(str) || MimeTypes.APPLICATION_VOBSUB.equals(str) || MimeTypes.APPLICATION_PGS.equals(str) || MimeTypes.APPLICATION_DVBSUBS.equals(str);
}
public static boolean a(String str, String str2) {
a c;
int a2;
if (str == null) {
return false;
}
switch (str) {
case "audio/mp4a-latm":
if (str2 != null && (c = c(str2)) != null && (a2 = c.a()) != 0 && a2 != 16) {
break;
}
break;
}
return false;
}
public static int e(String str) {
if (TextUtils.isEmpty(str)) {
return -1;
}
if (g(str)) {
return 1;
}
if (i(str)) {
return 2;
}
if (h(str)) {
return 3;
}
if (MimeTypes.APPLICATION_ID3.equals(str) || MimeTypes.APPLICATION_EMSG.equals(str) || MimeTypes.APPLICATION_SCTE35.equals(str)) {
return 5;
}
if (MimeTypes.APPLICATION_CAMERA_MOTION.equals(str)) {
return 6;
}
return f(str);
}
public static int b(String str, String str2) {
a c;
str.hashCode();
switch (str) {
case "audio/eac3-joc":
return 18;
case "audio/vnd.dts":
return 7;
case "audio/mp4a-latm":
if (str2 == null || (c = c(str2)) == null) {
return 0;
}
return c.a();
case "audio/ac3":
return 5;
case "audio/ac4":
return 17;
case "audio/eac3":
return 6;
case "audio/mpeg":
return 9;
case "audio/vnd.dts.hd":
return 8;
case "audio/true-hd":
return 14;
default:
return 0;
}
}
public static String j(String str) {
str.hashCode();
switch (str) {
case "audio/x-flac":
return MimeTypes.AUDIO_FLAC;
case "audio/x-wav":
return "audio/wav";
case "audio/mp3":
return MimeTypes.AUDIO_MPEG;
default:
return str;
}
}
private static String d(String str) {
int indexOf;
if (str == null || (indexOf = str.indexOf(47)) == -1) {
return null;
}
return str.substring(0, indexOf);
}
/* renamed from: com.applovin.impl.if$a */
public static final class a {
public final int a;
public final int b;
public int a() {
int i = this.b;
if (i == 2) {
return 10;
}
if (i == 5) {
return 11;
}
if (i == 29) {
return 12;
}
if (i == 42) {
return 16;
}
if (i != 22) {
return i != 23 ? 0 : 15;
}
return 1073741824;
}
public a(int i, int i2) {
this.a = i;
this.b = i2;
}
}
private static String a(String str) {
ArrayList arrayList = a;
if (arrayList.size() <= 0) {
return null;
}
d8.a(arrayList.get(0));
throw null;
}
public static String b(String str) {
a c;
String str2 = null;
if (str == null) {
return null;
}
String lowerCase = Ascii.toLowerCase(str.trim());
if (lowerCase.startsWith("avc1") || lowerCase.startsWith("avc3")) {
return "video/avc";
}
if (lowerCase.startsWith("hev1") || lowerCase.startsWith("hvc1")) {
return "video/hevc";
}
if (lowerCase.startsWith("dvav") || lowerCase.startsWith("dva1") || lowerCase.startsWith("dvhe") || lowerCase.startsWith("dvh1")) {
return "video/dolby-vision";
}
if (lowerCase.startsWith("av01")) {
return com.unity3d.services.core.device.MimeTypes.VIDEO_AV1;
}
if (lowerCase.startsWith("vp9") || lowerCase.startsWith("vp09")) {
return MimeTypes.VIDEO_VP9;
}
if (lowerCase.startsWith("vp8") || lowerCase.startsWith("vp08")) {
return MimeTypes.VIDEO_VP8;
}
if (!lowerCase.startsWith("mp4a")) {
return lowerCase.startsWith("mha1") ? "audio/mha1" : lowerCase.startsWith("mhm1") ? "audio/mhm1" : (lowerCase.startsWith("ac-3") || lowerCase.startsWith("dac3")) ? MimeTypes.AUDIO_AC3 : (lowerCase.startsWith("ec-3") || lowerCase.startsWith("dec3")) ? MimeTypes.AUDIO_E_AC3 : lowerCase.startsWith("ec+3") ? MimeTypes.AUDIO_E_AC3_JOC : (lowerCase.startsWith("ac-4") || lowerCase.startsWith("dac4")) ? "audio/ac4" : lowerCase.startsWith("dtsc") ? MimeTypes.AUDIO_DTS : lowerCase.startsWith("dtse") ? MimeTypes.AUDIO_DTS_EXPRESS : (lowerCase.startsWith("dtsh") || lowerCase.startsWith("dtsl")) ? MimeTypes.AUDIO_DTS_HD : lowerCase.startsWith("dtsx") ? "audio/vnd.dts.uhd;profile=p2" : lowerCase.startsWith("opus") ? MimeTypes.AUDIO_OPUS : lowerCase.startsWith("vorbis") ? MimeTypes.AUDIO_VORBIS : lowerCase.startsWith("flac") ? MimeTypes.AUDIO_FLAC : lowerCase.startsWith("stpp") ? MimeTypes.APPLICATION_TTML : lowerCase.startsWith("wvtt") ? MimeTypes.TEXT_VTT : lowerCase.contains("cea708") ? MimeTypes.APPLICATION_CEA708 : (lowerCase.contains("eia608") || lowerCase.contains("cea608")) ? MimeTypes.APPLICATION_CEA608 : a(lowerCase);
}
if (lowerCase.startsWith("mp4a.") && (c = c(lowerCase)) != null) {
str2 = a(c.a);
}
return str2 == null ? MimeTypes.AUDIO_AAC : str2;
}
}

View File

@@ -0,0 +1,114 @@
package com.applovin.impl;
/* loaded from: classes.dex */
public abstract class a {
private static final int[] a = {96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350};
private static final int[] b = {0, 1, 2, 3, 4, 5, 6, 8, -1, -1, -1, 7, 8, -1, 8, -1};
public static byte[] a(int i, int i2, int i3) {
return new byte[]{(byte) (((i << 3) & 248) | ((i2 >> 1) & 7)), (byte) (((i2 << 7) & 128) | ((i3 << 3) & 120))};
}
public static final class b {
public final int a;
public final int b;
public final String c;
private b(int i, int i2, String str) {
this.a = i;
this.b = i2;
this.c = str;
}
}
private static int b(ah ahVar) {
int a2 = ahVar.a(4);
if (a2 == 15) {
return ahVar.a(24);
}
if (a2 < 13) {
return a[a2];
}
throw dh.a(null, null);
}
private static int a(ah ahVar) {
int a2 = ahVar.a(5);
return a2 == 31 ? ahVar.a(6) + 32 : a2;
}
public static b a(ah ahVar, boolean z) {
int a2 = a(ahVar);
int b2 = b(ahVar);
int a3 = ahVar.a(4);
String str = "mp4a.40." + a2;
if (a2 == 5 || a2 == 29) {
b2 = b(ahVar);
a2 = a(ahVar);
if (a2 == 22) {
a3 = ahVar.a(4);
}
}
if (z) {
if (a2 != 6 && a2 != 7 && a2 != 17 && a2 != 1 && a2 != 2 && a2 != 3 && a2 != 4) {
switch (a2) {
case 19:
case 20:
case 21:
case 22:
case 23:
break;
default:
throw dh.a("Unsupported audio object type: " + a2);
}
}
a(ahVar, a2, a3);
switch (a2) {
case 17:
case 19:
case 20:
case 21:
case 22:
case 23:
int a4 = ahVar.a(2);
if (a4 == 2 || a4 == 3) {
throw dh.a("Unsupported epConfig: " + a4);
}
}
}
int i = b[a3];
if (i != -1) {
return new b(b2, i, str);
}
throw dh.a(null, null);
}
private static void a(ah ahVar, int i, int i2) {
if (ahVar.f()) {
pc.d("AacUtil", "Unexpected frameLengthFlag = 1");
}
if (ahVar.f()) {
ahVar.d(14);
}
boolean f = ahVar.f();
if (i2 == 0) {
throw new UnsupportedOperationException();
}
if (i == 6 || i == 20) {
ahVar.d(3);
}
if (f) {
if (i == 22) {
ahVar.d(16);
}
if (i == 17 || i == 19 || i == 20 || i == 23) {
ahVar.d(3);
}
ahVar.d(1);
}
}
public static b a(byte[] bArr) {
return a(new ah(bArr), false);
}
}

View File

@@ -0,0 +1,71 @@
package com.applovin.impl;
import com.applovin.impl.sdk.utils.JsonUtils;
import com.applovin.mediation.MaxAdFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONObject;
/* loaded from: classes.dex */
public class a0 {
private final String a;
private final String b;
private final kr c;
private final List d;
private final List e;
private boolean f = false;
public List a() {
return this.d;
}
public String b() {
return this.b;
}
public String c() {
return this.a;
}
public kr d() {
return this.c;
}
public List e() {
return this.e;
}
public boolean f() {
return this.f;
}
public a0(JSONObject jSONObject, Map map, MaxAdFormat maxAdFormat, com.applovin.impl.sdk.j jVar) {
this.a = JsonUtils.getString(jSONObject, "name", "");
this.b = JsonUtils.getString(jSONObject, "experiment", null);
this.c = a(jSONObject);
this.d = a("bidders", jSONObject, map, maxAdFormat, jVar);
this.e = a(com.ironsource.mediationsdk.d.g, jSONObject, map, maxAdFormat, jVar);
}
private List a(String str, JSONObject jSONObject, Map map, MaxAdFormat maxAdFormat, com.applovin.impl.sdk.j jVar) {
ke keVar;
ArrayList arrayList = new ArrayList();
JSONArray jSONArray = JsonUtils.getJSONArray(jSONObject, str, new JSONArray());
for (int i = 0; i < jSONArray.length(); i++) {
JSONObject jSONObject2 = JsonUtils.getJSONObject(jSONArray, i, (JSONObject) null);
if (jSONObject2 != null && (keVar = (ke) map.get(JsonUtils.getString(jSONObject2, "adapter_class", ""))) != null) {
if (keVar.B()) {
this.f = true;
}
arrayList.add(new ir(jSONObject2, maxAdFormat, keVar, jVar));
}
}
return arrayList;
}
private kr a(JSONObject jSONObject) {
return new kr(JsonUtils.getJSONObject(jSONObject, "targeting"));
}
}

View File

@@ -0,0 +1,65 @@
package com.applovin.impl;
import com.applovin.exoplayer2.common.base.Charsets;
import java.nio.ByteBuffer;
import java.util.ArrayList;
/* loaded from: classes.dex */
public final class a1 extends dk {
@Override // com.applovin.impl.dk
public bf a(ef efVar, ByteBuffer byteBuffer) {
if (byteBuffer.get() == 116) {
return a(new ah(byteBuffer.array(), byteBuffer.limit()));
}
return null;
}
private static bf a(ah ahVar) {
ahVar.d(12);
int d = (ahVar.d() + ahVar.a(12)) - 4;
ahVar.d(44);
ahVar.e(ahVar.a(12));
ahVar.d(16);
ArrayList arrayList = new ArrayList();
while (true) {
String str = null;
if (ahVar.d() >= d) {
break;
}
ahVar.d(48);
int a = ahVar.a(8);
ahVar.d(4);
int d2 = ahVar.d() + ahVar.a(12);
String str2 = null;
while (ahVar.d() < d2) {
int a2 = ahVar.a(8);
int a3 = ahVar.a(8);
int d3 = ahVar.d() + a3;
if (a2 == 2) {
int a4 = ahVar.a(16);
ahVar.d(8);
if (a4 == 3) {
while (ahVar.d() < d3) {
str = ahVar.a(ahVar.a(8), Charsets.US_ASCII);
int a5 = ahVar.a(8);
for (int i = 0; i < a5; i++) {
ahVar.e(ahVar.a(8));
}
}
}
} else if (a2 == 21) {
str2 = ahVar.a(a3, Charsets.US_ASCII);
}
ahVar.c(d3 * 8);
}
ahVar.c(d2 * 8);
if (str != null && str2 != null) {
arrayList.add(new z0(a, str + str2));
}
}
if (arrayList.isEmpty()) {
return null;
}
return new bf(arrayList);
}
}

View File

@@ -0,0 +1,53 @@
package com.applovin.impl;
import java.util.ArrayList;
/* loaded from: classes.dex */
public abstract class a2 implements i5 {
private final boolean a;
private final ArrayList b = new ArrayList(1);
private int c;
private l5 d;
public a2(boolean z) {
this.a = z;
}
@Override // com.applovin.impl.i5
public final void a(xo xoVar) {
b1.a(xoVar);
if (this.b.contains(xoVar)) {
return;
}
this.b.add(xoVar);
this.c++;
}
public final void b(l5 l5Var) {
for (int i = 0; i < this.c; i++) {
((xo) this.b.get(i)).b(this, l5Var, this.a);
}
}
public final void c(l5 l5Var) {
this.d = l5Var;
for (int i = 0; i < this.c; i++) {
((xo) this.b.get(i)).a(this, l5Var, this.a);
}
}
public final void d(int i) {
l5 l5Var = (l5) xp.a(this.d);
for (int i2 = 0; i2 < this.c; i2++) {
((xo) this.b.get(i2)).a(this, l5Var, this.a, i);
}
}
public final void g() {
l5 l5Var = (l5) xp.a(this.d);
for (int i = 0; i < this.c; i++) {
((xo) this.b.get(i)).c(this, l5Var, this.a);
}
this.d = null;
}
}

View File

@@ -0,0 +1,169 @@
package com.applovin.impl;
import com.applovin.impl.zg;
import java.util.ArrayDeque;
import java.util.PriorityQueue;
/* loaded from: classes.dex */
abstract class a3 implements ol {
private final ArrayDeque a = new ArrayDeque();
private final ArrayDeque b;
private final PriorityQueue c;
private b d;
private long e;
private long f;
@Override // com.applovin.impl.m5
public void a() {
}
@Override // com.applovin.impl.ol
public void a(long j) {
this.e = j;
}
public abstract void a(rl rlVar);
public abstract nl e();
public final long i() {
return this.e;
}
public abstract boolean j();
public a3() {
for (int i = 0; i < 10; i++) {
this.a.add(new b());
}
this.b = new ArrayDeque();
for (int i2 = 0; i2 < 2; i2++) {
this.b.add(new c(new zg.a() { // from class: com.applovin.impl.a3$$ExternalSyntheticLambda0
@Override // com.applovin.impl.zg.a
public final void a(zg zgVar) {
a3.this.a((sl) zgVar);
}
}));
}
this.c = new PriorityQueue();
}
@Override // com.applovin.impl.m5
/* renamed from: f, reason: merged with bridge method [inline-methods] */
public rl d() {
b1.b(this.d == null);
if (this.a.isEmpty()) {
return null;
}
b bVar = (b) this.a.pollFirst();
this.d = bVar;
return bVar;
}
@Override // com.applovin.impl.m5
/* renamed from: g, reason: merged with bridge method [inline-methods] */
public sl c() {
if (this.b.isEmpty()) {
return null;
}
while (!this.c.isEmpty() && ((b) xp.a((b) this.c.peek())).f <= this.e) {
b bVar = (b) xp.a((b) this.c.poll());
if (bVar.e()) {
sl slVar = (sl) xp.a((sl) this.b.pollFirst());
slVar.b(4);
a(bVar);
return slVar;
}
a((rl) bVar);
if (j()) {
nl e = e();
sl slVar2 = (sl) xp.a((sl) this.b.pollFirst());
slVar2.a(bVar.f, e, Long.MAX_VALUE);
a(bVar);
return slVar2;
}
a(bVar);
}
return null;
}
@Override // com.applovin.impl.m5
public void b() {
this.f = 0L;
this.e = 0L;
while (!this.c.isEmpty()) {
a((b) xp.a((b) this.c.poll()));
}
b bVar = this.d;
if (bVar != null) {
a(bVar);
this.d = null;
}
}
private void a(b bVar) {
bVar.b();
this.a.add(bVar);
}
public final sl h() {
return (sl) this.b.pollFirst();
}
public static final class b extends rl implements Comparable {
private long k;
private b() {
}
@Override // java.lang.Comparable
/* renamed from: a, reason: merged with bridge method [inline-methods] */
public int compareTo(b bVar) {
if (e() != bVar.e()) {
return e() ? 1 : -1;
}
long j = this.f - bVar.f;
if (j == 0) {
j = this.k - bVar.k;
if (j == 0) {
return 0;
}
}
return j > 0 ? 1 : -1;
}
}
public static final class c extends sl {
private zg.a g;
public c(zg.a aVar) {
this.g = aVar;
}
@Override // com.applovin.impl.zg
public final void g() {
this.g.a(this);
}
}
@Override // com.applovin.impl.m5
/* renamed from: b, reason: merged with bridge method [inline-methods] */
public void a(rl rlVar) {
b1.a(rlVar == this.d);
b bVar = (b) rlVar;
if (!bVar.d()) {
long j = this.f;
this.f = 1 + j;
bVar.k = j;
this.c.add(bVar);
} else {
a(bVar);
}
this.d = null;
}
public void a(sl slVar) {
slVar.b();
this.b.add(slVar);
}
}

View File

@@ -0,0 +1,75 @@
package com.applovin.impl;
import android.content.Context;
/* loaded from: classes.dex */
public abstract class a4 {
private static final a a = new a("Age Restricted User", uj.m);
private static final a b = new a("Has User Consent", uj.l);
private static final a c = new a("\"Do Not Sell\"", uj.n);
public static a a() {
return c;
}
public static a b() {
return b;
}
public static a c() {
return a;
}
public static boolean b(boolean z, Context context) {
return a(uj.l, Boolean.valueOf(z), context);
}
private static boolean a(uj ujVar, Boolean bool, Context context) {
if (context == null) {
com.applovin.impl.sdk.n.h("AppLovinSdk", "Failed to update compliance value for key: " + ujVar);
return false;
}
Boolean bool2 = (Boolean) vj.a(ujVar, (Object) null, context);
vj.b(ujVar, bool, context);
return bool2 == null || bool2 != bool;
}
public static boolean a(boolean z, Context context) {
return a(uj.n, Boolean.valueOf(z), context);
}
public static String a(Context context) {
return a(b, context) + a(c, context);
}
private static String a(a aVar, Context context) {
return "\n" + aVar.a + " - " + aVar.a(context);
}
public static class a {
private final String a;
private final uj b;
public String a() {
return this.a;
}
public a(String str, uj ujVar) {
this.a = str;
this.b = ujVar;
}
public Boolean b(Context context) {
if (context == null) {
com.applovin.impl.sdk.n.h("AppLovinSdk", "Failed to get value for key: " + this.b);
return null;
}
return (Boolean) vj.a(this.b, (Object) null, context);
}
public String a(Context context) {
Boolean b = b(context);
return b != null ? b.toString() : "No value set";
}
}
}

View File

@@ -0,0 +1,78 @@
package com.applovin.impl;
import android.media.MediaCodec;
/* loaded from: classes.dex */
public final class a5 {
public byte[] a;
public byte[] b;
public int c;
public int[] d;
public int[] e;
public int f;
public int g;
public int h;
private final MediaCodec.CryptoInfo i;
private final b j;
public MediaCodec.CryptoInfo a() {
return this.i;
}
/* JADX WARN: Multi-variable type inference failed */
public a5() {
MediaCodec.CryptoInfo cryptoInfo = new MediaCodec.CryptoInfo();
this.i = cryptoInfo;
this.j = xp.a >= 24 ? new b(cryptoInfo) : null;
}
public static final class b {
private final MediaCodec.CryptoInfo a;
private final MediaCodec.CryptoInfo.Pattern b;
private b(MediaCodec.CryptoInfo cryptoInfo) {
this.a = cryptoInfo;
this.b = new MediaCodec.CryptoInfo.Pattern(0, 0);
}
/* JADX INFO: Access modifiers changed from: private */
public void a(int i, int i2) {
this.b.set(i, i2);
this.a.setPattern(this.b);
}
}
public void a(int i) {
if (i == 0) {
return;
}
if (this.d == null) {
int[] iArr = new int[1];
this.d = iArr;
this.i.numBytesOfClearData = iArr;
}
int[] iArr2 = this.d;
iArr2[0] = iArr2[0] + i;
}
public void a(int i, int[] iArr, int[] iArr2, byte[] bArr, byte[] bArr2, int i2, int i3, int i4) {
this.f = i;
this.d = iArr;
this.e = iArr2;
this.b = bArr;
this.a = bArr2;
this.c = i2;
this.g = i3;
this.h = i4;
MediaCodec.CryptoInfo cryptoInfo = this.i;
cryptoInfo.numSubSamples = i;
cryptoInfo.numBytesOfClearData = iArr;
cryptoInfo.numBytesOfEncryptedData = iArr2;
cryptoInfo.key = bArr;
cryptoInfo.iv = bArr2;
cryptoInfo.mode = i2;
if (xp.a >= 24) {
((b) b1.a(this.j)).a(i3, i4);
}
}
}

View File

@@ -0,0 +1,154 @@
package com.applovin.impl;
import java.util.ArrayDeque;
/* loaded from: classes.dex */
final class a6 implements p7 {
private final byte[] a = new byte[8];
private final ArrayDeque b = new ArrayDeque();
private final zp c = new zp();
private o7 d;
private int e;
private int f;
private long g;
@Override // com.applovin.impl.p7
public void a(o7 o7Var) {
this.d = o7Var;
}
@Override // com.applovin.impl.p7
public void reset() {
this.e = 0;
this.b.clear();
this.c.b();
}
@Override // com.applovin.impl.p7
public boolean a(l8 l8Var) {
b1.b(this.d);
while (true) {
b bVar = (b) this.b.peek();
if (bVar == null || l8Var.f() < bVar.b) {
if (this.e == 0) {
long a2 = this.c.a(l8Var, true, false, 4);
if (a2 == -2) {
a2 = b(l8Var);
}
if (a2 == -1) {
return false;
}
this.f = (int) a2;
this.e = 1;
}
if (this.e == 1) {
this.g = this.c.a(l8Var, false, true, 8);
this.e = 2;
}
int b2 = this.d.b(this.f);
if (b2 != 0) {
if (b2 == 1) {
long f = l8Var.f();
this.b.push(new b(this.f, this.g + f));
this.d.a(this.f, f, this.g);
this.e = 0;
return true;
}
if (b2 == 2) {
long j = this.g;
if (j <= 8) {
this.d.a(this.f, b(l8Var, (int) j));
this.e = 0;
return true;
}
throw dh.a("Invalid integer size: " + this.g, null);
}
if (b2 == 3) {
long j2 = this.g;
if (j2 <= 2147483647L) {
this.d.a(this.f, c(l8Var, (int) j2));
this.e = 0;
return true;
}
throw dh.a("String element size: " + this.g, null);
}
if (b2 == 4) {
this.d.a(this.f, (int) this.g, l8Var);
this.e = 0;
return true;
}
if (b2 != 5) {
throw dh.a("Invalid element type " + b2, null);
}
long j3 = this.g;
if (j3 != 4 && j3 != 8) {
throw dh.a("Invalid float size: " + this.g, null);
}
this.d.a(this.f, a(l8Var, (int) j3));
this.e = 0;
return true;
}
l8Var.a((int) this.g);
this.e = 0;
} else {
this.d.a(((b) this.b.pop()).a);
return true;
}
}
}
private long b(l8 l8Var) {
l8Var.b();
while (true) {
l8Var.c(this.a, 0, 4);
int a2 = zp.a(this.a[0]);
if (a2 != -1 && a2 <= 4) {
int a3 = (int) zp.a(this.a, a2, false);
if (this.d.c(a3)) {
l8Var.a(a2);
return a3;
}
}
l8Var.a(1);
}
}
private static String c(l8 l8Var, int i) {
if (i == 0) {
return "";
}
byte[] bArr = new byte[i];
l8Var.d(bArr, 0, i);
while (i > 0 && bArr[i - 1] == 0) {
i--;
}
return new String(bArr, 0, i);
}
public static final class b {
private final int a;
private final long b;
private b(int i, long j) {
this.a = i;
this.b = j;
}
}
private long b(l8 l8Var, int i) {
l8Var.d(this.a, 0, i);
long j = 0;
for (int i2 = 0; i2 < i; i2++) {
j = (j << 8) | (this.a[i2] & 255);
}
return j;
}
private double a(l8 l8Var, int i) {
long b2 = b(l8Var, i);
if (i == 4) {
return Float.intBitsToFloat((int) b2);
}
return Double.longBitsToDouble(b2);
}
}

View File

@@ -0,0 +1,187 @@
package com.applovin.impl;
import android.os.Handler;
import com.applovin.impl.a7;
import com.applovin.impl.be;
import java.util.Iterator;
import java.util.concurrent.CopyOnWriteArrayList;
/* loaded from: classes.dex */
public interface a7 {
void a(int i, be.a aVar);
void a(int i, be.a aVar, int i2);
void a(int i, be.a aVar, Exception exc);
void b(int i, be.a aVar);
void c(int i, be.a aVar);
void d(int i, be.a aVar);
default void e(int i, be.a aVar) {
}
public static class a {
public final int a;
public final be.a b;
private final CopyOnWriteArrayList c;
public a() {
this(new CopyOnWriteArrayList(), 0, null);
}
public void a(Handler handler, a7 a7Var) {
b1.a(handler);
b1.a(a7Var);
this.c.add(new C0013a(handler, a7Var));
}
public void e(a7 a7Var) {
Iterator it = this.c.iterator();
while (it.hasNext()) {
C0013a c0013a = (C0013a) it.next();
if (c0013a.b == a7Var) {
this.c.remove(c0013a);
}
}
}
public void c() {
Iterator it = this.c.iterator();
while (it.hasNext()) {
C0013a c0013a = (C0013a) it.next();
final a7 a7Var = c0013a.b;
xp.a(c0013a.a, new Runnable() { // from class: com.applovin.impl.a7$a$$ExternalSyntheticLambda3
@Override // java.lang.Runnable
public final void run() {
a7.a.this.c(a7Var);
}
});
}
}
public void b() {
Iterator it = this.c.iterator();
while (it.hasNext()) {
C0013a c0013a = (C0013a) it.next();
final a7 a7Var = c0013a.b;
xp.a(c0013a.a, new Runnable() { // from class: com.applovin.impl.a7$a$$ExternalSyntheticLambda2
@Override // java.lang.Runnable
public final void run() {
a7.a.this.b(a7Var);
}
});
}
}
public void d() {
Iterator it = this.c.iterator();
while (it.hasNext()) {
C0013a c0013a = (C0013a) it.next();
final a7 a7Var = c0013a.b;
xp.a(c0013a.a, new Runnable() { // from class: com.applovin.impl.a7$a$$ExternalSyntheticLambda4
@Override // java.lang.Runnable
public final void run() {
a7.a.this.d(a7Var);
}
});
}
}
private a(CopyOnWriteArrayList copyOnWriteArrayList, int i, be.a aVar) {
this.c = copyOnWriteArrayList;
this.a = i;
this.b = aVar;
}
/* renamed from: com.applovin.impl.a7$a$a, reason: collision with other inner class name */
public static final class C0013a {
public Handler a;
public a7 b;
public C0013a(Handler handler, a7 a7Var) {
this.a = handler;
this.b = a7Var;
}
}
public void a() {
Iterator it = this.c.iterator();
while (it.hasNext()) {
C0013a c0013a = (C0013a) it.next();
final a7 a7Var = c0013a.b;
xp.a(c0013a.a, new Runnable() { // from class: com.applovin.impl.a7$a$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
a7.a.this.a(a7Var);
}
});
}
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void c(a7 a7Var) {
a7Var.c(this.a, this.b);
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void b(a7 a7Var) {
a7Var.a(this.a, this.b);
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void d(a7 a7Var) {
a7Var.b(this.a, this.b);
}
public void a(final int i) {
Iterator it = this.c.iterator();
while (it.hasNext()) {
C0013a c0013a = (C0013a) it.next();
final a7 a7Var = c0013a.b;
xp.a(c0013a.a, new Runnable() { // from class: com.applovin.impl.a7$a$$ExternalSyntheticLambda5
@Override // java.lang.Runnable
public final void run() {
a7.a.this.a(a7Var, i);
}
});
}
}
public void a(final Exception exc) {
Iterator it = this.c.iterator();
while (it.hasNext()) {
C0013a c0013a = (C0013a) it.next();
final a7 a7Var = c0013a.b;
xp.a(c0013a.a, new Runnable() { // from class: com.applovin.impl.a7$a$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
a7.a.this.a(a7Var, exc);
}
});
}
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void a(a7 a7Var) {
a7Var.d(this.a, this.b);
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void a(a7 a7Var, int i) {
a7Var.e(this.a, this.b);
a7Var.a(this.a, this.b, i);
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void a(a7 a7Var, Exception exc) {
a7Var.a(this.a, this.b, exc);
}
public a a(int i, be.a aVar) {
return new a(this.c, i, aVar);
}
}
}

View File

@@ -0,0 +1,95 @@
package com.applovin.impl;
import android.os.Bundle;
import android.os.SystemClock;
import android.text.TextUtils;
import com.applovin.impl.o2;
import java.io.IOException;
/* loaded from: classes.dex */
public final class a8 extends nh {
public static final o2.a l = new o2.a() { // from class: com.applovin.impl.a8$$ExternalSyntheticLambda0
@Override // com.applovin.impl.o2.a
public final o2 a(Bundle bundle) {
return a8.$r8$lambda$EmiKJ7f3R_W6NXDeEcT0iqE9T2w(bundle);
}
};
public final int d;
public final String f;
public final int g;
public final f9 h;
public final int i;
public final yd j;
final boolean k;
public static /* synthetic */ a8 $r8$lambda$EmiKJ7f3R_W6NXDeEcT0iqE9T2w(Bundle bundle) {
return new a8(bundle);
}
public static a8 a(Throwable th, String str, int i, f9 f9Var, int i2, boolean z, int i3) {
return new a8(1, th, null, i3, str, i, f9Var, f9Var == null ? 4 : i2, z);
}
private a8(int i, Throwable th, int i2) {
this(i, th, null, i2, null, -1, null, 4, false);
}
public static a8 a(RuntimeException runtimeException) {
return a(runtimeException, 1000);
}
private a8(int i, Throwable th, String str, int i2, String str2, int i3, f9 f9Var, int i4, boolean z) {
this(a(i, str, str2, i3, f9Var, i4), th, i2, i, str2, i3, f9Var, i4, null, SystemClock.elapsedRealtime(), z);
}
private a8(Bundle bundle) {
super(bundle);
this.d = bundle.getInt(nh.b(1001), 2);
this.f = bundle.getString(nh.b(1002));
this.g = bundle.getInt(nh.b(1003), -1);
this.h = (f9) p2.a(f9.I, bundle.getBundle(nh.b(1004)));
this.i = bundle.getInt(nh.b(1005), 4);
this.k = bundle.getBoolean(nh.b(1006), false);
this.j = null;
}
private static String a(int i, String str, String str2, int i2, f9 f9Var, int i3) {
String str3;
if (i == 0) {
str3 = "Source error";
} else if (i != 1) {
str3 = i != 3 ? "Unexpected runtime error" : "Remote error";
} else {
str3 = str2 + " error, index=" + i2 + ", format=" + f9Var + ", format_supported=" + t2.b(i3);
}
if (TextUtils.isEmpty(str)) {
return str3;
}
return str3 + ": " + str;
}
public static a8 a(IOException iOException, int i) {
return new a8(0, iOException, i);
}
public static a8 a(RuntimeException runtimeException, int i) {
return new a8(2, runtimeException, i);
}
public a8 a(yd ydVar) {
return new a8((String) xp.a((Object) getMessage()), getCause(), this.a, this.d, this.f, this.g, this.h, this.i, ydVar, this.b, this.k);
}
private a8(String str, Throwable th, int i, int i2, String str2, int i3, f9 f9Var, int i4, yd ydVar, long j, boolean z) {
super(str, th, i, j);
b1.a(!z || i2 == 1);
b1.a(th != null || i2 == 3);
this.d = i2;
this.f = str2;
this.g = i3;
this.h = f9Var;
this.i = i4;
this.j = ydVar;
this.k = z;
}
}

View File

@@ -0,0 +1,187 @@
package com.applovin.impl;
import android.support.v4.media.session.PlaybackStateCompat;
import com.applovin.impl.f9;
import com.ironsource.v8;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import kotlin.jvm.internal.ByteCompanionObject;
/* loaded from: classes.dex */
public final class a9 {
public final int a;
public final int b;
public final int c;
public final int d;
public final int e;
public final int f;
public final int g;
public final int h;
public final int i;
public final long j;
public final a k;
private final bf l;
private static int a(int i) {
if (i == 8) {
return 1;
}
if (i == 12) {
return 2;
}
if (i == 16) {
return 4;
}
if (i != 20) {
return i != 24 ? -1 : 6;
}
return 5;
}
private static int b(int i) {
switch (i) {
case 8000:
return 4;
case 16000:
return 5;
case 22050:
return 6;
case 24000:
return 7;
case 32000:
return 8;
case 44100:
return 9;
case 48000:
return 10;
case 88200:
return 1;
case 96000:
return 11;
case 176400:
return 2;
case 192000:
return 3;
default:
return -1;
}
}
public static class a {
public final long[] a;
public final long[] b;
public a(long[] jArr, long[] jArr2) {
this.a = jArr;
this.b = jArr2;
}
}
private a9(int i, int i2, int i3, int i4, int i5, int i6, int i7, long j, a aVar, bf bfVar) {
this.a = i;
this.b = i2;
this.c = i3;
this.d = i4;
this.e = i5;
this.f = b(i5);
this.g = i6;
this.h = i7;
this.i = a(i7);
this.j = j;
this.k = aVar;
this.l = bfVar;
}
public a9 b(List list) {
return new a9(this.a, this.b, this.c, this.d, this.e, this.g, this.h, this.j, this.k, a(a(list, Collections.emptyList())));
}
public a9(byte[] bArr, int i) {
ah ahVar = new ah(bArr);
ahVar.c(i * 8);
this.a = ahVar.a(16);
this.b = ahVar.a(16);
this.c = ahVar.a(24);
this.d = ahVar.a(24);
int a2 = ahVar.a(20);
this.e = a2;
this.f = b(a2);
this.g = ahVar.a(3) + 1;
int a3 = ahVar.a(5) + 1;
this.h = a3;
this.i = a(a3);
this.j = ahVar.b(36);
this.k = null;
this.l = null;
}
private static bf a(List list, List list2) {
if (list.isEmpty() && list2.isEmpty()) {
return null;
}
ArrayList arrayList = new ArrayList();
for (int i = 0; i < list.size(); i++) {
String str = (String) list.get(i);
String[] b = xp.b(str, v8.i.b);
if (b.length != 2) {
pc.d("FlacStreamMetadata", "Failed to parse Vorbis comment: " + str);
} else {
arrayList.add(new dr(b[0], b[1]));
}
}
arrayList.addAll(list2);
if (arrayList.isEmpty()) {
return null;
}
return new bf(arrayList);
}
public long b() {
long j = this.j;
return j == 0 ? C.TIME_UNSET : (j * 1000000) / this.e;
}
public a9 a(List list) {
return new a9(this.a, this.b, this.c, this.d, this.e, this.g, this.h, this.j, this.k, a(a(Collections.emptyList(), list)));
}
public long a() {
long j;
long j2;
int i = this.d;
if (i > 0) {
j = (i + this.c) / 2;
j2 = 1;
} else {
int i2 = this.a;
j = ((((i2 != this.b || i2 <= 0) ? PlaybackStateCompat.ACTION_SKIP_TO_QUEUE_ITEM : i2) * this.g) * this.h) / 8;
j2 = 64;
}
return j + j2;
}
public f9 a(byte[] bArr, bf bfVar) {
bArr[4] = ByteCompanionObject.MIN_VALUE;
int i = this.d;
if (i <= 0) {
i = -1;
}
return new f9.b().f(MimeTypes.AUDIO_FLAC).i(i).c(this.g).n(this.e).a(Collections.singletonList(bArr)).a(a(bfVar)).a();
}
public bf a(bf bfVar) {
bf bfVar2 = this.l;
return bfVar2 == null ? bfVar : bfVar2.a(bfVar);
}
public long a(long j) {
return xp.b((j * this.e) / 1000000, 0L, this.j - 1);
}
public a9 a(a aVar) {
return new a9(this.a, this.b, this.c, this.d, this.e, this.g, this.h, this.j, aVar, this.l);
}
}

View File

@@ -0,0 +1,79 @@
package com.applovin.impl;
import android.os.Parcel;
import android.os.Parcelable;
import com.ironsource.mediationsdk.logger.IronSourceError;
import com.mbridge.msdk.playercommon.exoplayer2.metadata.id3.GeobFrame;
import java.util.Arrays;
/* loaded from: classes.dex */
public final class aa extends ya {
public static final Parcelable.Creator<aa> CREATOR = new a();
public final String b;
public final String c;
public final String d;
public final byte[] f;
@Override // com.applovin.impl.ya
public String toString() {
return this.a + ": mimeType=" + this.b + ", filename=" + this.c + ", description=" + this.d;
}
public aa(Parcel parcel) {
super(GeobFrame.ID);
this.b = (String) xp.a((Object) parcel.readString());
this.c = (String) xp.a((Object) parcel.readString());
this.d = (String) xp.a((Object) parcel.readString());
this.f = (byte[]) xp.a((Object) parcel.createByteArray());
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || aa.class != obj.getClass()) {
return false;
}
aa aaVar = (aa) obj;
return xp.a((Object) this.b, (Object) aaVar.b) && xp.a((Object) this.c, (Object) aaVar.c) && xp.a((Object) this.d, (Object) aaVar.d) && Arrays.equals(this.f, aaVar.f);
}
public int hashCode() {
String str = this.b;
int hashCode = ((str != null ? str.hashCode() : 0) + IronSourceError.ERROR_NON_EXISTENT_INSTANCE) * 31;
String str2 = this.c;
int hashCode2 = (hashCode + (str2 != null ? str2.hashCode() : 0)) * 31;
String str3 = this.d;
return ((hashCode2 + (str3 != null ? str3.hashCode() : 0)) * 31) + Arrays.hashCode(this.f);
}
public aa(String str, String str2, String str3, byte[] bArr) {
super(GeobFrame.ID);
this.b = str;
this.c = str2;
this.d = str3;
this.f = bArr;
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
parcel.writeString(this.b);
parcel.writeString(this.c);
parcel.writeString(this.d);
parcel.writeByteArray(this.f);
}
public class a implements Parcelable.Creator {
@Override // android.os.Parcelable.Creator
/* renamed from: a, reason: merged with bridge method [inline-methods] */
public aa[] newArray(int i) {
return new aa[i];
}
@Override // android.os.Parcelable.Creator
/* renamed from: a, reason: merged with bridge method [inline-methods] */
public aa createFromParcel(Parcel parcel) {
return new aa(parcel);
}
}
}

View File

@@ -0,0 +1,83 @@
package com.applovin.impl;
import com.applovin.impl.dp;
import com.applovin.impl.f9;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
/* loaded from: classes.dex */
public final class ab implements q7 {
private qo b;
private boolean c;
private int e;
private int f;
private final bh a = new bh(10);
private long d = C.TIME_UNSET;
@Override // com.applovin.impl.q7
public void a() {
this.c = false;
this.d = C.TIME_UNSET;
}
@Override // com.applovin.impl.q7
public void a(long j, int i) {
if ((i & 4) == 0) {
return;
}
this.c = true;
if (j != C.TIME_UNSET) {
this.d = j;
}
this.e = 0;
this.f = 0;
}
@Override // com.applovin.impl.q7
public void a(bh bhVar) {
b1.b(this.b);
if (this.c) {
int a = bhVar.a();
int i = this.f;
if (i < 10) {
int min = Math.min(a, 10 - i);
System.arraycopy(bhVar.c(), bhVar.d(), this.a.c(), this.f, min);
if (this.f + min == 10) {
this.a.f(0);
if (73 == this.a.w() && 68 == this.a.w() && 51 == this.a.w()) {
this.a.g(3);
this.e = this.a.v() + 10;
} else {
pc.d("Id3Reader", "Discarding invalid ID3 tag");
this.c = false;
return;
}
}
}
int min2 = Math.min(a, this.e - this.f);
this.b.a(bhVar, min2);
this.f += min2;
}
}
@Override // com.applovin.impl.q7
public void b() {
int i;
b1.b(this.b);
if (this.c && (i = this.e) != 0 && this.f == i) {
long j = this.d;
if (j != C.TIME_UNSET) {
this.b.a(j, 1, i, 0, null);
}
this.c = false;
}
}
@Override // com.applovin.impl.q7
public void a(m8 m8Var, dp.d dVar) {
dVar.a();
qo a = m8Var.a(dVar.c(), 5);
this.b = a;
a.a(new f9.b().c(dVar.b()).f(MimeTypes.APPLICATION_ID3).a());
}
}

View File

@@ -0,0 +1,5 @@
package com.applovin.impl;
/* loaded from: classes.dex */
public interface ac {
}

View File

@@ -0,0 +1,40 @@
package com.applovin.impl;
import android.content.Context;
import android.view.View;
import android.widget.FrameLayout;
import com.applovin.sdk.AppLovinSdkUtils;
/* loaded from: classes.dex */
public class ad extends FrameLayout implements View.OnClickListener {
private a a;
public interface a {
void a(ad adVar);
}
public void setListener(a aVar) {
this.a = aVar;
}
public ad(cd cdVar, Context context) {
super(context);
setOnClickListener(this);
com.applovin.impl.adview.i iVar = new com.applovin.impl.adview.i(context);
int dpToPx = AppLovinSdkUtils.dpToPx(context, cdVar.e());
iVar.setLayoutParams(new FrameLayout.LayoutParams(dpToPx, dpToPx, 17));
iVar.a(dpToPx);
addView(iVar);
int dpToPx2 = AppLovinSdkUtils.dpToPx(context, cdVar.e() + (cdVar.c() * 2));
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(dpToPx2, dpToPx2, 8388661);
int dpToPx3 = AppLovinSdkUtils.dpToPx(context, cdVar.f());
int dpToPx4 = AppLovinSdkUtils.dpToPx(context, cdVar.d());
layoutParams.setMargins(dpToPx4, dpToPx3, dpToPx4, 0);
setLayoutParams(layoutParams);
}
@Override // android.view.View.OnClickListener
public void onClick(View view) {
this.a.a(this);
}
}

View File

@@ -0,0 +1,41 @@
package com.applovin.impl.adview;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.applovin.adview.AppLovinInterstitialAd;
import com.applovin.adview.AppLovinInterstitialAdDialog;
import com.applovin.sdk.AppLovinAd;
import com.applovin.sdk.AppLovinAdClickListener;
import com.applovin.sdk.AppLovinAdDisplayListener;
import com.applovin.sdk.AppLovinAdVideoPlaybackListener;
import com.applovin.sdk.AppLovinSdk;
/* loaded from: classes.dex */
public class AppLovinAppOpenAd {
private final AppLovinInterstitialAdDialog a;
public AppLovinAppOpenAd(@NonNull AppLovinSdk appLovinSdk) {
this.a = AppLovinInterstitialAd.create(appLovinSdk, com.applovin.impl.sdk.j.l());
}
public void setAdClickListener(@Nullable AppLovinAdClickListener appLovinAdClickListener) {
this.a.setAdClickListener(appLovinAdClickListener);
}
public void setAdDisplayListener(@Nullable AppLovinAdDisplayListener appLovinAdDisplayListener) {
this.a.setAdDisplayListener(appLovinAdDisplayListener);
}
public void setAdVideoPlaybackListener(@Nullable AppLovinAdVideoPlaybackListener appLovinAdVideoPlaybackListener) {
this.a.setAdVideoPlaybackListener(appLovinAdVideoPlaybackListener);
}
public void show(@NonNull AppLovinAd appLovinAd) {
this.a.showAndRender(appLovinAd);
}
@NonNull
public String toString() {
return "AppLovinAppOpenAd{}";
}
}

View File

@@ -0,0 +1,42 @@
package com.applovin.impl.adview;
import android.content.Context;
import com.applovin.adview.AppLovinIncentivizedInterstitial;
import com.applovin.sdk.AppLovinAd;
import com.applovin.sdk.AppLovinAdClickListener;
import com.applovin.sdk.AppLovinAdDisplayListener;
import com.applovin.sdk.AppLovinAdRewardListener;
import com.applovin.sdk.AppLovinAdVideoPlaybackListener;
import com.applovin.sdk.AppLovinSdk;
/* loaded from: classes.dex */
public class AppLovinRewardedInterstitialAd {
private final AppLovinIncentivizedInterstitial a;
private AppLovinAdDisplayListener b;
private AppLovinAdClickListener c;
private AppLovinAdVideoPlaybackListener d;
public AppLovinRewardedInterstitialAd(AppLovinSdk appLovinSdk) {
this.a = new AppLovinIncentivizedInterstitial(appLovinSdk);
}
public void setAdClickListener(AppLovinAdClickListener appLovinAdClickListener) {
this.c = appLovinAdClickListener;
}
public void setAdDisplayListener(AppLovinAdDisplayListener appLovinAdDisplayListener) {
this.b = appLovinAdDisplayListener;
}
public void setAdVideoPlaybackListener(AppLovinAdVideoPlaybackListener appLovinAdVideoPlaybackListener) {
this.d = appLovinAdVideoPlaybackListener;
}
public void show(AppLovinAd appLovinAd, Context context, AppLovinAdRewardListener appLovinAdRewardListener) {
this.a.show(appLovinAd, context, appLovinAdRewardListener, this.d, this.b, this.c);
}
public String toString() {
return "AppLovinRewardedInterstitialAd{}";
}
}

View File

@@ -0,0 +1,104 @@
package com.applovin.impl.adview;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Point;
import android.graphics.PointF;
import android.os.SystemClock;
import android.view.MotionEvent;
import android.view.View;
import com.applovin.impl.sj;
import com.applovin.impl.z3;
import com.applovin.sdk.AppLovinSdkUtils;
/* loaded from: classes.dex */
public class AppLovinTouchToClickListener implements View.OnTouchListener {
private final long a;
private final int b;
private final int c;
private final ClickRecognitionState d;
private long e;
private PointF f;
private boolean g;
private final Context h;
private final OnClickListener i;
public enum ClickRecognitionState {
DISABLED,
ACTION_DOWN,
ACTION_POINTER_UP,
ACTION_UP
}
public interface OnClickListener {
void onClick(View view, MotionEvent motionEvent);
}
private void a(View view, MotionEvent motionEvent) {
this.i.onClick(view, motionEvent);
this.g = true;
}
@Override // android.view.View.OnTouchListener
@SuppressLint({"ClickableViewAccessibility"})
public boolean onTouch(View view, MotionEvent motionEvent) {
int i;
int actionMasked = motionEvent.getActionMasked();
if (actionMasked != 0) {
if (actionMasked != 1) {
if (actionMasked == 6 && !this.g && this.d == ClickRecognitionState.ACTION_POINTER_UP) {
a(view, motionEvent);
}
} else if (!this.g && this.d == ClickRecognitionState.ACTION_UP) {
a(view, motionEvent);
} else if (this.d == ClickRecognitionState.DISABLED) {
long elapsedRealtime = SystemClock.elapsedRealtime() - this.e;
float a = a(this.f, new PointF(motionEvent.getX(), motionEvent.getY()));
if (!this.g) {
long j = this.a;
if ((j < 0 || elapsedRealtime < j) && ((i = this.b) < 0 || a < i)) {
a(view, motionEvent);
}
}
}
} else if (this.d != ClickRecognitionState.ACTION_DOWN) {
this.e = SystemClock.elapsedRealtime();
this.f = new PointF(motionEvent.getX(), motionEvent.getY());
this.g = false;
} else if (a(motionEvent)) {
a(view, motionEvent);
}
return true;
}
private float a(PointF pointF, PointF pointF2) {
float f = pointF.x - pointF2.x;
float f2 = pointF.y - pointF2.y;
return a((float) Math.sqrt((f * f) + (f2 * f2)));
}
private float a(float f) {
return f / this.h.getResources().getDisplayMetrics().density;
}
private boolean a(MotionEvent motionEvent) {
if (this.c <= 0) {
return true;
}
Point b = z3.b(this.h);
float rawX = motionEvent.getRawX();
float rawY = motionEvent.getRawY();
int i = this.c;
float f = i;
return rawX >= f && rawY >= f && rawX <= ((float) (b.x - i)) && rawY <= ((float) (b.y - i));
}
public AppLovinTouchToClickListener(com.applovin.impl.sdk.j jVar, sj sjVar, Context context, OnClickListener onClickListener) {
this.a = ((Long) jVar.a(sj.B0)).longValue();
this.b = ((Integer) jVar.a(sj.C0)).intValue();
this.c = AppLovinSdkUtils.dpToPx(context, ((Integer) jVar.a(sj.H0)).intValue());
this.d = ClickRecognitionState.values()[((Integer) jVar.a(sjVar)).intValue()];
this.h = context;
this.i = onClickListener;
}
}

View File

@@ -0,0 +1,17 @@
package com.applovin.impl.adview;
import android.content.Context;
import android.widget.VideoView;
/* loaded from: classes.dex */
public class AppLovinVideoView extends VideoView {
public AppLovinVideoView(Context context) {
super(context, null, 0);
}
public void setVideoSize(int i, int i2) {
getHolder().setFixedSize(i, i2);
requestLayout();
invalidate();
}
}

View File

@@ -0,0 +1,5 @@
package com.applovin.impl.adview;
/* loaded from: classes.dex */
public abstract /* synthetic */ class AppLovinWebViewBase$$ExternalSyntheticApiModelOutline0 {
}

View File

@@ -0,0 +1,105 @@
package com.applovin.impl.adview;
import android.content.Context;
import android.webkit.WebSettings;
import android.webkit.WebView;
import com.applovin.impl.z3;
import com.unity3d.ads.adplayer.AndroidWebViewClient;
/* loaded from: classes.dex */
public class AppLovinWebViewBase extends WebView {
public AppLovinWebViewBase(Context context) {
super(context);
}
public void applySettings(com.applovin.impl.sdk.ad.b bVar) {
Boolean m;
loadUrl(AndroidWebViewClient.BLANK_PAGE);
int u0 = bVar.u0();
if (u0 >= 0) {
setLayerType(u0, null);
}
if (z3.d()) {
getSettings().setMediaPlaybackRequiresUserGesture(bVar.G());
}
if (z3.e() && bVar.J0()) {
WebView.setWebContentsDebuggingEnabled(true);
}
m v0 = bVar.v0();
if (v0 != null) {
WebSettings settings = getSettings();
WebSettings.PluginState b = v0.b();
if (b != null) {
settings.setPluginState(b);
}
Boolean e = v0.e();
if (e != null) {
settings.setAllowFileAccess(e.booleanValue());
}
Boolean i = v0.i();
if (i != null) {
settings.setLoadWithOverviewMode(i.booleanValue());
}
Boolean q = v0.q();
if (q != null) {
settings.setUseWideViewPort(q.booleanValue());
}
Boolean d = v0.d();
if (d != null) {
settings.setAllowContentAccess(d.booleanValue());
}
Boolean p = v0.p();
if (p != null) {
settings.setBuiltInZoomControls(p.booleanValue());
}
Boolean h = v0.h();
if (h != null) {
settings.setDisplayZoomControls(h.booleanValue());
}
Boolean l = v0.l();
if (l != null) {
settings.setSaveFormData(l.booleanValue());
}
Boolean c = v0.c();
if (c != null) {
settings.setGeolocationEnabled(c.booleanValue());
}
Boolean j = v0.j();
if (j != null) {
settings.setNeedInitialFocus(j.booleanValue());
}
Boolean f = v0.f();
if (f != null) {
settings.setAllowFileAccessFromFileURLs(f.booleanValue());
}
Boolean g = v0.g();
if (g != null) {
settings.setAllowUniversalAccessFromFileURLs(g.booleanValue());
}
Boolean o = v0.o();
if (o != null) {
settings.setLoadsImagesAutomatically(o.booleanValue());
}
Boolean n = v0.n();
if (n != null) {
settings.setBlockNetworkImage(n.booleanValue());
}
if (z3.f()) {
Integer a = v0.a();
if (a != null) {
settings.setMixedContentMode(a.intValue());
}
if (z3.g()) {
Boolean k = v0.k();
if (k != null) {
settings.setOffscreenPreRaster(k.booleanValue());
}
if (!z3.l() || (m = v0.m()) == null) {
return;
}
settings.setAlgorithmicDarkeningAllowed(m.booleanValue());
}
}
}
}
}

View File

@@ -0,0 +1,969 @@
package com.applovin.impl.adview;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.widget.RelativeLayout;
import androidx.browser.customtabs.CustomTabsSession;
import com.applovin.adview.AppLovinAdView;
import com.applovin.adview.AppLovinAdViewDisplayErrorCode;
import com.applovin.adview.AppLovinAdViewEventListener;
import com.applovin.adview.AppLovinFullscreenActivity;
import com.applovin.communicator.AppLovinCommunicator;
import com.applovin.communicator.AppLovinCommunicatorMessage;
import com.applovin.communicator.AppLovinCommunicatorSubscriber;
import com.applovin.impl.adview.k;
import com.applovin.impl.ca;
import com.applovin.impl.e0;
import com.applovin.impl.ea;
import com.applovin.impl.g0;
import com.applovin.impl.gc;
import com.applovin.impl.jn;
import com.applovin.impl.la;
import com.applovin.impl.mg;
import com.applovin.impl.og;
import com.applovin.impl.pi;
import com.applovin.impl.qb;
import com.applovin.impl.qc;
import com.applovin.impl.sdk.AppLovinAdServiceImpl;
import com.applovin.impl.sdk.ad.b;
import com.applovin.impl.sdk.utils.StringUtils;
import com.applovin.impl.sj;
import com.applovin.impl.t6;
import com.applovin.impl.tm;
import com.applovin.impl.tr;
import com.applovin.impl.vb;
import com.applovin.impl.yp;
import com.applovin.impl.zq;
import com.applovin.sdk.AppLovinAd;
import com.applovin.sdk.AppLovinAdClickListener;
import com.applovin.sdk.AppLovinAdDisplayListener;
import com.applovin.sdk.AppLovinAdLoadListener;
import com.applovin.sdk.AppLovinAdSize;
import com.applovin.sdk.AppLovinSdk;
import com.applovin.sdk.AppLovinSdkUtils;
import com.iab.omid.library.applovin.adsession.FriendlyObstructionPurpose;
import com.tapjoy.TJAdUnitConstants;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
/* loaded from: classes.dex */
public class a implements AppLovinCommunicatorSubscriber {
private static final AtomicReference H = new AtomicReference();
private volatile AppLovinAdLoadListener C;
private volatile AppLovinAdDisplayListener D;
private volatile AppLovinAdViewEventListener E;
private volatile AppLovinAdClickListener F;
private Context a;
private ViewGroup b;
private com.applovin.impl.sdk.j c;
private AppLovinAdServiceImpl d;
private com.applovin.impl.sdk.n f;
private AppLovinCommunicator g;
private b h;
private AppLovinAdSize j;
private String k;
private CustomTabsSession l;
private com.applovin.impl.adview.c m;
private e n;
private com.applovin.impl.adview.b o;
private WebView p;
private k q;
private Runnable r;
private Runnable s;
private final Map i = Collections.synchronizedMap(new HashMap());
private volatile com.applovin.impl.sdk.ad.b t = null;
private volatile AppLovinAd u = null;
private f v = null;
private f w = null;
private final AtomicReference x = new AtomicReference();
private final AtomicBoolean y = new AtomicBoolean();
private volatile boolean z = false;
private volatile boolean A = false;
private volatile boolean B = false;
private volatile g0 G = null;
public interface b {
void a(a aVar);
}
public class c implements Runnable {
private c() {
}
@Override // java.lang.Runnable
public void run() {
if (a.this.o != null) {
a.this.o.setVisibility(8);
}
}
}
public class d implements Runnable {
/* renamed from: com.applovin.impl.adview.a$d$a, reason: collision with other inner class name */
public class C0015a implements k.a {
public C0015a() {
}
@Override // com.applovin.impl.adview.k.a
public void a() {
a.this.o.addView(a.this.q, new ViewGroup.LayoutParams(-1, -1));
}
@Override // com.applovin.impl.adview.k.a
public void onFailure() {
com.applovin.impl.sdk.n unused = a.this.f;
if (com.applovin.impl.sdk.n.a()) {
a.this.f.b("AppLovinAdView", "Watermark failed to render.");
}
}
}
private d() {
}
@Override // java.lang.Runnable
public void run() {
if (a.this.t != null) {
if (a.this.o == null) {
com.applovin.impl.sdk.n.h("AppLovinAdView", "Unable to render advertisement for ad #" + a.this.t.getAdIdNumber() + ". Please make sure you are not calling AppLovinAdView.destroy() prematurely.");
gc.a(a.this.E, a.this.t, (AppLovinAdView) null, AppLovinAdViewDisplayErrorCode.WEBVIEW_NOT_FOUND);
return;
}
a.this.w();
com.applovin.impl.sdk.n unused = a.this.f;
if (com.applovin.impl.sdk.n.a()) {
a.this.f.a("AppLovinAdView", "Rendering advertisement ad for #" + a.this.t.getAdIdNumber() + "...");
}
a.b(a.this.o, a.this.t.getSize());
if (a.this.q != null) {
zq.c(a.this.q);
a.this.q = null;
}
ea eaVar = new ea(a.this.i, a.this.c);
if (eaVar.c()) {
a.this.q = new k(eaVar, a.this.a);
a.this.q.a(new C0015a());
}
a.this.o.setAdHtmlLoaded(false);
a.this.o.a(a.this.t);
if (a.this.t.getSize() == AppLovinAdSize.INTERSTITIAL || a.this.A) {
return;
}
a.this.t.setHasShown(true);
}
}
}
public static class e implements AppLovinAdLoadListener {
private final a a;
public e(a aVar, com.applovin.impl.sdk.j jVar) {
if (aVar == null) {
throw new IllegalArgumentException("No view specified");
}
if (jVar == null) {
throw new IllegalArgumentException("No sdk specified");
}
this.a = aVar;
}
private a a() {
return this.a;
}
@Override // com.applovin.sdk.AppLovinAdLoadListener
public void adReceived(AppLovinAd appLovinAd) {
a a = a();
if (a != null) {
a.b(appLovinAd);
} else {
com.applovin.impl.sdk.n.h("AppLovinAdView", "Ad view has been garbage collected by the time an ad was received");
}
}
@Override // com.applovin.sdk.AppLovinAdLoadListener
public void failedToReceiveAd(int i) {
a a = a();
if (a != null) {
a.b(i);
}
}
}
private void G() {
com.applovin.impl.adview.b bVar;
if (this.f != null && com.applovin.impl.sdk.n.a() && com.applovin.impl.sdk.n.a()) {
this.f.a("AppLovinAdView", "Destroying...");
}
if (!((Boolean) this.c.a(sj.I1)).booleanValue() || (bVar = this.o) == null) {
tr.d(this.o);
} else {
tr.a(bVar);
f().a(this.o, new vb.b() { // from class: com.applovin.impl.adview.a$$ExternalSyntheticLambda1
@Override // com.applovin.impl.vb.b
public final void a(Object obj) {
tr.d((b) obj);
}
});
}
this.o = null;
tr.d(this.p);
this.p = null;
this.l = null;
this.C = null;
this.D = null;
this.F = null;
this.E = null;
this.A = true;
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ com.applovin.impl.adview.b o() {
return new com.applovin.impl.adview.b(this.c, this.a.getApplicationContext());
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void p() {
this.o.loadDataWithBaseURL("/", "<html></html>", "text/html", null, "");
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void q() {
com.applovin.impl.adview.b bVar;
d();
if (this.b == null || (bVar = this.o) == null || bVar.getParent() != null) {
return;
}
this.b.addView(this.o);
b(this.o, this.t.getSize());
if (this.t.isOpenMeasurementEnabled()) {
this.t.getAdEventTracker().a((View) this.o);
}
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void u() {
g().loadUrl("chrome://crash");
}
private void y() {
if (this.t.V0()) {
int a = this.c.n().a();
if (com.applovin.impl.sdk.f.a(a)) {
this.o.a("javascript:al_muteSwitchOn();");
} else if (a == 2) {
this.o.a("javascript:al_muteSwitchOff();");
}
}
}
public void A() {
if (com.applovin.impl.sdk.n.a()) {
this.f.a("AppLovinAdView", "AdView fully watched...");
}
b bVar = this.h;
if (bVar != null) {
bVar.a(this);
}
}
public void B() {
if (e0.a(this.o)) {
this.c.D().c(ca.r);
}
}
public void D() {
this.B = true;
}
public void E() {
this.B = false;
}
public void F() {
if (!this.z || this.A) {
return;
}
this.A = true;
}
public void a(AppLovinAdViewEventListener appLovinAdViewEventListener) {
this.E = appLovinAdViewEventListener;
}
public void a(b bVar) {
this.h = bVar;
}
public void a(g0 g0Var) {
this.G = g0Var;
}
public void a(AppLovinAdClickListener appLovinAdClickListener) {
this.F = appLovinAdClickListener;
}
public void a(AppLovinAdDisplayListener appLovinAdDisplayListener) {
this.D = appLovinAdDisplayListener;
}
public void a(AppLovinAdLoadListener appLovinAdLoadListener) {
this.C = appLovinAdLoadListener;
}
public AppLovinAdViewEventListener e() {
return this.E;
}
public com.applovin.impl.adview.b g() {
return this.o;
}
@Override // com.applovin.communicator.AppLovinCommunicatorEntity
public String getCommunicatorId() {
return a.class.getSimpleName();
}
public g0 h() {
return this.G;
}
public com.applovin.impl.sdk.ad.b i() {
return this.t;
}
public CustomTabsSession j() {
return this.l;
}
public AppLovinAdView k() {
return (AppLovinAdView) this.b;
}
public com.applovin.impl.sdk.j l() {
return this.c;
}
public AppLovinAdSize m() {
return this.j;
}
public String n() {
return this.k;
}
@Override // com.applovin.communicator.AppLovinCommunicatorSubscriber
public void onMessageReceived(AppLovinCommunicatorMessage appLovinCommunicatorMessage) {
if ("crash_applovin_ad_webview".equals(appLovinCommunicatorMessage.getTopic())) {
a(new Runnable() { // from class: com.applovin.impl.adview.a$$ExternalSyntheticLambda8
@Override // java.lang.Runnable
public final void run() {
a.this.u();
}
});
}
}
public void x() {
if ((this.a instanceof t6) && this.t != null && this.t.R() == b.EnumC0038b.DISMISS) {
((t6) this.a).dismiss();
}
}
/* JADX INFO: Access modifiers changed from: private */
public static void b(View view, AppLovinAdSize appLovinAdSize) {
if (view == null) {
return;
}
DisplayMetrics displayMetrics = view.getResources().getDisplayMetrics();
String label = appLovinAdSize.getLabel();
AppLovinAdSize appLovinAdSize2 = AppLovinAdSize.INTERSTITIAL;
int applyDimension = label.equals(appLovinAdSize2.getLabel()) ? -1 : appLovinAdSize.getWidth() == -1 ? displayMetrics.widthPixels : (int) TypedValue.applyDimension(1, appLovinAdSize.getWidth(), displayMetrics);
int applyDimension2 = appLovinAdSize.getLabel().equals(appLovinAdSize2.getLabel()) ? -1 : appLovinAdSize.getHeight() == -1 ? displayMetrics.heightPixels : (int) TypedValue.applyDimension(1, appLovinAdSize.getHeight(), displayMetrics);
ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
if (layoutParams == null) {
layoutParams = new RelativeLayout.LayoutParams(-2, -2);
}
layoutParams.width = applyDimension;
layoutParams.height = applyDimension2;
if (layoutParams instanceof RelativeLayout.LayoutParams) {
((RelativeLayout.LayoutParams) layoutParams).addRule(13);
}
view.setLayoutParams(layoutParams);
}
private void c() {
a(new Runnable() { // from class: com.applovin.impl.adview.a$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
a.this.s();
}
});
}
private void d() {
a(new Runnable() { // from class: com.applovin.impl.adview.a$$ExternalSyntheticLambda10
@Override // java.lang.Runnable
public final void run() {
a.this.t();
}
});
}
public static vb f() {
AtomicReference atomicReference = H;
Object obj = atomicReference.get();
if (obj == null) {
synchronized (atomicReference) {
try {
obj = atomicReference.get();
if (obj == null) {
obj = new vb.d();
atomicReference.set(obj);
}
} finally {
}
}
}
if (obj == atomicReference) {
obj = null;
}
return (vb) obj;
}
/* JADX INFO: Access modifiers changed from: private */
public void w() {
com.applovin.impl.sdk.ad.b bVar = this.t;
qc qcVar = new qc();
qcVar.a().a(bVar).a(k());
if (!yp.a(bVar.getSize())) {
qcVar.a().a("Fullscreen Ad Properties").b(bVar);
}
qcVar.a(this.c);
qcVar.a();
if (com.applovin.impl.sdk.n.a()) {
this.f.a("AppLovinAdView", qcVar.toString());
}
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void r() {
if (this.o != null && this.v != null) {
a();
}
G();
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void s() {
if (this.v != null) {
if (com.applovin.impl.sdk.n.a()) {
this.f.a("AppLovinAdView", "Detaching expanded ad: " + this.v.b());
}
this.w = this.v;
this.v = null;
a(this.j);
}
}
public void C() {
if (this.z) {
gc.b(this.D, this.t);
if (this.t != null && this.t.isOpenMeasurementEnabled() && yp.a(this.t.getSize())) {
this.t.getAdEventTracker().f();
}
if (this.o != null && this.v != null) {
if (com.applovin.impl.sdk.n.a()) {
this.f.a("AppLovinAdView", "onDetachedFromWindowCalled with expanded ad present");
}
c();
} else if (com.applovin.impl.sdk.n.a()) {
this.f.a("AppLovinAdView", "onDetachedFromWindowCalled without an expanded ad present");
}
}
}
public void H() {
if (this.z) {
AppLovinAd appLovinAd = (AppLovinAd) this.x.getAndSet(null);
if (appLovinAd != null) {
c(appLovinAd);
}
this.A = false;
}
}
public void c(AppLovinAd appLovinAd) {
a(appLovinAd, (String) null);
}
public void v() {
if (this.c != null && this.n != null && this.a != null && this.z) {
this.d.loadNextAd(this.k, this.j, this.n);
} else {
com.applovin.impl.sdk.n.i("AppLovinAdView", "Unable to load next ad: AppLovinAdView is not initialized.");
}
}
public void c(WebView webView) {
a(webView, (String) null);
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void t() {
com.applovin.impl.sdk.ad.a b2;
f fVar = this.w;
if (fVar == null && this.v == null) {
return;
}
if (fVar != null) {
b2 = fVar.b();
this.w.dismiss();
this.w = null;
} else {
b2 = this.v.b();
this.v.dismiss();
this.v = null;
}
gc.a(this.E, b2, (AppLovinAdView) this.b);
}
public void z() {
if (this.v == null && this.w == null) {
if (com.applovin.impl.sdk.n.a()) {
this.f.a("AppLovinAdView", "Ad: " + this.t + " closed.");
}
a(this.s);
gc.b(this.D, this.t);
this.t = null;
return;
}
a();
}
public void b() {
a(new Runnable() { // from class: com.applovin.impl.adview.a$$ExternalSyntheticLambda7
@Override // java.lang.Runnable
public final void run() {
a.this.r();
}
});
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void b(WebView webView) {
this.t.getAdEventTracker().c(webView);
k kVar = this.q;
if (kVar != null && kVar.a()) {
mg adEventTracker = this.t.getAdEventTracker();
k kVar2 = this.q;
adEventTracker.b(webView, Collections.singletonList(new og(kVar2, FriendlyObstructionPurpose.NOT_VISIBLE, kVar2.getIdentifier())));
} else {
this.t.getAdEventTracker().a((View) webView);
}
this.t.getAdEventTracker().h();
this.t.getAdEventTracker().g();
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void b(MotionEvent motionEvent) {
if (this.v == null && (this.t instanceof com.applovin.impl.sdk.ad.a) && this.o != null) {
com.applovin.impl.sdk.ad.a aVar = (com.applovin.impl.sdk.ad.a) this.t;
Context context = this.a;
Activity a = context instanceof Activity ? (Activity) context : zq.a(this.o, this.c);
if (a != null && !a.isFinishing()) {
ViewGroup viewGroup = this.b;
if (viewGroup != null) {
viewGroup.removeView(this.o);
}
f fVar = new f(aVar, this.o, a, this.c);
this.v = fVar;
fVar.setOnDismissListener(new DialogInterface.OnDismissListener() { // from class: com.applovin.impl.adview.a$$ExternalSyntheticLambda4
@Override // android.content.DialogInterface.OnDismissListener
public final void onDismiss(DialogInterface dialogInterface) {
a.this.a(dialogInterface);
}
});
this.v.show();
gc.c(this.E, this.t, (AppLovinAdView) this.b);
if (this.t.isOpenMeasurementEnabled()) {
this.t.getAdEventTracker().a((View) this.v.c());
return;
}
return;
}
com.applovin.impl.sdk.n.h("AppLovinAdView", "Unable to expand ad. No Activity found.");
Uri i = aVar.i();
if (i != null) {
this.d.trackAndLaunchClick(aVar, k(), this, i, motionEvent, this.B, null);
}
this.o.a("javascript:al_onFailedExpand();");
}
}
public void b(final AppLovinAd appLovinAd) {
if (appLovinAd != null) {
if (!this.A) {
c(appLovinAd);
} else {
this.x.set(appLovinAd);
if (com.applovin.impl.sdk.n.a()) {
this.f.a("AppLovinAdView", "Ad view has paused when an ad was received, ad saved for later");
}
}
a(new Runnable() { // from class: com.applovin.impl.adview.a$$ExternalSyntheticLambda3
@Override // java.lang.Runnable
public final void run() {
a.this.a(appLovinAd);
}
});
return;
}
if (com.applovin.impl.sdk.n.a()) {
this.f.b("AppLovinAdView", "No provided when to the view controller");
}
b(-1);
}
/* JADX INFO: Access modifiers changed from: private */
public void b(final int i) {
if (!this.A) {
a(this.s);
}
a(new Runnable() { // from class: com.applovin.impl.adview.a$$ExternalSyntheticLambda9
@Override // java.lang.Runnable
public final void run() {
a.this.a(i);
}
});
}
public void b(Uri uri) {
if (this.t != null && this.t.D0() && this.p == null) {
String queryParameter = uri.getQueryParameter("tracking_id");
if (TextUtils.isEmpty(queryParameter)) {
this.c.J();
if (com.applovin.impl.sdk.n.a()) {
this.c.J().b("AppLovinAdView", "Invalid tracking id. Cannot initialize GA");
return;
}
return;
}
WebView webView = new WebView(this.a);
this.p = webView;
webView.setWebViewClient(new pi());
this.p.getSettings().setJavaScriptEnabled(true);
this.p.loadDataWithBaseURL((String) this.c.a(sj.M6), "<html><head><link rel=\"icon\" href=\"data:,\"><G-SCRIPT_TAG></head><body></body></html>".replace("<G-SCRIPT_TAG>", "<script src='https://www.googletagmanager.com/gtag/js?id=<G-TRACKING_ID>'></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', '<G-TRACKING_ID>')</script>".replace("<G-TRACKING_ID>", queryParameter)), "text/html", "UTF-8", null);
}
}
private void a(AppLovinAdView appLovinAdView, com.applovin.impl.sdk.j jVar, AppLovinAdSize appLovinAdSize, String str, Context context) {
if (appLovinAdView == null) {
throw new IllegalArgumentException("No parent view specified");
}
if (jVar == null) {
throw new IllegalArgumentException("No sdk specified");
}
if (appLovinAdSize != null) {
this.c = jVar;
this.d = jVar.i();
this.f = jVar.J();
this.g = AppLovinCommunicator.getInstance(context);
this.j = appLovinAdSize;
this.k = str;
if (!(context instanceof AppLovinFullscreenActivity)) {
context = context.getApplicationContext();
}
this.a = context;
this.b = appLovinAdView;
this.m = new com.applovin.impl.adview.c(this, jVar);
this.s = new c();
this.r = new d();
this.n = new e(this, jVar);
a(appLovinAdSize);
return;
}
throw new IllegalArgumentException("No ad size specified");
}
public void a(AppLovinAdSize appLovinAdSize) {
try {
if (((Boolean) this.c.a(sj.I1)).booleanValue()) {
this.o = (com.applovin.impl.adview.b) f().a(new vb.a() { // from class: com.applovin.impl.adview.a$$ExternalSyntheticLambda12
@Override // com.applovin.impl.vb.a
public final Object a() {
b o;
o = a.this.o();
return o;
}
});
} else {
this.o = new com.applovin.impl.adview.b(this.c, this.a);
}
this.o.a(this.m);
this.o.setBackgroundColor(0);
this.o.setWillNotCacheDrawing(false);
this.b.setBackgroundColor(0);
this.b.addView(this.o);
b(this.o, appLovinAdSize);
if (!this.z) {
a(this.s);
}
a(new Runnable() { // from class: com.applovin.impl.adview.a$$ExternalSyntheticLambda13
@Override // java.lang.Runnable
public final void run() {
a.this.p();
}
});
this.z = true;
} catch (Throwable th) {
com.applovin.impl.sdk.n.c("AppLovinAdView", "Failed to initialize AdWebView", th);
this.c.E().a("AppLovinAdView", "initAdWebView", th);
this.y.set(true);
}
}
public void a(AppLovinAdView appLovinAdView, Context context, AppLovinAdSize appLovinAdSize, String str, AppLovinSdk appLovinSdk, AttributeSet attributeSet) {
if (appLovinAdView == null) {
throw new IllegalArgumentException("No parent view specified");
}
if (context == null) {
com.applovin.impl.sdk.n.h("AppLovinAdView", "Unable to build AppLovinAdView: no context provided. Please use a different constructor for this view.");
return;
}
if (appLovinAdSize == null && (appLovinAdSize = e0.a(attributeSet)) == null) {
appLovinAdSize = AppLovinAdSize.BANNER;
}
AppLovinAdSize appLovinAdSize2 = appLovinAdSize;
if (appLovinSdk == null) {
appLovinSdk = AppLovinSdk.getInstance(context);
}
if (appLovinSdk != null) {
a(appLovinAdView, appLovinSdk.a(), appLovinAdSize2, str, context);
if (e0.b(attributeSet)) {
v();
}
}
}
public void a(String str, Object obj) {
this.i.put(str, obj);
}
public void a(AppLovinAd appLovinAd, String str) {
if (appLovinAd != null) {
yp.b(appLovinAd, this.c);
if (this.z) {
com.applovin.impl.sdk.ad.b bVar = (com.applovin.impl.sdk.ad.b) yp.a(appLovinAd, this.c);
if (bVar == null) {
com.applovin.impl.sdk.n.h("AppLovinAdView", "Unable to retrieve the loaded ad: " + appLovinAd);
gc.a(this.D, "Unable to retrieve the loaded ad");
return;
}
if (bVar == this.t) {
com.applovin.impl.sdk.n.h("AppLovinAdView", "Attempting to show ad again: " + bVar);
if (((Boolean) this.c.a(sj.a2)).booleanValue()) {
if (this.D instanceof qb) {
gc.a(this.D, "Attempting to show ad again");
return;
}
throw new IllegalStateException("Attempting to show ad again");
}
return;
}
if (com.applovin.impl.sdk.n.a()) {
this.f.a("AppLovinAdView", "Rendering ad #" + bVar.getAdIdNumber() + " (" + bVar.getSize() + ")");
}
gc.b(this.D, this.t);
if (this.t != null && this.t.isOpenMeasurementEnabled()) {
this.t.getAdEventTracker().f();
}
this.x.set(null);
this.u = null;
this.t = bVar;
if (this.t.B0()) {
this.l = this.c.x().a(this);
this.c.x().b(this.t.z(), this.l);
}
if (!this.A && yp.a(this.j)) {
this.c.i().trackImpression(bVar);
}
if (this.v != null) {
c();
}
a(this.r);
return;
}
com.applovin.impl.sdk.n.i("AppLovinAdView", "Unable to render ad: AppLovinAdView is not initialized.");
return;
}
throw new IllegalArgumentException("No ad specified");
}
public void a(final WebView webView, String str) {
if (this.t == null) {
return;
}
a(new Runnable() { // from class: com.applovin.impl.adview.a$$ExternalSyntheticLambda5
@Override // java.lang.Runnable
public final void run() {
webView.setVisibility(0);
}
});
if (!((Boolean) this.c.a(sj.q6)).booleanValue() || (str != null && str.startsWith(this.t.g()))) {
try {
if (this.t != this.u) {
this.u = this.t;
y();
this.o.setAdHtmlLoaded(true);
if (this.D != null) {
this.c.w().d(this.t);
this.c.E().a(la.k, this.t);
gc.a(this.D, this.t);
this.o.a("javascript:al_onAdViewRendered();");
}
if ((this.t instanceof com.applovin.impl.sdk.ad.a) && this.t.isOpenMeasurementEnabled()) {
this.c.j0().a(new jn(this.c, "StartOMSDK", new Runnable() { // from class: com.applovin.impl.adview.a$$ExternalSyntheticLambda6
@Override // java.lang.Runnable
public final void run() {
a.this.b(webView);
}
}), tm.b.OTHER, 500L);
}
}
} catch (Throwable th) {
com.applovin.impl.sdk.n.c("AppLovinAdView", "Exception while notifying ad display listener", th);
com.applovin.impl.sdk.j jVar = this.c;
if (jVar != null) {
jVar.E().a("AppLovinAdView", "onAdHtmlLoaded", th);
}
}
}
}
public void a(final MotionEvent motionEvent) {
a(new Runnable() { // from class: com.applovin.impl.adview.a$$ExternalSyntheticLambda11
@Override // java.lang.Runnable
public final void run() {
a.this.b(motionEvent);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void a(DialogInterface dialogInterface) {
a();
}
public void a() {
a(new Runnable() { // from class: com.applovin.impl.adview.a$$ExternalSyntheticLambda2
@Override // java.lang.Runnable
public final void run() {
a.this.q();
}
});
}
public void a(com.applovin.impl.sdk.ad.b bVar, AppLovinAdView appLovinAdView, Uri uri, MotionEvent motionEvent, Bundle bundle) {
if (appLovinAdView != null) {
this.d.trackAndLaunchClick(bVar, appLovinAdView, this, uri, motionEvent, this.B, bundle);
} else if (com.applovin.impl.sdk.n.a()) {
this.f.b("AppLovinAdView", "Unable to process ad click - AppLovinAdView destroyed prematurely");
}
gc.a(this.F, bVar);
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void a(AppLovinAd appLovinAd) {
if (this.y.compareAndSet(true, false)) {
a(this.j);
}
try {
if (this.C != null) {
this.C.adReceived(appLovinAd);
}
} catch (Throwable th) {
com.applovin.impl.sdk.n.h("AppLovinAdView", "Exception while running ad load callback: " + th.getMessage());
com.applovin.impl.sdk.j jVar = this.c;
if (jVar != null) {
jVar.E().a("AppLovinAdView", "notifyAdLoaded", th);
}
}
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void a(int i) {
try {
if (this.C != null) {
this.C.failedToReceiveAd(i);
}
} catch (Throwable th) {
com.applovin.impl.sdk.n.c("AppLovinAdView", "Exception while running app load callback", th);
com.applovin.impl.sdk.j jVar = this.c;
if (jVar != null) {
jVar.E().a("AppLovinAdView", "notifyAdLoadFailed", th);
}
}
}
private void a(Runnable runnable) {
AppLovinSdkUtils.runOnUiThread(runnable);
}
public void a(Uri uri) {
if (this.t == null || !this.t.D0()) {
return;
}
if (this.p == null) {
this.c.J();
if (com.applovin.impl.sdk.n.a()) {
this.c.J().a("AppLovinAdView", "GA is not initialized. Cannot fire GA event");
return;
}
return;
}
final String queryParameter = uri.getQueryParameter(TJAdUnitConstants.PARAM_PLACEMENT_NAME);
final String queryParameter2 = uri.getQueryParameter("event_params_json");
if (TextUtils.isEmpty(queryParameter)) {
this.c.J();
if (com.applovin.impl.sdk.n.a()) {
this.c.J().a("AppLovinAdView", "Invalid GA event name. Cannot fire GA event");
return;
}
return;
}
a(new Runnable() { // from class: com.applovin.impl.adview.a$$ExternalSyntheticLambda14
@Override // java.lang.Runnable
public final void run() {
a.this.a(queryParameter2, queryParameter);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void a(String str, String str2) {
String str3;
if (StringUtils.isValidString(str)) {
str3 = "gtag('event', '" + str2 + "', " + str + ");";
} else {
str3 = "gtag('event', '" + str2 + "')";
}
tr.a(this.p, str3);
}
}

View File

@@ -0,0 +1,103 @@
package com.applovin.impl.adview.activity;
import android.app.Service;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.os.Messenger;
import android.os.RemoteException;
import com.applovin.adview.AppLovinFullscreenActivity;
import com.applovin.impl.gc;
import com.applovin.impl.sdk.n;
import com.applovin.impl.tb;
import com.applovin.impl.yp;
/* loaded from: classes.dex */
public class FullscreenAdService extends Service {
public static final String DATA_KEY_RAW_FULL_AD_RESPONSE = "raw_full_ad_response";
private static final String TAG = "FullscreenAdService";
public static class b extends Handler {
private b() {
}
@Override // android.os.Handler
public void handleMessage(Message message) {
try {
tb tbVar = AppLovinFullscreenActivity.parentInterstitialWrapper;
if (tbVar == null) {
if (!yp.a(1.0d)) {
super.handleMessage(message);
return;
}
throw new RuntimeException("parentWrapper is null for " + message.what);
}
com.applovin.impl.sdk.ad.b f = tbVar.f();
int i = message.what;
c cVar = c.AD;
if (i == cVar.b()) {
Bundle bundle = new Bundle();
bundle.putString(FullscreenAdService.DATA_KEY_RAW_FULL_AD_RESPONSE, f.getRawFullResponse());
Message obtain = Message.obtain((Handler) null, cVar.b());
obtain.setData(bundle);
try {
message.replyTo.send(obtain);
return;
} catch (RemoteException e) {
n.c(FullscreenAdService.TAG, "Failed to respond to Fullscreen Activity in another process with ad", e);
return;
}
}
if (message.what == c.AD_DISPLAYED.b()) {
gc.a(tbVar.c(), f);
return;
}
if (message.what == c.AD_CLICKED.b()) {
gc.a(tbVar.b(), f);
return;
}
if (message.what == c.AD_VIDEO_STARTED.b()) {
gc.a(tbVar.d(), f);
return;
}
if (message.what == c.AD_VIDEO_ENDED.b()) {
Bundle data = message.getData();
gc.a(tbVar.d(), f, data.getDouble("percent_viewed"), data.getBoolean("fully_watched"));
return;
}
if (message.what == c.AD_HIDDEN.b()) {
gc.b(tbVar.c(), f);
} else {
super.handleMessage(message);
}
} catch (Throwable unused) {
}
}
}
public enum c {
AD(0),
AD_DISPLAYED(1),
AD_CLICKED(2),
AD_VIDEO_STARTED(3),
AD_VIDEO_ENDED(4),
AD_HIDDEN(5);
private final int a;
c(int i2) {
this.a = i2;
}
public int b() {
return this.a;
}
}
@Override // android.app.Service
public IBinder onBind(Intent intent) {
return new Messenger(new b()).getBinder();
}
}

View File

@@ -0,0 +1,236 @@
package com.applovin.impl.adview.activity;
import android.content.ComponentName;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.os.Messenger;
import android.os.RemoteException;
import android.text.TextUtils;
import com.applovin.adview.AppLovinFullscreenActivity;
import com.applovin.impl.adview.activity.FullscreenAdService;
import com.applovin.impl.h0;
import com.applovin.impl.p9;
import com.applovin.impl.sdk.j;
import com.applovin.impl.sdk.n;
import com.applovin.impl.sdk.utils.JsonUtils;
import com.applovin.impl.tb;
import com.applovin.impl.um;
import com.applovin.sdk.AppLovinAd;
import com.applovin.sdk.AppLovinAdClickListener;
import com.applovin.sdk.AppLovinAdDisplayListener;
import com.applovin.sdk.AppLovinAdLoadListener;
import com.applovin.sdk.AppLovinAdVideoPlaybackListener;
import java.lang.ref.WeakReference;
import java.util.concurrent.atomic.AtomicBoolean;
import org.json.JSONException;
import org.json.JSONObject;
/* loaded from: classes.dex */
public class a implements ServiceConnection {
private final j a;
private final n b;
private final WeakReference c;
private final AtomicBoolean d = new AtomicBoolean();
private Messenger e;
public class b implements AppLovinAdDisplayListener, AppLovinAdClickListener, AppLovinAdVideoPlaybackListener {
private b() {
}
private void a(FullscreenAdService.c cVar) {
a(null, cVar);
}
@Override // com.applovin.sdk.AppLovinAdClickListener
public void adClicked(AppLovinAd appLovinAd) {
a(FullscreenAdService.c.AD_CLICKED);
}
@Override // com.applovin.sdk.AppLovinAdDisplayListener
public void adDisplayed(AppLovinAd appLovinAd) {
a(FullscreenAdService.c.AD_DISPLAYED);
}
@Override // com.applovin.sdk.AppLovinAdDisplayListener
public void adHidden(AppLovinAd appLovinAd) {
a(FullscreenAdService.c.AD_HIDDEN);
}
@Override // com.applovin.sdk.AppLovinAdVideoPlaybackListener
public void videoPlaybackBegan(AppLovinAd appLovinAd) {
a(FullscreenAdService.c.AD_VIDEO_STARTED);
}
@Override // com.applovin.sdk.AppLovinAdVideoPlaybackListener
public void videoPlaybackEnded(AppLovinAd appLovinAd, double d, boolean z) {
Bundle bundle = new Bundle();
bundle.putDouble("percent_viewed", d);
bundle.putBoolean("fully_watched", z);
a(bundle, FullscreenAdService.c.AD_VIDEO_ENDED);
}
public /* synthetic */ b(a aVar, C0016a c0016a) {
this();
}
private void a(Bundle bundle, FullscreenAdService.c cVar) {
Message obtain = Message.obtain((Handler) null, cVar.b());
if (bundle != null) {
obtain.setData(bundle);
}
try {
a.this.e.send(obtain);
} catch (RemoteException e) {
n unused = a.this.b;
if (n.a()) {
a.this.b.a("AppLovinFullscreenActivity", "Failed to forward callback (" + cVar.b() + ")", e);
}
}
}
}
public static class c extends Handler {
private final WeakReference a;
public /* synthetic */ c(a aVar, C0016a c0016a) {
this(aVar);
}
@Override // android.os.Handler
public void handleMessage(Message message) {
a aVar;
if (message.what != FullscreenAdService.c.AD.b() || (aVar = (a) this.a.get()) == null) {
super.handleMessage(message);
} else {
aVar.a(message.getData().getString(FullscreenAdService.DATA_KEY_RAW_FULL_AD_RESPONSE));
}
}
private c(a aVar) {
this.a = new WeakReference(aVar);
}
}
public a(AppLovinFullscreenActivity appLovinFullscreenActivity, j jVar) {
this.a = jVar;
this.b = jVar.J();
this.c = new WeakReference(appLovinFullscreenActivity);
}
@Override // android.content.ServiceConnection
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
if (this.d.compareAndSet(false, true)) {
if (n.a()) {
this.b.a("AppLovinFullscreenActivity", "Fullscreen ad service connected to " + componentName);
}
this.e = new Messenger(iBinder);
Message obtain = Message.obtain((Handler) null, FullscreenAdService.c.AD.b());
obtain.replyTo = new Messenger(new c(this, null));
try {
if (n.a()) {
this.b.a("AppLovinFullscreenActivity", "Requesting ad from FullscreenAdService...");
}
this.e.send(obtain);
} catch (RemoteException e) {
if (n.a()) {
this.b.a("AppLovinFullscreenActivity", "Failed to send ad request message to FullscreenAdService", e);
}
a();
}
}
}
@Override // android.content.ServiceConnection
public void onServiceDisconnected(ComponentName componentName) {
if (this.d.compareAndSet(true, false) && n.a()) {
this.b.a("AppLovinFullscreenActivity", "FullscreenAdService disconnected from " + componentName);
}
}
/* JADX INFO: Access modifiers changed from: private */
public void a() {
AppLovinFullscreenActivity appLovinFullscreenActivity = (AppLovinFullscreenActivity) this.c.get();
if (appLovinFullscreenActivity != null) {
if (n.a()) {
this.b.a("AppLovinFullscreenActivity", "Dismissing...");
}
appLovinFullscreenActivity.dismiss();
} else if (n.a()) {
this.b.b("AppLovinFullscreenActivity", "Unable to dismiss parent Activity");
}
}
/* JADX INFO: Access modifiers changed from: private */
public void a(String str) {
try {
JSONObject jSONObject = new JSONObject(str);
String string = JsonUtils.getString(jSONObject, "zone_id", "");
if (!TextUtils.isEmpty(string)) {
this.a.j0().a(new um(jSONObject, h0.a(string), true, new C0016a(), this.a));
return;
}
throw new IllegalStateException("No zone identifier found in ad response: " + jSONObject);
} catch (JSONException e) {
if (n.a()) {
this.b.a("AppLovinFullscreenActivity", "Unable to process ad: " + str, e);
}
a();
}
}
/* renamed from: com.applovin.impl.adview.activity.a$a, reason: collision with other inner class name */
public class C0016a implements AppLovinAdLoadListener {
public C0016a() {
}
@Override // com.applovin.sdk.AppLovinAdLoadListener
public void adReceived(AppLovinAd appLovinAd) {
AppLovinFullscreenActivity appLovinFullscreenActivity = (AppLovinFullscreenActivity) a.this.c.get();
if (appLovinFullscreenActivity != null) {
n unused = a.this.b;
if (n.a()) {
a.this.b.a("AppLovinFullscreenActivity", "Presenting ad...");
}
b bVar = new b(a.this, null);
p9.a((com.applovin.impl.sdk.ad.b) appLovinAd, bVar, bVar, bVar, null, a.this.a, appLovinFullscreenActivity, new C0017a(appLovinFullscreenActivity, appLovinAd, bVar));
return;
}
n unused2 = a.this.b;
if (n.a()) {
a.this.b.b("AppLovinFullscreenActivity", "Unable to present ad, parent activity has been GC'd - " + appLovinAd);
}
}
@Override // com.applovin.sdk.AppLovinAdLoadListener
public void failedToReceiveAd(int i) {
a.this.a();
}
/* renamed from: com.applovin.impl.adview.activity.a$a$a, reason: collision with other inner class name */
public class C0017a implements p9.d {
final /* synthetic */ AppLovinFullscreenActivity a;
final /* synthetic */ AppLovinAd b;
final /* synthetic */ b c;
public C0017a(AppLovinFullscreenActivity appLovinFullscreenActivity, AppLovinAd appLovinAd, b bVar) {
this.a = appLovinFullscreenActivity;
this.b = appLovinAd;
this.c = bVar;
}
@Override // com.applovin.impl.p9.d
public void a(p9 p9Var) {
this.a.setPresenter(p9Var);
p9Var.y();
}
@Override // com.applovin.impl.p9.d
public void a(String str, Throwable th) {
tb.a((com.applovin.impl.sdk.ad.b) this.b, this.c, str, th, this.a);
}
}
}
}

View File

@@ -0,0 +1,295 @@
package com.applovin.impl.adview;
import android.content.Context;
import android.net.Uri;
import android.view.MotionEvent;
import android.view.View;
import android.webkit.WebSettings;
import com.applovin.impl.aq;
import com.applovin.impl.dq;
import com.applovin.impl.f0;
import com.applovin.impl.iq;
import com.applovin.impl.j3;
import com.applovin.impl.pi;
import com.applovin.impl.sdk.utils.StringUtils;
import com.applovin.impl.sj;
import com.applovin.impl.tr;
import com.applovin.impl.yp;
import com.applovin.impl.z3;
import com.unity3d.ads.adplayer.AndroidWebViewClient;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/* loaded from: classes.dex */
public class b extends j3 {
private final com.applovin.impl.sdk.n c;
private final com.applovin.impl.sdk.j d;
private com.applovin.impl.sdk.ad.b f;
private boolean g;
private boolean h;
private final List i;
private final Object j;
public b(com.applovin.impl.sdk.j jVar, Context context) {
super(context);
this.i = new ArrayList();
this.j = new Object();
if (jVar == null) {
throw new IllegalArgumentException("No sdk specified.");
}
this.d = jVar;
this.c = jVar.J();
setBackgroundColor(0);
WebSettings settings = getSettings();
settings.setSupportMultipleWindows(false);
settings.setJavaScriptEnabled(true);
setVerticalScrollBarEnabled(false);
setHorizontalScrollBarEnabled(false);
setScrollBarStyle(33554432);
if (z3.k() && ((Boolean) jVar.a(sj.W5)).booleanValue()) {
setWebViewRenderProcessClient(new d(jVar).a());
}
setOnTouchListener(new View.OnTouchListener() { // from class: com.applovin.impl.adview.b$$ExternalSyntheticLambda0
@Override // android.view.View.OnTouchListener
public final boolean onTouch(View view, MotionEvent motionEvent) {
boolean a;
a = b.a(view, motionEvent);
return a;
}
});
setOnLongClickListener(new View.OnLongClickListener() { // from class: com.applovin.impl.adview.b$$ExternalSyntheticLambda1
@Override // android.view.View.OnLongClickListener
public final boolean onLongClick(View view) {
boolean a;
a = b.this.a(view);
return a;
}
});
}
private void b() {
synchronized (this.j) {
try {
Iterator it = this.i.iterator();
while (it.hasNext()) {
tr.a(this, (String) it.next(), "AdWebView", this.d);
}
this.i.clear();
} catch (Throwable th) {
throw th;
}
}
}
@Override // android.webkit.WebView, android.view.View
public void computeScroll() {
}
public com.applovin.impl.sdk.ad.b getCurrentAd() {
return this.f;
}
@Override // android.webkit.WebView, android.view.View
public void onScrollChanged(int i, int i2, int i3, int i4) {
}
@Override // android.view.View
public void scrollTo(int i, int i2) {
}
@Override // android.webkit.WebView
public void destroy() {
this.g = true;
this.h = false;
super.destroy();
}
public void setAdHtmlLoaded(boolean z) {
this.h = z;
if (z && ((Boolean) this.d.a(sj.q6)).booleanValue()) {
b();
}
}
private void a(String str, String str2, String str3, com.applovin.impl.sdk.j jVar, aq aqVar) {
String a = a(str3, str);
if (StringUtils.isValidString(a)) {
if (com.applovin.impl.sdk.n.a()) {
this.c.a("AdWebView", "Rendering webview for VAST ad with resourceContents : " + a);
}
loadDataWithBaseURL(str2, a, "text/html", null, "");
return;
}
String a2 = a((String) jVar.a(sj.S4), str);
if (StringUtils.isValidString(a2)) {
if (aqVar.B1() && aqVar.isOpenMeasurementEnabled()) {
a2 = jVar.W().a(a2);
}
String str4 = a2;
if (com.applovin.impl.sdk.n.a()) {
this.c.a("AdWebView", "Rendering webview for VAST ad with resourceContents : " + str4);
}
loadDataWithBaseURL(str2, str4, "text/html", null, "");
return;
}
if (com.applovin.impl.sdk.n.a()) {
this.c.a("AdWebView", "Rendering webview for VAST ad with resourceURL : " + str);
}
loadUrl(str);
}
/* JADX INFO: Access modifiers changed from: private */
public static /* synthetic */ boolean a(View view, MotionEvent motionEvent) {
if (view.hasFocus()) {
return false;
}
view.requestFocus();
return false;
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ boolean a(View view) {
if (!com.applovin.impl.sdk.n.a()) {
return true;
}
this.c.a("AdWebView", "Received a LongClick event.");
return true;
}
public void a(c cVar) {
if (((Boolean) this.d.a(sj.H1)).booleanValue()) {
loadUrl(AndroidWebViewClient.BLANK_PAGE);
clearView();
}
setWebViewClient(cVar != null ? cVar : new pi());
setWebChromeClient(new f0(cVar != null ? cVar.c() : null, this.d));
synchronized (this.i) {
this.i.clear();
}
onResume();
}
public void a(com.applovin.impl.sdk.ad.b bVar) {
if (!this.g) {
this.f = bVar;
try {
applySettings(bVar);
if (yp.a(bVar.getSize())) {
setVisibility(0);
}
if (bVar instanceof com.applovin.impl.sdk.ad.a) {
loadDataWithBaseURL(bVar.g(), ((com.applovin.impl.sdk.ad.a) bVar).j1(), "text/html", null, "");
if (com.applovin.impl.sdk.n.a()) {
this.c.a("AdWebView", "AppLovinAd rendered");
return;
}
return;
}
if (bVar instanceof aq) {
aq aqVar = (aq) bVar;
dq j1 = aqVar.j1();
if (j1 != null) {
iq d = j1.d();
Uri b = d.b();
String uri = b != null ? b.toString() : "";
String a = d.a();
String l1 = aqVar.l1();
if (!StringUtils.isValidString(uri) && !StringUtils.isValidString(a)) {
if (com.applovin.impl.sdk.n.a()) {
this.c.b("AdWebView", "Unable to load companion ad. No resources provided.");
return;
}
return;
}
if (d.c() == iq.a.STATIC) {
if (com.applovin.impl.sdk.n.a()) {
this.c.a("AdWebView", "Rendering WebView for static VAST ad");
}
String a2 = a((String) this.d.a(sj.R4), uri);
if (aqVar.B1() && aqVar.isOpenMeasurementEnabled() && aqVar.C1()) {
a2 = this.d.W().a(a2);
}
loadDataWithBaseURL(bVar.g(), a2, "text/html", null, "");
return;
}
if (d.c() == iq.a.HTML) {
if (StringUtils.isValidString(a)) {
String a3 = a(l1, a);
String str = StringUtils.isValidString(a3) ? a3 : a;
if (com.applovin.impl.sdk.n.a()) {
this.c.a("AdWebView", "Rendering WebView for HTML VAST ad with resourceContents: " + str);
}
loadDataWithBaseURL(bVar.g(), str, "text/html", null, "");
return;
}
if (StringUtils.isValidString(uri)) {
if (com.applovin.impl.sdk.n.a()) {
this.c.a("AdWebView", "Preparing to load HTML VAST ad resourceUri");
}
a(uri, bVar.g(), l1, this.d, aqVar);
return;
}
return;
}
if (d.c() == iq.a.IFRAME) {
if (StringUtils.isValidString(uri)) {
if (com.applovin.impl.sdk.n.a()) {
this.c.a("AdWebView", "Preparing to load iFrame VAST ad resourceUri");
}
a(uri, bVar.g(), l1, this.d, aqVar);
return;
} else {
if (StringUtils.isValidString(a)) {
String a4 = a(l1, a);
String str2 = StringUtils.isValidString(a4) ? a4 : a;
if (com.applovin.impl.sdk.n.a()) {
this.c.a("AdWebView", "Rendering WebView for iFrame VAST ad with resourceContents: " + str2);
}
loadDataWithBaseURL(bVar.g(), str2, "text/html", null, "");
return;
}
return;
}
}
if (com.applovin.impl.sdk.n.a()) {
this.c.b("AdWebView", "Failed to render VAST companion ad of invalid type");
return;
}
return;
}
if (com.applovin.impl.sdk.n.a()) {
this.c.a("AdWebView", "No companion ad provided.");
return;
}
return;
}
return;
} catch (Throwable th) {
throw new RuntimeException("Unable to render AppLovin ad (" + (bVar != null ? String.valueOf(bVar.getAdIdNumber()) : "null") + ") - " + th);
}
}
com.applovin.impl.sdk.n.h("AdWebView", "Ad can not be loaded in a destroyed webview");
}
public void a(String str) {
if (!((Boolean) this.d.a(sj.q6)).booleanValue()) {
tr.a(this, str, "AdWebView", this.d);
} else {
if (this.h) {
tr.a(this, str, "AdWebView", this.d);
return;
}
synchronized (this.i) {
this.i.add(str);
}
}
}
private String a(String str, String str2) {
if (StringUtils.isValidString(str)) {
return str.replace("{SOURCE}", str2);
}
return null;
}
}

View File

@@ -0,0 +1,402 @@
package com.applovin.impl.adview;
import android.content.Intent;
import android.net.Uri;
import android.net.http.SslError;
import android.os.Bundle;
import android.view.MotionEvent;
import android.webkit.RenderProcessGoneDetail;
import android.webkit.SslErrorHandler;
import android.webkit.WebResourceError;
import android.webkit.WebResourceRequest;
import android.webkit.WebResourceResponse;
import android.webkit.WebView;
import com.applovin.adview.AppLovinAdView;
import com.applovin.impl.aq;
import com.applovin.impl.dq;
import com.applovin.impl.la;
import com.applovin.impl.ma;
import com.applovin.impl.mq;
import com.applovin.impl.pi;
import com.applovin.impl.sdk.AppLovinBroadcastManager;
import com.applovin.impl.sdk.utils.CollectionUtils;
import com.applovin.impl.sdk.utils.StringUtils;
import com.applovin.impl.sj;
import com.applovin.impl.tp;
import com.applovin.impl.yp;
import com.applovin.impl.z3;
import com.applovin.sdk.AppLovinAdSize;
import com.facebook.share.internal.ShareConstants;
import com.google.android.gms.measurement.AppMeasurement;
import com.ironsource.mediationsdk.utils.IronSourceConstants;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
/* loaded from: classes.dex */
public class c extends pi {
private final com.applovin.impl.sdk.j a;
private final com.applovin.impl.sdk.n b;
private final a c;
public c(a aVar, com.applovin.impl.sdk.j jVar) {
this.a = jVar;
this.b = jVar.J();
this.c = aVar;
}
private void b() {
this.c.a();
}
public a c() {
return this.c;
}
@Override // android.webkit.WebViewClient
public void onLoadResource(WebView webView, String str) {
super.onLoadResource(webView, str);
if (com.applovin.impl.sdk.n.a()) {
this.b.d("AdWebView", "Loaded resource: " + str);
}
}
@Override // android.webkit.WebViewClient
public void onPageFinished(WebView webView, String str) {
super.onPageFinished(webView, str);
if (com.applovin.impl.sdk.n.a()) {
this.b.d("AdWebView", "Loaded URL: " + str);
}
a aVar = this.c;
if (aVar != null) {
aVar.a(webView, str);
}
}
@Override // android.webkit.WebViewClient
public void onReceivedError(WebView webView, WebResourceRequest webResourceRequest, WebResourceError webResourceError) {
super.onReceivedError(webView, webResourceRequest, webResourceError);
onReceivedError(webView, webResourceError.getErrorCode(), webResourceError.getDescription().toString(), webResourceRequest.getUrl().toString());
}
@Override // android.webkit.WebViewClient
public void onReceivedHttpError(WebView webView, WebResourceRequest webResourceRequest, WebResourceResponse webResourceResponse) {
super.onReceivedHttpError(webView, webResourceRequest, webResourceResponse);
a aVar = this.c;
if (aVar != null) {
com.applovin.impl.sdk.ad.b i = aVar.i();
if (com.applovin.impl.sdk.n.a()) {
this.b.b("AdWebView", "Received HTTP error: " + webResourceResponse + "for url: " + webResourceRequest.getUrl() + " and ad: " + i);
}
}
if (yp.a(webResourceRequest.getUrl().toString(), this.a)) {
this.a.E().a("adWebViewReceivedHttpError", webResourceRequest.getUrl().toString(), webResourceResponse.getStatusCode());
}
}
@Override // android.webkit.WebViewClient
public void onReceivedSslError(WebView webView, SslErrorHandler sslErrorHandler, SslError sslError) {
super.onReceivedSslError(webView, sslErrorHandler, sslError);
a aVar = this.c;
if (aVar != null) {
com.applovin.impl.sdk.ad.b i = aVar.i();
String str = "Received SSL error: " + sslError;
if (com.applovin.impl.sdk.n.a()) {
this.b.b("AdWebView", str + " for ad: " + i);
}
}
}
@Override // com.applovin.impl.pi, android.webkit.WebViewClient
public boolean onRenderProcessGone(WebView webView, RenderProcessGoneDetail renderProcessGoneDetail) {
AppLovinBroadcastManager.sendBroadcast(new Intent("com.applovin.render_process_gone"), null);
if (this.c == null) {
return true;
}
com.applovin.impl.sdk.n.h("AdWebView", "Render process gone for ad: " + this.c.i() + ". Process did crash: " + renderProcessGoneDetail.didCrash());
com.applovin.impl.sdk.ad.b i = this.c.i();
if (i != null) {
Map a = ma.a(i);
CollectionUtils.putStringIfValid("top_main_method", "onRenderProcessGone", a);
if (z3.i()) {
a.put(ShareConstants.FEED_SOURCE_PARAM, renderProcessGoneDetail.didCrash() ? AppMeasurement.CRASH_ORIGIN : "non_crash");
}
this.a.E().a(la.U, a);
}
if (((Boolean) this.a.a(sj.S5)).booleanValue()) {
if (renderProcessGoneDetail.didCrash() && ((Boolean) this.a.a(sj.V5)).booleanValue()) {
throw new RuntimeException("Render process crashed. This is likely caused by a crash in an AppLovin ad with ID: " + (i != null ? String.valueOf(i.getAdIdNumber()) : "null"));
}
if (webView != null && webView.equals(this.c.g())) {
this.c.b();
AppLovinAdSize m = this.c.m();
if (yp.a(m)) {
this.c.a(m);
this.c.H();
}
}
}
return super.onRenderProcessGone(webView, renderProcessGoneDetail);
}
@Override // android.webkit.WebViewClient
public boolean shouldOverrideUrlLoading(WebView webView, WebResourceRequest webResourceRequest) {
Uri url = webResourceRequest.getUrl();
if (url != null) {
return a(webView, url.toString());
}
if (!com.applovin.impl.sdk.n.a()) {
return false;
}
this.b.b("AdWebView", "No url found for request");
return false;
}
@Override // android.webkit.WebViewClient
public void onReceivedError(WebView webView, int i, String str, String str2) {
super.onReceivedError(webView, i, str, str2);
a aVar = this.c;
if (aVar != null) {
com.applovin.impl.sdk.ad.b i2 = aVar.i();
String str3 = "Received error with error code: " + i + " with description \\'" + str + "\\' for URL: " + str2;
if (com.applovin.impl.sdk.n.a()) {
this.b.b("AdWebView", str3 + " for ad: " + i2);
}
}
if (yp.a(str2, this.a)) {
this.a.E().a("adWebViewReceivedError", str2, i);
}
}
@Override // android.webkit.WebViewClient
public boolean shouldOverrideUrlLoading(WebView webView, String str) {
return a(webView, str);
}
private void a(aq aqVar, b bVar) {
a(aqVar, bVar, (Bundle) null);
}
private void a(aq aqVar, b bVar, Bundle bundle) {
dq j1 = aqVar.j1();
if (j1 != null) {
mq.a(j1.a(), this.c.l());
a(bVar, j1.b(), bundle);
}
}
public boolean a(WebView webView, String str) {
boolean z;
if (this.c == null) {
return true;
}
if (com.applovin.impl.sdk.n.a()) {
this.b.d("AdWebView", "Processing click on ad URL \"" + str + "\"");
}
if (str != null && (webView instanceof b)) {
Uri parse = Uri.parse(str);
b bVar = (b) webView;
String scheme = parse.getScheme();
String host = parse.getHost();
String path = parse.getPath();
com.applovin.impl.sdk.ad.b i = this.c.i();
if (i == null) {
if (com.applovin.impl.sdk.n.a()) {
this.b.b("AdWebView", "Unable to process click, ad not found!");
}
return true;
}
Iterator it = i.d0().iterator();
while (true) {
if (!it.hasNext()) {
z = true;
break;
}
String str2 = (String) it.next();
if (StringUtils.isValidString(path) && path.contains(str2)) {
z = false;
break;
}
}
boolean a = bVar.a();
boolean z2 = (!i.Y0() || a) ? z : false;
if ("applovin".equals(scheme) && "com.applovin.sdk".equals(host)) {
if ("/adservice/close_ad".equals(path)) {
String str3 = this.a.g0().getExtraParameters().get("enable_close_URL_ad_value");
if (StringUtils.isValidString(str3) && Boolean.parseBoolean(str3)) {
i.setMaxAdValue("close_url", str);
}
a();
} else if ("/adservice/expand_ad".equals(path)) {
if (i.Z0() && !a) {
if (com.applovin.impl.sdk.n.a()) {
this.b.b("AdWebView", "Skipping expand command without user interaction");
}
return true;
}
a(bVar.getLastClickEvent());
} else if ("/adservice/contract_ad".equals(path)) {
b();
} else {
if ("/adservice/no_op".equals(path)) {
return true;
}
if ("/adservice/load_url".equals(path)) {
if (a(a, i, parse)) {
if (com.applovin.impl.sdk.n.a()) {
this.b.b("AdWebView", "Skipping URL load command without user interaction");
}
return true;
}
tp.a(parse, this.c, this.a);
} else if ("/adservice/track_click_now".equals(path)) {
if (a(a, i, parse)) {
if (com.applovin.impl.sdk.n.a()) {
this.b.b("AdWebView", "Skipping click tracking command without user interaction");
}
return true;
}
if (i instanceof aq) {
a((aq) i, bVar);
} else {
a(bVar, Uri.parse("/adservice/track_click_now"));
}
} else if ("/adservice/deeplink".equals(path)) {
if (a(a, i, parse)) {
if (com.applovin.impl.sdk.n.a()) {
this.b.b("AdWebView", "Skipping deep link plus command without user interaction");
}
return true;
}
if (i instanceof aq) {
aq aqVar = (aq) i;
if (aqVar.A1()) {
a(aqVar, bVar);
}
}
a(bVar, parse);
} else if ("/adservice/postback".equals(path)) {
tp.a(parse, i, this.a);
} else if ("/ga_init".equals(path)) {
this.c.b(parse);
} else if ("/ga_event".equals(path)) {
this.c.a(parse);
} else if ("/playable_event".equals(path)) {
a(parse);
} else if ("/adservice/direct_download".equals(path)) {
Bundle a2 = tp.a(parse);
if (i instanceof aq) {
aq aqVar2 = (aq) i;
if (aqVar2.A1()) {
a(aqVar2, bVar, a2);
}
}
a(bVar, i.i(), a2);
} else if ("/template_error".equals(path)) {
tp.b(parse, i, this.a);
} else if (this.c.h() != null) {
if ("/video_began".equals(path)) {
this.c.h().b(yp.a(parse.getQueryParameter(IronSourceConstants.EVENTS_DURATION), 0.0d));
} else if ("/video_completed".equals(path)) {
this.c.h().e();
} else if ("/video_progress".equals(path)) {
this.c.h().a(yp.a(parse.getQueryParameter("percent_viewed"), 0.0d));
} else if ("/video_waiting".equals(path)) {
this.c.h().a();
} else if ("/video_resumed".equals(path)) {
this.c.h().d();
}
} else if ("/adservice/fully_watched".equals(path)) {
this.c.A();
} else {
if (com.applovin.impl.sdk.n.a()) {
this.b.k("AdWebView", "Unknown URL: " + str);
}
if (com.applovin.impl.sdk.n.a()) {
this.b.k("AdWebView", "Path: " + path);
}
}
}
} else if (z2) {
List x0 = i.x0();
List w0 = i.w0();
if ((!x0.isEmpty() && !x0.contains(scheme)) || (!w0.isEmpty() && !w0.contains(host))) {
if (com.applovin.impl.sdk.n.a()) {
this.b.b("AdWebView", "URL is not whitelisted - bypassing click");
}
} else {
if (i instanceof aq) {
aq aqVar3 = (aq) i;
if (aqVar3.A1()) {
a(aqVar3, bVar);
if (!a && i.f1()) {
this.a.E().a(la.E, a(i, parse));
}
}
}
a(bVar, parse);
if (!a) {
this.a.E().a(la.E, a(i, parse));
}
}
}
}
return true;
}
private boolean a(boolean z, com.applovin.impl.sdk.ad.b bVar, Uri uri) {
if (z) {
return false;
}
if (bVar.Z0()) {
return true;
}
if (bVar.f1()) {
this.a.E().a(la.E, a(bVar, uri));
}
return false;
}
private static Map a(com.applovin.impl.sdk.ad.b bVar, Uri uri) {
Map a = ma.a(bVar);
CollectionUtils.putStringIfValid("url", uri.toString(), a);
return a;
}
private void a() {
this.c.z();
}
private void a(MotionEvent motionEvent) {
this.c.a(motionEvent);
}
private void a(b bVar, Uri uri) {
a(bVar, uri, (Bundle) null);
}
private void a(b bVar, Uri uri, Bundle bundle) {
com.applovin.impl.sdk.ad.b currentAd = bVar.getCurrentAd();
AppLovinAdView k = this.c.k();
if (k != null && currentAd != null) {
if (currentAd instanceof aq) {
((aq) currentAd).getAdEventTracker().v();
}
this.c.a(currentAd, k, uri, bVar.getAndClearLastClickEvent(), bundle);
} else if (com.applovin.impl.sdk.n.a()) {
this.b.b("AdWebView", "Attempting to track click that is null or not an ApplovinAdView instance for clickedUri = " + uri);
}
}
private void a(Uri uri) {
String str;
boolean booleanQueryParameter = uri.getBooleanQueryParameter("success", false);
String queryParameter = uri.getQueryParameter("type");
if (booleanQueryParameter) {
str = "Tracked event: " + queryParameter;
} else {
str = "Failed to track event: " + queryParameter;
}
yp.a(str, com.applovin.impl.sdk.j.l());
}
}

View File

@@ -0,0 +1,37 @@
package com.applovin.impl.adview;
import android.webkit.WebView;
import android.webkit.WebViewRenderProcess;
import android.webkit.WebViewRenderProcessClient;
/* loaded from: classes.dex */
class d {
private final com.applovin.impl.sdk.j a;
private final WebViewRenderProcessClient b = new a();
public class a extends WebViewRenderProcessClient {
public a() {
}
public void onRenderProcessResponsive(WebView webView, WebViewRenderProcess webViewRenderProcess) {
}
public void onRenderProcessUnresponsive(WebView webView, WebViewRenderProcess webViewRenderProcess) {
if (webView instanceof b) {
com.applovin.impl.sdk.ad.b currentAd = ((b) webView).getCurrentAd();
d.this.a.J();
if (com.applovin.impl.sdk.n.a()) {
d.this.a.J().b("AdWebViewRenderProcessClient", "WebView render process unresponsive for ad: " + currentAd);
}
}
}
}
public d(com.applovin.impl.sdk.j jVar) {
this.a = jVar;
}
public WebViewRenderProcessClient a() {
return this.b;
}
}

View File

@@ -0,0 +1,66 @@
package com.applovin.impl.adview;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
/* loaded from: classes.dex */
public abstract class e extends View {
protected float a;
protected final Context b;
public enum a {
WHITE_ON_BLACK(0),
WHITE_ON_TRANSPARENT(1),
INVISIBLE(2),
TRANSPARENT_SKIP(3);
private final int a;
a(int i) {
this.a = i;
}
public int b() {
return this.a;
}
}
public e(Context context) {
super(context);
this.a = 1.0f;
this.b = context;
}
public void a(int i) {
setViewScale(i / 30.0f);
ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams != null) {
layoutParams.width = (int) getSize();
layoutParams.height = (int) getSize();
}
}
public float getSize() {
return this.a * 30.0f;
}
public abstract a getStyle();
public void setViewScale(float f) {
this.a = f;
}
public static e a(a aVar, Context context) {
if (aVar.equals(a.INVISIBLE)) {
return new h(context);
}
if (aVar.equals(a.WHITE_ON_TRANSPARENT)) {
return new i(context);
}
if (aVar.equals(a.TRANSPARENT_SKIP)) {
return new j(context);
}
return new n(context);
}
}

View File

@@ -0,0 +1,235 @@
package com.applovin.impl.adview;
import android.R;
import android.app.Activity;
import android.app.Dialog;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.widget.RelativeLayout;
import com.applovin.impl.adview.e;
import com.applovin.impl.sj;
import com.applovin.impl.t6;
import com.applovin.sdk.AppLovinSdkUtils;
/* loaded from: classes.dex */
class f extends Dialog implements t6 {
private final Activity a;
private final com.applovin.impl.sdk.j b;
private final com.applovin.impl.sdk.n c;
private final b d;
private final com.applovin.impl.sdk.ad.a f;
private RelativeLayout g;
private e h;
public class a implements Animation.AnimationListener {
public a() {
}
@Override // android.view.animation.Animation.AnimationListener
public void onAnimationEnd(Animation animation) {
f.this.h.setClickable(true);
}
@Override // android.view.animation.Animation.AnimationListener
public void onAnimationRepeat(Animation animation) {
}
@Override // android.view.animation.Animation.AnimationListener
public void onAnimationStart(Animation animation) {
}
}
public f(com.applovin.impl.sdk.ad.a aVar, b bVar, Activity activity, com.applovin.impl.sdk.j jVar) {
super(activity, R.style.Theme.Translucent.NoTitleBar);
if (aVar == null) {
throw new IllegalArgumentException("No ad specified");
}
if (bVar == null) {
throw new IllegalArgumentException("No main view specified");
}
if (jVar == null) {
throw new IllegalArgumentException("No sdk specified");
}
if (activity == null) {
throw new IllegalArgumentException("No activity specified");
}
this.b = jVar;
this.c = jVar.J();
this.a = activity;
this.d = bVar;
this.f = aVar;
requestWindowFeature(1);
setCancelable(false);
}
private void d() {
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-1, -1);
layoutParams.addRule(13);
this.d.setLayoutParams(layoutParams);
RelativeLayout relativeLayout = new RelativeLayout(this.a);
this.g = relativeLayout;
relativeLayout.setLayoutParams(new RelativeLayout.LayoutParams(-1, -1));
this.g.setBackgroundColor(-1157627904);
this.g.addView(this.d);
if (!this.f.p1()) {
a(this.f.i1());
g();
}
setContentView(this.g);
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void e() {
this.g.removeView(this.d);
super.dismiss();
}
private void g() {
this.a.runOnUiThread(new Runnable() { // from class: com.applovin.impl.adview.f$$ExternalSyntheticLambda2
@Override // java.lang.Runnable
public final void run() {
f.this.f();
}
});
}
public com.applovin.impl.sdk.ad.a b() {
return this.f;
}
public b c() {
return this.d;
}
@Override // android.app.Dialog, android.content.DialogInterface, com.applovin.impl.t6
public void dismiss() {
this.a.runOnUiThread(new Runnable() { // from class: com.applovin.impl.adview.f$$ExternalSyntheticLambda3
@Override // java.lang.Runnable
public final void run() {
f.this.e();
}
});
}
@Override // android.app.Dialog
public void onBackPressed() {
this.d.a("javascript:al_onBackPressed();");
dismiss();
}
@Override // android.app.Dialog
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
d();
}
@Override // android.app.Dialog
public void onStart() {
super.onStart();
try {
Window window = getWindow();
if (window != null) {
window.setFlags(this.a.getWindow().getAttributes().flags, this.a.getWindow().getAttributes().flags);
window.addFlags(16777216);
} else if (com.applovin.impl.sdk.n.a()) {
this.c.b("ExpandedAdDialog", "Unable to turn on hardware acceleration - window is null");
}
} catch (Throwable th) {
if (com.applovin.impl.sdk.n.a()) {
this.c.a("ExpandedAdDialog", "Setting window flags failed.", th);
}
}
}
private void a() {
this.d.a("javascript:al_onCloseTapped();");
dismiss();
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void b(View view) {
if (this.h.isClickable()) {
this.h.performClick();
}
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void f() {
try {
if (this.h == null) {
a();
}
this.h.setVisibility(0);
this.h.bringToFront();
AlphaAnimation alphaAnimation = new AlphaAnimation(0.0f, 1.0f);
alphaAnimation.setDuration(300L);
alphaAnimation.setAnimationListener(new a());
this.h.startAnimation(alphaAnimation);
} catch (Throwable th) {
if (com.applovin.impl.sdk.n.a()) {
this.c.a("ExpandedAdDialog", "Unable to fade in close button", th);
}
a();
}
}
private void a(e.a aVar) {
if (this.h != null) {
if (com.applovin.impl.sdk.n.a()) {
this.c.k("ExpandedAdDialog", "Attempting to create duplicate close button");
return;
}
return;
}
e a2 = e.a(aVar, this.a);
this.h = a2;
a2.setVisibility(8);
this.h.setOnClickListener(new View.OnClickListener() { // from class: com.applovin.impl.adview.f$$ExternalSyntheticLambda0
@Override // android.view.View.OnClickListener
public final void onClick(View view) {
f.this.a(view);
}
});
this.h.setClickable(false);
int a3 = a(((Integer) this.b.a(sj.V1)).intValue());
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(a3, a3);
layoutParams.addRule(10);
com.applovin.impl.sdk.j jVar = this.b;
sj sjVar = sj.Y1;
layoutParams.addRule(((Boolean) jVar.a(sjVar)).booleanValue() ? 9 : 11);
this.h.a(a3);
int a4 = a(((Integer) this.b.a(sj.X1)).intValue());
int a5 = a(((Integer) this.b.a(sj.W1)).intValue());
layoutParams.setMargins(a5, a4, a5, 0);
this.g.addView(this.h, layoutParams);
this.h.bringToFront();
int a6 = a(((Integer) this.b.a(sj.Z1)).intValue());
View view = new View(this.a);
view.setBackgroundColor(0);
int i = a3 + a6;
RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(i, i);
layoutParams2.addRule(10);
layoutParams2.addRule(((Boolean) this.b.a(sjVar)).booleanValue() ? 9 : 11);
layoutParams2.setMargins(a5 - a(5), a4 - a(5), a5 - a(5), 0);
view.setOnClickListener(new View.OnClickListener() { // from class: com.applovin.impl.adview.f$$ExternalSyntheticLambda1
@Override // android.view.View.OnClickListener
public final void onClick(View view2) {
f.this.b(view2);
}
});
this.g.addView(view, layoutParams2);
view.bringToFront();
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void a(View view) {
a();
}
private int a(int i) {
return AppLovinSdkUtils.dpToPx(this.a, i);
}
}

View File

@@ -0,0 +1,49 @@
package com.applovin.impl.adview;
import android.app.Activity;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import com.applovin.impl.adview.e;
/* loaded from: classes.dex */
public class g extends FrameLayout {
private e a;
private int b;
public g(e.a aVar, Activity activity) {
super(activity);
setBackgroundColor(0);
e a = e.a(aVar, activity);
this.a = a;
addView(a);
}
public void a(e.a aVar) {
if (aVar == null || aVar == this.a.getStyle()) {
return;
}
ViewGroup.LayoutParams layoutParams = this.a.getLayoutParams();
removeView(this.a);
e a = e.a(aVar, getContext());
this.a = a;
addView(a);
this.a.setLayoutParams(layoutParams);
this.a.a(this.b);
}
public void a(int i, int i2, int i3, int i4) {
this.b = i;
int i5 = i2 + i + i3;
ViewGroup.LayoutParams layoutParams = getLayoutParams();
if (layoutParams != null) {
layoutParams.height = i5;
layoutParams.width = i5;
} else {
setLayoutParams(new FrameLayout.LayoutParams(i5, i5));
}
FrameLayout.LayoutParams layoutParams2 = new FrameLayout.LayoutParams(i, i, i4);
layoutParams2.setMargins(i3, i3, i3, 0);
this.a.setLayoutParams(layoutParams2);
this.a.a(i);
}
}

View File

@@ -0,0 +1,21 @@
package com.applovin.impl.adview;
import android.content.Context;
import com.applovin.impl.adview.e;
/* loaded from: classes.dex */
public final class h extends e {
public h(Context context) {
super(context);
}
@Override // com.applovin.impl.adview.e
public void a(int i) {
setViewScale(i / 30.0f);
}
@Override // com.applovin.impl.adview.e
public e.a getStyle() {
return e.a.INVISIBLE;
}
}

View File

@@ -0,0 +1,55 @@
package com.applovin.impl.adview;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import com.applovin.impl.adview.e;
/* loaded from: classes.dex */
public final class i extends e {
private static final Paint c = new Paint(1);
private static final Paint d = new Paint(1);
public i(Context context) {
super(context);
c.setARGB(80, 0, 0, 0);
Paint paint = d;
paint.setColor(-1);
paint.setStyle(Paint.Style.STROKE);
}
@Override // com.applovin.impl.adview.e
public void a(int i) {
setViewScale(i / 30.0f);
}
public float getCenter() {
return getSize() / 2.0f;
}
public float getCrossOffset() {
return this.a * 8.0f;
}
public float getStrokeWidth() {
return this.a * 2.0f;
}
@Override // com.applovin.impl.adview.e
public e.a getStyle() {
return e.a.WHITE_ON_TRANSPARENT;
}
@Override // android.view.View
public void onDraw(Canvas canvas) {
super.onDraw(canvas);
float center = getCenter();
canvas.drawCircle(center, center, center, c);
float crossOffset = getCrossOffset();
float size = getSize() - crossOffset;
Paint paint = d;
paint.setStrokeWidth(getStrokeWidth());
canvas.drawLine(crossOffset, crossOffset, size, size, paint);
canvas.drawLine(crossOffset, size, size, crossOffset, paint);
}
}

View File

@@ -0,0 +1,85 @@
package com.applovin.impl.adview;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Path;
import com.applovin.impl.adview.e;
/* loaded from: classes.dex */
public final class j extends e {
private static final Paint f = new Paint(1);
private static final Paint g = new Paint(1);
private final float[] c;
private Path d;
public j(Context context) {
super(context);
this.c = new float[]{30.0f, 30.0f, 50.0f, 50.0f, 30.0f, 70.0f, 55.0f, 30.0f, 75.0f, 50.0f, 55.0f, 70.0f};
f.setARGB(80, 0, 0, 0);
Paint paint = g;
paint.setColor(-1);
paint.setStyle(Paint.Style.STROKE);
}
@Override // com.applovin.impl.adview.e
public void a(int i) {
setViewScale(i / 30.0f);
a();
}
public float getCenter() {
return getSize() / 2.0f;
}
public float getStrokeWidth() {
return this.a * 2.0f;
}
@Override // com.applovin.impl.adview.e
public e.a getStyle() {
return e.a.TRANSPARENT_SKIP;
}
@Override // android.view.View
public void onDraw(Canvas canvas) {
super.onDraw(canvas);
float center = getCenter();
canvas.drawCircle(center, center, center, f);
Paint paint = g;
paint.setStrokeWidth(getStrokeWidth());
canvas.drawPath(this.d, paint);
}
private void a() {
int i = 0;
while (true) {
float[] fArr = this.c;
if (i < fArr.length) {
fArr[i] = fArr[i] * 0.3f * this.a;
i++;
} else {
Path path = new Path();
this.d = path;
float[] fArr2 = this.c;
path.moveTo(fArr2[0], fArr2[1]);
Path path2 = this.d;
float[] fArr3 = this.c;
path2.lineTo(fArr3[2], fArr3[3]);
Path path3 = this.d;
float[] fArr4 = this.c;
path3.lineTo(fArr4[4], fArr4[5]);
Path path4 = this.d;
float[] fArr5 = this.c;
path4.moveTo(fArr5[6], fArr5[7]);
Path path5 = this.d;
float[] fArr6 = this.c;
path5.lineTo(fArr6[8], fArr6[9]);
Path path6 = this.d;
float[] fArr7 = this.c;
path6.lineTo(fArr7[10], fArr7[11]);
return;
}
}
}
}

View File

@@ -0,0 +1,59 @@
package com.applovin.impl.adview;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.View;
import com.applovin.impl.ea;
/* loaded from: classes.dex */
public class k extends View {
private final ea a;
private boolean b;
public interface a {
void a();
void onFailure();
}
public boolean a() {
return this.b;
}
public void b() {
a(null);
}
public String getIdentifier() {
return this.a.b();
}
public void a(a aVar) {
if (this.b) {
if (aVar != null) {
aVar.a();
return;
}
return;
}
Drawable a2 = this.a.a();
if (a2 == null) {
if (aVar != null) {
aVar.onFailure();
}
} else {
setBackground(a2);
this.b = true;
if (aVar != null) {
aVar.a();
}
}
}
public k(ea eaVar, Context context) {
super(context);
this.a = eaVar;
setClickable(false);
setFocusable(false);
}
}

View File

@@ -0,0 +1,40 @@
package com.applovin.impl.adview;
import android.content.Context;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import com.applovin.impl.j3;
import com.applovin.impl.rr;
import com.applovin.impl.z3;
/* loaded from: classes.dex */
public class l extends j3 {
private final String c;
public void a(String str) {
loadDataWithBaseURL(this.c, str, "text/html", null, "");
}
public l(String str, com.applovin.impl.sdk.ad.b bVar, rr rrVar, Context context) {
super(context);
this.c = str;
setBackgroundColor(0);
WebSettings settings = getSettings();
settings.setSupportMultipleWindows(false);
settings.setJavaScriptEnabled(true);
if (bVar.N0()) {
applySettings(bVar);
} else {
settings.setAllowFileAccess(true);
if (z3.e() && bVar.J0()) {
WebView.setWebContentsDebuggingEnabled(true);
}
}
setWebViewClient(rrVar);
setWebChromeClient(new WebChromeClient());
setVerticalScrollBarEnabled(false);
setHorizontalScrollBarEnabled(false);
setScrollBarStyle(33554432);
}
}

View File

@@ -0,0 +1,108 @@
package com.applovin.impl.adview;
import android.webkit.WebSettings;
import com.applovin.impl.sdk.utils.JsonUtils;
import com.applovin.impl.sdk.utils.StringUtils;
import com.tapjoy.TJAdUnitConstants;
import org.json.JSONObject;
/* loaded from: classes.dex */
public final class m {
private final JSONObject a;
public m(JSONObject jSONObject) {
this.a = jSONObject;
}
public Integer a() {
String string = JsonUtils.getString(this.a, "mixed_content_mode", null);
if (StringUtils.isValidString(string)) {
if ("always_allow".equalsIgnoreCase(string)) {
return 0;
}
if ("never_allow".equalsIgnoreCase(string)) {
return 1;
}
if ("compatibility_mode".equalsIgnoreCase(string)) {
return 2;
}
}
return null;
}
public WebSettings.PluginState b() {
String string = JsonUtils.getString(this.a, "plugin_state", null);
if (StringUtils.isValidString(string)) {
if (TJAdUnitConstants.String.SPLIT_VIEW_TRIGGER_ON.equalsIgnoreCase(string)) {
return WebSettings.PluginState.ON;
}
if ("on_demand".equalsIgnoreCase(string)) {
return WebSettings.PluginState.ON_DEMAND;
}
if ("off".equalsIgnoreCase(string)) {
return WebSettings.PluginState.OFF;
}
}
return null;
}
public Boolean c() {
return JsonUtils.getBoolean(this.a, "geolocation_enabled", null);
}
public Boolean d() {
return JsonUtils.getBoolean(this.a, "allow_content_access", null);
}
public Boolean e() {
return JsonUtils.getBoolean(this.a, "allow_file_access", null);
}
public Boolean f() {
return JsonUtils.getBoolean(this.a, "allow_file_access_from_file_urls", null);
}
public Boolean g() {
return JsonUtils.getBoolean(this.a, "allow_universal_access_from_file_urls", null);
}
public Boolean h() {
return JsonUtils.getBoolean(this.a, "display_zoom_controls", null);
}
public Boolean i() {
return JsonUtils.getBoolean(this.a, "load_with_overview_mode", null);
}
public Boolean j() {
return JsonUtils.getBoolean(this.a, "need_initial_focus", null);
}
public Boolean k() {
return JsonUtils.getBoolean(this.a, "offscreen_pre_raster", null);
}
public Boolean l() {
return JsonUtils.getBoolean(this.a, "save_form_data", null);
}
public Boolean m() {
return JsonUtils.getBoolean(this.a, "algorithmic_darkening_allowed", null);
}
public Boolean n() {
return JsonUtils.getBoolean(this.a, "block_network_image", null);
}
public Boolean o() {
return JsonUtils.getBoolean(this.a, "loads_images_automatically", null);
}
public Boolean p() {
return JsonUtils.getBoolean(this.a, "use_built_in_zoom_controls", null);
}
public Boolean q() {
return JsonUtils.getBoolean(this.a, "use_wide_view_port", null);
}
}

View File

@@ -0,0 +1,62 @@
package com.applovin.impl.adview;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import androidx.core.view.ViewCompat;
import com.applovin.impl.adview.e;
/* loaded from: classes.dex */
public final class n extends e {
private static final Paint c = new Paint(1);
private static final Paint d = new Paint(1);
private static final Paint f = new Paint(1);
public n(Context context) {
super(context);
c.setColor(-1);
d.setColor(ViewCompat.MEASURED_STATE_MASK);
Paint paint = f;
paint.setColor(-1);
paint.setStyle(Paint.Style.STROKE);
}
public float getCenter() {
return getSize() / 2.0f;
}
public float getCrossOffset() {
return this.a * 10.0f;
}
public float getInnerCircleOffset() {
return this.a * 2.0f;
}
public float getInnerCircleRadius() {
return getCenter() - getInnerCircleOffset();
}
public float getStrokeWidth() {
return this.a * 3.0f;
}
@Override // com.applovin.impl.adview.e
public e.a getStyle() {
return e.a.WHITE_ON_BLACK;
}
@Override // android.view.View
public void onDraw(Canvas canvas) {
super.onDraw(canvas);
float center = getCenter();
canvas.drawCircle(center, center, center, c);
canvas.drawCircle(center, center, getInnerCircleRadius(), d);
float crossOffset = getCrossOffset();
float size = getSize() - crossOffset;
Paint paint = f;
paint.setStrokeWidth(getStrokeWidth());
canvas.drawLine(crossOffset, crossOffset, size, size, paint);
canvas.drawLine(crossOffset, size, size, crossOffset, paint);
}
}

View File

@@ -0,0 +1,555 @@
package com.applovin.impl;
import android.os.Handler;
import android.util.Pair;
import com.applovin.impl.be;
import com.applovin.impl.eb;
import com.applovin.impl.fo;
import com.mbridge.msdk.playercommon.exoplayer2.C;
/* loaded from: classes.dex */
final class ae {
private final fo.b a = new fo.b();
private final fo.d b = new fo.d();
private final r0 c;
private final Handler d;
private long e;
private int f;
private boolean g;
private xd h;
private xd i;
private xd j;
private int k;
private Object l;
private long m;
private boolean a(long j, long j2) {
return j == C.TIME_UNSET || j == j2;
}
public xd d() {
return this.j;
}
public xd e() {
return this.h;
}
public xd f() {
return this.i;
}
public ae(r0 r0Var, Handler handler) {
this.c = r0Var;
this.d = handler;
}
public boolean h() {
xd xdVar = this.j;
return xdVar == null || (!xdVar.f.i && xdVar.j() && this.j.f.e != C.TIME_UNSET && this.k < 100);
}
public xd b() {
xd xdVar = this.i;
b1.b((xdVar == null || xdVar.d() == null) ? false : true);
this.i = this.i.d();
g();
return this.i;
}
public xd a() {
xd xdVar = this.h;
if (xdVar == null) {
return null;
}
if (xdVar == this.i) {
this.i = xdVar.d();
}
this.h.l();
int i = this.k - 1;
this.k = i;
if (i == 0) {
this.j = null;
xd xdVar2 = this.h;
this.l = xdVar2.b;
this.m = xdVar2.f.a.d;
}
this.h = this.h.d();
g();
return this.h;
}
public void c() {
if (this.k == 0) {
return;
}
xd xdVar = (xd) b1.b(this.h);
this.l = xdVar.b;
this.m = xdVar.f.a.d;
while (xdVar != null) {
xdVar.l();
xdVar = xdVar.d();
}
this.h = null;
this.j = null;
this.i = null;
this.k = 0;
g();
}
private void g() {
if (this.c != null) {
final eb.a f = eb.f();
for (xd xdVar = this.h; xdVar != null; xdVar = xdVar.d()) {
f.b(xdVar.f.a);
}
xd xdVar2 = this.i;
final be.a aVar = xdVar2 == null ? null : xdVar2.f.a;
this.d.post(new Runnable() { // from class: com.applovin.impl.ae$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
ae.this.a(f, aVar);
}
});
}
}
private boolean a(zd zdVar, zd zdVar2) {
return zdVar.b == zdVar2.b && zdVar.a.equals(zdVar2.a);
}
/* JADX WARN: Code restructure failed: missing block: B:6:0x0018, code lost:
if (r1 != com.mbridge.msdk.playercommon.exoplayer2.C.TIME_UNSET) goto L8;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public com.applovin.impl.xd a(com.applovin.impl.ri[] r12, com.applovin.impl.vo r13, com.applovin.impl.n0 r14, com.applovin.impl.fe r15, com.applovin.impl.zd r16, com.applovin.impl.wo r17) {
/*
r11 = this;
r0 = r11
r8 = r16
com.applovin.impl.xd r1 = r0.j
if (r1 != 0) goto L1f
com.applovin.impl.be$a r1 = r8.a
boolean r1 = r1.a()
if (r1 == 0) goto L1c
long r1 = r8.c
r3 = -9223372036854775807(0x8000000000000001, double:-4.9E-324)
int r3 = (r1 > r3 ? 1 : (r1 == r3 ? 0 : -1))
if (r3 == 0) goto L1c
L1a:
r3 = r1
goto L2e
L1c:
r1 = 0
goto L1a
L1f:
long r1 = r1.f()
com.applovin.impl.xd r3 = r0.j
com.applovin.impl.zd r3 = r3.f
long r3 = r3.e
long r1 = r1 + r3
long r3 = r8.b
long r1 = r1 - r3
goto L1a
L2e:
com.applovin.impl.xd r10 = new com.applovin.impl.xd
r1 = r10
r2 = r12
r5 = r13
r6 = r14
r7 = r15
r8 = r16
r9 = r17
r1.<init>(r2, r3, r5, r6, r7, r8, r9)
com.applovin.impl.xd r1 = r0.j
if (r1 == 0) goto L44
r1.a(r10)
goto L48
L44:
r0.h = r10
r0.i = r10
L48:
r1 = 0
r0.l = r1
r0.j = r10
int r1 = r0.k
int r1 = r1 + 1
r0.k = r1
r11.g()
return r10
*/
throw new UnsupportedOperationException("Method not decompiled: com.applovin.impl.ae.a(com.applovin.impl.ri[], com.applovin.impl.vo, com.applovin.impl.n0, com.applovin.impl.fe, com.applovin.impl.zd, com.applovin.impl.wo):com.applovin.impl.xd");
}
private zd a(oh ohVar) {
return a(ohVar.a, ohVar.b, ohVar.c, ohVar.s);
}
private zd a(fo foVar, xd xdVar, long j) {
long j2;
zd zdVar = xdVar.f;
long f = (xdVar.f() + zdVar.e) - j;
if (zdVar.g) {
long j3 = 0;
int a = foVar.a(foVar.a(zdVar.a.a), this.a, this.b, this.f, this.g);
if (a == -1) {
return null;
}
int i = foVar.a(a, this.a, true).c;
Object obj = this.a.b;
long j4 = zdVar.a.d;
if (foVar.a(i, this.b).p == a) {
Pair a2 = foVar.a(this.b, this.a, i, C.TIME_UNSET, Math.max(0L, f));
if (a2 == null) {
return null;
}
obj = a2.first;
long longValue = ((Long) a2.second).longValue();
xd d = xdVar.d();
if (d == null || !d.b.equals(obj)) {
j4 = this.e;
this.e = 1 + j4;
} else {
j4 = d.f.a.d;
}
j2 = longValue;
j3 = C.TIME_UNSET;
} else {
j2 = 0;
}
return a(foVar, a(foVar, obj, j2, j4, this.a), j3, j2);
}
be.a aVar = zdVar.a;
foVar.a(aVar.a, this.a);
if (aVar.a()) {
int i2 = aVar.b;
int a3 = this.a.a(i2);
if (a3 == -1) {
return null;
}
int b = this.a.b(i2, aVar.c);
if (b < a3) {
return a(foVar, aVar.a, i2, b, zdVar.c, aVar.d);
}
long j5 = zdVar.c;
if (j5 == C.TIME_UNSET) {
fo.d dVar = this.b;
fo.b bVar = this.a;
Pair a4 = foVar.a(dVar, bVar, bVar.c, C.TIME_UNSET, Math.max(0L, f));
if (a4 == null) {
return null;
}
j5 = ((Long) a4.second).longValue();
}
return a(foVar, aVar.a, Math.max(a(foVar, aVar.a, aVar.b), j5), zdVar.c, aVar.d);
}
int d2 = this.a.d(aVar.e);
if (d2 == this.a.a(aVar.e)) {
return a(foVar, aVar.a, a(foVar, aVar.a, aVar.e), zdVar.e, aVar.d);
}
return a(foVar, aVar.a, aVar.e, d2, zdVar.e, aVar.d);
}
private zd a(fo foVar, be.a aVar, long j, long j2) {
foVar.a(aVar.a, this.a);
if (aVar.a()) {
return a(foVar, aVar.a, aVar.b, aVar.c, j, aVar.d);
}
return a(foVar, aVar.a, j2, j, aVar.d);
}
private zd a(fo foVar, Object obj, int i, int i2, long j, long j2) {
be.a aVar = new be.a(obj, i, i2, j2);
long a = foVar.a(aVar.a, this.a).a(aVar.b, aVar.c);
long b = i2 == this.a.d(i) ? this.a.b() : 0L;
return new zd(aVar, (a == C.TIME_UNSET || b < a) ? b : Math.max(0L, a - 1), j, C.TIME_UNSET, a, this.a.f(aVar.b), false, false, false);
}
private zd a(fo foVar, Object obj, long j, long j2, long j3) {
long j4 = j;
foVar.a(obj, this.a);
int a = this.a.a(j4);
be.a aVar = new be.a(obj, j3, a);
boolean a2 = a(aVar);
boolean a3 = a(foVar, aVar);
boolean a4 = a(foVar, aVar, a2);
boolean z = a != -1 && this.a.f(a);
long b = a != -1 ? this.a.b(a) : -9223372036854775807L;
long j5 = (b == C.TIME_UNSET || b == Long.MIN_VALUE) ? this.a.d : b;
if (j5 != C.TIME_UNSET && j4 >= j5) {
j4 = Math.max(0L, j5 - 1);
}
return new zd(aVar, j4, j2, b, j5, z, a2, a3, a4);
}
private long a(fo foVar, Object obj, int i) {
foVar.a(obj, this.a);
long b = this.a.b(i);
if (b == Long.MIN_VALUE) {
return this.a.d;
}
return b + this.a.c(i);
}
public zd a(long j, oh ohVar) {
xd xdVar = this.j;
if (xdVar == null) {
return a(ohVar);
}
return a(ohVar.a, xdVar, j);
}
/* JADX WARN: Removed duplicated region for block: B:12:0x0062 */
/* JADX WARN: Removed duplicated region for block: B:17:0x006c */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public com.applovin.impl.zd a(com.applovin.impl.fo r19, com.applovin.impl.zd r20) {
/*
r18 = this;
r0 = r18
r1 = r19
r2 = r20
com.applovin.impl.be$a r3 = r2.a
boolean r12 = r0.a(r3)
boolean r13 = r0.a(r1, r3)
boolean r14 = r0.a(r1, r3, r12)
com.applovin.impl.be$a r4 = r2.a
java.lang.Object r4 = r4.a
com.applovin.impl.fo$b r5 = r0.a
r1.a(r4, r5)
boolean r1 = r3.a()
r4 = -9223372036854775807(0x8000000000000001, double:-4.9E-324)
r6 = -1
if (r1 != 0) goto L35
int r1 = r3.e
if (r1 != r6) goto L2e
goto L35
L2e:
com.applovin.impl.fo$b r7 = r0.a
long r7 = r7.b(r1)
goto L36
L35:
r7 = r4
L36:
boolean r1 = r3.a()
if (r1 == 0) goto L48
com.applovin.impl.fo$b r1 = r0.a
int r4 = r3.b
int r5 = r3.c
long r4 = r1.a(r4, r5)
L46:
r9 = r4
goto L5c
L48:
int r1 = (r7 > r4 ? 1 : (r7 == r4 ? 0 : -1))
if (r1 == 0) goto L55
r4 = -9223372036854775808
int r1 = (r7 > r4 ? 1 : (r7 == r4 ? 0 : -1))
if (r1 != 0) goto L53
goto L55
L53:
r9 = r7
goto L5c
L55:
com.applovin.impl.fo$b r1 = r0.a
long r4 = r1.c()
goto L46
L5c:
boolean r1 = r3.a()
if (r1 == 0) goto L6c
com.applovin.impl.fo$b r1 = r0.a
int r4 = r3.b
boolean r1 = r1.f(r4)
L6a:
r11 = r1
goto L7c
L6c:
int r1 = r3.e
if (r1 == r6) goto L7a
com.applovin.impl.fo$b r4 = r0.a
boolean r1 = r4.f(r1)
if (r1 == 0) goto L7a
r1 = 1
goto L6a
L7a:
r1 = 0
goto L6a
L7c:
com.applovin.impl.zd r15 = new com.applovin.impl.zd
long r4 = r2.b
long r1 = r2.c
r16 = r1
r1 = r15
r2 = r3
r3 = r4
r5 = r16
r1.<init>(r2, r3, r5, r7, r9, r11, r12, r13, r14)
return r15
*/
throw new UnsupportedOperationException("Method not decompiled: com.applovin.impl.ae.a(com.applovin.impl.fo, com.applovin.impl.zd):com.applovin.impl.zd");
}
private boolean a(be.a aVar) {
return !aVar.a() && aVar.e == -1;
}
private boolean a(fo foVar, be.a aVar, boolean z) {
int a = foVar.a(aVar.a);
return !foVar.a(foVar.a(a, this.a).c, this.b).j && foVar.b(a, this.a, this.b, this.f, this.g) && z;
}
private boolean a(fo foVar, be.a aVar) {
if (a(aVar)) {
return foVar.a(foVar.a(aVar.a, this.a).c, this.b).q == foVar.a(aVar.a);
}
return false;
}
public boolean a(wd wdVar) {
xd xdVar = this.j;
return xdVar != null && xdVar.a == wdVar;
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void a(eb.a aVar, be.a aVar2) {
this.c.a(aVar.a(), aVar2);
}
public void a(long j) {
xd xdVar = this.j;
if (xdVar != null) {
xdVar.b(j);
}
}
public boolean a(xd xdVar) {
boolean z = false;
b1.b(xdVar != null);
if (xdVar.equals(this.j)) {
return false;
}
this.j = xdVar;
while (xdVar.d() != null) {
xdVar = xdVar.d();
if (xdVar == this.i) {
this.i = this.h;
z = true;
}
xdVar.l();
this.k--;
}
this.j.a((xd) null);
g();
return z;
}
public be.a a(fo foVar, Object obj, long j) {
return a(foVar, obj, j, a(foVar, obj), this.a);
}
private static be.a a(fo foVar, Object obj, long j, long j2, fo.b bVar) {
foVar.a(obj, bVar);
int b = bVar.b(j);
if (b == -1) {
return new be.a(obj, j2, bVar.a(j));
}
return new be.a(obj, b, bVar.d(b), j2);
}
private long a(fo foVar, Object obj) {
int a;
int i = foVar.a(obj, this.a).c;
Object obj2 = this.l;
if (obj2 != null && (a = foVar.a(obj2)) != -1 && foVar.a(a, this.a).c == i) {
return this.m;
}
for (xd xdVar = this.h; xdVar != null; xdVar = xdVar.d()) {
if (xdVar.b.equals(obj)) {
return xdVar.f.a.d;
}
}
for (xd xdVar2 = this.h; xdVar2 != null; xdVar2 = xdVar2.d()) {
int a2 = foVar.a(xdVar2.b);
if (a2 != -1 && foVar.a(a2, this.a).c == i) {
return xdVar2.f.a.d;
}
}
long j = this.e;
this.e = 1 + j;
if (this.h == null) {
this.l = obj;
this.m = j;
}
return j;
}
private boolean a(fo foVar) {
xd xdVar = this.h;
if (xdVar == null) {
return true;
}
int a = foVar.a(xdVar.b);
while (true) {
a = foVar.a(a, this.a, this.b, this.f, this.g);
while (xdVar.d() != null && !xdVar.f.g) {
xdVar = xdVar.d();
}
xd d = xdVar.d();
if (a == -1 || d == null || foVar.a(d.b) != a) {
break;
}
xdVar = d;
}
boolean a2 = a(xdVar);
xdVar.f = a(foVar, xdVar.f);
return !a2;
}
public boolean a(fo foVar, long j, long j2) {
boolean a;
zd zdVar;
xd xdVar = this.h;
xd xdVar2 = null;
while (xdVar != null) {
zd zdVar2 = xdVar.f;
if (xdVar2 == null) {
zdVar = a(foVar, zdVar2);
} else {
zd a2 = a(foVar, xdVar2, j);
if (a2 == null) {
a = a(xdVar2);
} else if (a(zdVar2, a2)) {
zdVar = a2;
} else {
a = a(xdVar2);
}
return !a;
}
xdVar.f = zdVar.a(zdVar2.c);
if (!a(zdVar2.e, zdVar.e)) {
xdVar.m();
long j3 = zdVar.e;
return (a(xdVar) || (xdVar == this.i && !xdVar.f.f && ((j2 > Long.MIN_VALUE ? 1 : (j2 == Long.MIN_VALUE ? 0 : -1)) == 0 || (j2 > ((j3 > C.TIME_UNSET ? 1 : (j3 == C.TIME_UNSET ? 0 : -1)) == 0 ? Long.MAX_VALUE : xdVar.e(j3)) ? 1 : (j2 == ((j3 > C.TIME_UNSET ? 1 : (j3 == C.TIME_UNSET ? 0 : -1)) == 0 ? Long.MAX_VALUE : xdVar.e(j3)) ? 0 : -1)) >= 0))) ? false : true;
}
xdVar2 = xdVar;
xdVar = xdVar.d();
}
return true;
}
public boolean a(fo foVar, int i) {
this.f = i;
return a(foVar);
}
public boolean a(fo foVar, boolean z) {
this.g = z;
return a(foVar);
}
}

View File

@@ -0,0 +1,255 @@
package com.applovin.impl;
import android.content.Context;
import android.text.TextUtils;
import com.applovin.impl.mediation.MaxMediatedNetworkInfoImpl;
import com.applovin.impl.sdk.utils.CollectionUtils;
import com.applovin.impl.sdk.utils.JsonUtils;
import com.applovin.impl.sdk.utils.StringUtils;
import com.applovin.mediation.MaxAdFormat;
import com.applovin.mediation.MaxMediatedNetworkInfo;
import com.applovin.mediation.adapter.MaxAdapter;
import com.applovin.sdk.AppLovinSdk;
import com.applovin.sdk.AppLovinSdkUtils;
import com.google.android.gms.ads.AdSize;
import com.ironsource.mediationsdk.logger.IronSourceError;
import com.vungle.ads.BuildConfig;
import csdk.gluads.Consts;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import org.json.JSONArray;
import org.json.JSONObject;
/* loaded from: classes.dex */
public abstract class af {
private static final TreeMap a;
private static final Map b;
private static final List c;
private static JSONArray d;
private static final Map e = new HashMap();
private static final Object f = new Object();
private static final Map g = Collections.synchronizedMap(new HashMap(1));
static {
TreeMap treeMap = new TreeMap();
a = treeMap;
treeMap.put("com.applovin.mediation.adapters.AmazonAdMarketplaceMediationAdapter", "Amazon Publisher Services");
treeMap.put("com.applovin.mediation.adapters.AppLovinMediationAdapter", "AppLovin");
treeMap.put("com.applovin.mediation.adapters.BidMachineMediationAdapter", "BidMachine");
treeMap.put("com.applovin.mediation.adapters.BigoAdsMediationAdapter", "Bigo Ads");
treeMap.put("com.applovin.mediation.adapters.ByteDanceMediationAdapter", "Pangle");
treeMap.put("com.applovin.mediation.adapters.ChartboostMediationAdapter", "Chartboost");
treeMap.put("com.applovin.mediation.adapters.CSJMediationAdapter", "CSJ");
treeMap.put("com.applovin.mediation.adapters.DataseatMediationAdapter", "Dataseat");
treeMap.put("com.applovin.mediation.adapters.FacebookMediationAdapter", "Facebook");
treeMap.put("com.applovin.mediation.adapters.GoogleMediationAdapter", "AdMob");
treeMap.put("com.applovin.mediation.adapters.GoogleAdManagerMediationAdapter", "Google Ad Manager");
treeMap.put("com.applovin.mediation.adapters.HyprMXMediationAdapter", "HyprMX");
treeMap.put("com.applovin.mediation.adapters.InMobiMediationAdapter", "InMobi");
treeMap.put("com.applovin.mediation.adapters.InneractiveMediationAdapter", "Fyber");
treeMap.put("com.applovin.mediation.adapters.IronSourceMediationAdapter", Consts.SDK_IRONSOURCE);
treeMap.put("com.applovin.mediation.adapters.LineMediationAdapter", "LINE");
treeMap.put("com.applovin.mediation.adapters.MaioMediationAdapter", "Maio");
treeMap.put("com.applovin.mediation.adapters.MintegralMediationAdapter", "Mintegral");
treeMap.put("com.applovin.mediation.adapters.MobileFuseMediationAdapter", "MobileFuse");
treeMap.put("com.applovin.mediation.adapters.MolocoMediationAdapter", "Moloco");
treeMap.put("com.applovin.mediation.adapters.MyTargetMediationAdapter", "myTarget");
treeMap.put("com.applovin.mediation.adapters.OguryMediationAdapter", "Ogury");
treeMap.put("com.applovin.mediation.adapters.OguryPresageMediationAdapter", "Ogury Presage");
treeMap.put("com.applovin.mediation.adapters.PangleMediationAdapter", "Pangle");
treeMap.put("com.applovin.mediation.adapters.PubMaticMediationAdapter", "PubMatic");
treeMap.put("com.applovin.mediation.adapters.SayGamesMediationAdapter", "SayGames");
treeMap.put("com.applovin.mediation.adapters.SmaatoMediationAdapter", "Smaato");
treeMap.put("com.applovin.mediation.adapters.TencentMediationAdapter", "Tencent");
treeMap.put("com.applovin.mediation.adapters.UnityAdsMediationAdapter", "Unity Ads");
treeMap.put("com.applovin.mediation.adapters.VerveMediationAdapter", "Verve");
treeMap.put("com.applovin.mediation.adapters.VungleMediationAdapter", BuildConfig.OMSDK_PARTNER_NAME);
treeMap.put("com.applovin.mediation.adapters.YandexMediationAdapter", "Yandex");
treeMap.put("com.applovin.mediation.adapters.LinkedInDSPAdapter", "LinkedIn");
treeMap.put("com.applovin.mediation.adapters.AdColonyMediationAdapter", "AdColony");
treeMap.put("com.applovin.mediation.adapters.AmazonMediationAdapter", "Amazon");
treeMap.put("com.applovin.mediation.adapters.AmazonPublisherServicesMediationAdapter", "Amazon Publisher Services");
treeMap.put("com.applovin.mediation.adapters.CriteoMediationAdapter", "Criteo");
treeMap.put("com.applovin.mediation.adapters.NendMediationAdapter", "Nend");
treeMap.put("com.applovin.mediation.adapters.SnapMediationAdapter", "Snap");
treeMap.put("com.applovin.mediation.adapters.TapjoyMediationAdapter", "Tapjoy");
treeMap.put("com.applovin.mediation.adapters.VerizonAdsMediationAdapter", "Verizon");
treeMap.put("com.applovin.mediation.adapters.YahooMediationAdapter", "Yahoo");
treeMap.put("com.applovin.mediation.ALYsoNetworkMediationAdapter", "YSO Network");
treeMap.put("com.applovin.mediation.adapters.YsoNetworkMediationAdapter", "YSO Network");
c = new ArrayList(treeMap.keySet());
HashMap hashMap = new HashMap();
b = hashMap;
hashMap.put("com.applovin.mediation.adapters.BidMachineMediationAdapter", "3.0.1.1");
hashMap.put("com.applovin.mediation.adapters.ByteDanceMediationAdapter", "6.2.0.5.2");
hashMap.put("com.applovin.mediation.adapters.ChartboostMediationAdapter", "9.7.0.3");
hashMap.put("com.applovin.mediation.adapters.FacebookMediationAdapter", "6.17.0.1");
hashMap.put("com.applovin.mediation.adapters.GoogleMediationAdapter", "23.3.0.1");
hashMap.put("com.applovin.mediation.adapters.GoogleAdManagerMediationAdapter", "23.3.0.1");
hashMap.put("com.applovin.mediation.adapters.HyprMXMediationAdapter", "6.4.2.1");
hashMap.put("com.applovin.mediation.adapters.InMobiMediationAdapter", "10.7.7.1");
hashMap.put("com.applovin.mediation.adapters.InneractiveMediationAdapter", "8.3.1.1");
hashMap.put("com.applovin.mediation.adapters.IronSourceMediationAdapter", "8.3.0.0.2");
hashMap.put("com.applovin.mediation.adapters.LineMediationAdapter", "2024.8.27.1");
hashMap.put("com.applovin.mediation.adapters.MintegralMediationAdapter", "16.8.51.1");
hashMap.put("com.applovin.mediation.adapters.MobileFuseMediationAdapter", "1.7.6.1");
hashMap.put("com.applovin.mediation.adapters.MolocoMediationAdapter", "3.1.0.1");
hashMap.put("com.applovin.mediation.adapters.MyTargetMediationAdapter", "5.22.1.1");
hashMap.put("com.applovin.mediation.adapters.PubMaticMediationAdapter", "3.9.0.2");
hashMap.put("com.applovin.mediation.adapters.SmaatoMediationAdapter", "22.7.0.1");
hashMap.put("com.applovin.mediation.adapters.UnityAdsMediationAdapter", "4.12.2.1");
hashMap.put("com.applovin.mediation.adapters.VerveMediationAdapter", "3.0.4.1");
hashMap.put("com.applovin.mediation.adapters.VungleMediationAdapter", "7.4.1.1");
hashMap.put("com.applovin.mediation.adapters.YandexMediationAdapter", "7.4.0.1");
}
public static MaxAdapter a(String str, com.applovin.impl.sdk.j jVar) {
Class<?> cls;
if (TextUtils.isEmpty(str)) {
jVar.J();
if (com.applovin.impl.sdk.n.a()) {
jVar.J().b("AppLovinSdk", "Failed to create adapter instance. No class name provided");
}
return null;
}
try {
cls = Class.forName(str);
} catch (ClassNotFoundException unused) {
} catch (Throwable th) {
jVar.J();
if (com.applovin.impl.sdk.n.a()) {
jVar.J().a("AppLovinSdk", "Failed to load: " + str, th);
}
}
if (MaxAdapter.class.isAssignableFrom(cls)) {
return (MaxAdapter) cls.getConstructor(AppLovinSdk.class).newInstance(jVar.s0());
}
jVar.J();
if (com.applovin.impl.sdk.n.a()) {
jVar.J().b("AppLovinSdk", str + " error: not an instance of '" + MaxAdapter.class.getName() + "'.");
}
return null;
}
public static boolean b(Object obj) {
return (obj instanceof ge) && "APPLOVIN".equals(((ge) obj).k());
}
private static void b(com.applovin.impl.sdk.j jVar) {
MaxAdapter a2;
synchronized (f) {
for (int i = 0; i < d.length(); i++) {
try {
JSONObject jSONObject = JsonUtils.getJSONObject(d, i, (JSONObject) null);
String string = JsonUtils.getString(jSONObject, "class", "");
if (!StringUtils.isValidString(JsonUtils.getString(jSONObject, "sdk_version", "")) && (a2 = a(string, jVar)) != null) {
String a3 = a(a2);
if (StringUtils.isValidString(a3)) {
JsonUtils.putString(jSONObject, "sdk_version", a3);
e.put(string, new MaxMediatedNetworkInfoImpl(jSONObject));
}
}
} catch (Throwable th) {
throw th;
}
}
}
}
public static String a(MaxAdapter maxAdapter) {
try {
return StringUtils.emptyIfNull(maxAdapter.getSdkVersion());
} catch (Throwable th) {
com.applovin.impl.sdk.n.c("MediationUtils", "Failed to retrieve SDK version for adapter: " + maxAdapter, th);
return "";
}
}
public static AppLovinSdkUtils.Size a(int i, MaxAdFormat maxAdFormat, Context context) {
if (i < 0) {
try {
i = AppLovinSdkUtils.pxToDp(context, z3.a(context).x);
} catch (Throwable unused) {
return maxAdFormat.getSize();
}
}
Map map = g;
AppLovinSdkUtils.Size size = (AppLovinSdkUtils.Size) map.get(Integer.valueOf(i));
if (size != null) {
return size;
}
int i2 = AdSize.FULL_WIDTH;
Method method = AdSize.class.getMethod("getCurrentOrientationAnchoredAdaptiveBannerAdSize", Context.class, Integer.TYPE);
Method method2 = AdSize.class.getMethod("getWidth", new Class[0]);
Method method3 = AdSize.class.getMethod("getHeight", new Class[0]);
Object invoke = method.invoke(null, context, Integer.valueOf(i));
AppLovinSdkUtils.Size size2 = new AppLovinSdkUtils.Size(((Integer) method2.invoke(invoke, new Object[0])).intValue(), ((Integer) method3.invoke(invoke, new Object[0])).intValue());
map.put(Integer.valueOf(i), size2);
return size2;
}
public static boolean a(Object obj) {
return (obj instanceof com.applovin.impl.sdk.ad.b) && StringUtils.isValidString(((com.applovin.impl.sdk.ad.b) obj).H());
}
private static boolean a(MaxAdapter maxAdapter, String str) {
return TextUtils.isEmpty(str) || yp.a(maxAdapter.getAdapterVersion(), str) >= 0;
}
public static boolean a(JSONObject jSONObject, String str, com.applovin.impl.sdk.j jVar) {
if (!JsonUtils.containsJSONObjectContainingInt(jSONObject.optJSONArray("no_fill_reason"), IronSourceError.ERROR_IS_LOAD_FAILED_NO_CANDIDATES, "code")) {
return false;
}
jVar.E().a(la.L, "invalid_or_disabled_ad_unit_id", CollectionUtils.hashMap("ad_unit_id", str), "invalid_or_disabled_ad_unit_id" + str);
return true;
}
public static JSONArray a(com.applovin.impl.sdk.j jVar) {
synchronized (f) {
try {
if (d != null) {
b(jVar);
return d;
}
d = new JSONArray();
for (String str : c) {
MaxAdapter a2 = a(str, jVar);
if (a2 != null) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("name", a.get(str));
jSONObject.put("class", str);
jSONObject.put("sdk_version", a(a2));
jSONObject.put("version", a2.getAdapterVersion());
jSONObject.put("is_supported", a(a2, (String) b.get(str)));
} catch (Throwable unused) {
}
d.put(jSONObject);
e.put(str, new MaxMediatedNetworkInfoImpl(jSONObject));
}
}
return d;
} catch (Throwable th) {
throw th;
}
}
}
public static MaxMediatedNetworkInfo a(String str) {
MaxMediatedNetworkInfo maxMediatedNetworkInfo;
synchronized (f) {
maxMediatedNetworkInfo = (MaxMediatedNetworkInfo) e.get(str);
}
if (maxMediatedNetworkInfo != null) {
return maxMediatedNetworkInfo;
}
JSONObject jSONObject = new JSONObject();
JsonUtils.putString(jSONObject, "class", str);
return new MaxMediatedNetworkInfoImpl(jSONObject);
}
}

View File

@@ -0,0 +1,29 @@
package com.applovin.impl;
import com.applovin.exoplayer2.common.base.Preconditions;
import java.io.Serializable;
/* loaded from: classes.dex */
final class ag extends wg implements Serializable {
static final ag a = new ag();
@Override // com.applovin.impl.wg
public wg c() {
return xi.a;
}
public String toString() {
return "Ordering.natural()";
}
@Override // com.applovin.impl.wg, java.util.Comparator
/* renamed from: a, reason: merged with bridge method [inline-methods] */
public int compare(Comparable comparable, Comparable comparable2) {
Preconditions.checkNotNull(comparable);
Preconditions.checkNotNull(comparable2);
return comparable.compareTo(comparable2);
}
private ag() {
}
}

View File

@@ -0,0 +1,230 @@
package com.applovin.impl;
import androidx.core.view.MotionEventCompat;
import java.nio.charset.Charset;
/* loaded from: classes.dex */
public final class ah {
public byte[] a;
private int b;
private int c;
private int d;
public void a(byte[] bArr, int i) {
this.a = bArr;
this.b = 0;
this.c = 0;
this.d = i;
}
public int b() {
return ((this.d - this.b) * 8) - this.c;
}
public int e() {
return (this.b * 8) + this.c;
}
public ah() {
this.a = xp.f;
}
public ah(byte[] bArr) {
this(bArr, bArr.length);
}
public int d() {
b1.b(this.c == 0);
return this.b;
}
public void g() {
int i = this.c + 1;
this.c = i;
if (i == 8) {
this.c = 0;
this.b++;
}
a();
}
public ah(byte[] bArr, int i) {
this.a = bArr;
this.d = i;
}
public boolean f() {
boolean z = (this.a[this.b] & (128 >> this.c)) != 0;
g();
return z;
}
public void c() {
if (this.c == 0) {
return;
}
this.c = 0;
this.b++;
a();
}
public void d(int i) {
int i2 = i / 8;
int i3 = this.b + i2;
this.b = i3;
int i4 = this.c + (i - (i2 * 8));
this.c = i4;
if (i4 > 7) {
this.b = i3 + 1;
this.c = i4 - 8;
}
a();
}
public long b(int i) {
if (i <= 32) {
return xp.i(a(i));
}
return xp.c(a(i - 32), a(32));
}
private void a() {
int i;
int i2 = this.b;
b1.b(i2 >= 0 && (i2 < (i = this.d) || (i2 == i && this.c == 0)));
}
public void c(int i) {
int i2 = i / 8;
this.b = i2;
this.c = i - (i2 * 8);
a();
}
public void e(int i) {
b1.b(this.c == 0);
this.b += i;
a();
}
public void b(byte[] bArr, int i, int i2) {
b1.b(this.c == 0);
System.arraycopy(this.a, this.b, bArr, i, i2);
this.b += i2;
a();
}
public void a(int i, int i2) {
if (i2 < 32) {
i &= (1 << i2) - 1;
}
int min = Math.min(8 - this.c, i2);
int i3 = this.c;
int i4 = (8 - i3) - min;
int i5 = (MotionEventCompat.ACTION_POINTER_INDEX_MASK >> i3) | ((1 << i4) - 1);
byte[] bArr = this.a;
int i6 = this.b;
byte b = (byte) (i5 & bArr[i6]);
bArr[i6] = b;
int i7 = i2 - min;
bArr[i6] = (byte) (b | ((i >>> i7) << i4));
int i8 = i6 + 1;
while (i7 > 8) {
this.a[i8] = (byte) (i >>> (i7 - 8));
i7 -= 8;
i8++;
}
int i9 = 8 - i7;
byte[] bArr2 = this.a;
byte b2 = (byte) (bArr2[i8] & ((1 << i9) - 1));
bArr2[i8] = b2;
bArr2[i8] = (byte) (((i & ((1 << i7) - 1)) << i9) | b2);
d(i2);
a();
}
public int a(int i) {
int i2;
if (i == 0) {
return 0;
}
this.c += i;
int i3 = 0;
while (true) {
i2 = this.c;
if (i2 <= 8) {
break;
}
int i4 = i2 - 8;
this.c = i4;
byte[] bArr = this.a;
int i5 = this.b;
this.b = i5 + 1;
i3 |= (bArr[i5] & 255) << i4;
}
byte[] bArr2 = this.a;
int i6 = this.b;
int i7 = ((-1) >>> (32 - i)) & (i3 | ((bArr2[i6] & 255) >> (8 - i2)));
if (i2 == 8) {
this.c = 0;
this.b = i6 + 1;
}
a();
return i7;
}
public void a(byte[] bArr, int i, int i2) {
int i3 = (i2 >> 3) + i;
while (i < i3) {
byte[] bArr2 = this.a;
int i4 = this.b;
int i5 = i4 + 1;
this.b = i5;
byte b = bArr2[i4];
int i6 = this.c;
byte b2 = (byte) (b << i6);
bArr[i] = b2;
bArr[i] = (byte) (((255 & bArr2[i5]) >> (8 - i6)) | b2);
i++;
}
int i7 = i2 & 7;
if (i7 == 0) {
return;
}
byte b3 = (byte) (bArr[i3] & (255 >> i7));
bArr[i3] = b3;
int i8 = this.c;
if (i8 + i7 > 8) {
byte[] bArr3 = this.a;
int i9 = this.b;
this.b = i9 + 1;
bArr[i3] = (byte) (b3 | ((bArr3[i9] & 255) << i8));
this.c = i8 - 8;
}
int i10 = this.c + i7;
this.c = i10;
byte[] bArr4 = this.a;
int i11 = this.b;
bArr[i3] = (byte) (((byte) (((255 & bArr4[i11]) >> (8 - i10)) << (8 - i7))) | bArr[i3]);
if (i10 == 8) {
this.c = 0;
this.b = i11 + 1;
}
a();
}
public String a(int i, Charset charset) {
byte[] bArr = new byte[i];
b(bArr, 0, i);
return new String(bArr, charset);
}
public void a(bh bhVar) {
a(bhVar.c(), bhVar.e());
c(bhVar.d() * 8);
}
public void a(byte[] bArr) {
a(bArr, bArr.length);
}
}

View File

@@ -0,0 +1,872 @@
package com.applovin.impl;
import android.net.Uri;
import android.os.Handler;
import androidx.work.WorkRequest;
import com.applovin.impl.a7;
import com.applovin.impl.bj;
import com.applovin.impl.ce;
import com.applovin.impl.f9;
import com.applovin.impl.ij;
import com.applovin.impl.l5;
import com.applovin.impl.mc;
import com.applovin.impl.oc;
import com.applovin.impl.ta;
import com.applovin.impl.wd;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/* loaded from: classes.dex */
final class ai implements wd, m8, oc.b, oc.f, bj.d {
private static final Map N = l();
private static final f9 O = new f9.b().c("icy").f("application/x-icy").a();
private boolean B;
private boolean D;
private boolean E;
private int F;
private long H;
private boolean J;
private int K;
private boolean L;
private boolean M;
private final Uri a;
private final i5 b;
private final b7 c;
private final mc d;
private final ce.a f;
private final a7.a g;
private final b h;
private final n0 i;
private final String j;
private final long k;
private final zh m;
private wd.a r;
private va s;
private boolean v;
private boolean w;
private boolean x;
private e y;
private ij z;
private final oc l = new oc("ProgressiveMediaPeriod");
private final c4 n = new c4();
private final Runnable o = new Runnable() { // from class: com.applovin.impl.ai$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
ai.this.r();
}
};
private final Runnable p = new Runnable() { // from class: com.applovin.impl.ai$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
ai.this.q();
}
};
private final Handler q = xp.a();
private d[] u = new d[0];
private bj[] t = new bj[0];
private long I = C.TIME_UNSET;
private long G = -1;
private long A = C.TIME_UNSET;
private int C = 1;
public interface b {
void a(long j, boolean z, boolean z2);
}
private static Map l() {
HashMap hashMap = new HashMap();
hashMap.put("Icy-MetaData", "1");
return Collections.unmodifiableMap(hashMap);
}
private boolean p() {
return this.I != C.TIME_UNSET;
}
private void u() {
a aVar = new a(this.a, this.b, this.m, this, this.n);
if (this.w) {
b1.b(p());
long j = this.A;
if (j != C.TIME_UNSET && this.I > j) {
this.L = true;
this.I = C.TIME_UNSET;
return;
}
aVar.a(((ij) b1.a(this.z)).b(this.I).a.b, this.I);
for (bj bjVar : this.t) {
bjVar.c(this.I);
}
this.I = C.TIME_UNSET;
}
this.K = m();
this.f.c(new nc(aVar.a, aVar.k, this.l.a(aVar, this, this.d.a(this.C))), 1, -1, null, 0, null, aVar.j, this.A);
}
@Override // com.applovin.impl.wd
public void c(long j) {
}
public ai(Uri uri, i5 i5Var, zh zhVar, b7 b7Var, a7.a aVar, mc mcVar, ce.a aVar2, b bVar, n0 n0Var, String str, int i) {
this.a = uri;
this.b = i5Var;
this.c = b7Var;
this.g = aVar;
this.d = mcVar;
this.f = aVar2;
this.h = bVar;
this.i = n0Var;
this.j = str;
this.k = i;
this.m = zhVar;
}
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void q() {
if (this.M) {
return;
}
((wd.a) b1.a(this.r)).a((pj) this);
}
public void t() {
if (this.w) {
for (bj bjVar : this.t) {
bjVar.k();
}
}
this.l.a(this);
this.q.removeCallbacksAndMessages(null);
this.r = null;
this.M = true;
}
@Override // com.applovin.impl.wd
public void f() {
s();
if (this.L && !this.w) {
throw dh.a("Loading finished before preparation is complete.", null);
}
}
@Override // com.applovin.impl.wd
public long g() {
if (this.F == 0) {
return Long.MIN_VALUE;
}
return e();
}
@Override // com.applovin.impl.wd
public long h() {
if (!this.E) {
return C.TIME_UNSET;
}
if (!this.L && m() <= this.K) {
return C.TIME_UNSET;
}
this.E = false;
return this.H;
}
@Override // com.applovin.impl.wd
public boolean b(long j) {
if (this.L || this.l.c() || this.J) {
return false;
}
if (this.w && this.F == 0) {
return false;
}
boolean e2 = this.n.e();
if (this.l.d()) {
return e2;
}
u();
return true;
}
@Override // com.applovin.impl.wd
public long e() {
long j;
k();
boolean[] zArr = this.y.b;
if (this.L) {
return Long.MIN_VALUE;
}
if (p()) {
return this.I;
}
if (this.x) {
int length = this.t.length;
j = Long.MAX_VALUE;
for (int i = 0; i < length; i++) {
if (zArr[i] && !this.t[i].i()) {
j = Math.min(j, this.t[i].c());
}
}
} else {
j = Long.MAX_VALUE;
}
if (j == Long.MAX_VALUE) {
j = n();
}
return j == Long.MIN_VALUE ? this.H : j;
}
public void s() {
this.l.a(this.d.a(this.C));
}
public void d(int i) {
this.t[i].j();
s();
}
private boolean v() {
return this.E || p();
}
@Override // com.applovin.impl.wd
public po b() {
k();
return this.y.a;
}
public qo o() {
return a(new d(0, true));
}
/* JADX INFO: Access modifiers changed from: private */
public void r() {
bf a2;
if (this.M || this.w || !this.v || this.z == null) {
return;
}
for (bj bjVar : this.t) {
if (bjVar.f() == null) {
return;
}
}
this.n.c();
int length = this.t.length;
oo[] ooVarArr = new oo[length];
boolean[] zArr = new boolean[length];
for (int i = 0; i < length; i++) {
f9 f9Var = (f9) b1.a(this.t[i].f());
String str = f9Var.m;
boolean g = Cif.g(str);
boolean z = g || Cif.i(str);
zArr[i] = z;
this.x = z | this.x;
va vaVar = this.s;
if (vaVar != null) {
if (g || this.u[i].b) {
bf bfVar = f9Var.k;
if (bfVar == null) {
a2 = new bf(vaVar);
} else {
a2 = bfVar.a(vaVar);
}
f9Var = f9Var.a().a(a2).a();
}
if (g && f9Var.g == -1 && f9Var.h == -1 && vaVar.a != -1) {
f9Var = f9Var.a().b(vaVar.a).a();
}
}
ooVarArr[i] = new oo(f9Var.a(this.c.a(f9Var)));
}
this.y = new e(new po(ooVarArr), zArr);
this.w = true;
((wd.a) b1.a(this.r)).a((wd) this);
}
@Override // com.applovin.impl.m8
public void c() {
this.v = true;
this.q.post(this.o);
}
@Override // com.applovin.impl.oc.f
public void d() {
for (bj bjVar : this.t) {
bjVar.l();
}
this.m.a();
}
private int m() {
int i = 0;
for (bj bjVar : this.t) {
i += bjVar.g();
}
return i;
}
/* JADX INFO: Access modifiers changed from: private */
public long n() {
long j = Long.MIN_VALUE;
for (bj bjVar : this.t) {
j = Math.max(j, bjVar.c());
}
return j;
}
private void k() {
b1.b(this.w);
b1.a(this.y);
b1.a(this.z);
}
public final class c implements cj {
private final int a;
public c(int i) {
this.a = i;
}
@Override // com.applovin.impl.cj
public boolean d() {
return ai.this.a(this.a);
}
@Override // com.applovin.impl.cj
public void a() {
ai.this.d(this.a);
}
@Override // com.applovin.impl.cj
public int a(g9 g9Var, p5 p5Var, int i) {
return ai.this.a(this.a, g9Var, p5Var, i);
}
@Override // com.applovin.impl.cj
public int a(long j) {
return ai.this.a(this.a, j);
}
}
public final class a implements oc.e, ta.a {
private final Uri b;
private final fl c;
private final zh d;
private final m8 e;
private final c4 f;
private volatile boolean h;
private long j;
private qo m;
private boolean n;
private final th g = new th();
private boolean i = true;
private long l = -1;
private final long a = nc.a();
private l5 k = a(0);
@Override // com.applovin.impl.oc.e
public void b() {
this.h = true;
}
public a(Uri uri, i5 i5Var, zh zhVar, m8 m8Var, c4 c4Var) {
this.b = uri;
this.c = new fl(i5Var);
this.d = zhVar;
this.e = m8Var;
this.f = c4Var;
}
@Override // com.applovin.impl.oc.e
public void a() {
int i = 0;
while (i == 0 && !this.h) {
try {
long j = this.g.a;
l5 a = a(j);
this.k = a;
long a2 = this.c.a(a);
this.l = a2;
if (a2 != -1) {
this.l = a2 + j;
}
ai.this.s = va.a(this.c.e());
g5 g5Var = this.c;
if (ai.this.s != null && ai.this.s.g != -1) {
g5Var = new ta(this.c, ai.this.s.g, this);
qo o = ai.this.o();
this.m = o;
o.a(ai.O);
}
long j2 = j;
this.d.a(g5Var, this.b, this.c.e(), j, this.l, this.e);
if (ai.this.s != null) {
this.d.c();
}
if (this.i) {
this.d.a(j2, this.j);
this.i = false;
}
while (true) {
long j3 = j2;
while (i == 0 && !this.h) {
try {
this.f.a();
i = this.d.a(this.g);
j2 = this.d.b();
if (j2 > ai.this.k + j3) {
break;
}
} catch (InterruptedException unused) {
throw new InterruptedIOException();
}
}
this.f.c();
ai.this.q.post(ai.this.p);
}
if (i == 1) {
i = 0;
} else if (this.d.b() != -1) {
this.g.a = this.d.b();
}
xp.a((i5) this.c);
} catch (Throwable th) {
if (i != 1 && this.d.b() != -1) {
this.g.a = this.d.b();
}
xp.a((i5) this.c);
throw th;
}
}
}
@Override // com.applovin.impl.ta.a
public void a(bh bhVar) {
long max = !this.n ? this.j : Math.max(ai.this.n(), this.j);
int a = bhVar.a();
qo qoVar = (qo) b1.a(this.m);
qoVar.a(bhVar, a);
qoVar.a(max, 1, a, 0, null);
this.n = true;
}
/* JADX INFO: Access modifiers changed from: private */
public void a(long j, long j2) {
this.g.a = j;
this.j = j2;
this.i = true;
this.n = false;
}
private l5 a(long j) {
return new l5.b().a(this.b).a(j).a(ai.this.j).a(6).a(ai.N).a();
}
}
private boolean a(a aVar, int i) {
ij ijVar;
if (this.G != -1 || ((ijVar = this.z) != null && ijVar.d() != C.TIME_UNSET)) {
this.K = i;
return true;
}
if (this.w && !v()) {
this.J = true;
return false;
}
this.E = this.w;
this.H = 0L;
this.K = 0;
for (bj bjVar : this.t) {
bjVar.n();
}
aVar.a(0L, 0L);
return true;
}
public static final class e {
public final po a;
public final boolean[] b;
public final boolean[] c;
public final boolean[] d;
public e(po poVar, boolean[] zArr) {
this.a = poVar;
this.b = zArr;
int i = poVar.a;
this.c = new boolean[i];
this.d = new boolean[i];
}
}
public static final class d {
public final int a;
public final boolean b;
public int hashCode() {
return (this.a * 31) + (this.b ? 1 : 0);
}
public d(int i, boolean z) {
this.a = i;
this.b = z;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || d.class != obj.getClass()) {
return false;
}
d dVar = (d) obj;
return this.a == dVar.a && this.b == dVar.b;
}
}
private void c(int i) {
k();
boolean[] zArr = this.y.b;
if (this.J && zArr[i]) {
if (this.t[i].a(false)) {
return;
}
this.I = 0L;
this.J = false;
this.E = true;
this.H = 0L;
this.K = 0;
for (bj bjVar : this.t) {
bjVar.n();
}
((wd.a) b1.a(this.r)).a((pj) this);
}
}
private void a(a aVar) {
if (this.G == -1) {
this.G = aVar.l;
}
}
private void b(int i) {
k();
e eVar = this.y;
boolean[] zArr = eVar.d;
if (zArr[i]) {
return;
}
f9 a2 = eVar.a.a(i).a(0);
this.f.a(Cif.e(a2.m), a2, 0, (Object) null, this.H);
zArr[i] = true;
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: c, reason: merged with bridge method [inline-methods] */
public void b(ij ijVar) {
this.z = this.s == null ? ijVar : new ij.b(C.TIME_UNSET);
this.A = ijVar.d();
boolean z = this.G == -1 && ijVar.d() == C.TIME_UNSET;
this.B = z;
this.C = z ? 7 : 1;
this.h.a(this.A, ijVar.b(), this.B);
if (this.w) {
return;
}
r();
}
@Override // com.applovin.impl.wd
public void a(long j, boolean z) {
k();
if (p()) {
return;
}
boolean[] zArr = this.y.c;
int length = this.t.length;
for (int i = 0; i < length; i++) {
this.t[i].b(j, z, zArr[i]);
}
}
@Override // com.applovin.impl.wd
public long a(long j, jj jjVar) {
k();
if (!this.z.b()) {
return 0L;
}
ij.a b2 = this.z.b(j);
return jjVar.a(j, b2.a.a, b2.b.a);
}
@Override // com.applovin.impl.wd
public boolean a() {
return this.l.d() && this.n.d();
}
public boolean a(int i) {
return !v() && this.t[i].a(this.L);
}
@Override // com.applovin.impl.oc.b
public void a(a aVar, long j, long j2, boolean z) {
fl flVar = aVar.c;
nc ncVar = new nc(aVar.a, aVar.k, flVar.h(), flVar.i(), j, j2, flVar.g());
this.d.a(aVar.a);
this.f.a(ncVar, 1, -1, null, 0, null, aVar.j, this.A);
if (z) {
return;
}
a(aVar);
for (bj bjVar : this.t) {
bjVar.n();
}
if (this.F > 0) {
((wd.a) b1.a(this.r)).a((pj) this);
}
}
@Override // com.applovin.impl.oc.b
public void a(a aVar, long j, long j2) {
ij ijVar;
if (this.A == C.TIME_UNSET && (ijVar = this.z) != null) {
boolean b2 = ijVar.b();
long n = n();
long j3 = n == Long.MIN_VALUE ? 0L : n + WorkRequest.MIN_BACKOFF_MILLIS;
this.A = j3;
this.h.a(j3, b2, this.B);
}
fl flVar = aVar.c;
nc ncVar = new nc(aVar.a, aVar.k, flVar.h(), flVar.i(), j, j2, flVar.g());
this.d.a(aVar.a);
this.f.b(ncVar, 1, -1, null, 0, null, aVar.j, this.A);
a(aVar);
this.L = true;
((wd.a) b1.a(this.r)).a((pj) this);
}
@Override // com.applovin.impl.oc.b
public oc.c a(a aVar, long j, long j2, IOException iOException, int i) {
boolean z;
a aVar2;
oc.c cVar;
a(aVar);
fl flVar = aVar.c;
nc ncVar = new nc(aVar.a, aVar.k, flVar.h(), flVar.i(), j, j2, flVar.g());
long a2 = this.d.a(new mc.a(ncVar, new ud(1, -1, null, 0, null, t2.b(aVar.j), t2.b(this.A)), iOException, i));
if (a2 == C.TIME_UNSET) {
cVar = oc.g;
} else {
int m = m();
if (m > this.K) {
aVar2 = aVar;
z = true;
} else {
z = false;
aVar2 = aVar;
}
if (a(aVar2, m)) {
cVar = oc.a(z, a2);
} else {
cVar = oc.f;
}
}
boolean z2 = !cVar.a();
this.f.a(ncVar, 1, -1, null, 0, null, aVar.j, this.A, iOException, z2);
if (z2) {
this.d.a(aVar.a);
}
return cVar;
}
@Override // com.applovin.impl.bj.d
public void a(f9 f9Var) {
this.q.post(this.o);
}
@Override // com.applovin.impl.wd
public void a(wd.a aVar, long j) {
this.r = aVar;
this.n.e();
u();
}
private qo a(d dVar) {
int length = this.t.length;
for (int i = 0; i < length; i++) {
if (dVar.equals(this.u[i])) {
return this.t[i];
}
}
bj a2 = bj.a(this.i, this.q.getLooper(), this.c, this.g);
a2.a(this);
int i2 = length + 1;
d[] dVarArr = (d[]) Arrays.copyOf(this.u, i2);
dVarArr[length] = dVar;
this.u = (d[]) xp.a((Object[]) dVarArr);
bj[] bjVarArr = (bj[]) Arrays.copyOf(this.t, i2);
bjVarArr[length] = a2;
this.t = (bj[]) xp.a((Object[]) bjVarArr);
return a2;
}
public int a(int i, g9 g9Var, p5 p5Var, int i2) {
if (v()) {
return -3;
}
b(i);
int a2 = this.t[i].a(g9Var, p5Var, i2, this.L);
if (a2 == -3) {
c(i);
}
return a2;
}
private boolean a(boolean[] zArr, long j) {
int length = this.t.length;
for (int i = 0; i < length; i++) {
if (!this.t[i].b(j, false) && (zArr[i] || !this.x)) {
return false;
}
}
return true;
}
@Override // com.applovin.impl.m8
public void a(final ij ijVar) {
this.q.post(new Runnable() { // from class: com.applovin.impl.ai$$ExternalSyntheticLambda2
@Override // java.lang.Runnable
public final void run() {
ai.this.b(ijVar);
}
});
}
@Override // com.applovin.impl.wd
public long a(long j) {
k();
boolean[] zArr = this.y.b;
if (!this.z.b()) {
j = 0;
}
int i = 0;
this.E = false;
this.H = j;
if (p()) {
this.I = j;
return j;
}
if (this.C != 7 && a(zArr, j)) {
return j;
}
this.J = false;
this.I = j;
this.L = false;
if (this.l.d()) {
bj[] bjVarArr = this.t;
int length = bjVarArr.length;
while (i < length) {
bjVarArr[i].b();
i++;
}
this.l.a();
} else {
this.l.b();
bj[] bjVarArr2 = this.t;
int length2 = bjVarArr2.length;
while (i < length2) {
bjVarArr2[i].n();
i++;
}
}
return j;
}
@Override // com.applovin.impl.wd
public long a(h8[] h8VarArr, boolean[] zArr, cj[] cjVarArr, boolean[] zArr2, long j) {
h8 h8Var;
k();
e eVar = this.y;
po poVar = eVar.a;
boolean[] zArr3 = eVar.c;
int i = this.F;
int i2 = 0;
for (int i3 = 0; i3 < h8VarArr.length; i3++) {
cj cjVar = cjVarArr[i3];
if (cjVar != null && (h8VarArr[i3] == null || !zArr[i3])) {
int i4 = ((c) cjVar).a;
b1.b(zArr3[i4]);
this.F--;
zArr3[i4] = false;
cjVarArr[i3] = null;
}
}
boolean z = !this.D ? j == 0 : i != 0;
for (int i5 = 0; i5 < h8VarArr.length; i5++) {
if (cjVarArr[i5] == null && (h8Var = h8VarArr[i5]) != null) {
b1.b(h8Var.b() == 1);
b1.b(h8Var.b(0) == 0);
int a2 = poVar.a(h8Var.a());
b1.b(!zArr3[a2]);
this.F++;
zArr3[a2] = true;
cjVarArr[i5] = new c(a2);
zArr2[i5] = true;
if (!z) {
bj bjVar = this.t[a2];
z = (bjVar.b(j, true) || bjVar.e() == 0) ? false : true;
}
}
}
if (this.F == 0) {
this.J = false;
this.E = false;
if (this.l.d()) {
bj[] bjVarArr = this.t;
int length = bjVarArr.length;
while (i2 < length) {
bjVarArr[i2].b();
i2++;
}
this.l.a();
} else {
bj[] bjVarArr2 = this.t;
int length2 = bjVarArr2.length;
while (i2 < length2) {
bjVarArr2[i2].n();
i2++;
}
}
} else if (z) {
j = a(j);
while (i2 < cjVarArr.length) {
if (cjVarArr[i2] != null) {
zArr2[i2] = true;
}
i2++;
}
}
this.D = true;
return j;
}
public int a(int i, long j) {
if (v()) {
return 0;
}
b(i);
bj bjVar = this.t[i];
int a2 = bjVar.a(j, this.L);
bjVar.f(a2);
if (a2 == 0) {
c(i);
}
return a2;
}
@Override // com.applovin.impl.m8
public qo a(int i, int i2) {
return a(new d(i, false));
}
}

View File

@@ -0,0 +1,275 @@
package com.applovin.impl;
import com.applovin.impl.bj;
import com.applovin.impl.qo;
import java.io.EOFException;
import java.nio.ByteBuffer;
import java.util.Arrays;
import kotlin.jvm.internal.ByteCompanionObject;
/* loaded from: classes.dex */
class aj {
private final n0 a;
private final int b;
private final bh c;
private a d;
private a e;
private a f;
private long g;
public long a() {
return this.g;
}
public void c() {
this.e = this.d;
}
public aj(n0 n0Var) {
this.a = n0Var;
int c = n0Var.c();
this.b = c;
this.c = new bh(32);
a aVar = new a(0L, c);
this.d = aVar;
this.e = aVar;
this.f = aVar;
}
private void a(a aVar) {
if (aVar.c) {
a aVar2 = this.f;
boolean z = aVar2.c;
int i = (z ? 1 : 0) + (((int) (aVar2.a - aVar.a)) / this.b);
m0[] m0VarArr = new m0[i];
for (int i2 = 0; i2 < i; i2++) {
m0VarArr[i2] = aVar.d;
aVar = aVar.a();
}
this.a.a(m0VarArr);
}
}
private int b(int i) {
a aVar = this.f;
if (!aVar.c) {
aVar.a(this.a.b(), new a(this.f.b, this.b));
}
return Math.min(i, (int) (this.f.b - this.g));
}
public void a(long j) {
a aVar;
if (j == -1) {
return;
}
while (true) {
aVar = this.d;
if (j < aVar.b) {
break;
}
this.a.a(aVar.d);
this.d = this.d.a();
}
if (this.e.a < aVar.a) {
this.e = aVar;
}
}
public static final class a {
public final long a;
public final long b;
public boolean c;
public m0 d;
public a e;
public a a() {
this.d = null;
a aVar = this.e;
this.e = null;
return aVar;
}
public void a(m0 m0Var, a aVar) {
this.d = m0Var;
this.e = aVar;
this.c = true;
}
public a(long j, int i) {
this.a = j;
this.b = j + i;
}
public int a(long j) {
return ((int) (j - this.a)) + this.d.b;
}
}
private static a b(a aVar, p5 p5Var, bj.b bVar, bh bhVar) {
if (p5Var.h()) {
aVar = a(aVar, p5Var, bVar, bhVar);
}
if (p5Var.c()) {
bhVar.d(4);
a a2 = a(aVar, bVar.b, bhVar.c(), 4);
int A = bhVar.A();
bVar.b += 4;
bVar.a -= 4;
p5Var.g(A);
a a3 = a(a2, bVar.b, p5Var.c, A);
bVar.b += A;
int i = bVar.a - A;
bVar.a = i;
p5Var.h(i);
return a(a3, bVar.b, p5Var.g, bVar.a);
}
p5Var.g(bVar.a);
return a(aVar, bVar.b, p5Var.c, bVar.a);
}
public void b(p5 p5Var, bj.b bVar) {
this.e = b(this.e, p5Var, bVar, this.c);
}
public void b() {
a(this.d);
a aVar = new a(0L, this.b);
this.d = aVar;
this.e = aVar;
this.f = aVar;
this.g = 0L;
this.a.a();
}
private static a a(a aVar, long j) {
while (j >= aVar.b) {
aVar = aVar.e;
}
return aVar;
}
public void a(p5 p5Var, bj.b bVar) {
b(this.e, p5Var, bVar, this.c);
}
private void a(int i) {
long j = this.g + i;
this.g = j;
a aVar = this.f;
if (j == aVar.b) {
this.f = aVar.e;
}
}
private static a a(a aVar, long j, ByteBuffer byteBuffer, int i) {
a a2 = a(aVar, j);
while (i > 0) {
int min = Math.min(i, (int) (a2.b - j));
byteBuffer.put(a2.d.a, a2.a(j), min);
i -= min;
j += min;
if (j == a2.b) {
a2 = a2.e;
}
}
return a2;
}
private static a a(a aVar, long j, byte[] bArr, int i) {
a a2 = a(aVar, j);
int i2 = i;
while (i2 > 0) {
int min = Math.min(i2, (int) (a2.b - j));
System.arraycopy(a2.d.a, a2.a(j), bArr, i - i2, min);
i2 -= min;
j += min;
if (j == a2.b) {
a2 = a2.e;
}
}
return a2;
}
private static a a(a aVar, p5 p5Var, bj.b bVar, bh bhVar) {
long j = bVar.b;
int i = 1;
bhVar.d(1);
a a2 = a(aVar, j, bhVar.c(), 1);
long j2 = j + 1;
byte b = bhVar.c()[0];
boolean z = (b & ByteCompanionObject.MIN_VALUE) != 0;
int i2 = b & Byte.MAX_VALUE;
a5 a5Var = p5Var.b;
byte[] bArr = a5Var.a;
if (bArr == null) {
a5Var.a = new byte[16];
} else {
Arrays.fill(bArr, (byte) 0);
}
a a3 = a(a2, j2, a5Var.a, i2);
long j3 = j2 + i2;
if (z) {
bhVar.d(2);
a3 = a(a3, j3, bhVar.c(), 2);
j3 += 2;
i = bhVar.C();
}
int i3 = i;
int[] iArr = a5Var.d;
if (iArr == null || iArr.length < i3) {
iArr = new int[i3];
}
int[] iArr2 = iArr;
int[] iArr3 = a5Var.e;
if (iArr3 == null || iArr3.length < i3) {
iArr3 = new int[i3];
}
int[] iArr4 = iArr3;
if (z) {
int i4 = i3 * 6;
bhVar.d(i4);
a3 = a(a3, j3, bhVar.c(), i4);
j3 += i4;
bhVar.f(0);
for (int i5 = 0; i5 < i3; i5++) {
iArr2[i5] = bhVar.C();
iArr4[i5] = bhVar.A();
}
} else {
iArr2[0] = 0;
iArr4[0] = bVar.a - ((int) (j3 - bVar.b));
}
qo.a aVar2 = (qo.a) xp.a(bVar.c);
a5Var.a(i3, iArr2, iArr4, aVar2.b, a5Var.a, aVar2.a, aVar2.c, aVar2.d);
long j4 = bVar.b;
int i6 = (int) (j3 - j4);
bVar.b = j4 + i6;
bVar.a -= i6;
return a3;
}
public int a(g5 g5Var, int i, boolean z) {
int b = b(i);
a aVar = this.f;
int a2 = g5Var.a(aVar.d.a, aVar.a(this.g), b);
if (a2 != -1) {
a(a2);
return a2;
}
if (z) {
return -1;
}
throw new EOFException();
}
public void a(bh bhVar, int i) {
while (i > 0) {
int b = b(i);
a aVar = this.f;
bhVar.a(aVar.d.a, aVar.a(this.g), b);
i -= b;
a(b);
}
}
}

View File

@@ -0,0 +1,221 @@
package com.applovin.impl;
import com.applovin.impl.p1;
import java.nio.ByteBuffer;
/* loaded from: classes.dex */
public final class ak extends z1 {
private final long i;
private final long j;
private final short k;
private int l;
private boolean m;
private byte[] n;
private byte[] o;
private int p;
private int q;
private int r;
private boolean s;
private long t;
public void a(boolean z) {
this.m = z;
}
@Override // com.applovin.impl.z1, com.applovin.impl.p1
public boolean f() {
return this.m;
}
public long j() {
return this.t;
}
public ak() {
this(150000L, 20000L, (short) 1024);
}
@Override // com.applovin.impl.z1
public void h() {
int i = this.q;
if (i > 0) {
a(this.n, i);
}
if (this.s) {
return;
}
this.t += this.r / this.l;
}
@Override // com.applovin.impl.z1
public void g() {
if (this.m) {
this.l = this.b.d;
int a = a(this.i) * this.l;
if (this.n.length != a) {
this.n = new byte[a];
}
int a2 = a(this.j) * this.l;
this.r = a2;
if (this.o.length != a2) {
this.o = new byte[a2];
}
}
this.p = 0;
this.t = 0L;
this.q = 0;
this.s = false;
}
public ak(long j, long j2, short s) {
b1.a(j2 <= j);
this.i = j;
this.j = j2;
this.k = s;
byte[] bArr = xp.f;
this.n = bArr;
this.o = bArr;
}
@Override // com.applovin.impl.z1
public void i() {
this.m = false;
this.r = 0;
byte[] bArr = xp.f;
this.n = bArr;
this.o = bArr;
}
private void e(ByteBuffer byteBuffer) {
int limit = byteBuffer.limit();
int c = c(byteBuffer);
int position = c - byteBuffer.position();
byte[] bArr = this.n;
int length = bArr.length;
int i = this.q;
int i2 = length - i;
if (c < limit && position < i2) {
a(bArr, i);
this.q = 0;
this.p = 0;
return;
}
int min = Math.min(position, i2);
byteBuffer.limit(byteBuffer.position() + min);
byteBuffer.get(this.n, this.q, min);
int i3 = this.q + min;
this.q = i3;
byte[] bArr2 = this.n;
if (i3 == bArr2.length) {
if (this.s) {
a(bArr2, this.r);
this.t += (this.q - (this.r * 2)) / this.l;
} else {
this.t += (i3 - this.r) / this.l;
}
a(byteBuffer, this.n, this.q);
this.q = 0;
this.p = 2;
}
byteBuffer.limit(limit);
}
private void d(ByteBuffer byteBuffer) {
int remaining = byteBuffer.remaining();
a(remaining).put(byteBuffer).flip();
if (remaining > 0) {
this.s = true;
}
}
private int a(long j) {
return (int) ((j * this.b.a) / 1000000);
}
private int c(ByteBuffer byteBuffer) {
for (int position = byteBuffer.position(); position < byteBuffer.limit(); position += 2) {
if (Math.abs((int) byteBuffer.getShort(position)) > this.k) {
int i = this.l;
return i * (position / i);
}
}
return byteBuffer.limit();
}
private int b(ByteBuffer byteBuffer) {
int limit = byteBuffer.limit();
do {
limit -= 2;
if (limit < byteBuffer.position()) {
return byteBuffer.position();
}
} while (Math.abs((int) byteBuffer.getShort(limit)) <= this.k);
int i = this.l;
return ((limit / i) * i) + i;
}
private void f(ByteBuffer byteBuffer) {
int limit = byteBuffer.limit();
byteBuffer.limit(Math.min(limit, byteBuffer.position() + this.n.length));
int b = b(byteBuffer);
if (b == byteBuffer.position()) {
this.p = 1;
} else {
byteBuffer.limit(b);
d(byteBuffer);
}
byteBuffer.limit(limit);
}
private void g(ByteBuffer byteBuffer) {
int limit = byteBuffer.limit();
int c = c(byteBuffer);
byteBuffer.limit(c);
this.t += byteBuffer.remaining() / this.l;
a(byteBuffer, this.o, this.r);
if (c < limit) {
a(this.o, this.r);
this.p = 0;
byteBuffer.limit(limit);
}
}
@Override // com.applovin.impl.z1
public p1.a b(p1.a aVar) {
if (aVar.c == 2) {
return this.m ? aVar : p1.a.e;
}
throw new p1.b(aVar);
}
private void a(byte[] bArr, int i) {
a(i).put(bArr, 0, i).flip();
if (i > 0) {
this.s = true;
}
}
@Override // com.applovin.impl.p1
public void a(ByteBuffer byteBuffer) {
while (byteBuffer.hasRemaining() && !a()) {
int i = this.p;
if (i == 0) {
f(byteBuffer);
} else if (i == 1) {
e(byteBuffer);
} else if (i == 2) {
g(byteBuffer);
} else {
throw new IllegalStateException();
}
}
}
private void a(ByteBuffer byteBuffer, byte[] bArr, int i) {
int min = Math.min(byteBuffer.remaining(), this.r);
int i2 = this.r - min;
System.arraycopy(bArr, i - i2, this.o, 0, i2);
byteBuffer.position(byteBuffer.limit() - min);
byteBuffer.get(this.o, i2, min);
}
}

View File

@@ -0,0 +1,45 @@
package com.applovin.impl;
import java.util.Collections;
import java.util.List;
/* loaded from: classes.dex */
final class al implements nl {
private final List a;
private final List b;
public al(List list, List list2) {
this.a = list;
this.b = list2;
}
@Override // com.applovin.impl.nl
public long a(int i) {
b1.a(i >= 0);
b1.a(i < this.b.size());
return ((Long) this.b.get(i)).longValue();
}
@Override // com.applovin.impl.nl
public List b(long j) {
int b = xp.b(this.b, (Comparable) Long.valueOf(j), true, false);
if (b == -1) {
return Collections.emptyList();
}
return (List) this.a.get(b);
}
@Override // com.applovin.impl.nl
public int a() {
return this.b.size();
}
@Override // com.applovin.impl.nl
public int a(long j) {
int a = xp.a(this.b, (Comparable) Long.valueOf(j), false, false);
if (a < this.b.size()) {
return a;
}
return -1;
}
}

View File

@@ -0,0 +1,66 @@
package com.applovin.impl;
import android.app.Activity;
import android.text.TextUtils;
import com.applovin.impl.tm;
import java.util.List;
/* loaded from: classes.dex */
public class am extends yl {
private final List h;
private final Activity i;
/* JADX INFO: Access modifiers changed from: private */
public /* synthetic */ void a(pe peVar) {
if (com.applovin.impl.sdk.n.a()) {
this.c.a(this.b, "Auto-initing adapter: " + peVar);
}
this.a.L().b(peVar, this.i);
}
public am(List list, Activity activity, com.applovin.impl.sdk.j jVar) {
super("TaskAutoInitAdapters", jVar, true);
this.h = list;
this.i = activity;
}
@Override // java.lang.Runnable
public void run() {
if (this.h.size() > 0) {
if (com.applovin.impl.sdk.n.a()) {
com.applovin.impl.sdk.n nVar = this.c;
String str = this.b;
StringBuilder sb = new StringBuilder();
sb.append("Auto-initing ");
sb.append(this.h.size());
sb.append(" adapters");
sb.append(this.a.l0().c() ? " in test mode" : "");
sb.append("...");
nVar.a(str, sb.toString());
}
if (TextUtils.isEmpty(this.a.O())) {
this.a.e("max");
} else if (!this.a.A0()) {
com.applovin.impl.sdk.n.h("AppLovinSdk", "Auto-initing adapters for non-MAX mediation provider: " + this.a.O());
}
if (this.i == null) {
com.applovin.impl.sdk.n.h("AppLovinSdk", "\n**********\nAttempting to init 3rd-party SDKs without an Activity instance.\n**********\n");
}
for (final pe peVar : this.h) {
if (peVar.s()) {
this.a.j0().a(new Runnable() { // from class: com.applovin.impl.am$$ExternalSyntheticLambda0
@Override // java.lang.Runnable
public final void run() {
am.this.a(peVar);
}
}, tm.b.MEDIATION);
} else {
this.a.J();
if (com.applovin.impl.sdk.n.a()) {
this.a.J().a(this.b, "Skipping eager auto-init for adapter " + peVar);
}
}
}
}
}
}

View File

@@ -0,0 +1,36 @@
package com.applovin.impl;
import com.applovin.impl.tm;
import java.lang.ref.WeakReference;
/* loaded from: classes.dex */
public class an extends yl {
private final WeakReference h;
private final Object i;
public static void a(long j, fi fiVar, Object obj, String str, com.applovin.impl.sdk.j jVar) {
if (j <= 0) {
return;
}
jVar.j0().a(new an(fiVar, obj, str, jVar), tm.b.TIMEOUT, j);
}
public an(fi fiVar, Object obj, String str, com.applovin.impl.sdk.j jVar) {
super(str, jVar);
this.h = new WeakReference(fiVar);
this.i = obj;
}
@Override // java.lang.Runnable
public void run() {
fi fiVar = (fi) this.h.get();
if (fiVar == null || fiVar.c()) {
return;
}
this.a.J();
if (com.applovin.impl.sdk.n.a()) {
this.a.J().d(this.b, "Attempting to timeout pending task " + fiVar.b() + " with " + this.i);
}
fiVar.a(this.i);
}
}

Some files were not shown because too many files have changed in this diff Show More