Luno v7.28.0版本的 MD5 值为:08d81b3b88ef7df48c89cb5d56dc11a2
以下内容为反编译后的 s16.java 源代码,内容仅作参考
package mdi.sdk;
import android.annotation.SuppressLint;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.FragmentActivity;
import co.bitx.android.walleu.R;
import co.bitx.android.walleu.app.DeepLinkHandlerActivity;
import com.mparticle.BuildConfig;
import java.util.Map;
import kotlin.Lazy;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
public final class s16 extends ww1 {
public static final a x = new a(null);
public ti4 j;
public f7 k;
private final Lazy l;
private final Lazy m;
private final Lazy v;
private WebView w;
public static final class a {
private a() {
}
public a(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
@fg2
public final s16 a(String str, String str2, boolean z) {
w32.h(str, "title");
w32.h(str2, "url");
s16 s16Var = new s16();
Bundle bundle = new Bundle();
bundle.putString("arg_title", str);
bundle.putString("arg_url", str2);
bundle.putBoolean("arg_follow", z);
s16Var.setArguments(bundle);
return s16Var;
}
}
public static final class b extends WebViewClient {
b() {
}
@Override
public boolean shouldOverrideUrlLoading(WebView webView, String str) {
w32.h(webView, "view");
w32.h(str, "url");
Uri parse = Uri.parse(str);
if (w32.d(BuildConfig.SCHEME, parse.getScheme())) {
if (s16.this.U0() || w32.d("luno.com", parse.getHost()) || w32.d("www.luno.com", parse.getHost()) || w32.d("staging.luno.com", parse.getHost())) {
return false;
}
} else if (w32.d("luno", parse.getScheme()) && !DeepLinkHandlerActivity.a.B(DeepLinkHandlerActivity.e, s16.this.getActivity(), parse, false, false, 12, null)) {
n32.k(s16.this.getContext(), str);
}
return true;
}
}
static final class c extends sl2 implements Function0<Boolean> {
c() {
super(0);
}
@Override
public final Boolean invoke() {
return Boolean.valueOf(s16.this.requireArguments().getBoolean("arg_follow", false));
}
}
static final class d extends sl2 implements Function0<String> {
d() {
super(0);
}
@Override
public final String invoke() {
return s16.this.requireArguments().getString("arg_title", "");
}
}
static final class e extends sl2 implements Function0<String> {
e() {
super(0);
}
@Override
public final String invoke() {
return s16.this.requireArguments().getString("arg_url", "https://www.luno.com/");
}
}
public s16() {
Lazy b2;
Lazy b3;
Lazy b4;
b2 = un2.b(new e());
this.l = b2;
b3 = un2.b(new d());
this.m = b3;
b4 = un2.b(new c());
this.v = b4;
}
private final WebViewClient S0() {
return new b();
}
public final boolean U0() {
return ((Boolean) this.v.getValue()).booleanValue();
}
private final String W0() {
return (String) this.m.getValue();
}
private final String X0() {
return (String) this.l.getValue();
}
private final void Y0(Toolbar toolbar) {
ActionBar supportActionBar;
String W0 = W0();
w32.g(W0, "title");
if (W0.length() > 0) {
FragmentActivity activity = getActivity();
AppCompatActivity appCompatActivity = activity instanceof AppCompatActivity ? (AppCompatActivity) activity : null;
if (appCompatActivity != null) {
appCompatActivity.setSupportActionBar(toolbar);
}
if (appCompatActivity != null && (supportActionBar = appCompatActivity.getSupportActionBar()) != null) {
supportActionBar.m(true);
}
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
s16.Z0(s16.this, view);
}
});
toolbar.setTitle(W0());
return;
}
toolbar.setVisibility(8);
}
public static final void Z0(s16 s16Var, View view) {
w32.h(s16Var, "this$0");
s16Var.V0().b();
}
@SuppressLint({"SetJavaScriptEnabled"})
private final void a1() {
WebView webView = this.w;
if (webView == null) {
w32.y("webView");
webView = null;
}
webView.setWebViewClient(S0());
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setUserAgentString(w32.q(webView.getSettings().getUserAgentString(), " InAppWebView/1"));
webView.loadUrl(X0());
webView.setBackgroundColor(0);
webView.setLayerType(1, null);
}
public final f7 T0() {
f7 f7Var = this.k;
if (f7Var != null) {
return f7Var;
}
w32.y("analyticsService");
return null;
}
public final ti4 V0() {
ti4 ti4Var = this.j;
if (ti4Var != null) {
return ti4Var;
}
w32.y("router");
return null;
}
@Override
public boolean n0() {
WebView webView = this.w;
WebView webView2 = null;
if (webView == null) {
w32.y("webView");
webView = null;
}
if (webView.canGoBack()) {
WebView webView3 = this.w;
if (webView3 == null) {
w32.y("webView");
} else {
webView2 = webView3;
}
webView2.goBack();
return true;
}
return super.n0();
}
@Override
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
w32.h(layoutInflater, "inflater");
View inflate = layoutInflater.inflate(R.layout.fragment_web_links, viewGroup, false);
View findViewById = inflate.findViewById(R.id.webview);
w32.g(findViewById, "it.findViewById(R.id.webview)");
this.w = (WebView) findViewById;
a1();
View findViewById2 = inflate.findViewById(R.id.toolbar);
w32.g(findViewById2, "it.findViewById(R.id.toolbar)");
Y0((Toolbar) findViewById2);
return inflate;
}
@Override
public void onDestroyView() {
I0(true);
super.onDestroyView();
}
@Override
public void onResume() {
Map<String, String> f;
super.onResume();
String W0 = W0();
w32.g(W0, "title");
if (W0.length() > 0) {
f = ly2.f(gn5.a("title", W0()));
} else {
f = ly2.f(gn5.a("url", X0()));
}
T0().c("Webview", f);
I0(false);
}
}