package com.vungle.warren.utility; import android.content.Context; import android.content.Intent; import android.text.TextUtils; import android.util.Log; import com.vungle.warren.utility.a; import java.net.URISyntaxException; /* loaded from: classes2.dex */ public abstract class h { /* renamed from: a, reason: collision with root package name */ public static final String f8597a = "h"; private static Intent a(String str, boolean z10) { Intent intent = null; try { if (!TextUtils.isEmpty(str)) { intent = Intent.parseUri(str, 0); } if (intent != null && z10) { intent.setFlags(268435456); } } catch (URISyntaxException e10) { Log.e(f8597a, "url format is not correct " + e10.getLocalizedMessage()); } return intent; } public static boolean b(String str, String str2, Context context, a.f fVar, boolean z10, l8.f fVar2) { if ((TextUtils.isEmpty(str) && TextUtils.isEmpty(str2)) || context == null) { return false; } try { a.x(context, a(str, z10), a(str2, z10), fVar, fVar2); return true; } catch (Exception e10) { String str3 = f8597a; Log.e(str3, "Error while opening url" + e10.getLocalizedMessage()); Log.d(str3, "Cannot open url " + str2); return false; } } }