Files
rr3-apk/decompiled-community/sources/com/fyber/inneractive/sdk/util/z0.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- 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
2026-02-18 15:48:36 -08:00

128 lines
3.4 KiB
Java

package com.fyber.inneractive.sdk.util;
import android.content.Context;
import android.os.Handler;
import android.text.TextUtils;
import android.webkit.WebSettings;
import android.webkit.WebView;
import androidx.annotation.RequiresApi;
import com.ironsource.ad;
import java.util.concurrent.atomic.AtomicBoolean;
/* loaded from: classes2.dex */
public final class z0 {
public volatile String a = null;
public Context b = null;
public final AtomicBoolean c = new AtomicBoolean(false);
public final a d = new a();
public class a implements Runnable {
public a() {
}
@Override // java.lang.Runnable
public final void run() {
z0.this.e();
}
}
public class b implements Runnable {
public b() {
}
@Override // java.lang.Runnable
public final void run() {
z0.this.c();
}
}
public class c implements Runnable {
public c() {
}
@Override // java.lang.Runnable
public final void run() {
z0.this.b();
}
}
public final String a() {
if (!TextUtils.isEmpty(this.a)) {
return this.a;
}
a aVar = this.d;
if (aVar != null) {
Handler handler = p.b;
handler.removeCallbacks(aVar);
handler.postDelayed(this.d, 50L);
}
return System.getProperty("http.agent");
}
public final void b() {
WebView webView;
String str = null;
try {
webView = new WebView(this.b);
try {
str = webView.getSettings().getUserAgentString();
} catch (Throwable unused) {
}
} catch (Throwable unused2) {
webView = null;
}
if (!TextUtils.isEmpty(str)) {
this.a = str;
if (!TextUtils.isEmpty(this.a)) {
IAlog.a("UserAgentProvider | populated user agent form updateUserAgentIfPossible", new Object[0]);
this.c.compareAndSet(false, true);
}
p.a(new a1(this, str));
}
if (webView != null) {
webView.destroy();
}
}
public final void d() {
if (this.b != null && TextUtils.isEmpty(this.a)) {
this.a = this.b.getSharedPreferences("fyber.ua", 0).getString(ad.U, null);
if (!TextUtils.isEmpty(this.a)) {
IAlog.a("UserAgentProvider | populated user agent from shared prefs", new Object[0]);
this.c.compareAndSet(false, true);
}
e();
}
if (this.c.get()) {
return;
}
c();
}
public final void e() {
p.a(new b());
}
@RequiresApi(api = 17)
public final void c() {
String str;
Context context = this.b;
if (context != null) {
try {
str = WebSettings.getDefaultUserAgent(context);
} catch (Throwable unused) {
str = null;
}
if (TextUtils.isEmpty(str)) {
return;
}
this.a = str;
if (!TextUtils.isEmpty(this.a)) {
IAlog.a("UserAgentProvider | populated user agent form updateUserAgentIfPossible", new Object[0]);
this.c.compareAndSet(false, true);
}
p.a(new a1(this, str));
}
}
}