正在查看: 夜猫麻将 v24.1.1 应用的 UrlWebActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 夜猫麻将 v24.1.1 应用的 UrlWebActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.pay.paytypelibrary.activity;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ImageButton;
import android.widget.TextView;
import com.pay.paytypelibrary.R;
import com.pay.paytypelibrary.base.OrderInfo;
public class UrlWebActivity extends Activity {
public WebView f16OooO00o;
public class OooO00o implements View.OnClickListener {
public OooO00o() {
}
@Override
public void onClick(View view) {
UrlWebActivity.this.finish();
}
}
public class OooO0O0 extends WebViewClient {
public OooO0O0() {
}
@Override
public void onPageFinished(WebView webView, String str) {
super.onPageFinished(webView, str);
}
@Override
public void onPageStarted(WebView webView, String str, Bitmap bitmap) {
super.onPageStarted(webView, str, bitmap);
}
@Override
public boolean shouldOverrideUrlLoading(WebView webView, String str) {
String substring;
if (str.startsWith("sandh5payres://")) {
OrderInfo orderInfo = new OrderInfo();
int indexOf = str.indexOf("://") + 3;
if (indexOf == str.length()) {
substring = "no action";
} else {
int indexOf2 = str.indexOf("/", indexOf);
substring = indexOf2 != -1 ? str.substring(indexOf, indexOf2) : str.substring(indexOf);
}
orderInfo.setH5PayResAction(substring);
Intent intent = new Intent();
intent.putExtra("orderInfo", orderInfo);
UrlWebActivity.this.setResult(-1, intent);
} else if (!str.startsWith("sandcashiers://") && !str.contains("about:blank")) {
return false;
}
UrlWebActivity.this.finish();
return true;
}
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.sand_activity_web);
Bundle extras = getIntent().getExtras();
if (extras == null) {
finish();
return;
}
((TextView) findViewById(R.id.tv_head)).setText("");
((ImageButton) findViewById(R.id.btn_back)).setOnClickListener(new OooO00o());
String string = extras.getString("url");
WebView webView = (WebView) findViewById(R.id.webview);
this.f16OooO00o = webView;
WebSettings settings = webView.getSettings();
settings.setJavaScriptEnabled(true);
settings.setJavaScriptCanOpenWindowsAutomatically(true);
settings.setAllowFileAccess(true);
settings.setBuiltInZoomControls(true);
settings.setCacheMode(2);
settings.setDomStorageEnabled(true);
settings.setGeolocationEnabled(true);
this.f16OooO00o.setWebViewClient(new OooO0O0());
this.f16OooO00o.loadUrl(string);
}
@Override
public void onDestroy() {
WebView webView = this.f16OooO00o;
if (webView != null) {
webView.clearHistory();
this.f16OooO00o.setWebViewClient(null);
this.f16OooO00o.removeAllViews();
if (this.f16OooO00o.getParent() instanceof ViewGroup) {
((ViewGroup) this.f16OooO00o.getParent()).removeView(this.f16OooO00o);
}
this.f16OooO00o.destroy();
this.f16OooO00o = null;
}
super.onDestroy();
}
@Override
public void onResume() {
super.onResume();
WebView webView = this.f16OooO00o;
if (webView != null) {
webView.resumeTimers();
this.f16OooO00o.onResume();
}
}
}