Files
rr3-apk/decompiled/sources/com/fyber/inneractive/sdk/click/h.java
Daniel Elliott f9d20bb3fc 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>
2026-02-18 14:52:23 -08:00

89 lines
3.9 KiB
Java

package com.fyber.inneractive.sdk.click;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import com.fyber.inneractive.sdk.activities.InneractiveInternalBrowserActivity;
import com.fyber.inneractive.sdk.click.l;
import com.fyber.inneractive.sdk.util.IAlog;
import com.fyber.inneractive.sdk.util.a0;
import com.google.android.gms.drive.DriveFile;
import java.util.ArrayList;
/* loaded from: classes2.dex */
public final class h implements a {
public final String a;
public final boolean b;
public h(boolean z, String str) {
this.a = str;
this.b = z;
}
@Override // com.fyber.inneractive.sdk.click.a
public final boolean a(Uri uri, l lVar) {
return "fybernativebrowser".equalsIgnoreCase(uri.getScheme()) || "fybernativebrowser".equalsIgnoreCase(this.a) || this.b;
}
@Override // com.fyber.inneractive.sdk.click.a
public final b a(Context context, Uri uri, ArrayList arrayList) {
a0.a aVar;
String uri2 = uri.toString();
a0.c cVar = a0.c.OPEN_EVERYTHING;
try {
context.getClass();
} catch (Throwable unused) {
}
try {
IAlog.a("IAJavaUtil - valid url found: '%s' opening browser", uri2);
try {
try {
Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(uri2));
if (!(context instanceof Activity)) {
intent.setFlags(DriveFile.MODE_READ_ONLY);
}
context.startActivity(intent);
aVar = new a0.a(a0.d.OPEN_IN_EXTERNAL_BROWSER, null);
} catch (Throwable unused2) {
IAlog.f("Failed opening chrome for a special uri.", new Object[0]);
aVar = new a0.a(a0.d.FAILED, new a0.b("tryOpeningChromeGracefully has failed and couldn't open the url"));
}
} catch (ActivityNotFoundException unused3) {
Intent intent2 = new Intent("android.intent.action.VIEW", Uri.parse(String.format("googlechrome://navigate?url=%s", uri2)));
if (!(context instanceof Activity)) {
intent2.addFlags(DriveFile.MODE_READ_ONLY);
}
context.startActivity(intent2);
aVar = new a0.a(a0.d.OPENED_USING_CHROME_NAVIGATE, null);
} catch (Throwable unused4) {
if (a0.e(uri2) || a0.d(uri2) || cVar == a0.c.DO_NOT_OPEN_IN_INTERNAL_BROWSER) {
aVar = new a0.a(a0.d.FAILED, new a0.b("canOpenInExternalBrowser has decided it cant be opened and shouldUseInternalBrowser was set to true"));
} else {
Intent intent3 = new Intent(context, (Class<?>) InneractiveInternalBrowserActivity.class);
intent3.putExtra(InneractiveInternalBrowserActivity.URL_EXTRA, uri2);
intent3.putExtra("spotId", (String) null);
if (!(context instanceof Activity)) {
intent3.setFlags(DriveFile.MODE_READ_ONLY);
}
context.startActivity(intent3);
aVar = new a0.a(a0.d.OPENED_IN_INTERNAL_BROWSER, null);
}
}
} catch (Throwable th) {
IAlog.a("IAJavaUtil - could not open a browser for url: %s", uri2);
aVar = new a0.a(a0.d.FAILED, th);
}
if (arrayList != null) {
Throwable th2 = aVar.b;
if (th2 != null) {
arrayList.add(new i(uri2, false, null, th2.toString()));
} else {
arrayList.add(new i(uri2, true, l.d.OPENED_IN_EXTERNAL_BROWSER, null));
}
}
return l.a(uri.toString(), l.d.OPENED_IN_EXTERNAL_BROWSER, "FyberNativeBrowser");
}
}