- 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
46 lines
1.5 KiB
Java
46 lines
1.5 KiB
Java
package com.vungle.ads.internal.platform;
|
|
|
|
import android.content.Context;
|
|
import android.util.AndroidRuntimeException;
|
|
import android.webkit.WebSettings;
|
|
import androidx.core.util.Consumer;
|
|
import com.vungle.ads.internal.util.Logger;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public final class WebViewUtil {
|
|
public static final Companion Companion = new Companion(null);
|
|
private static final String TAG = WebViewUtil.class.getSimpleName();
|
|
private final Context context;
|
|
|
|
public WebViewUtil(Context context) {
|
|
Intrinsics.checkNotNullParameter(context, "context");
|
|
this.context = context;
|
|
}
|
|
|
|
public static final class Companion {
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
private Companion() {
|
|
}
|
|
}
|
|
|
|
public final void getUserAgent(Consumer<String> consumer) {
|
|
Intrinsics.checkNotNullParameter(consumer, "consumer");
|
|
try {
|
|
consumer.accept(WebSettings.getDefaultUserAgent(this.context));
|
|
} catch (Exception e) {
|
|
if (e instanceof AndroidRuntimeException) {
|
|
Logger.Companion companion = Logger.Companion;
|
|
String TAG2 = TAG;
|
|
Intrinsics.checkNotNullExpressionValue(TAG2, "TAG");
|
|
companion.e(TAG2, "WebView could be missing here");
|
|
}
|
|
consumer.accept(null);
|
|
}
|
|
}
|
|
}
|