正在查看: OVO v3.139.0 应用的 OneKlikWebViewActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: OVO v3.139.0 应用的 OneKlikWebViewActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package ovo.id.wallet.topup.ui.presentation.oneklik;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.MenuItem;
import android.webkit.WebView;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.Toolbar;
import androidx.databinding.ViewDataBinding;
import androidx.fragment.app.Fragment;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import kotlin.Metadata;
import o.i.Function110;
import o.i.akb;
import o.i.ayd;
import o.i.ce;
import o.i.cn;
import o.i.fv2;
import o.i.fxa;
import o.i.g00;
import o.i.jh0;
import o.i.jqe;
import o.i.ju2;
import o.i.lc2;
import o.i.lo5;
import o.i.p1g;
import o.i.pma;
import o.i.pvm;
import o.i.r7c;
import o.i.r89;
import o.i.ru1;
import o.i.sh;
import o.i.sid;
import o.i.tg6;
import o.i.tid;
import o.i.tsf;
import o.i.ua8;
import o.i.uh;
import o.i.vk7;
import o.i.xh;
import o.i.y0c;
import o.i.y5c;
import o.i.yac;
import o.i.z8;
import ovo.id.analytics.AnalyticType;
import ovo.id.base.BaseActivity;
import ovo.id.base.utils.StringWrapper;
import ovo.id.webview.presentation.base.BaseWebviewActivity;
import ovo.id.webview.presentation.base.WebviewFragment;
@Metadata(d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0007\u0018\u00002\u00020\u00012\u00020\u0002B\u0007¢\u0006\u0004\b\u0003\u0010\u0004¨\u0006\u0005"}, d2 = {"Lovo/id/wallet/topup/ui/presentation/oneklik/OneKlikWebViewActivity;", "Lovo/id/webview/presentation/base/BaseWebviewActivity;", "Lo/i/jh0;", "<init>", "()V", "topup-ui_release"}, k = 1, mv = {1, 8, 0})
public final class OneKlikWebViewActivity extends BaseWebviewActivity implements jh0 {
public sid G;
public akb H;
public pma I;
public boolean J = true;
public String K;
public StringWrapper L;
public Bundle M;
public ce N;
public static final class a extends ua8 implements Function110<String, Boolean> {
public final String b;
public a(String str) {
super(1);
this.b = str;
}
public final Object invoke(Object obj) {
String str = (String) obj;
vk7.f(str, "end");
return Boolean.valueOf(jqe.J(this.b, str, false));
}
}
public static final class b extends ua8 implements Function110<String, Boolean> {
public final String b;
public b(String str) {
super(1);
this.b = str;
}
public final Object invoke(Object obj) {
String str = (String) obj;
vk7.f(str, "end");
return Boolean.valueOf(jqe.J(this.b, str, false));
}
}
public final void E0() {
lo5 lo5Var = ((BaseActivity) this).C;
Integer valueOf = lo5Var != null ? Integer.valueOf(lo5Var.F()) : null;
vk7.c(valueOf);
if (valueOf.intValue() > 0) {
C0();
} else {
B0();
}
}
public final void G0() {
ju2 ju2Var = tg6.c;
if (ju2Var == null) {
vk7.m("topUpComponent");
throw null;
}
g00 g00Var = ju2Var.a;
sid F = g00Var.F();
pvm.p(F);
this.G = F;
akb H = g00Var.H();
pvm.p(H);
this.H = H;
this.I = ju2Var.a();
}
@Override
public final void K(WebView webView, String str, String str2) {
Object obj;
pma pmaVar = this.I;
if (pmaVar == null) {
vk7.m("ovoFeatureFlag");
throw null;
}
boolean Q = pmaVar.Q();
List y = sh.y("/id/oneklik/success");
if (str != null) {
String lowerCase = str.toLowerCase(Locale.ROOT);
vk7.e(lowerCase, "this as java.lang.String).toLowerCase(Locale.ROOT)");
tsf D = ayd.D(ru1.g0(y), new a(lowerCase));
Iterator it = D.a.iterator();
while (true) {
if (!it.hasNext()) {
obj = null;
break;
} else {
obj = D.b.invoke(it.next());
if (((Boolean) obj).booleanValue()) {
break;
}
}
}
if (vk7.a(obj, Boolean.TRUE)) {
if (!Q) {
if (webView != null) {
webView.evaluateJavascript("javascript:(function f() {\n var btn = document.querySelector('button.btn-primary');\n btn.setAttribute('onclick', 'AndroidJsHandler.closeWebView();');\n })()", null);
}
} else {
uh.a(this, new xh(AnalyticType.LEANPLUM_EVENT, "event/topup", r89.w(new fxa[]{new fxa("Trigger", "Page Load"), new fxa("Product", "BCA OneKlik Top Up"), new fxa("Page", "Activation Steps"), new fxa("Description", "Page Load - Top Up - Activation Steps")}), 8));
if (webView != null) {
webView.evaluateJavascript("javascript:(function f() {\n var btn = document.querySelector('button.btn-primary');\n btn.setAttribute('onclick', 'BcaJsHandler.openInstruction();');\n })()", null);
}
}
}
}
}
@Override
public final Toolbar N0() {
ce ceVar = this.N;
if (ceVar != null) {
return ceVar.f168u;
}
vk7.m("binding");
throw null;
}
@Override
public final void i(WebView webView, String str, Bitmap bitmap) {
Object obj;
List z = sh.z(new String[]{"/id/oneklik/failed", "/id/oneklik/success"});
if (str != null) {
String lowerCase = str.toLowerCase(Locale.ROOT);
vk7.e(lowerCase, "this as java.lang.String).toLowerCase(Locale.ROOT)");
tsf D = ayd.D(ru1.g0(z), new b(lowerCase));
Iterator it = D.a.iterator();
while (true) {
if (!it.hasNext()) {
obj = null;
break;
} else {
obj = D.b.invoke(it.next());
if (((Boolean) obj).booleanValue()) {
break;
}
}
}
if (vk7.a(obj, Boolean.TRUE)) {
P0(1);
lo5 lo5Var = ((BaseActivity) this).C;
Fragment C = lo5Var != null ? lo5Var.C(y5c.fl_container) : null;
WebviewFragment webviewFragment = C instanceof WebviewFragment ? (WebviewFragment) C : null;
if (webviewFragment != null) {
webviewFragment.p0().f1655t.setValue(1);
}
}
}
}
@Override
public final void k(WebView webView, Integer num, String str, String str2) {
cn.c(num, "BCA-ONEKLIK", str, str2);
P0(1);
}
@Override
public final void k0(String str) {
}
public final void onBackPressed() {
p1g p1gVar = null;
if (isTaskRoot()) {
sid sidVar = this.G;
if (sidVar != null) {
tid.b(sidVar, this, (Bundle) null);
return;
} else {
vk7.m("screenRouter");
throw null;
}
}
lo5 lo5Var = ((BaseActivity) this).C;
Fragment C = lo5Var != null ? lo5Var.C(y5c.fl_container) : null;
WebviewFragment webviewFragment = C instanceof WebviewFragment ? (WebviewFragment) C : null;
if (webviewFragment != null) {
webviewFragment.s0();
p1gVar = p1g.a;
}
if (p1gVar == null) {
super.onBackPressed();
}
}
public final void onCreate(Bundle bundle) {
Bundle extras;
Bundle extras2;
Intent intent = getIntent();
boolean z = true;
if (intent != null && (extras2 = intent.getExtras()) != null) {
z = extras2.getBoolean("webview_use_light_theme", true);
}
this.J = z;
if (z) {
setTheme(yac.Ravier_AppTheme_Base_White);
}
super.onCreate(bundle);
ViewDataBinding c = fv2.c(this, r7c.activity_webview);
vk7.e(c, "setContentView(this, Web…sources.activity_webview)");
this.N = (ce) c;
Intent intent2 = getIntent();
if (intent2 != null && (extras = intent2.getExtras()) != null) {
this.K = extras.getString("webview_url");
Object obj = extras.get("webview_title");
if (obj != null) {
this.L = obj instanceof String ? StringWrapper.a.e((String) obj) : obj instanceof StringWrapper ? (StringWrapper) obj : null;
}
this.M = extras.getBundle("webview_extra_bundle");
}
ce ceVar = this.N;
if (ceVar == null) {
vk7.m("binding");
throw null;
}
Toolbar toolbar = ceVar.f168u;
vk7.e(toolbar, "it");
z8.f(this, toolbar, true, true, null, null, null, 56);
ActionBar x0 = x0();
if (x0 != null) {
StringWrapper stringWrapper = this.L;
x0.y(stringWrapper != null ? stringWrapper.a(this) : null);
}
if (this.J) {
toolbar.setBackgroundColor(lc2.b(this, y0c.color_whitepepper));
toolbar.setTitleTextColor(lc2.b(this, y0c.color_shallot_darkest));
Drawable navigationIcon = toolbar.getNavigationIcon();
if (navigationIcon != null) {
navigationIcon.setColorFilter(lc2.b(this, y0c.color_shallot_darkest), PorterDuff.Mode.SRC_ATOP);
}
} else {
toolbar.setBackgroundColor(lc2.b(this, y0c.color_taro_dark));
toolbar.setTitleTextColor(lc2.b(this, y0c.color_whitepepper));
Drawable navigationIcon2 = toolbar.getNavigationIcon();
if (navigationIcon2 != null) {
navigationIcon2.setColorFilter(lc2.b(this, y0c.color_whitepepper), PorterDuff.Mode.SRC_ATOP);
}
}
String str = this.K;
if (str != null) {
int i = y5c.fl_container;
int i2 = WebviewFragment.E;
z8.o(this, i, WebviewFragment.a.a(str, this.L, this.M), false, 12);
}
}
public final boolean onOptionsItemSelected(MenuItem menuItem) {
vk7.f(menuItem, "item");
if (menuItem.getItemId() != 16908332) {
return super/*android.app.Activity*/.onOptionsItemSelected(menuItem);
}
onBackPressed();
return true;
}
}