正在查看: bbinstant v6.24.0 应用的 MoEActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: bbinstant v6.24.0 应用的 MoEActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.moe.pushlibrary.activities;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.fragment.app.FragmentActivity;
import com.moengage.core.g;
import com.moengage.core.internal.global.a;
import com.moengage.core.internal.logger.f;
import com.moengage.core.internal.utils.d;
import kotlin.jvm.internal.v;
import kotlin.text.p;
public final class MoEActivity extends FragmentActivity {
private final String tag = "Core_MoEActivity";
@SuppressLint({"SetJavaScriptEnabled"})
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
try {
Context applicationContext = getApplicationContext();
v.checkNotNullExpressionValue(applicationContext, "this.applicationContext");
if (!d.canUseWebView(applicationContext)) {
f.a.print$default(f.Companion, 0, null, new MoEActivity$onCreate$1(this), 3, null);
finish();
return;
}
setContentView(g.activity_moe_rich_landing);
WebView webView = (WebView) findViewById(com.moengage.core.f.moeRichLandingWebView);
Bundle extras = getIntent().getExtras();
if (extras != null && extras.containsKey("gcm_webUrl")) {
String string = extras.getString("gcm_webUrl");
if (string != null && !p.isBlank(string)) {
final boolean z = extras.getBoolean("isEmbeddedWebView", false);
f.a.print$default(f.Companion, 0, null, new MoEActivity$onCreate$3(this, z), 3, null);
webView.loadUrl(string);
webView.getSettings().setJavaScriptEnabled(a.INSTANCE.getJsConfig().isJavaScriptEnabled());
webView.getSettings().setBuiltInZoomControls(true);
webView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView webView2, String str) {
v.checkNotNullParameter(webView2, "view");
v.checkNotNullParameter(str, "url");
try {
f.a.print$default(f.Companion, 0, null, new MoEActivity$onCreate$4$shouldOverrideUrlLoading$1(this, str), 3, null);
Uri parse = Uri.parse(str);
String scheme = parse.getScheme();
if (!z || (!v.areEqual("http", scheme) && !v.areEqual("https", scheme))) {
this.startActivity(new Intent("android.intent.action.VIEW", parse));
return true;
}
return false;
} catch (Throwable th) {
f.Companion.print(1, th, new MoEActivity$onCreate$4$shouldOverrideUrlLoading$2(this));
return false;
}
}
});
return;
}
f.a.print$default(f.Companion, 0, null, new MoEActivity$onCreate$2(this), 3, null);
finish();
return;
}
finish();
} catch (Throwable th) {
f.a aVar = f.Companion;
aVar.print(1, th, new MoEActivity$onCreate$5(this));
f.a.print$default(aVar, 0, null, new MoEActivity$onCreate$6(this), 3, null);
finish();
}
}
}