米多多 v3.0.1版本的 MD5 值为:f69e79dbe1787218a397ad907fb8f3ab
以下内容为反编译后的 CCMUDDUI0100Ower50ACT.java 源代码,内容仅作参考
package com.miduoduo.ui.activitys;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.net.Uri;
import android.net.http.SslError;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.SslErrorHandler;
import android.webkit.WebResourceRequest;
import android.webkit.WebView;
import android.widget.LinearLayout;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;
import c.a.a.n.b;
import c.j.c.d.b.h;
import com.base.commonlibrary.base.BaseResult;
import com.base.commonlibrary.views.LoadingTip;
import com.base.commonlibrary.views.TitleLayout;
import com.just.agentweb.AgentWeb;
import com.just.agentweb.MiddlewareWebChromeBase;
import com.just.agentweb.MiddlewareWebClientBase;
import iiebbq.jchjbr.edecis.R;
public class CCMUDDUI0100Ower50ACT extends c.a.a.n.b {
@BindView(R.id.container)
public LinearLayout container;
public Unbinder n;
public c.h.a.d p;
@BindView(R.id.title)
public TitleLayout titleView;
public class a implements View.OnClickListener {
public a() {
}
@Override
public void onClick(View view) {
if (CCMUDDUI0100Ower50ACT.this.l == null || CCMUDDUI0100Ower50ACT.this.l.back()) {
return;
}
CCMUDDUI0100Ower50ACT.this.finish();
}
}
public class b implements View.OnClickListener {
public b() {
}
@Override
public void onClick(View view) {
CCMUDDUI0100Ower50ACT.this.finish();
}
}
public class c extends MiddlewareWebChromeBase {
public c() {
}
@Override
public void onReceivedTitle(WebView webView, String str) {
super.onReceivedTitle(webView, str);
TitleLayout titleLayout = CCMUDDUI0100Ower50ACT.this.titleView;
if (titleLayout != null) {
titleLayout.setTitle(str);
}
}
}
public class e extends h<BaseResult> {
public e(Context context, boolean z) {
super(context, z);
}
@Override
public void a(String str) {
CCMUDDUI0100Ower50ACT.this.v(str);
CCMUDDUI0100Ower50ACT.this.finish();
}
@Override
public void b(BaseResult baseResult) {
CCMUDDUI0100Ower50ACT.this.v(baseResult.getMessage());
CCMUDDUI0100Ower50ACT.this.finish();
}
}
public class f implements LoadingTip.d {
public f() {
}
@Override
public void a() {
CCMUDDUI0100Ower50ACT.this.finish();
}
}
@Override
public ViewGroup E() {
return (ViewGroup) findViewById(R.id.container);
}
@Override
public b.c H() {
b.c H = super.H();
H.c(R.layout.dialog_404_tip);
H.d(R.id.finish);
return H;
}
@Override
public int I() {
return Color.parseColor("#ff0000");
}
@Override
public int J() {
return 1;
}
@Override
public MiddlewareWebChromeBase K() {
return new c();
}
@Override
public MiddlewareWebClientBase L() {
return new d();
}
@Override
public String O() {
Bundle extras = getIntent().getExtras();
if (extras != null) {
String string = extras.getString("url");
this.titleView.setTitle(extras.getString("title"));
return string;
}
return "";
}
public final void U() {
if (!c.j.c.d.d.a.f5740a.c() && !c.j.c.d.d.a.f5740a.b()) {
LoadingTip loadingTip = this.f3105h;
if (loadingTip != null) {
loadingTip.setLoadingTip(LoadingTip.LoadStatus.finish);
return;
}
return;
}
LoadingTip loadingTip2 = this.f3105h;
if (loadingTip2 != null) {
loadingTip2.setOnKnowListener(new f());
this.f3105h.setBackgroundColor(a.h.e.b.b(this.f3099b, R.color.white));
this.f3105h.setLoadingTip(LoadingTip.LoadStatus.know);
}
}
public final void V() {
this.f3100c.a(c.j.c.d.a.a.a().N().a(c.a.a.m.d.d.a()).s(new e(this.f3099b, true)));
}
@Override
public void a() {
this.n = ButterKnife.bind(this);
c.h.a.d C = c.h.a.d.C(this);
this.p = C;
C.y(true, 0.5f);
this.p.h();
}
@Override
public boolean b() {
return false;
}
@Override
public int f() {
return R.layout.act_base_web;
}
@Override
public void h() {
}
@Override
public void i(Bundle bundle) {
this.titleView.setOnBackButtonClickListener(new a());
this.titleView.b(R.mipmap.wp_ic_close, new b());
}
@Override
public void k() {
}
@Override
public void m() {
}
@Override
public void onDestroy() {
this.n.unbind();
AgentWeb agentWeb = this.l;
if (agentWeb != null) {
agentWeb.clearWebCache();
}
c.h.a.d dVar = this.p;
if (dVar != null) {
dVar.e();
}
super.onDestroy();
}
@Override
public boolean onKeyDown(int i2, KeyEvent keyEvent) {
AgentWeb agentWeb = this.l;
if (agentWeb == null || !agentWeb.handleKeyEvent(i2, keyEvent)) {
return super.onKeyDown(i2, keyEvent);
}
return true;
}
@Override
public void onResume() {
super.onResume();
U();
}
public class d extends MiddlewareWebClientBase {
public d() {
}
@Override
public void onReceivedSslError(WebView webView, SslErrorHandler sslErrorHandler, SslError sslError) {
sslErrorHandler.proceed();
}
@Override
@TargetApi(24)
public boolean shouldOverrideUrlLoading(WebView webView, WebResourceRequest webResourceRequest) {
String uri = webResourceRequest.getUrl().toString();
if (!uri.startsWith("http")) {
Log.i("vv", "处理自定义scheme");
try {
Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(uri));
intent.setFlags(805306368);
CCMUDDUI0100Ower50ACT.this.startActivity(intent);
} catch (Exception e2) {
e2.printStackTrace();
}
return true;
} else if (uri.contains("https://nice800.com/")) {
CCMUDDUI0100Ower50ACT.this.V();
return true;
} else {
return false;
}
}
@Override
public boolean shouldOverrideUrlLoading(WebView webView, String str) {
if (!str.startsWith("http")) {
Log.i("vv", "处理自定义scheme");
try {
Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(str));
intent.setFlags(805306368);
CCMUDDUI0100Ower50ACT.this.startActivity(intent);
} catch (Exception e2) {
e2.printStackTrace();
}
return true;
} else if (str.contains("https://nice800.com/")) {
CCMUDDUI0100Ower50ACT.this.V();
return true;
} else {
return false;
}
}
}
}