正在查看: Oolka v2.4.42 应用的 UpswingActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Oolka v2.4.42 应用的 UpswingActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package one.upswing.sdk.ui;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.ColorStateList;
import android.content.res.Configuration;
import android.graphics.Color;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.activity.d0;
import androidx.activity.r;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.e;
import androidx.core.view.WindowInsetsCompat;
import androidx.core.view.a3;
import androidx.core.view.h0;
import androidx.core.view.m1;
import androidx.core.view.z0;
import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.c0;
import androidx.lifecycle.o;
import in.juspay.hyper.constants.Labels;
import in.juspay.hyper.constants.LogCategory;
import java.util.LinkedHashMap;
import kotlin.Metadata;
import kotlin.NoWhenBranchMatchedException;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.i;
import kotlinx.coroutines.x0;
import one.upswing.sdk.c2;
import one.upswing.sdk.c3;
import one.upswing.sdk.c6;
import one.upswing.sdk.e2;
import one.upswing.sdk.f6;
import one.upswing.sdk.h2;
import one.upswing.sdk.h3;
import one.upswing.sdk.i2;
import one.upswing.sdk.j3;
import one.upswing.sdk.l2;
import one.upswing.sdk.p2;
import one.upswing.sdk.p6;
import one.upswing.sdk.partner.UpswingTheme;
import one.upswing.sdk.q4;
import one.upswing.sdk.s6;
import one.upswing.sdk.ui.util.UpswingDeeplinkData;
import one.upswing.sdk.v4;
import one.upswing.sdk.w5;
import one.upswing.sdk.y1;
import one.upswing.sdk.y5;
import one.upswing.sdk.z;
import one.upswing.sdk.z5;
@Metadata
@SourceDebugExtension({"SMAP\nUpswingActivity.kt\nKotlin\n*S Kotlin\n*F\n+ 1 UpswingActivity.kt\none/upswing/sdk/ui/UpswingActivity\n+ 2 LifecycleExtension.kt\none/upswing/sdk/apihelper/LifecycleExtensionKt\n*L\n1#1,399:1\n15#2,8:400\n25#2:408\n*S KotlinDebug\n*F\n+ 1 UpswingActivity.kt\none/upswing/sdk/ui/UpswingActivity\n*L\n128#1:400,8\n169#1:408\n*E\n"})
public final class UpswingActivity extends AppCompatActivity {
public static final int x1 = 0;
public Button A0;
public TextView C0;
public one.upswing.sdk.util.b G;
public c3 H;
public LinearLayout I;
public LinearLayout c0;
public TextView c1;
public l2 p1;
public static final WindowInsetsCompat O(LinearLayout linearLayout, View view, WindowInsetsCompat windowInsetsCompat) {
e f = windowInsetsCompat.f(WindowInsetsCompat.l.h() | WindowInsetsCompat.l.b() | WindowInsetsCompat.l.c());
linearLayout.setPadding(f.a, f.b, f.c, f.d);
return windowInsetsCompat;
}
public static final void q0(UpswingActivity upswingActivity, View view) {
if (y5.a(upswingActivity)) {
Intent intent = upswingActivity.getIntent();
upswingActivity.finish();
upswingActivity.startActivity(intent);
}
}
public static final void t0(UpswingActivity upswingActivity, View view) {
upswingActivity.finish();
}
public final void a(Intent intent) {
UpswingDeeplinkData upswingDeeplinkData;
String queryParameter;
String queryParameter2;
if (intent != null) {
boolean booleanExtra = intent.getBooleanExtra("start_upswing_act_via_deep_link", false);
one.upswing.sdk.util.b bVar = null;
String str = "pciInput";
String str2 = Labels.Android.WEBVIEW;
if (booleanExtra) {
String action = intent.getAction();
String stringExtra = intent.getStringExtra("deeplink_value_sent_via_partner");
Uri parse = stringExtra != null ? Uri.parse(stringExtra) : null;
if (!Intrinsics.areEqual(action, "android.intent.action.VIEW") || parse == null) {
upswingDeeplinkData = new UpswingDeeplinkData(Labels.Android.WEBVIEW, "pciInput");
} else {
String stringExtra2 = intent.getStringExtra("deeplink_value_sent_via_partner");
Uri parse2 = stringExtra2 != null ? Uri.parse(stringExtra2) : null;
if (parse2 != null && (queryParameter2 = parse2.getQueryParameter(LogCategory.ACTION)) != null) {
str2 = queryParameter2;
}
if (parse2 != null && (queryParameter = parse2.getQueryParameter("redirect")) != null) {
str = queryParameter;
}
upswingDeeplinkData = new UpswingDeeplinkData(str2, str);
}
} else {
upswingDeeplinkData = new UpswingDeeplinkData(Labels.Android.WEBVIEW, "pciInput");
}
if (!new z(this).d.c()) {
r0(booleanExtra, upswingDeeplinkData);
return;
}
one.upswing.sdk.util.b bVar2 = this.G;
if (bVar2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("biometricAuthLifecycleObserverProvider");
} else {
bVar = bVar2;
}
bVar.a.a(new z5(this, booleanExtra, upswingDeeplinkData), new c6(this), new f6(this));
}
}
public final void n0() {
final LinearLayout linearLayout = (LinearLayout) findViewById(h2.g);
z0.G0(linearLayout, new h0() {
public final WindowInsetsCompat onApplyWindowInsets(View view, WindowInsetsCompat windowInsetsCompat) {
return UpswingActivity.O(linearLayout, view, windowInsetsCompat);
}
});
}
public final void o0(Configuration configuration) {
UpswingTheme upswingTheme;
int parseColor;
int parseColor2;
int parseColor3;
int parseColor4;
c3 c3Var = this.H;
TextView textView = null;
if (c3Var == null) {
Intrinsics.throwUninitializedPropertyAccessException("sharedPreferenceStore");
c3Var = null;
}
int i = w5.a[UpswingTheme.valueOf(((y1) ((e2) ((j3) c3Var).c.getValue())).a("upswing_web_ui_theme_mode", "LIGHT")).ordinal()];
boolean z = true;
if (i == 1) {
upswingTheme = UpswingTheme.LIGHT;
} else if (i == 2) {
upswingTheme = UpswingTheme.DARK;
} else {
if (i != 3) {
throw new NoWhenBranchMatchedException();
}
int i2 = configuration.uiMode & 48;
upswingTheme = i2 != 16 ? i2 != 32 ? UpswingTheme.LIGHT : UpswingTheme.DARK : UpswingTheme.LIGHT;
}
try {
if (Build.VERSION.SDK_INT >= 35) {
if (upswingTheme != UpswingTheme.LIGHT) {
z = false;
}
a3 a = m1.a(getWindow(), getWindow().getDecorView());
a.e(z);
a.d(z);
} else {
Window window = getWindow();
c3 c3Var2 = this.H;
if (c3Var2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("sharedPreferenceStore");
c3Var2 = null;
}
window.setStatusBarColor(((SharedPreferences) ((y1) ((e2) ((j3) c3Var2).c.getValue())).b.getValue()).getInt("status_bar_color", -16777216));
}
} catch (Exception e) {
e.getMessage();
}
c3 c3Var3 = this.H;
if (c3Var3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("sharedPreferenceStore");
c3Var3 = null;
}
try {
parseColor = Color.parseColor(q4.a(((j3) c3Var3).e(), upswingTheme, v4.a));
} catch (IllegalArgumentException unused) {
parseColor = Color.parseColor("#373084");
}
c3 c3Var4 = this.H;
if (c3Var4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("sharedPreferenceStore");
c3Var4 = null;
}
try {
parseColor2 = Color.parseColor(q4.a(((j3) c3Var4).e(), upswingTheme, v4.b));
} catch (IllegalArgumentException unused2) {
parseColor2 = Color.parseColor("#FFFFFF");
}
c3 c3Var5 = this.H;
if (c3Var5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("sharedPreferenceStore");
c3Var5 = null;
}
try {
parseColor3 = Color.parseColor(q4.a(((j3) c3Var5).e(), upswingTheme, v4.c));
} catch (IllegalArgumentException unused3) {
parseColor3 = Color.parseColor("#FFFFFF");
}
c3 c3Var6 = this.H;
if (c3Var6 == null) {
Intrinsics.throwUninitializedPropertyAccessException("sharedPreferenceStore");
c3Var6 = null;
}
try {
parseColor4 = Color.parseColor(q4.a(((j3) c3Var6).e(), upswingTheme, v4.d));
} catch (IllegalArgumentException unused4) {
parseColor4 = Color.parseColor("#000000");
}
LinearLayout linearLayout = this.I;
if (linearLayout == null) {
Intrinsics.throwUninitializedPropertyAccessException("containerLayout");
linearLayout = null;
}
linearLayout.setBackgroundTintList(ColorStateList.valueOf(parseColor3));
LinearLayout linearLayout2 = this.c0;
if (linearLayout2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("internetErrorLayout");
linearLayout2 = null;
}
linearLayout2.setBackgroundTintList(ColorStateList.valueOf(parseColor3));
Button button = this.A0;
if (button == null) {
Intrinsics.throwUninitializedPropertyAccessException("retryBtn");
button = null;
}
button.setBackgroundTintList(ColorStateList.valueOf(parseColor));
Button button2 = this.A0;
if (button2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("retryBtn");
button2 = null;
}
button2.setTextColor(ColorStateList.valueOf(parseColor2));
TextView textView2 = this.C0;
if (textView2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("gotBackTextBtn");
textView2 = null;
}
textView2.setTextColor(ColorStateList.valueOf(parseColor4));
TextView textView3 = this.c1;
if (textView3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("errorMsgTv");
} else {
textView = textView3;
}
textView.setTextColor(ColorStateList.valueOf(parseColor4));
}
public final void onConfigurationChanged(Configuration configuration) {
super.onConfigurationChanged(configuration);
o0(configuration);
}
public final void onCreate(Bundle bundle) {
super/*androidx.fragment.app.FragmentActivity*/.onCreate(bundle);
one.upswing.sdk.util.b bVar = null;
r.b(this, (d0) null, (d0) null, 3, (Object) null);
setContentView(i2.d);
n0();
this.I = (LinearLayout) findViewById(h2.g);
this.c0 = (LinearLayout) findViewById(h2.e);
this.A0 = (Button) findViewById(h2.f);
this.C0 = (TextView) findViewById(h2.b);
this.c1 = (TextView) findViewById(h2.d);
LinearLayout linearLayout = this.c0;
if (linearLayout == null) {
Intrinsics.throwUninitializedPropertyAccessException("internetErrorLayout");
linearLayout = null;
}
linearLayout.setVisibility(8);
this.G = new one.upswing.sdk.util.b(this, getActivityResultRegistry());
Lifecycle lifecycle = getLifecycle();
one.upswing.sdk.util.b bVar2 = this.G;
if (bVar2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("biometricAuthLifecycleObserverProvider");
} else {
bVar = bVar2;
}
lifecycle.a(bVar.a);
this.H = (c3) j3.f.a(getApplicationContext());
this.p1 = (l2) new ViewModelProvider(this, new s6(this)).a(l2.class);
o0(getResources().getConfiguration());
if (y5.a(this)) {
return;
}
s0();
}
public final void onNewIntent(Intent intent) {
super/*androidx.activity.ComponentActivity*/.onNewIntent(intent);
a(intent);
}
public final void onPostCreate(Bundle bundle) {
super.onPostCreate(bundle);
l2 l2Var = this.p1;
if (l2Var == null) {
Intrinsics.throwUninitializedPropertyAccessException("sdkRemoteConfigViewModel");
l2Var = null;
}
i.e(o.a(this), null, null, new p6(this, Lifecycle.b.CREATED, l2Var.f, null, this), 3, null);
l2 l2Var2 = this.p1;
if (l2Var2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("sdkRemoteConfigViewModel");
l2Var2 = null;
}
l2Var2.getClass();
kotlinx.coroutines.h0 a = c0.a(l2Var2);
l2Var2.a.getClass();
i.e(a, x0.c(), null, new c2(l2Var2, null), 2, null);
}
public final void onStart() {
super.onStart();
one.upswing.sdk.c.b.a(getApplicationContext());
}
public final void onStop() {
super.onStop();
LinkedHashMap linkedHashMap = h3.a;
linkedHashMap.clear();
linkedHashMap.isEmpty();
((one.upswing.sdk.c) one.upswing.sdk.c.b.a(getApplicationContext())).a.a();
}
public final void p0(FragmentTransaction fragmentTransaction) {
try {
if (getSupportFragmentManager().Q0()) {
fragmentTransaction.j();
} else {
fragmentTransaction.i();
}
} catch (IllegalStateException e) {
((one.upswing.sdk.c) one.upswing.sdk.c.b.a(getApplicationContext())).a.c(e);
}
}
public final void r0(boolean z, UpswingDeeplinkData upswingDeeplinkData) {
if (!z) {
if (z) {
return;
}
p2 p2Var = new p2();
p2Var.setArguments(new Bundle());
FragmentTransaction p = getSupportFragmentManager().p();
p.q(h2.g, p2Var);
p0(p);
return;
}
upswingDeeplinkData.getAction();
upswingDeeplinkData.getWebRoute();
int i = p2.M;
String action = upswingDeeplinkData.getAction();
String webRoute = upswingDeeplinkData.getWebRoute();
p2 p2Var2 = new p2();
Bundle bundle = new Bundle();
bundle.putBoolean("is_fromDeep_link", true);
bundle.putString("deep_link_action", action);
bundle.putString("deep_link_web_route", webRoute);
p2Var2.setArguments(bundle);
FragmentTransaction p2 = getSupportFragmentManager().p();
p2.q(h2.g, p2Var2);
if (getSupportFragmentManager().v0().size() > 1) {
p2.g((String) null);
}
p0(p2);
}
public final void s0() {
LinearLayout linearLayout = this.c0;
TextView textView = null;
if (linearLayout == null) {
Intrinsics.throwUninitializedPropertyAccessException("internetErrorLayout");
linearLayout = null;
}
linearLayout.setVisibility(0);
Button button = this.A0;
if (button == null) {
Intrinsics.throwUninitializedPropertyAccessException("retryBtn");
button = null;
}
button.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
UpswingActivity.q0(UpswingActivity.this, view);
}
});
TextView textView2 = this.C0;
if (textView2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("gotBackTextBtn");
} else {
textView = textView2;
}
textView.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
UpswingActivity.t0(UpswingActivity.this, view);
}
});
textView.setVisibility(0);
}
}