- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
452 lines
17 KiB
Java
452 lines
17 KiB
Java
package com.applovin.impl;
|
|
|
|
import android.app.Activity;
|
|
import android.content.ComponentName;
|
|
import android.net.Uri;
|
|
import android.os.Bundle;
|
|
import android.text.TextUtils;
|
|
import androidx.browser.customtabs.CustomTabColorSchemeParams;
|
|
import androidx.browser.customtabs.CustomTabsCallback;
|
|
import androidx.browser.customtabs.CustomTabsClient;
|
|
import androidx.browser.customtabs.CustomTabsIntent;
|
|
import androidx.browser.customtabs.CustomTabsService;
|
|
import androidx.browser.customtabs.CustomTabsServiceConnection;
|
|
import androidx.browser.customtabs.CustomTabsSession;
|
|
import com.applovin.impl.sdk.utils.CollectionUtils;
|
|
import com.applovin.sdk.R;
|
|
import com.facebook.internal.AnalyticsEvents;
|
|
import com.ironsource.v8;
|
|
import java.util.ArrayList;
|
|
import java.util.Iterator;
|
|
import java.util.LinkedList;
|
|
import java.util.List;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class d5 {
|
|
private final com.applovin.impl.sdk.j a;
|
|
private CustomTabsClient b;
|
|
|
|
public d5(com.applovin.impl.sdk.j jVar) {
|
|
this.a = jVar;
|
|
}
|
|
|
|
public class a extends CustomTabsServiceConnection {
|
|
public a() {
|
|
}
|
|
|
|
@Override // androidx.browser.customtabs.CustomTabsServiceConnection
|
|
public void onCustomTabsServiceConnected(ComponentName componentName, CustomTabsClient customTabsClient) {
|
|
d5.this.a.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
d5.this.a.J().a("CustomTabsManager", "Connection successful: " + componentName);
|
|
}
|
|
d5.this.b = customTabsClient;
|
|
}
|
|
|
|
@Override // android.content.ServiceConnection
|
|
public void onServiceDisconnected(ComponentName componentName) {
|
|
d5.this.a.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
d5.this.a.J().a("CustomTabsManager", "Service disconnected: " + componentName);
|
|
}
|
|
d5.this.b = null;
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Code restructure failed: missing block: B:13:0x0044, code lost:
|
|
|
|
if (com.applovin.impl.sdk.n.a() != false) goto L28;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:15:0x007f, code lost:
|
|
|
|
return;
|
|
*/
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
private void a(java.util.LinkedList r7) {
|
|
/*
|
|
r6 = this;
|
|
java.lang.String r0 = "Retrying with next package name..."
|
|
java.lang.String r1 = "CustomTabsManager"
|
|
r2 = 0
|
|
android.content.Context r3 = com.applovin.impl.sdk.j.l() // Catch: java.lang.Throwable -> L31
|
|
java.lang.Object r4 = r7.poll() // Catch: java.lang.Throwable -> L31
|
|
java.lang.String r4 = (java.lang.String) r4 // Catch: java.lang.Throwable -> L31
|
|
com.applovin.impl.d5$a r5 = new com.applovin.impl.d5$a // Catch: java.lang.Throwable -> L31
|
|
r5.<init>() // Catch: java.lang.Throwable -> L31
|
|
boolean r2 = androidx.browser.customtabs.CustomTabsClient.bindCustomTabsService(r3, r4, r5) // Catch: java.lang.Throwable -> L31
|
|
if (r2 != 0) goto L33
|
|
com.applovin.impl.sdk.j r3 = r6.a // Catch: java.lang.Throwable -> L31
|
|
r3.J() // Catch: java.lang.Throwable -> L31
|
|
boolean r3 = com.applovin.impl.sdk.n.a() // Catch: java.lang.Throwable -> L31
|
|
if (r3 == 0) goto L33
|
|
com.applovin.impl.sdk.j r3 = r6.a // Catch: java.lang.Throwable -> L31
|
|
com.applovin.impl.sdk.n r3 = r3.J() // Catch: java.lang.Throwable -> L31
|
|
java.lang.String r4 = "Custom Tabs service not available"
|
|
r3.b(r1, r4) // Catch: java.lang.Throwable -> L31
|
|
goto L33
|
|
L31:
|
|
r3 = move-exception
|
|
goto L47
|
|
L33:
|
|
if (r2 != 0) goto L7f
|
|
boolean r2 = r7.isEmpty()
|
|
if (r2 != 0) goto L7f
|
|
com.applovin.impl.sdk.j r2 = r6.a
|
|
r2.J()
|
|
boolean r2 = com.applovin.impl.sdk.n.a()
|
|
if (r2 == 0) goto L7c
|
|
goto L73
|
|
L47:
|
|
com.applovin.impl.sdk.j r4 = r6.a // Catch: java.lang.Throwable -> L5e
|
|
r4.J() // Catch: java.lang.Throwable -> L5e
|
|
boolean r4 = com.applovin.impl.sdk.n.a() // Catch: java.lang.Throwable -> L5e
|
|
if (r4 == 0) goto L60
|
|
com.applovin.impl.sdk.j r4 = r6.a // Catch: java.lang.Throwable -> L5e
|
|
com.applovin.impl.sdk.n r4 = r4.J() // Catch: java.lang.Throwable -> L5e
|
|
java.lang.String r5 = "Failed to bind to service"
|
|
r4.a(r1, r5, r3) // Catch: java.lang.Throwable -> L5e
|
|
goto L60
|
|
L5e:
|
|
r3 = move-exception
|
|
goto L80
|
|
L60:
|
|
if (r2 != 0) goto L7f
|
|
boolean r2 = r7.isEmpty()
|
|
if (r2 != 0) goto L7f
|
|
com.applovin.impl.sdk.j r2 = r6.a
|
|
r2.J()
|
|
boolean r2 = com.applovin.impl.sdk.n.a()
|
|
if (r2 == 0) goto L7c
|
|
L73:
|
|
com.applovin.impl.sdk.j r2 = r6.a
|
|
com.applovin.impl.sdk.n r2 = r2.J()
|
|
r2.a(r1, r0)
|
|
L7c:
|
|
r6.a(r7)
|
|
L7f:
|
|
return
|
|
L80:
|
|
if (r2 != 0) goto L9f
|
|
boolean r2 = r7.isEmpty()
|
|
if (r2 != 0) goto L9f
|
|
com.applovin.impl.sdk.j r2 = r6.a
|
|
r2.J()
|
|
boolean r2 = com.applovin.impl.sdk.n.a()
|
|
if (r2 == 0) goto L9c
|
|
com.applovin.impl.sdk.j r2 = r6.a
|
|
com.applovin.impl.sdk.n r2 = r2.J()
|
|
r2.a(r1, r0)
|
|
L9c:
|
|
r6.a(r7)
|
|
L9f:
|
|
throw r3
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.applovin.impl.d5.a(java.util.LinkedList):void");
|
|
}
|
|
|
|
public void b(final List list, final CustomTabsSession customTabsSession) {
|
|
if (list.isEmpty()) {
|
|
return;
|
|
}
|
|
if (customTabsSession == null) {
|
|
this.a.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.a.J().a("CustomTabsManager", "Custom Tabs session is null, cannot warmup urls");
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
a("warmup urls", new Runnable() { // from class: com.applovin.impl.d5$$ExternalSyntheticLambda2
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
d5.this.a(list, customTabsSession);
|
|
}
|
|
});
|
|
}
|
|
|
|
public void a() {
|
|
if (((Boolean) this.a.a(sj.D6)).booleanValue() && this.b == null) {
|
|
String packageName = CustomTabsClient.getPackageName(com.applovin.impl.sdk.j.l(), this.a.c(sj.E6), true);
|
|
String packageName2 = CustomTabsClient.getPackageName(com.applovin.impl.sdk.j.l(), null);
|
|
LinkedList linkedList = new LinkedList();
|
|
if (((Boolean) this.a.a(sj.F6)).booleanValue()) {
|
|
CollectionUtils.addUniqueObjectIfExists(packageName2, linkedList);
|
|
CollectionUtils.addUniqueObjectIfExists(packageName, linkedList);
|
|
} else {
|
|
CollectionUtils.addUniqueObjectIfExists(packageName, linkedList);
|
|
CollectionUtils.addUniqueObjectIfExists(packageName2, linkedList);
|
|
}
|
|
if (linkedList.isEmpty()) {
|
|
this.a.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.a.J().b("CustomTabsManager", "Unable to find a supported Custom Tabs package name");
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
a(linkedList);
|
|
}
|
|
}
|
|
|
|
public class b extends CustomTabsCallback {
|
|
private final com.applovin.impl.adview.a a;
|
|
|
|
public b(com.applovin.impl.adview.a aVar) {
|
|
this.a = aVar;
|
|
}
|
|
|
|
@Override // androidx.browser.customtabs.CustomTabsCallback
|
|
public void onNavigationEvent(int i, Bundle bundle) {
|
|
com.applovin.impl.sdk.ad.b i2 = this.a.i();
|
|
if (i2 == null) {
|
|
d5.this.a.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
d5.this.a.J().b("CustomTabsManager", "Unable to track navigation event (" + i + "). No ad specified.");
|
|
}
|
|
return;
|
|
}
|
|
switch (i) {
|
|
case 1:
|
|
if (i2.R0()) {
|
|
d5.this.a.i().trackCustomTabsNavigationStarted(i2);
|
|
break;
|
|
}
|
|
break;
|
|
case 2:
|
|
if (i2.R0()) {
|
|
d5.this.a.i().trackCustomTabsNavigationFinished(i2);
|
|
break;
|
|
}
|
|
break;
|
|
case 3:
|
|
if (i2.R0()) {
|
|
d5.this.a.i().trackCustomTabsNavigationFailed(i2);
|
|
break;
|
|
}
|
|
break;
|
|
case 4:
|
|
if (i2.R0()) {
|
|
d5.this.a.i().trackCustomTabsNavigationAborted(i2);
|
|
break;
|
|
}
|
|
break;
|
|
case 5:
|
|
if (i2.R0()) {
|
|
d5.this.a.i().trackCustomTabsTabShown(i2);
|
|
}
|
|
gc.c(this.a.e(), i2, this.a.k());
|
|
break;
|
|
case 6:
|
|
if (i2.R0()) {
|
|
d5.this.a.i().trackCustomTabsTabHidden(i2);
|
|
}
|
|
gc.a(this.a.e(), i2, this.a.k());
|
|
break;
|
|
default:
|
|
d5.this.a.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
d5.this.a.J().a("CustomTabsManager", "Unknown navigation event: " + i);
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
|
|
@Override // androidx.browser.customtabs.CustomTabsCallback
|
|
public void onRelationshipValidationResult(int i, Uri uri, boolean z, Bundle bundle) {
|
|
d5.this.a.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
com.applovin.impl.sdk.n J = d5.this.a.J();
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("Validation ");
|
|
sb.append(z ? AnalyticsEvents.PARAMETER_SHARE_OUTCOME_SUCCEEDED : v8.h.t);
|
|
sb.append(" for session-URL relation(");
|
|
sb.append(i);
|
|
sb.append("), requestedOrigin(");
|
|
sb.append(uri);
|
|
sb.append(")");
|
|
J.a("CustomTabsManager", sb.toString());
|
|
}
|
|
}
|
|
}
|
|
|
|
private CustomTabsIntent a(com.applovin.impl.adview.a aVar, Activity activity) {
|
|
this.a.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.a.J().a("CustomTabsManager", "Creating Custom Tabs intent");
|
|
}
|
|
com.applovin.impl.sdk.ad.b i = aVar.i();
|
|
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder(aVar.j());
|
|
e5 w = i != null ? i.w() : null;
|
|
if (((Boolean) this.a.a(sj.G6)).booleanValue()) {
|
|
builder.setStartAnimations(activity, R.anim.applovin_slide_up_animation, R.anim.applovin_slide_down_animation);
|
|
builder.setExitAnimations(activity, R.anim.applovin_slide_up_animation, R.anim.applovin_slide_down_animation);
|
|
}
|
|
if (w != null) {
|
|
Integer h = w.h();
|
|
if (h != null) {
|
|
builder.setDefaultColorSchemeParams(new CustomTabColorSchemeParams.Builder().setToolbarColor(h.intValue()).build());
|
|
}
|
|
Integer a2 = w.a();
|
|
if (a2 != null) {
|
|
builder.setColorSchemeParams(2, new CustomTabColorSchemeParams.Builder().setToolbarColor(a2.intValue()).build());
|
|
}
|
|
Boolean i2 = w.i();
|
|
if (i2 != null) {
|
|
builder.setUrlBarHidingEnabled(i2.booleanValue());
|
|
}
|
|
Boolean g = w.g();
|
|
if (g != null) {
|
|
builder.setShowTitle(g.booleanValue());
|
|
}
|
|
Boolean c = w.c();
|
|
if (c != null) {
|
|
builder.setInstantAppsEnabled(c.booleanValue());
|
|
}
|
|
Integer f = w.f();
|
|
if (f != null) {
|
|
builder.setShareState(f.intValue());
|
|
}
|
|
}
|
|
CustomTabsIntent build = builder.build();
|
|
if (w != null) {
|
|
String d = w.d();
|
|
if (d != null) {
|
|
build.intent.putExtra("android.intent.extra.REFERRER", Uri.parse(d));
|
|
}
|
|
Bundle r = i.r();
|
|
if (!r.isEmpty()) {
|
|
build.intent.putExtra("com.android.browser.headers", r);
|
|
}
|
|
}
|
|
return build;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public /* synthetic */ void a(com.applovin.impl.adview.a aVar, Activity activity, String str) {
|
|
a(aVar, activity).launchUrl(activity, Uri.parse(str));
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public /* synthetic */ void a(com.applovin.impl.sdk.ad.b bVar, CustomTabsSession customTabsSession) {
|
|
this.b.warmup(0L);
|
|
e5 w = bVar.w();
|
|
if (w == null) {
|
|
return;
|
|
}
|
|
Integer e = w.e();
|
|
String b2 = w.b();
|
|
if (e == null || TextUtils.isEmpty(b2)) {
|
|
return;
|
|
}
|
|
if (customTabsSession == null) {
|
|
this.a.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.a.J().b("CustomTabsManager", "Cannot validate session-URL relation because the session is null");
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
this.a.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.a.J().a("CustomTabsManager", "Validating session-URL relation: " + e + " with digital asset link: " + b2);
|
|
}
|
|
customTabsSession.validateRelationship(e.intValue(), Uri.parse(b2), null);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public /* synthetic */ void a(List list, CustomTabsSession customTabsSession) {
|
|
this.a.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.a.J().a("CustomTabsManager", "Warming up URLs: " + list);
|
|
}
|
|
String str = (String) list.remove(0);
|
|
ArrayList arrayList = new ArrayList(list.size());
|
|
Iterator it = list.iterator();
|
|
while (it.hasNext()) {
|
|
String str2 = (String) it.next();
|
|
Bundle bundle = new Bundle();
|
|
bundle.putParcelable(CustomTabsService.KEY_URL, Uri.parse(str2));
|
|
arrayList.add(bundle);
|
|
}
|
|
boolean mayLaunchUrl = customTabsSession.mayLaunchUrl(Uri.parse(str), null, arrayList);
|
|
this.a.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
com.applovin.impl.sdk.n J = this.a.J();
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("Warmup for URLs ");
|
|
sb.append(mayLaunchUrl ? AnalyticsEvents.PARAMETER_SHARE_OUTCOME_SUCCEEDED : v8.h.t);
|
|
J.a("CustomTabsManager", sb.toString());
|
|
}
|
|
}
|
|
|
|
public void a(final String str, final com.applovin.impl.adview.a aVar, final Activity activity) {
|
|
a("launch url", new Runnable() { // from class: com.applovin.impl.d5$$ExternalSyntheticLambda1
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
d5.this.a(aVar, activity, str);
|
|
}
|
|
});
|
|
}
|
|
|
|
private void a(String str, Runnable runnable) {
|
|
try {
|
|
this.a.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.a.J().a("CustomTabsManager", "Running operation: " + str);
|
|
}
|
|
runnable.run();
|
|
this.a.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.a.J().a("CustomTabsManager", "Finished operation: " + str);
|
|
}
|
|
} catch (Throwable th) {
|
|
this.a.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.a.J().a("CustomTabsManager", "Failed to run operation: " + str, th);
|
|
}
|
|
this.a.E().a("CustomTabsManager", str, th);
|
|
}
|
|
}
|
|
|
|
public CustomTabsSession a(com.applovin.impl.adview.a aVar) {
|
|
if (this.b == null) {
|
|
this.a.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.a.J().a("CustomTabsManager", "Custom Tabs service is not connected, cannot start session");
|
|
}
|
|
return null;
|
|
}
|
|
this.a.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.a.J().a("CustomTabsManager", "Starting Custom Tabs session");
|
|
}
|
|
try {
|
|
CustomTabsSession newSession = this.b.newSession(new b(aVar));
|
|
a(newSession, aVar.i());
|
|
return newSession;
|
|
} catch (Exception e) {
|
|
this.a.J();
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.a.J().a("CustomTabsManager", "Failed to create Custom Tabs session", e);
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
|
|
private void a(final CustomTabsSession customTabsSession, final com.applovin.impl.sdk.ad.b bVar) {
|
|
if (bVar == null || !bVar.A0()) {
|
|
return;
|
|
}
|
|
a("client warmup", new Runnable() { // from class: com.applovin.impl.d5$$ExternalSyntheticLambda0
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
d5.this.a(bVar, customTabsSession);
|
|
}
|
|
});
|
|
}
|
|
}
|