- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
94 lines
2.8 KiB
Java
94 lines
2.8 KiB
Java
package com.applovin.impl;
|
|
|
|
import android.net.Uri;
|
|
import android.os.Bundle;
|
|
import android.webkit.WebView;
|
|
import java.lang.ref.WeakReference;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class rr extends pi {
|
|
private final com.applovin.impl.sdk.n a;
|
|
private WeakReference b;
|
|
|
|
public interface a {
|
|
void a(Uri uri, com.applovin.impl.adview.l lVar);
|
|
|
|
void a(com.applovin.impl.adview.l lVar);
|
|
|
|
void a(com.applovin.impl.adview.l lVar, Bundle bundle);
|
|
|
|
void b(Uri uri, com.applovin.impl.adview.l lVar);
|
|
|
|
void b(com.applovin.impl.adview.l lVar);
|
|
|
|
void c(com.applovin.impl.adview.l lVar);
|
|
|
|
void d(com.applovin.impl.adview.l lVar);
|
|
}
|
|
|
|
public void a(WeakReference weakReference) {
|
|
this.b = weakReference;
|
|
}
|
|
|
|
public rr(com.applovin.impl.sdk.j jVar) {
|
|
this.a = jVar.J();
|
|
}
|
|
|
|
private void a(WebView webView, String str) {
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.a.d("WebViewButtonClient", "Processing click on ad URL \"" + str + "\"");
|
|
}
|
|
if (str == null || !(webView instanceof com.applovin.impl.adview.l)) {
|
|
return;
|
|
}
|
|
com.applovin.impl.adview.l lVar = (com.applovin.impl.adview.l) webView;
|
|
Uri parse = Uri.parse(str);
|
|
String scheme = parse.getScheme();
|
|
String host = parse.getHost();
|
|
String path = parse.getPath();
|
|
a aVar = (a) this.b.get();
|
|
if ("applovin".equalsIgnoreCase(scheme) && "com.applovin.sdk".equalsIgnoreCase(host) && aVar != null) {
|
|
if ("/track_click".equals(path)) {
|
|
aVar.b(lVar);
|
|
return;
|
|
}
|
|
if ("/close_ad".equals(path)) {
|
|
aVar.a(lVar);
|
|
return;
|
|
}
|
|
if ("/skip_ad".equals(path)) {
|
|
aVar.d(lVar);
|
|
return;
|
|
}
|
|
if ("/direct_download".equals(path)) {
|
|
aVar.a(lVar, tp.a(parse));
|
|
return;
|
|
}
|
|
if ("/load_url".equals(path)) {
|
|
aVar.a(parse, lVar);
|
|
return;
|
|
}
|
|
if ("/template_error".equals(path)) {
|
|
aVar.b(parse, lVar);
|
|
return;
|
|
}
|
|
if ("/fully_watched".equals(path)) {
|
|
aVar.c(lVar);
|
|
return;
|
|
}
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.a.k("WebViewButtonClient", "Unknown URL: " + str);
|
|
}
|
|
if (com.applovin.impl.sdk.n.a()) {
|
|
this.a.k("WebViewButtonClient", "Path: " + path);
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // android.webkit.WebViewClient
|
|
public boolean shouldOverrideUrlLoading(WebView webView, String str) {
|
|
a(webView, str);
|
|
return true;
|
|
}
|
|
}
|