正在查看: Vi App v10.18.0 应用的 j2.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Vi App v10.18.0 应用的 j2.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package one.upswing.sdk;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.Configuration;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.CookieManager;
import android.webkit.ValueCallback;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.activity.result.ActivityResultCallback;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.PickVisualMediaRequest;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleCoroutineScope;
import androidx.lifecycle.LifecycleOwnerKt;
import androidx.lifecycle.ViewModelProvider;
import java.lang.ref.WeakReference;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.TuplesKt;
import kotlin.Unit;
import kotlin.collections.CollectionsKt__CollectionsKt;
import kotlin.collections.MapsKt__MapsJVMKt;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
import kotlin.text.StringsKt__StringsJVMKt;
import kotlinx.coroutines.BuildersKt__Builders_commonKt;
import kotlinx.coroutines.CoroutineScope;
import one.upswing.sdk.partner.UpswingTheme;
import one.upswing.sdk.v2;
import one.upswing.sdk.webviewcore.webclient.WebViewErrorData;
import one.upswing.sdk.yesbank.data.JsResponseYesBankDeviceToken;
import one.upswing.sdk.yesbank.data.YesBankDeviceTokenResponse;
import one.upswing.sdk.yesbank.data.YesBankErrorResponse;
import one.upswing.sdk.yesbank.data.YesBankRequestDataWrapper;
import org.bouncycastle.crypto.params.Ed25519PrivateKeyParameters;
import org.bouncycastle.crypto.params.Ed25519PublicKeyParameters;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@Metadata(bv = {}, d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\u0018\u00002\u00020\u0001:\u0001\u0004B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0005"}, d2 = {"Lone/upswing/sdk/j2;", "Landroidx/fragment/app/Fragment;", "<init>", "()V", "a", "sdk_prodWithoutTinkRelease"}, k = 1, mv = {1, 7, 1})
public final class j2 extends Fragment {
@NotNull
public static final a E = new a();
@NotNull
public final ActivityResultLauncher<p1> A;
@NotNull
public final ActivityResultLauncher<PickVisualMediaRequest> B;
@NotNull
public final ActivityResultLauncher<YesBankRequestDataWrapper> C;
@NotNull
public final ActivityResultLauncher<YesBankRequestDataWrapper> D;
@NotNull
public final String a = "https://webapp.upswing.one";
@NotNull
public final String b = "UpswingWebViewFragment";
@NotNull
public final List<Integer> c;
public m d;
public l0 e;
public i1 f;
public y0 g;
public w0 h;
@Nullable
public WebView i;
@Nullable
public LinearLayout f11j;
@Nullable
public TextView f12k;
@Nullable
public Button f13l;
@Nullable
public LinearLayout f14m;
public String n;
@Nullable
public Ed25519PrivateKeyParameters o;
@Nullable
public Ed25519PublicKeyParameters p;
public j0 q;
public YesBankRequestDataWrapper r;
public boolean s;
@Nullable
public ValueCallback<Uri[]> t;
public n0 u;
public a2 v;
public c2 w;
public int x;
public one.upswing.sdk.util.a y;
@NotNull
public final Lazy z;
public static final class a {
}
public class b {
public static final int[] a;
static {
int[] iArr = new int[UpswingTheme.values().length];
iArr[UpswingTheme.LIGHT.ordinal()] = 1;
iArr[UpswingTheme.DARK.ordinal()] = 2;
iArr[UpswingTheme.SYSTEM.ordinal()] = 3;
a = iArr;
}
}
public static final class c extends Lambda implements Function0<k> {
public c() {
super(0);
}
@Override
public final k invoke() {
return (k) new ViewModelProvider(j2.this.requireActivity()).get(k.class);
}
}
@DebugMetadata(c = "one.upswing.sdk.ui.UpswingWebViewFragment$exitSdk$1", f = "UpswingWebViewFragment.kt", i = {}, l = {}, m = "invokeSuspend", n = {}, s = {})
public static final class d extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
public d(Continuation<? super d> continuation) {
super(2, continuation);
}
@Override
@NotNull
public final Continuation<Unit> create(@Nullable Object obj, @NotNull Continuation<?> continuation) {
return j2.this.new d(continuation);
}
@Override
public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
return ((d) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override
@Nullable
public final Object invokeSuspend(@NotNull Object obj) {
IntrinsicsKt__IntrinsicsKt.getCOROUTINE_SUSPENDED();
ResultKt.throwOnFailure(obj);
j2 j2Var = j2.this;
a aVar = j2.E;
j2Var.f();
return Unit.INSTANCE;
}
}
public j2() {
List<Integer> listOf;
Lazy lazy;
listOf = CollectionsKt__CollectionsKt.listOf((Object[]) new Integer[]{-6, -2});
this.c = listOf;
lazy = LazyKt__LazyJVMKt.lazy(new c());
this.z = lazy;
this.A = registerForActivityResult(new r1(), new ActivityResultCallback() {
public final void onActivityResult(Object obj) {
j2.a(j2.this, (q1) obj);
}
});
this.B = registerForActivityResult(new ActivityResultContracts.PickMultipleVisualMedia(0, 1, (DefaultConstructorMarker) null), new ActivityResultCallback() {
public final void onActivityResult(Object obj) {
j2.a(j2.this, (List) obj);
}
});
this.C = registerForActivityResult(new u(), new ActivityResultCallback() {
public final void onActivityResult(Object obj) {
j2.a(j2.this, (v2) obj);
}
});
this.D = registerForActivityResult(new l1(), new ActivityResultCallback() {
public final void onActivityResult(Object obj) {
j2.b(j2.this, (v2) obj);
}
});
}
public static final void a(j2 j2Var, List list) {
if (!list.isEmpty()) {
ValueCallback<Uri[]> valueCallback = j2Var.t;
if (valueCallback != 0) {
valueCallback.onReceiveValue(list.toArray(new Uri[0]));
return;
}
return;
}
ValueCallback<Uri[]> valueCallback2 = j2Var.t;
if (valueCallback2 != null) {
valueCallback2.onReceiveValue(null);
}
}
public static final boolean a(View view) {
return true;
}
public final one.upswing.sdk.partner.UpswingTheme b() {
throw new UnsupportedOperationException("Method not decompiled: one.upswing.sdk.j2.b():one.upswing.sdk.partner.UpswingTheme");
}
@NotNull
public final String c() {
String url;
WebView webView = this.i;
return (webView == null || (url = webView.getUrl()) == null) ? this.a : url;
}
@NotNull
public final String d() {
WebSettings settings;
String userAgentString;
WebView webView = this.i;
return (webView == null || (settings = webView.getSettings()) == null || (userAgentString = settings.getUserAgentString()) == null) ? "NA" : userAgentString;
}
@SuppressLint({"SetJavaScriptEnabled"})
public final void e() {
y0 y0Var;
a2 a2Var;
WebSettings settings;
WebView webView = this.i;
if (webView != null && (settings = webView.getSettings()) != null) {
settings.setJavaScriptEnabled(true);
settings.setAllowFileAccess(false);
settings.setAllowContentAccess(false);
settings.setDomStorageEnabled(true);
settings.setGeolocationEnabled(true);
settings.setMediaPlaybackRequiresUserGesture(false);
}
WebView webView2 = this.i;
if (webView2 != null) {
Context requireContext = requireContext();
y0 y0Var2 = this.g;
l0 l0Var = null;
if (y0Var2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("publishEventHandler");
y0Var = null;
} else {
y0Var = y0Var2;
}
m2 m2Var = new m2(this);
n2 n2Var = new n2(this);
a2 a2Var2 = this.v;
if (a2Var2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("upswingCrashMonitor");
a2Var = null;
} else {
a2Var = a2Var2;
}
webView2.setWebViewClient(new i2(requireContext, y0Var, m2Var, n2Var, a2Var));
webView2.setWebChromeClient(new h2(new l2(this), new u2(new WeakReference(requireActivity()))));
l0 l0Var2 = this.e;
if (l0Var2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("jsEntryPoint");
} else {
l0Var = l0Var2;
}
webView2.addJavascriptInterface(l0Var, "AndroidBridge");
webView2.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public final boolean onLongClick(View view) {
return j2.a(view);
}
});
webView2.setLongClickable(false);
webView2.setHapticFeedbackEnabled(false);
}
WebView.setWebContentsDebuggingEnabled(false);
CookieManager.getInstance().setAcceptThirdPartyCookies(this.i, true);
}
public final void f() {
WebView webView = this.i;
if (webView != null) {
webView.destroy();
}
this.i = null;
this.f11j = null;
this.f12k = null;
this.f13l = null;
this.f14m = null;
}
public final void g() {
UpswingTheme b2 = b();
j0 j0Var = this.q;
j0 j0Var2 = null;
if (j0Var == null) {
Intrinsics.throwUninitializedPropertyAccessException("sharedPreferenceStore");
j0Var = null;
}
int d2 = j0Var.d(b2);
j0 j0Var3 = this.q;
if (j0Var3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("sharedPreferenceStore");
j0Var3 = null;
}
int c2 = j0Var3.c(b2);
j0 j0Var4 = this.q;
if (j0Var4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("sharedPreferenceStore");
j0Var4 = null;
}
int b3 = j0Var4.b(b2);
j0 j0Var5 = this.q;
if (j0Var5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("sharedPreferenceStore");
} else {
j0Var2 = j0Var5;
}
int a2 = j0Var2.a(b2);
LinearLayout linearLayout = this.f14m;
if (linearLayout != null) {
linearLayout.setBackgroundTintList(ColorStateList.valueOf(b3));
}
Button button = this.f13l;
if (button != null) {
button.setBackgroundTintList(ColorStateList.valueOf(d2));
}
Button button2 = this.f13l;
if (button2 != null) {
button2.setTextColor(ColorStateList.valueOf(c2));
}
TextView textView = this.f12k;
if (textView != null) {
textView.setTextColor(ColorStateList.valueOf(a2));
}
LinearLayout linearLayout2 = this.f11j;
if (linearLayout2 != null) {
linearLayout2.setBackgroundTintList(ColorStateList.valueOf(b3));
}
WebView webView = this.i;
if (webView != null) {
webView.setBackgroundColor(b3);
}
}
public final void h() {
Map mapOf;
Map mapOf2;
Map mapOf3;
int i = b.a[b().ordinal()];
y0 y0Var = null;
if (i == 1) {
y0 y0Var2 = this.g;
if (y0Var2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("publishEventHandler");
} else {
y0Var = y0Var2;
}
y0Var.getClass();
mapOf = MapsKt__MapsJVMKt.mapOf(TuplesKt.to("activeThemeMode", "LIGHT"));
y0Var.a().a(a1.ACTIVE_UI_MODE, y0Var.c.toJson(mapOf));
return;
}
if (i != 2) {
y0 y0Var3 = this.g;
if (y0Var3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("publishEventHandler");
} else {
y0Var = y0Var3;
}
y0Var.getClass();
mapOf3 = MapsKt__MapsJVMKt.mapOf(TuplesKt.to("activeThemeMode", "LIGHT"));
y0Var.a().a(a1.ACTIVE_UI_MODE, y0Var.c.toJson(mapOf3));
return;
}
y0 y0Var4 = this.g;
if (y0Var4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("publishEventHandler");
} else {
y0Var = y0Var4;
}
y0Var.getClass();
mapOf2 = MapsKt__MapsJVMKt.mapOf(TuplesKt.to("activeThemeMode", "DARK"));
y0Var.a().a(a1.ACTIVE_UI_MODE, y0Var.c.toJson(mapOf2));
}
public final void onAttach(@NotNull Context context) {
super.onAttach(context);
requireActivity().setRequestedOrientation(1);
}
public final void onConfigurationChanged(@NotNull Configuration configuration) {
super.onConfigurationChanged(configuration);
h();
g();
}
public final void onCreate(@Nullable Bundle bundle) {
super.onCreate(bundle);
this.y = new one.upswing.sdk.util.a(requireActivity(), requireActivity().getActivityResultRegistry());
Lifecycle lifecycle = getLifecycle();
one.upswing.sdk.util.a aVar = this.y;
if (aVar == null) {
Intrinsics.throwUninitializedPropertyAccessException("biometricAuthLifecycleObserverProvider");
aVar = null;
}
lifecycle.addObserver(aVar.a);
}
@Nullable
public final View onCreateView(@NotNull LayoutInflater layoutInflater, @Nullable ViewGroup viewGroup, @Nullable Bundle bundle) {
return layoutInflater.inflate(R.layout.upswing_web_view_fragment, viewGroup, false);
}
public final void onDestroyView() {
super.onDestroyView();
f();
}
public final void onDetach() {
super.onDetach();
requireActivity().setRequestedOrientation(-1);
}
public final void onResume() {
super.onResume();
y0 y0Var = this.g;
if (y0Var == null) {
Intrinsics.throwUninitializedPropertyAccessException("publishEventHandler");
y0Var = null;
}
y0Var.a().a(a1.FRAGMENT_RESUMED, "{}");
}
public final void onStop() {
super.onStop();
i1 i1Var = this.f;
if (i1Var == null) {
Intrinsics.throwUninitializedPropertyAccessException("smsUtil");
i1Var = null;
}
if (i1Var.e) {
i1Var.a.unregisterReceiver(i1Var.f);
i1Var.a.unregisterReceiver(i1Var.g);
i1Var.e = false;
}
}
public final void onViewCreated(@NotNull View view, @Nullable Bundle bundle) {
w0 w0Var;
j0 j0Var;
m mVar;
y0 y0Var;
n0 n0Var;
one.upswing.sdk.util.a aVar;
i1 i1Var;
boolean z;
String str;
boolean equals$default;
super.onViewCreated(view, bundle);
this.q = g2.f.a(requireContext().getApplicationContext());
this.v = a2.b.a(requireContext().getApplicationContext());
this.w = c2.c.a(requireContext().getApplicationContext());
this.i = (WebView) requireView().findViewById(R.id.upswing_web_view);
LinearLayout linearLayout = (LinearLayout) requireView().findViewById(R.id.error_layout);
this.f11j = linearLayout;
this.f12k = linearLayout != null ? (TextView) linearLayout.findViewById(R.id.error_msg_tv) : null;
LinearLayout linearLayout2 = this.f11j;
this.f13l = linearLayout2 != null ? (Button) linearLayout2.findViewById(R.id.retry_button) : null;
LinearLayout linearLayout3 = this.f11j;
TextView textView = linearLayout3 != null ? (TextView) linearLayout3.findViewById(R.id.btn_go_back) : null;
if (textView != null) {
textView.setVisibility(8);
}
this.f14m = (LinearLayout) requireView().findViewById(R.id.upswing_web_view_fragment_layout);
this.g = new y0(this, this.i);
this.d = new m(requireActivity());
j0 j0Var2 = this.q;
if (j0Var2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("sharedPreferenceStore");
j0Var2 = null;
}
this.h = new w0(this, j0Var2);
y0 y0Var2 = this.g;
if (y0Var2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("publishEventHandler");
y0Var2 = null;
}
y0Var2.a().a(a1.PERSISTENT_STORAGE_FILE_LOADED, "{}");
a2 a2Var = this.v;
if (a2Var == null) {
Intrinsics.throwUninitializedPropertyAccessException("upswingCrashMonitor");
a2Var = null;
}
String str2 = this.a;
j0 j0Var3 = this.q;
if (j0Var3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("sharedPreferenceStore");
j0Var3 = null;
}
this.u = new n0(a2Var, str2, j0Var3.f());
FragmentActivity requireActivity = requireActivity();
y0 y0Var3 = this.g;
if (y0Var3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("publishEventHandler");
y0Var3 = null;
}
this.f = new i1(requireActivity, y0Var3);
FragmentActivity requireActivity2 = requireActivity();
w0 w0Var2 = this.h;
if (w0Var2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("permissionUtil");
w0Var = null;
} else {
w0Var = w0Var2;
}
j0 j0Var4 = this.q;
if (j0Var4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("sharedPreferenceStore");
j0Var = null;
} else {
j0Var = j0Var4;
}
m mVar2 = this.d;
if (mVar2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("deviceInfo");
mVar = null;
} else {
mVar = mVar2;
}
LifecycleCoroutineScope lifecycleScope = LifecycleOwnerKt.getLifecycleScope(this);
y0 y0Var4 = this.g;
if (y0Var4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("publishEventHandler");
y0Var = null;
} else {
y0Var = y0Var4;
}
n0 n0Var2 = this.u;
if (n0Var2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("jsInterfaceProxy");
n0Var = null;
} else {
n0Var = n0Var2;
}
one.upswing.sdk.util.a aVar2 = this.y;
if (aVar2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("biometricAuthLifecycleObserverProvider");
aVar = null;
} else {
aVar = aVar2;
}
i1 i1Var2 = this.f;
if (i1Var2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("smsUtil");
i1Var = null;
} else {
i1Var = i1Var2;
}
this.e = new l0(requireActivity2, this, w0Var, j0Var, mVar, lifecycleScope, y0Var, n0Var, aVar, i1Var, (k) this.z.getValue());
g();
e();
j0 j0Var5 = this.q;
if (j0Var5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("sharedPreferenceStore");
j0Var5 = null;
}
if (j0Var5.g()) {
j0 j0Var6 = this.q;
if (j0Var6 == null) {
Intrinsics.throwUninitializedPropertyAccessException("sharedPreferenceStore");
j0Var6 = null;
}
Ed25519PrivateKeyParameters b2 = j0Var6.b();
this.o = b2;
this.p = b2 != null ? b2.generatePublicKey() : null;
}
l0 l0Var = this.e;
if (l0Var == null) {
Intrinsics.throwUninitializedPropertyAccessException("jsEntryPoint");
l0Var = null;
}
if (l0Var.isDeviceRooted()) {
a2 a2Var2 = this.v;
if (a2Var2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("upswingCrashMonitor");
a2Var2 = null;
}
a2Var2.a.b();
a("Rooted device not supported", "Go back", new k2(this));
z = true;
} else {
z = false;
}
if (!z) {
Bundle arguments = getArguments();
boolean z2 = arguments != null ? arguments.getBoolean("is_fromDeep_link", false) : false;
String string = arguments != null ? arguments.getString("deep_link_action") : null;
if (arguments == null || (str = arguments.getString("deep_link_web_route")) == null) {
str = "pciInput";
}
y0 y0Var5 = this.g;
if (y0Var5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("publishEventHandler");
y0Var5 = null;
}
y0Var5.a().a(a1.CUSTOMER_INITIALIZER_SET, "{}");
j0 j0Var7 = this.q;
if (j0Var7 == null) {
Intrinsics.throwUninitializedPropertyAccessException("sharedPreferenceStore");
j0Var7 = null;
}
String f = j0Var7.f();
if (z2) {
equals$default = StringsKt__StringsJVMKt.equals$default(string, "webview", false, 2, null);
if (equals$default) {
a(str);
}
}
a("pciInput?partnerCode=" + f);
}
try {
requireActivity().getOnBackPressedDispatcher().addCallback(getViewLifecycleOwner(), new o2(this));
} catch (Exception e) {
e.getMessage();
}
}
public static final void a(j2 j2Var, String str) {
WebView webView = j2Var.i;
if (webView != null) {
webView.loadUrl("javascript:document.open();document.close();");
}
WebView webView2 = j2Var.i;
if (webView2 != null) {
webView2.loadUrl(str);
}
}
public final void a(WebViewErrorData webViewErrorData) {
a2 a2Var = this.v;
if (a2Var == null) {
Intrinsics.throwUninitializedPropertyAccessException("upswingCrashMonitor");
a2Var = null;
}
h0 h0Var = a2Var.a;
StringBuilder a2 = a3.a("onReceivedError-> error code: ");
a2.append(webViewErrorData.getErrorCode());
a2.append(", errorDesc: ");
a2.append(webViewErrorData.getErrorDesc());
a2.append(" , url: ");
a2.append(webViewErrorData.getCurrentUrl());
h0Var.a(a2.toString());
}
public static final void b(j2 j2Var, v2 v2Var) {
y0 y0Var = null;
YesBankRequestDataWrapper yesBankRequestDataWrapper = null;
if (v2Var instanceof v2.b) {
Objects.toString(((v2.b) v2Var).a);
j2Var.s = true;
YesBankRequestDataWrapper yesBankRequestDataWrapper2 = j2Var.r;
if (yesBankRequestDataWrapper2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mYesBankRequestDataWrapper");
} else {
yesBankRequestDataWrapper = yesBankRequestDataWrapper2;
}
j2Var.a(yesBankRequestDataWrapper);
return;
}
if (v2Var instanceof v2.a) {
v2.a aVar = (v2.a) v2Var;
Objects.toString(aVar.a);
y0 y0Var2 = j2Var.g;
if (y0Var2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("publishEventHandler");
} else {
y0Var = y0Var2;
}
y0Var.a(aVar.a);
}
}
public final void a(String str, String str2, final Function0<Unit> function0) {
WebView webView = this.i;
if (webView != null) {
webView.setVisibility(8);
}
LinearLayout linearLayout = this.f11j;
if (linearLayout != null) {
linearLayout.setVisibility(0);
}
TextView textView = this.f12k;
if (textView != null) {
textView.setText(str);
}
Button button = this.f13l;
if (button != null) {
button.setText(str2);
}
Button button2 = this.f13l;
if (button2 != null) {
button2.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
j2.a(Function0.this, view);
}
});
}
}
public static final void a(Function0 function0, View view) {
function0.invoke();
}
public final void a(String str) {
WebView webView = this.i;
if (webView != null) {
webView.loadUrl(this.a + '/' + str);
}
}
public static final void a(j2 j2Var, v2 v2Var) {
y0 y0Var = null;
if (v2Var instanceof v2.b) {
v2.b bVar = (v2.b) v2Var;
Objects.toString(bVar.a);
y0 y0Var2 = j2Var.g;
if (y0Var2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("publishEventHandler");
} else {
y0Var = y0Var2;
}
YesBankDeviceTokenResponse yesBankDeviceTokenResponse = (YesBankDeviceTokenResponse) bVar.a;
boolean z = j2Var.s;
y0Var.getClass();
y0Var.a().a(a1.YES_BANK_TOKEN_RECEIVED, y0Var.c.toJson(new JsResponseYesBankDeviceToken("SUCCESS", yesBankDeviceTokenResponse.getStatusCode(), yesBankDeviceTokenResponse.getDeviceToken(), yesBankDeviceTokenResponse.getYppReferenceNumber(), z, yesBankDeviceTokenResponse.getResult())));
j2Var.s = false;
return;
}
if (v2Var instanceof v2.a) {
v2.a aVar = (v2.a) v2Var;
Objects.toString(aVar.a);
if (Intrinsics.areEqual(aVar.a.getStatusCode(), "DB009")) {
ActivityResultLauncher<YesBankRequestDataWrapper> activityResultLauncher = j2Var.D;
?? r10 = j2Var.r;
if (r10 == 0) {
Intrinsics.throwUninitializedPropertyAccessException("mYesBankRequestDataWrapper");
} else {
y0Var = r10;
}
activityResultLauncher.launch(y0Var);
return;
}
y0 y0Var3 = j2Var.g;
if (y0Var3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("publishEventHandler");
} else {
y0Var = y0Var3;
}
y0Var.a(aVar.a);
}
}
public final void a(@NotNull YesBankRequestDataWrapper yesBankRequestDataWrapper) {
Objects.toString(yesBankRequestDataWrapper);
y0 y0Var = null;
try {
this.r = yesBankRequestDataWrapper;
ActivityResultLauncher<YesBankRequestDataWrapper> activityResultLauncher = this.C;
if (yesBankRequestDataWrapper == null) {
Intrinsics.throwUninitializedPropertyAccessException("mYesBankRequestDataWrapper");
yesBankRequestDataWrapper = null;
}
activityResultLauncher.launch(yesBankRequestDataWrapper);
} catch (Exception e) {
e.getMessage();
a2 a2Var = this.v;
if (a2Var == null) {
Intrinsics.throwUninitializedPropertyAccessException("upswingCrashMonitor");
a2Var = null;
}
a2Var.a.a(e);
y0 y0Var2 = this.g;
if (y0Var2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("publishEventHandler");
} else {
y0Var = y0Var2;
}
String message = e.getMessage();
Intrinsics.checkNotNull(message);
y0Var.a(new YesBankErrorResponse(message, ""));
}
}
public static final void a(j2 j2Var, q1 q1Var) {
y0 y0Var = j2Var.g;
if (y0Var == null) {
Intrinsics.throwUninitializedPropertyAccessException("publishEventHandler");
y0Var = null;
}
y0Var.a().a(a1.RETURNED_FROM_UPI_APP, y0Var.c.toJson(""));
}
public final void a() {
BuildersKt__Builders_commonKt.launch$default(LifecycleOwnerKt.getLifecycleScope(getViewLifecycleOwner()), null, null, new d(null), 3, null);
requireActivity().finish();
}
}