正在查看: OVO v3.139.0 应用的 CommonErrorActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: OVO v3.139.0 应用的 CommonErrorActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package ovo.id.common.error.presentation;
import android.content.Context;
import android.content.Intent;
import android.graphics.ColorFilter;
import android.graphics.PorterDuffColorFilter;
import android.os.Build;
import android.os.Bundle;
import androidx.compose.foundation.layout.LayoutWeightElement;
import androidx.compose.ui.Modifier;
import androidx.compose.ui.platform.AndroidCompositionLocals_androidKt;
import com.google.gson.Gson;
import java.util.Locale;
import java.util.Map;
import kotlin.Metadata;
import o.i.Alignment;
import o.i.Arrangement;
import o.i.Composer;
import o.i.Function110;
import o.i.Function23;
import o.i.aac;
import o.i.ay1;
import o.i.b0;
import o.i.b22;
import o.i.b52;
import o.i.b6d;
import o.i.bw6;
import o.i.bx1;
import o.i.bxa;
import o.i.c22;
import o.i.c9c;
import o.i.cc2;
import o.i.d6d;
import o.i.dl0;
import o.i.dx1;
import o.i.efc;
import o.i.ehc;
import o.i.exa;
import o.i.ez7;
import o.i.f10;
import o.i.ffc;
import o.i.fma;
import o.i.fqe;
import o.i.fxa;
import o.i.hc;
import o.i.ifc;
import o.i.iw0;
import o.i.jgc;
import o.i.jo3;
import o.i.l22;
import o.i.lj0;
import o.i.m;
import o.i.myf;
import o.i.n8b;
import o.i.nca;
import o.i.nic;
import o.i.np0;
import o.i.oc0;
import o.i.ohm;
import o.i.p1g;
import o.i.pgc;
import o.i.pq0;
import o.i.qsc;
import o.i.qx1;
import o.i.r2c;
import o.i.rrc;
import o.i.sp0;
import o.i.t02;
import o.i.tf8;
import o.i.tl2;
import o.i.tl4;
import o.i.u5g;
import o.i.ua8;
import o.i.uh;
import o.i.us;
import o.i.usc;
import o.i.v42;
import o.i.vk7;
import o.i.wm3;
import o.i.xh;
import o.i.xh9;
import o.i.xx1;
import o.i.xz6;
import o.i.yfc;
import o.i.zk;
import o.i.zu5;
import okhttp3.HttpUrl;
import org.bouncycastle.i18n.MessageBundle;
import org.json.JSONObject;
import ovo.id.analytics.AnalyticType;
import ovo.id.base.BaseActivity;
import ovo.id.core.models.dynamicerror.Action;
import ovo.id.ravier.widgets.CommonLayoutClickType;
import ovo.id.ravier.widgets.LineSeparatorType;
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0007\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0004"}, d2 = {"Lovo/id/common/error/presentation/CommonErrorActivity;", "Lovo/id/base/BaseActivity;", "<init>", "()V", "ovo-common-error_release"}, k = 1, mv = {1, 8, 0})
public final class CommonErrorActivity extends BaseActivity {
public static final int H = aac.ovo_general_error_title;
public static final int I = aac.ovo_desc_generic_error;
public static final int J = aac.ovo_action_oke;
public static final String K;
public xx1 G;
public static final class a extends ua8 implements zu5<p1g> {
public final Context c;
public a(Context context) {
super(0);
this.c = context;
}
@Override
public final p1g invoke() {
CommonErrorActivity.O0(CommonErrorActivity.this, this.c);
return p1g.a;
}
}
public static final class b extends ua8 implements Function110<CommonLayoutClickType, p1g> {
public final String b;
public final CommonErrorActivity c;
public final Context d;
public class a {
public static final int[] a;
static {
int[] iArr = new int[CommonLayoutClickType.values().length];
try {
iArr[CommonLayoutClickType.PRIMARY.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
a = iArr;
}
}
public b(String str, CommonErrorActivity commonErrorActivity, Context context) {
super(1);
this.b = str;
this.c = commonErrorActivity;
this.d = context;
}
@Override
public final p1g invoke(CommonLayoutClickType commonLayoutClickType) {
CommonLayoutClickType commonLayoutClickType2 = commonLayoutClickType;
vk7.f(commonLayoutClickType2, "type");
if (a.a[commonLayoutClickType2.ordinal()] == 1) {
CommonErrorActivity commonErrorActivity = this.c;
p1g p1gVar = null;
String str = this.b;
if (str != null) {
String str2 = str.length() > 0 ? str : null;
if (str2 != null) {
CommonErrorActivity.N0(commonErrorActivity, new Action(null, null, str2, null, 11, null));
p1gVar = p1g.a;
}
}
if (p1gVar == null) {
CommonErrorActivity.O0(commonErrorActivity, this.d);
}
}
return p1g.a;
}
}
public static final class c extends ua8 implements zu5<p1g> {
public final String c;
public c(String str) {
super(0);
this.c = str;
}
@Override
public final p1g invoke() {
?? r0 = CommonErrorActivity.this;
xx1 P0 = r0.P0();
P0.g();
String str = this.c;
P0.i(r0, str, iw0.a(new fxa[]{new fxa("webview_url", str)}));
return p1g.a;
}
}
public static final class d extends ua8 implements zu5<p1g> {
public final JSONObject c;
public d(JSONObject jSONObject) {
super(0);
this.c = jSONObject;
}
@Override
public final p1g invoke() {
?? r0 = CommonErrorActivity.this;
xx1 P0 = r0.P0();
JSONObject jSONObject = this.c;
String string = jSONObject.getString("action");
vk7.e(string, "banner.getString(\"action\")");
P0.g();
P0.i(r0, string, iw0.a(new fxa[]{new fxa("webview_url", jSONObject.getString("action"))}));
return p1g.a;
}
}
public static final class e extends ua8 implements zu5<p1g> {
public final Action c;
public e(Action action) {
super(0);
this.c = action;
}
@Override
public final p1g invoke() {
CommonErrorActivity.N0(CommonErrorActivity.this, this.c);
return p1g.a;
}
}
public static final class f extends ua8 implements Function23<Composer, Integer, p1g> {
public final String c;
public final String d;
public final String e;
public final String f;
public final String g;
public final String h;
public final String i;
public final boolean j;
public final String k;
public final int f290l;
public final int m;
public f(String str, String str2, String str3, String str4, String str5, String str6, String str7, boolean z, String str8, int i, int i3) {
super(2);
this.c = str;
this.d = str2;
this.e = str3;
this.f = str4;
this.g = str5;
this.h = str6;
this.i = str7;
this.j = z;
this.k = str8;
this.f290l = i;
this.m = i3;
}
@Override
public final p1g invoke(Composer composer, Integer num) {
num.intValue();
CommonErrorActivity.this.M0(this.c, this.d, this.e, this.f, this.g, this.h, this.i, this.j, this.k, composer, jo3.e(this.f290l | 1), this.m);
return p1g.a;
}
}
@Metadata(d1 = {"\u0000\u000b\n\u0000\n\u0002\u0018\u0002\n\u0000*\u0001\u0000\b\n\u0018\u00002\b\u0012\u0004\u0012\u00028\u00000\u0001¨\u0006\u0002"}, d2 = {"ovo/id/common/error/presentation/CommonErrorActivity$g", "Lo/i/myf;", "common_release"}, k = 1, mv = {1, 8, 0})
public static final class g extends myf<Action[]> {
}
public static final class h extends ua8 implements Function23<Composer, Integer, p1g> {
public final usc<String> c;
public final usc<String> d;
public final usc<String> e;
public final usc<String> f;
public final usc<String> g;
public final usc<String> h;
public final usc<String> i;
public final qsc j;
public final usc<String> k;
public h(usc<String> uscVar, usc<String> uscVar2, usc<String> uscVar3, usc<String> uscVar4, usc<String> uscVar5, usc<String> uscVar6, usc<String> uscVar7, qsc qscVar, usc<String> uscVar8) {
super(2);
this.c = uscVar;
this.d = uscVar2;
this.e = uscVar3;
this.f = uscVar4;
this.g = uscVar5;
this.h = uscVar6;
this.i = uscVar7;
this.j = qscVar;
this.k = uscVar8;
}
@Override
public final p1g invoke(Composer composer, Integer num) {
Composer composer2 = composer;
if ((num.intValue() & 11) == 2 && composer2.j()) {
composer2.F();
} else {
nic.a(false, c22.b(composer2, 197369714, new ovo.id.common.error.presentation.a(CommonErrorActivity.this, this.c, this.d, this.e, this.f, this.g, this.h, this.i, this.j, this.k)), composer2, 48, 1);
}
return p1g.a;
}
}
public static final class i extends nca {
public i() {
super(true);
}
public final void d() {
?? r0 = CommonErrorActivity.this;
CommonErrorActivity.O0(r0, r0);
}
}
static {
fma fmaVar = oc0.c;
if (fmaVar != null) {
K = pq0.b(new StringBuilder(), fmaVar.t, "://helpcenter");
} else {
vk7.m("ovoCoreConfig");
throw null;
}
}
public static final void N0(CommonErrorActivity commonErrorActivity, Action action) {
commonErrorActivity.getClass();
boolean a2 = vk7.a(action.getActionUrl(), "doClose");
String str = HttpUrl.FRAGMENT_ENCODE_SET;
if (a2) {
commonErrorActivity.finish();
} else {
xx1 P0 = commonErrorActivity.P0();
String actionUrl = action.getActionUrl();
if (actionUrl == null) {
actionUrl = HttpUrl.FRAGMENT_ENCODE_SET;
}
P0.i(commonErrorActivity, actionUrl, null);
}
ez7 tracker = action.getTracker();
if (tracker != null) {
String jy7Var = tracker.A("params").toString();
vk7.e(jy7Var, "it.getAsJsonObject(\"params\").toString()");
String p = tracker.z("type").p();
if (p == null) {
p = HttpUrl.FRAGMENT_ENCODE_SET;
}
Locale locale = Locale.ROOT;
String lowerCase = p.toLowerCase(locale);
vk7.e(lowerCase, "this as java.lang.String).toLowerCase(Locale.ROOT)");
AnalyticType analyticType = AnalyticType.APPSFLYER;
String lowerCase2 = analyticType.name().toLowerCase(locale);
vk7.e(lowerCase2, "this as java.lang.String).toLowerCase(Locale.ROOT)");
if (!vk7.a(lowerCase, lowerCase2)) {
analyticType = AnalyticType.LEANPLUM_STATE;
String lowerCase3 = analyticType.name().toLowerCase(locale);
vk7.e(lowerCase3, "this as java.lang.String).toLowerCase(Locale.ROOT)");
if (!vk7.a(lowerCase, lowerCase3)) {
analyticType = AnalyticType.LEANPLUM_EVENT;
}
}
String p2 = tracker.z("event_name").p();
if (p2 != null) {
str = p2;
}
uh.a(commonErrorActivity, new xh(analyticType, str, (Map) new Gson().d(jy7Var, new qx1().getType()), 8));
}
}
public static final void O0(CommonErrorActivity commonErrorActivity, Context context) {
if (commonErrorActivity.isTaskRoot()) {
commonErrorActivity.P0().f(context);
}
commonErrorActivity.B0();
}
@Override
public final void G0() {
tl2 tl2Var = bw6.a;
if (tl2Var != null) {
this.G = tl2Var.a;
} else {
vk7.m("commonErrorComponent");
throw null;
}
}
public final void M0(String str, String str2, String str3, String str4, String str5, String str6, String str7, boolean z, String str8, Composer composer, int i3, int i5) {
ColorFilter porterDuffColorFilter;
v42.a.a aVar;
long j;
String str9;
String str10;
boolean z2;
boolean z3;
int i6;
vk7.f(str2, MessageBundle.TITLE_ENTRY);
vk7.f(str3, "description");
b52 h3 = composer.h(1847708833);
String str11 = (i5 & 8) != 0 ? null : str4;
String str12 = (i5 & 16) != 0 ? null : str5;
String str13 = (i5 & 32) != 0 ? null : str6;
String str14 = (i5 & 64) != 0 ? null : str7;
boolean z4 = (i5 & 128) != 0 ? false : z;
String str15 = (i5 & 256) != 0 ? null : str8;
Context context = (Context) h3.C(AndroidCompositionLocals_androidKt.b);
Modifier.a aVar2 = Modifier.a.b;
String str16 = str13;
String str17 = str12;
long j2 = yfc.G;
Modifier a2 = xh9.a(androidx.compose.foundation.layout.h.f(androidx.compose.foundation.a.c(aVar2, j2)), "column_common_error_screen");
String str18 = str15;
dx1 a3 = bx1.a(Arrangement.c, Alignment.a.m, h3, 0);
int i7 = h3.P;
n8b T = h3.T();
Modifier d2 = androidx.compose.ui.c.d(h3, a2);
v42.c0.getClass();
tf8.a aVar3 = v42.a.b;
f10 f10Var = h3.a;
String str19 = str14;
if (!(f10Var instanceof f10)) {
hc.o();
throw null;
}
h3.A();
if (h3.O) {
h3.q(aVar3);
} else {
h3.n();
}
v42.a.d dVar = v42.a.f;
u5g.a(h3, a3, dVar);
v42.a.f fVar = v42.a.e;
u5g.a(h3, T, fVar);
v42.a.a aVar4 = v42.a.i;
if (h3.O || !vk7.a(h3.v(), Integer.valueOf(i7))) {
us.b(i7, h3, i7, aVar4);
}
v42.a.e eVar = v42.a.c;
u5g.a(h3, d2, eVar);
Modifier h4 = androidx.compose.foundation.layout.h.h(aVar2);
float f2 = pgc.h;
Modifier m = b0.m(androidx.compose.foundation.layout.g.h(h4, f2, 0.0f, 2));
float f3 = pgc.e;
Modifier a4 = xh9.a(androidx.compose.foundation.layout.g.j(m, 0.0f, f3, 0.0f, 0.0f, 13), "row_common_error_screen");
Arrangement.j jVar = Arrangement.a;
lj0.b bVar = Alignment.a.j;
d6d a5 = b6d.a(jVar, bVar, h3, 0);
int i8 = h3.P;
n8b T2 = h3.T();
Modifier d3 = androidx.compose.ui.c.d(h3, a4);
if (!(f10Var instanceof f10)) {
hc.o();
throw null;
}
h3.A();
if (h3.O) {
h3.q(aVar3);
} else {
h3.n();
}
u5g.a(h3, a5, dVar);
u5g.a(h3, T2, fVar);
if (h3.O || !vk7.a(h3.v(), Integer.valueOf(i8))) {
us.b(i8, h3, i8, aVar4);
}
u5g.a(h3, d3, eVar);
bxa a6 = exa.a(r2c.rico_system_close, 0, h3);
cc2.a.b bVar2 = cc2.a.g;
long j4 = yfc.x;
if (Build.VERSION.SDK_INT >= 29) {
porterDuffColorFilter = sp0.a.a(j4, 5);
aVar = aVar4;
} else {
aVar = aVar4;
porterDuffColorFilter = new PorterDuffColorFilter(dl0.k(j4), zk.b(5));
}
xz6.a(a6, "Navigate Back", xh9.a(androidx.compose.foundation.b.c(androidx.compose.foundation.layout.h.s(aVar2, pgc.j), false, (String) null, new a(context), 7), "image_error_screen"), (Alignment) null, bVar2, 0.0f, new np0(j4, 5, porterDuffColorFilter), h3, 24632, 40);
h3.X(true);
v42.a.a aVar5 = aVar;
String str20 = str17;
jgc.a(xh9.a(androidx.compose.foundation.layout.g.h(aVar2, f2, 0.0f, 2), "common_layout_error_screen"), new ay1.a(str, str2, str3, str11, (String) null, false, (String) null, z4, 208), (wm3) null, (wm3) null, new b(str20, this, context), h3, 64, 12);
double d4 = 1.0f;
if (!(d4 > 0.0d)) {
throw new IllegalArgumentException("invalid weight 1.0; must be greater than zero".toString());
}
ohm.a(new LayoutWeightElement(1.0f, true), h3);
h3.u(-1545587836);
if (str16 == null) {
j = j2;
} else {
j = j2;
ifc.a(androidx.compose.foundation.layout.g.j(androidx.compose.foundation.a.c(androidx.compose.foundation.layout.h.h(aVar2), j), 0.0f, 0.0f, 0.0f, f3, 7), r2c.rima_graphicon_helpcenter, b0.n(c9c.ovo_title_help_center, h3), b0.n(c9c.ovo_desc_help_center, h3), l22.a, false, new c(str16), h3, 24576, 32);
p1g p1gVar = p1g.a;
}
h3.X(false);
h3.u(-1545586761);
String str21 = str19;
if (str21 != null) {
JSONObject jSONObject = new JSONObject(str21);
tl4 tl4Var = tl4.a;
String string = jSONObject.getString("image");
vk7.e(string, "banner.getString(\"image\")");
Object l2 = tl4Var.l(context, string);
Integer num = l2 instanceof Integer ? (Integer) l2 : null;
if (num != null) {
num.intValue();
i6 = num.intValue();
} else {
i6 = r2c.rima_graphicon_helpcenter;
}
String string2 = jSONObject.getString(MessageBundle.TITLE_ENTRY);
String string3 = jSONObject.getString("description");
Modifier j5 = androidx.compose.foundation.layout.g.j(androidx.compose.foundation.a.c(androidx.compose.foundation.layout.h.h(aVar2), j), 0.0f, 0.0f, 0.0f, f3, 7);
vk7.e(string2, "getString(\"title\")");
vk7.e(string3, "getString(\"description\")");
ifc.a(j5, i6, string2, string3, l22.b, false, new d(jSONObject), h3, 24576, 32);
p1g p1gVar2 = p1g.a;
}
h3.X(false);
h3.u(-973595702);
if (str18 == null) {
z2 = false;
z3 = true;
str9 = str21;
str10 = str20;
} else {
ehc.a((Modifier) null, LineSeparatorType.THICK_SOLID, h3, 48, 1);
Action[] actionArr = (Action[]) new Gson().d(str18, new g().getType());
Modifier a7 = xh9.a(androidx.compose.foundation.layout.g.i(aVar2, f3, f2, f3, f2), "row_common_error_multiple_button");
d6d a8 = b6d.a(Arrangement.f, bVar, h3, 6);
int i9 = h3.P;
n8b T3 = h3.T();
Modifier d5 = androidx.compose.ui.c.d(h3, a7);
if (!(f10Var instanceof f10)) {
hc.o();
throw null;
}
h3.A();
if (h3.O) {
h3.q(aVar3);
} else {
h3.n();
}
u5g.a(h3, a8, dVar);
u5g.a(h3, T3, fVar);
if (h3.O || !vk7.a(h3.v(), Integer.valueOf(i9))) {
us.b(i9, h3, i9, aVar5);
}
u5g.a(h3, d5, eVar);
h3.u(-1545584854);
int length = actionArr.length;
int i10 = 0;
while (i10 < length) {
Action action = actionArr[i10];
if (!(d4 > 0.0d)) {
throw new IllegalArgumentException("invalid weight 1.0; must be greater than zero".toString());
}
Modifier h5 = androidx.compose.foundation.layout.g.h(new LayoutWeightElement(1.0f, true), pgc.e, 0.0f, 2);
String title = action.getTitle();
String str22 = HttpUrl.FRAGMENT_ENCODE_SET;
if (title == null) {
title = HttpUrl.FRAGMENT_ENCODE_SET;
}
String type = action.getType();
if (type != null) {
str22 = type;
}
String lowerCase = str22.toLowerCase(Locale.ROOT);
vk7.e(lowerCase, "this as java.lang.String).toLowerCase(Locale.ROOT)");
efc.a(title, efc.b(lowerCase), new e(action), h5, false, (ffc) null, h3, 0, 48);
i10++;
actionArr = actionArr;
str20 = str20;
str21 = str21;
}
str9 = str21;
str10 = str20;
z2 = false;
h3.X(false);
z3 = true;
h3.X(true);
p1g p1gVar3 = p1g.a;
}
rrc c2 = m.c(h3, z2, z3);
if (c2 == null) {
return;
}
c2.d = new f(str, str2, str3, str11, str10, str16, str9, z4, str18, i3, i5);
}
public final xx1 P0() {
xx1 xx1Var = this.G;
if (xx1Var != null) {
return xx1Var;
}
vk7.m("commonErrorListener");
throw null;
}
@Override
public final void onCreate(Bundle bundle) {
Bundle extras;
super.onCreate(bundle);
xx1 P0 = P0();
Intent intent = getIntent();
vk7.e(intent, "intent");
P0.a(intent);
usc uscVar = new usc();
String str = HttpUrl.FRAGMENT_ENCODE_SET;
uscVar.a = HttpUrl.FRAGMENT_ENCODE_SET;
usc uscVar2 = new usc();
uscVar2.a = HttpUrl.FRAGMENT_ENCODE_SET;
usc uscVar3 = new usc();
uscVar3.a = HttpUrl.FRAGMENT_ENCODE_SET;
usc uscVar4 = new usc();
uscVar4.a = HttpUrl.FRAGMENT_ENCODE_SET;
usc uscVar5 = new usc();
usc uscVar6 = new usc();
usc uscVar7 = new usc();
usc uscVar8 = new usc();
qsc qscVar = new qsc();
Intent intent2 = getIntent();
if (intent2 != null && (extras = intent2.getExtras()) != null) {
P0().o();
String string = extras.getString("notificationId");
if (string != null) {
P0().b(string);
}
P0().l();
String string2 = extras.getString("ovo.id.core.ErrorImage");
T t = string2;
if (string2 == null) {
t = "rima_inline_error";
}
uscVar.a = t;
P0().d();
String string3 = extras.getString("ovo.id.core.ErrorTitle");
T t2 = string3;
if (string3 == null) {
String string4 = getString(H);
vk7.e(string4, "this.getString(DEFAULT_TITLE)");
t2 = string4;
}
uscVar2.a = t2;
P0().h();
String string5 = extras.getString("ovo.id.core.ErrorMessage");
T t3 = string5;
if (string5 == null) {
String string6 = getString(I);
vk7.e(string6, "this.getString(DEFAULT_DESCRIPTION)");
t3 = string6;
}
uscVar3.a = t3;
P0().j();
String string7 = extras.getString("ovo.id.core.ButtonLabel");
T t4 = string7;
if (string7 == null) {
String string8 = getString(J);
vk7.e(string8, "this.getString(DEFAULT_BUTTON_LABEL)");
t4 = string8;
}
uscVar4.a = t4;
P0().p();
String string9 = extras.getString("ovo.id.core.ButtonPage");
T t5 = str;
if (string9 != null) {
t5 = string9;
}
uscVar5.a = t5;
P0().m();
?? string10 = extras.getString("ovo.id.core.BannerJson");
uscVar8.a = string10;
if (string10 == 0 || fqe.A(string10)) {
P0().c();
String string11 = extras.getString("ovo.id.core.Page");
T t6 = string11;
if (string11 == null) {
t6 = K;
}
uscVar6.a = t6;
}
P0().k();
qscVar.a = extras.getBoolean("ovo.id.core.ErrorIsInline");
P0().e();
uscVar7.a = extras.getString("ovo.id.core.MultipleButtonJson");
}
h hVar = new h(uscVar, uscVar2, uscVar3, uscVar4, uscVar5, uscVar6, uscVar8, qscVar, uscVar7);
Object obj = c22.a;
t02.a(this, new b22(117515460, hVar, true));
R().a(this, new i());
}
}