package com.iBookStar.views; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.Point; import android.location.Location; import android.net.Uri; import android.os.Build; import android.os.Handler; import android.os.Looper; import android.text.format.Time; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; import android.view.ViewTreeObserver; import android.view.accessibility.AccessibilityManager; import android.webkit.JavascriptInterface; import android.webkit.WebView; import android.widget.FrameLayout; import android.widget.Toast; import com.baidu.idl.face.platform.FaceEnvironment; import com.iBookStar.activityComm.CommonLogin; import com.iBookStar.activityComm.DownloadService; import com.mbridge.msdk.foundation.entity.CampaignEx; import com.tencent.smtt.sdk.TbsVideoCacheTask; import java.lang.reflect.Method; import java.net.URLDecoder; import java.net.URLEncoder; import java.util.HashMap; import java.util.Map; import java.util.UUID; import org.json.JSONObject; public class CommonWebView extends FrameLayout { protected static Handler q = new Handler(Looper.getMainLooper()); private InnerWebView a; private X5WebView b; private g2 c; private b2 d; private h2 e; private View.OnTouchListener f; private Map<String, String> g = new HashMap(); protected boolean h = true; protected boolean i = false; protected Point j = new Point(); protected boolean k = false; protected boolean l = false; protected boolean m = false; private com.iBookStar.a.k n = null; private String o; private FloatBannerView p; class a implements Runnable { a() { } public void run() { CommonWebView.this.o = UUID.randomUUID().toString(); Intent intent = new Intent(CommonWebView.this.getContext(), CommonLogin.class); intent.addFlags(268435456); intent.putExtra("uid", CommonWebView.this.o); CommonWebView.this.getContext().startActivity(intent); } } class a0 implements Runnable { final /* synthetic */ int a; a0(int i) { this.a = i; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.hrefNumOnPage(this.a); } } } class a1 implements Runnable { final /* synthetic */ String a; a1(String str) { this.a = str; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.userToLoginAndAuthorized(this.a); } } } class a2 implements Runnable { final /* synthetic */ int a; final /* synthetic */ int b; final /* synthetic */ long c; final /* synthetic */ String d; a2(int i, int i2, long j, String str) { this.a = i; this.b = i2; this.c = j; this.d = str; } public void run() { if (CommonWebView.this.d != null) { CommonWebView.this.d.a(this.a, this.b, this.c, this.d); } } } class b implements Runnable { final /* synthetic */ String a; final /* synthetic */ String b; b(String str, String str2) { this.a = str; this.b = str2; } public void run() { CommonWebView.this.o = UUID.randomUUID().toString(); Intent intent = new Intent(CommonWebView.this.getContext(), CommonLogin.class); intent.addFlags(268435456); if (com.iBookStar.utils.s.c(this.a)) { intent.putExtra("successUrl", this.a); } if (com.iBookStar.utils.s.c(this.b)) { intent.putExtra("failUrl", this.b); } intent.putExtra("uid", CommonWebView.this.o); CommonWebView.this.getContext().startActivity(intent); } } class b0 implements Runnable { b0() { } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.onClickTasksCenter(); } } } class b1 implements Runnable { final /* synthetic */ String a; final /* synthetic */ String b; final /* synthetic */ String c; b1(String str, String str2, String str3) { this.a = str; this.b = str2; this.c = str3; } public void run() { CommonWebView.this.o = UUID.randomUUID().toString(); Intent intent = new Intent(CommonWebView.this.getContext(), CommonLogin.class); intent.addFlags(268435456); if (com.iBookStar.utils.s.c(this.a)) { intent.putExtra("url", this.a); } if (com.iBookStar.utils.s.c(this.b)) { intent.putExtra("successUrl", this.b); } if (com.iBookStar.utils.s.c(this.c)) { intent.putExtra("failUrl", this.c); } intent.putExtra("uid", CommonWebView.this.o); CommonWebView.this.getContext().startActivity(intent); } } public interface b2 { String a(int i, int i2); void a(); void a(int i, int i2, long j); void a(int i, int i2, long j, String str); void a(String str); void a(String str, float f); void b(); int c(); void d(); void e(); void f(); void g(); void h(); int i(); void j(); void k(); int l(); int m(); String n(); } class c implements Runnable { c() { } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.onRefresh(); } } } class c0 implements Runnable { c0() { } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.openNextCoinTask(); } } } class c1 implements Runnable { c1() { } public void run() { if (CommonWebView.this.d != null) { CommonWebView.this.d.e(); } } } public interface c2 { int a(); e2 a(int i); } class d implements Runnable { d() { } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.onPayStart(); } } } class d0 implements Runnable { d0() { } public void run() { if (CommonWebView.this.n != null) { CommonWebView.this.n.c(); } } } class d1 implements Runnable { d1() { } public void run() { if (CommonWebView.this.d != null) { CommonWebView.this.d.f(); } } } public static class d2 { public void a(CommonWebView commonWebView, int i) { } public void a(CommonWebView commonWebView, String str) { } } class e implements Runnable { e() { } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.onPayCancel(); } } } class e0 implements Runnable { e0() { } public void run() { if (CommonWebView.this.n != null) { CommonWebView.this.n.a(false); } } } class e1 implements Runnable { e1() { } public void run() { if (CommonWebView.this.d != null) { CommonWebView.this.d.j(); } } } public interface e2 { String a(); String b(); } class f implements Runnable { f() { } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.onPayFinish(); } } } class f0 implements Runnable { f0() { } public void run() { if (CommonWebView.this.n != null) { CommonWebView.this.n.a(); } } } class f1 implements Runnable { final /* synthetic */ int a; f1(int i) { this.a = i; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.setStatusBarMode(this.a); } } } public static class f2 { public void a(CommonWebView commonWebView, String str) { } public void a(CommonWebView commonWebView, String str, Bitmap bitmap) { } public boolean b(CommonWebView commonWebView, String str) { if (str.startsWith("http://") || str.startsWith("https://")) { return false; } try { Intent parseUri = Intent.parseUri(str, 3); if (!com.iBookStar.c.c.c(parseUri.getScheme())) { return true; } parseUri.addFlags(268435456); commonWebView.getContext().startActivity(parseUri); return true; } catch (Throwable th) { th.printStackTrace(); return true; } } } class g implements Runnable { final /* synthetic */ String a; g(String str) { this.a = str; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.onContentLoaded(this.a); } } } /* access modifiers changed from: package-private */ public class g0 implements DialogInterface.OnClickListener { final /* synthetic */ String a; final /* synthetic */ String b; g0(String str, String str2) { this.a = str; this.b = str2; } public void onClick(DialogInterface dialogInterface, int i) { Intent intent = new Intent(CommonWebView.this.getContext(), DownloadService.class); intent.putExtra(CampaignEx.JSON_KEY_TITLE, this.a); intent.putExtra("downurl", this.b); intent.putExtra("path", com.iBookStar.c.b.c()); intent.putExtra("continuedown", true); CommonWebView.this.getContext().startService(intent); } } class g1 implements Runnable { g1() { } public void run() { if (CommonWebView.this.a != null) { CommonWebView.this.a.clearCache(true); } else if (CommonWebView.this.b != null) { CommonWebView.this.b.clearCache(true); } } } public interface g2 { void aSetUserBindRelation(String str); void clickToPushSetting(); void createPopupWindow(String str, String str2); void dealPics(String str); void destroyPopupWindow(String str); void fetchAd(String str); String getCoinTaskProgress(); String getCurrentCoinTask(); long getCurrentTaskId(); void getMonitorTime(String str); String getTaskParams(); float getTopSafeAreaInset(); String getUserBindRelation(); String getUserSpecialId(); String getUtdid(); int getWebViewEnvironment(); String getYPProductData(); void gotoTab(String str); void hidePopupWindow(String str); void hrefNumOnPage(int i); String isEnterReaderFromTask(); String isTaskFail(); void needPost(); void onBackAdReceived(String str); void onClickTasksCenter(); void onClose(); void onContentLoaded(String str); void onContinueAd(); void onFloatAdShow(); void onMonitorPhase(String str); void onMonitorTips(String str); void onPayCancel(); void onPayFinish(); void onPayStart(); void onRefresh(); void onSkipAd(); void openCouponPage(String str); void openItemDetailWithParams(String str); void openNextCoinTask(); void openURLWithNewWindow(String str); void postPopupWindowHeight(String str, int i); void postRightBtn(String str); void postTaskCenterCloseMsg(String str); void postTaskCondition(String str); void sendMessage(String str, String str2); void setAdItem(com.iBookStar.a.f fVar); void setStatusBarMode(int i); void shareGoodsDetails(String str); void showPopupWindow(String str); void timeMonitorComplete(); void userToLoginAndAuthorized(String str); void webPageChanged(String str); void webviewTitleChangeToString(String str); void withdraw(); } class h implements Runnable { h() { } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.onClose(); } } } class h0 implements Runnable { final /* synthetic */ String a; h0(String str) { this.a = str; } public void run() { if (CommonWebView.this.n != null) { CommonWebView.this.n.b(this.a); } } } class h1 implements Runnable { final /* synthetic */ String a; h1(String str) { this.a = str; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.dealPics(this.a); } } } public interface h2 { void a(String str); } class i implements Runnable { final /* synthetic */ String a; final /* synthetic */ String b; i(String str, String str2) { this.a = str; this.b = str2; } public void run() { NativeAdUtil.getInstance().requestAd(CommonWebView.this, this.a, this.b); } } class i0 implements Runnable { final /* synthetic */ String a; i0(String str) { this.a = str; } public void run() { if (CommonWebView.this.n != null) { CommonWebView.this.n.a(this.a); } } } class i1 implements Runnable { final /* synthetic */ boolean a; final /* synthetic */ String b; i1(boolean z, String str) { this.a = z; this.b = str; } public void run() { if (CommonWebView.this.n != null) { CommonWebView.this.n.a(this.a, this.b); } } } class j implements Runnable { final /* synthetic */ String a; j(String str) { this.a = str; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.fetchAd(this.a); } } } class j0 implements Runnable { final /* synthetic */ String a; j0(String str) { this.a = str; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.openURLWithNewWindow(this.a); } } } class j1 implements Runnable { j1() { } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.clickToPushSetting(); } } } class k implements ViewTreeObserver.OnGlobalLayoutListener { k() { } public void onGlobalLayout() { if (CommonWebView.this.n != null) { CommonWebView.this.n.b(); } } } class k0 implements Runnable { k0() { } public void run() { if (CommonWebView.this.d != null) { CommonWebView.this.d.b(); } } } class k1 implements Runnable { final /* synthetic */ String a; k1(String str) { this.a = str; } public void run() { if (CommonWebView.this.p == null) { CommonWebView.this.p = new FloatBannerView(CommonWebView.this.getContext()); CommonWebView.this.p.setWebView(CommonWebView.this); CommonWebView commonWebView = CommonWebView.this; commonWebView.addView(commonWebView.p, new FrameLayout.LayoutParams(-1, -1)); } CommonWebView.this.p.createFloatAds(this.a); } } class l implements Runnable { final /* synthetic */ String a; l(CommonWebView commonWebView, String str) { this.a = str; } public void run() { try { NativeAdUtil.getInstance().show(this.a); } catch (Exception e) { e.printStackTrace(); } } } class l0 implements Runnable { final /* synthetic */ String a; l0(String str) { this.a = str; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.onBackAdReceived(this.a); } } } class l1 implements Runnable { final /* synthetic */ String a; l1(String str) { this.a = str; } public void run() { if (CommonWebView.this.p != null) { CommonWebView.this.p.moveFloatAds(this.a); } } } class m implements Runnable { final /* synthetic */ String a; final /* synthetic */ int b; final /* synthetic */ int c; final /* synthetic */ int d; final /* synthetic */ int e; m(String str, int i, int i2, int i3, int i4) { this.a = str; this.b = i; this.c = i2; this.d = i3; this.e = i4; } public void run() { try { NativeAdUtil.getInstance().click(CommonWebView.this, this.a, this.b, this.c, this.d, this.e, false); } catch (Exception e2) { e2.printStackTrace(); } } } class m0 implements Runnable { final /* synthetic */ String a; m0(String str) { this.a = str; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.openItemDetailWithParams(this.a); } } } class m1 implements Runnable { m1() { } public void run() { if (CommonWebView.this.p != null) { CommonWebView.this.p.destroyFloatAds(); } } } class n implements Runnable { final /* synthetic */ String a; final /* synthetic */ int b; final /* synthetic */ int c; final /* synthetic */ int d; final /* synthetic */ int e; n(String str, int i, int i2, int i3, int i4) { this.a = str; this.b = i; this.c = i2; this.d = i3; this.e = i4; } public void run() { try { NativeAdUtil.getInstance().click(CommonWebView.this, this.a, this.b, this.c, this.d, this.e, true); } catch (Exception e2) { e2.printStackTrace(); } } } class n0 implements Runnable { n0() { } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.onClose(); } } } class n1 implements Runnable { final /* synthetic */ String a; n1(String str) { this.a = str; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.postTaskCondition(this.a); } } } class o implements Runnable { final /* synthetic */ String a; final /* synthetic */ int b; o(CommonWebView commonWebView, String str, int i) { this.a = str; this.b = i; } public void run() { try { NativeAdUtil.getInstance().loadReport(this.a, this.b); } catch (Exception e) { e.printStackTrace(); } } } class o0 implements Runnable { final /* synthetic */ String a; o0(String str) { this.a = str; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.openCouponPage(this.a); } } } class o1 implements Runnable { o1() { } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.timeMonitorComplete(); } } } class p implements Runnable { final /* synthetic */ String a; p(String str) { this.a = str; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.webPageChanged(this.a); } } } class p0 implements Runnable { final /* synthetic */ String a; p0(String str) { this.a = str; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.shareGoodsDetails(this.a); } } } class p1 implements Runnable { final /* synthetic */ String a; p1(String str) { this.a = str; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.getMonitorTime(this.a); } } } class q implements Runnable { q() { } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.withdraw(); } } } class q0 implements Runnable { final /* synthetic */ String a; final /* synthetic */ String b; q0(String str, String str2) { this.a = str; this.b = str2; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.createPopupWindow(this.a, this.b); } } } class q1 implements Runnable { final /* synthetic */ boolean a; q1(boolean z) { this.a = z; } public void run() { if (CommonWebView.this.p != null) { CommonWebView.this.p.setFloatAdsCarousel(this.a); } } } class r implements Runnable { r() { } public void run() { if (CommonWebView.this.d != null) { CommonWebView.this.d.k(); } } } class r0 implements Runnable { final /* synthetic */ String a; r0(String str) { this.a = str; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.webviewTitleChangeToString(this.a); } } } class r1 implements Runnable { final /* synthetic */ String a; r1(String str) { this.a = str; } public void run() { if (CommonWebView.this.p != null) { CommonWebView.this.p.setFloatAdsItem(this.a); } } } class s implements Runnable { s() { } public void run() { if (CommonWebView.this.d != null) { CommonWebView.this.d.h(); } } } class s0 implements Runnable { final /* synthetic */ String a; s0(String str) { this.a = str; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.showPopupWindow(this.a); } } } class s1 implements Runnable { final /* synthetic */ String a; s1(String str) { this.a = str; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.postRightBtn(this.a); } } } class t implements Runnable { t() { } public void run() { if (CommonWebView.this.d != null) { CommonWebView.this.d.g(); } } } class t0 implements Runnable { final /* synthetic */ String a; t0(String str) { this.a = str; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.hidePopupWindow(this.a); } } } class t1 implements Runnable { t1() { } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.onFloatAdShow(); } } } class u implements Runnable { u() { } public void run() { if (CommonWebView.this.d != null) { CommonWebView.this.d.d(); } } } class u0 implements Runnable { final /* synthetic */ String a; u0(String str) { this.a = str; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.destroyPopupWindow(this.a); } } } class u1 implements Runnable { final /* synthetic */ String a; u1(String str) { this.a = str; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.onMonitorTips(this.a); } } } /* access modifiers changed from: package-private */ public class v implements Runnable { final /* synthetic */ String a; v(String str) { this.a = str; } public void run() { CommonWebView.this.a((CommonWebView) this.a); } } class v0 implements Runnable { final /* synthetic */ String a; final /* synthetic */ int b; v0(String str, int i) { this.a = str; this.b = i; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.postPopupWindowHeight(this.a, this.b); } } } class v1 implements Runnable { final /* synthetic */ String a; v1(String str) { this.a = str; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.onMonitorPhase(this.a); } } } class w implements Runnable { w() { } public void run() { if (CommonWebView.this.d != null) { CommonWebView.this.d.a(); } } } class w0 implements Runnable { final /* synthetic */ String a; final /* synthetic */ String b; w0(String str, String str2) { this.a = str; this.b = str2; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.sendMessage(this.a, this.b); } } } class w1 implements Runnable { w1() { } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.onSkipAd(); } } } class x implements Runnable { final /* synthetic */ String a; x(String str) { this.a = str; } public void run() { if (CommonWebView.this.d != null) { CommonWebView.this.d.a(this.a); } } } class x0 implements Runnable { final /* synthetic */ String a; x0(String str) { this.a = str; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.aSetUserBindRelation(this.a); } } } class x1 implements Runnable { x1() { } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.onContinueAd(); } } } class y implements Runnable { y() { } public void run() { if (CommonWebView.this.a != null) { CommonWebView.this.a.a(); } else if (CommonWebView.this.b != null) { CommonWebView.this.b.g(); } } } class y0 implements Runnable { final /* synthetic */ String a; y0(String str) { this.a = str; } public void run() { if (CommonWebView.this.e != null) { CommonWebView.this.e.a(this.a); } } } class y1 implements Runnable { y1() { } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.needPost(); } } } class z implements Runnable { final /* synthetic */ String a; z(String str) { this.a = str; } public void run() { if (CommonWebView.this.a != null) { CommonWebView.this.a.a(this.a); } else if (CommonWebView.this.b != null) { CommonWebView.this.b.a(this.a); } } } class z0 implements Runnable { final /* synthetic */ String a; z0(String str) { this.a = str; } public void run() { if (CommonWebView.this.c != null) { CommonWebView.this.c.gotoTab(this.a); } } } class z1 implements Runnable { final /* synthetic */ int a; final /* synthetic */ int b; final /* synthetic */ long c; z1(int i, int i2, long j) { this.a = i; this.b = i2; this.c = j; } public void run() { if (CommonWebView.this.d != null) { CommonWebView.this.d.a(this.a, this.b, this.c); } } } public CommonWebView(Context context) { super(context); } public CommonWebView(Context context, AttributeSet attributeSet) { super(context, attributeSet); } public CommonWebView(Context context, AttributeSet attributeSet, int i2) { super(context, attributeSet, i2); } public CommonWebView(Context context, AttributeSet attributeSet, int i2, int i3) { super(context, attributeSet, i2, i3); } private void a() { Context context; if (Build.VERSION.SDK_INT == 17 && (context = getContext()) != null) { try { AccessibilityManager accessibilityManager = (AccessibilityManager) context.getSystemService("accessibility"); if (accessibilityManager.isEnabled()) { Method declaredMethod = accessibilityManager.getClass().getDeclaredMethod("setState", Integer.TYPE); declaredMethod.setAccessible(true); declaredMethod.invoke(accessibilityManager, 0); } } catch (Exception unused) { } } } /* access modifiers changed from: private */ /* access modifiers changed from: public */ private void a(String str) { if (str.startsWith("javascript:") && Build.VERSION.SDK_INT >= 19) { InnerWebView innerWebView = this.a; if (innerWebView != null) { innerWebView.evaluateJavascript(str, null); return; } X5WebView x5WebView = this.b; if (x5WebView != null) { x5WebView.evaluateJavascript(str, null); } } else if (Build.VERSION.SDK_INT >= 8) { b(); InnerWebView innerWebView2 = this.a; if (innerWebView2 != null) { innerWebView2.loadUrl(str, this.g); return; } X5WebView x5WebView2 = this.b; if (x5WebView2 != null) { x5WebView2.loadUrl(str, this.g); } } else { InnerWebView innerWebView3 = this.a; if (innerWebView3 != null) { innerWebView3.loadUrl(str); return; } X5WebView x5WebView3 = this.b; if (x5WebView3 != null) { x5WebView3.loadUrl(str); } } } private boolean a(String str, String str2, long j2, boolean z2) { String str3; boolean z3 = false; if (com.iBookStar.utils.s.a(str) || (!str.startsWith("http://") && !str.startsWith("https://"))) { return false; } if (com.iBookStar.utils.s.c(str2)) { String[] split = str2.split("\\s*;\\s*"); int length = split.length; int i2 = 0; while (true) { if (i2 >= length) { break; } String str4 = split[i2]; int indexOf = str4.indexOf(61); if (indexOf == -1 || !str4.substring(0, indexOf).trim().equalsIgnoreCase(TbsVideoCacheTask.KEY_VIDEO_CACHE_PARAM_FILENAME)) { i2++; } else { str3 = str4.substring(indexOf + 1).trim(); if (str3.startsWith("\"") && str3.endsWith("\"")) { str3 = str3.substring(1, str3.length() - 1); } } } } str3 = ""; if (com.iBookStar.utils.s.c(str3)) { String decode = URLDecoder.decode(str3); if (!decode.equalsIgnoreCase(str3)) { if (!URLEncoder.encode(decode).equalsIgnoreCase(str3)) { try { str3 = URLDecoder.decode(str3, "GB2312"); } catch (Exception unused) { } } else { str3 = URLDecoder.decode(str3); } } } else { str3 = com.iBookStar.utils.s.b(com.iBookStar.utils.s.a(URLDecoder.decode(str), '/'), '?'); if (!str.contains(str3) && !str.contains(URLEncoder.encode(str3).replace("+", "%20"))) { str3 = com.iBookStar.utils.s.b(com.iBookStar.utils.s.a(URLDecoder.decode(str, "GB2312"), '/'), '?'); } } if (com.iBookStar.utils.s.a(str3)) { return false; } String lowerCase = str3.toLowerCase(); if (!lowerCase.endsWith(".apk")) { return false; } if (this.h) { if (com.iBookStar.utils.k.c() == 1) { z3 = true; } AlertDialog create = new AlertDialog.Builder(getContext()).setTitle("提示").setMessage(z3 ? "您正处在WIFI网络下,下载无需流量:)" : "您正处在非WIFI网络下,下载需要消耗流量!").setPositiveButton("确认", new g0(lowerCase, str)).setNegativeButton("取消", (DialogInterface.OnClickListener) null).create(); create.setCancelable(true); create.setCanceledOnTouchOutside(true); create.show(); } else { Intent intent = new Intent(getContext(), DownloadService.class); intent.putExtra(CampaignEx.JSON_KEY_TITLE, lowerCase); intent.putExtra("downurl", str); intent.putExtra("path", com.iBookStar.c.b.c()); intent.putExtra("continuedown", true); getContext().startService(intent); } return true; } private void b() { this.g.clear(); this.g.put("X-Requested-With", "XMLHttpRequest"); this.g.put("info-userid", String.valueOf(com.iBookStar.c.b.j().c())); this.g.put("info-login", com.iBookStar.c.b.j().d() ? "1" : "0"); if (com.iBookStar.utils.s.c(com.iBookStar.c.b.j().a())) { this.g.put("info-uid", com.iBookStar.c.b.j().a()); } this.g.put("x-auth-token", com.iBookStar.c.b.j().b()); this.g.put("info-product", com.iBookStar.b.a.j); this.g.put("info-adproduct", com.iBookStar.b.a.i); this.g.put("info-sv", String.valueOf(7603)); if (isX5CoreLoaded()) { this.g.put("info-x5", "1"); } if (com.iBookStar.utils.s.c(com.iBookStar.b.a.s)) { this.g.put("info-tsv", com.iBookStar.b.a.s); } if (com.iBookStar.utils.s.c(com.iBookStar.b.a.t)) { this.g.put("info-tv", com.iBookStar.b.a.t); } if (this.i) { this.g.put("info-supgdt", "1"); this.g.put("info-source", "sdk"); this.g.put("info-adver", "76"); this.g.put("info-readerver", "3.0"); this.g.put("info-releasetime", com.iBookStar.b.a.b); this.g.put("info-imei", com.iBookStar.utils.d.b()); this.g.put("info-channel", com.iBookStar.b.a.f); this.g.put("info-mac", com.iBookStar.utils.d.d()); this.g.put("info-imsi", com.iBookStar.utils.d.c()); this.g.put("info-androiid", com.iBookStar.utils.d.a()); this.g.put("info-version", String.valueOf(com.iBookStar.b.a.c)); this.g.put("info-versionName", com.iBookStar.b.a.d); this.g.put("info-subversion", String.valueOf(com.iBookStar.b.a.e)); this.g.put("info-model", Build.MODEL); this.g.put("info-os", Build.VERSION.RELEASE); this.g.put("info-sdkint", String.valueOf(Build.VERSION.SDK_INT)); this.g.put("info-manufacturer", Build.MANUFACTURER); this.g.put("info-brand", Build.BRAND); this.g.put("info-vendor", Build.PRODUCT); this.g.put("info-device", Build.DEVICE); this.g.put("info-board", Build.BOARD); this.g.put("info-hardware", Build.HARDWARE); this.g.put("info-totalRam", String.valueOf(com.iBookStar.utils.d.h())); this.g.put("info-totalRom", String.valueOf(com.iBookStar.utils.d.i())); this.g.put("info-display", Build.DISPLAY); this.g.put("info-platform", FaceEnvironment.OS); this.g.put("info-dt", "phone"); if (com.iBookStar.utils.s.c(com.iBookStar.utils.d.e())) { this.g.put("info-oaid", com.iBookStar.utils.d.e()); } Time time = new Time(); time.setToNow(); String valueOf = String.valueOf(time.toMillis(true)); this.g.put("info-time", valueOf); this.g.put("info-vcode", com.iBookStar.d.c.a(valueOf + com.iBookStar.b.a.c)); this.g.put("info-network", String.valueOf(com.iBookStar.utils.k.a())); this.g.put("screen-width", String.valueOf(com.iBookStar.utils.d.f().x)); this.g.put("screen-height", String.valueOf(com.iBookStar.utils.d.f().y)); this.g.put("screen-inches", String.format("%.1f", Double.valueOf(com.iBookStar.utils.d.g()))); this.g.put("info-pkg", com.iBookStar.b.a.g); this.g.put("info-battery", com.iBookStar.utils.a.b()); Location b3 = com.iBookStar.utils.o.b(); if (b3 != null) { this.g.put("info-lon", String.format("%.2f", Double.valueOf(b3.getLongitude()))); this.g.put("info-lat", String.format("%.2f", Double.valueOf(b3.getLatitude()))); } this.g.put("info-city", com.iBookStar.b.a.m); } } /* JADX WARNING: Can't wrap try/catch for region: R(7:0|1|2|(1:4)|5|6|(2:8|10)(1:12)) */ /* JADX WARNING: Code restructure failed: missing block: B:11:?, code lost: return; */ /* JADX WARNING: Failed to process nested try/catch */ /* JADX WARNING: Missing exception handler attribute for start block: B:5:0x0009 */ /* JADX WARNING: Removed duplicated region for block: B:12:? A[RETURN, SYNTHETIC] */ /* JADX WARNING: Removed duplicated region for block: B:8:0x000d A[Catch:{ all -> 0x0010 }] */ public static void setDebuggingMode(boolean z2) { if (Build.VERSION.SDK_INT >= 19) { WebView.setWebContentsDebuggingEnabled(z2); } if (Build.VERSION.SDK_INT < 19) { com.tencent.smtt.sdk.WebView.setWebContentsDebuggingEnabled(z2); } } /* access modifiers changed from: protected */ public final void a(Runnable runnable) { if (Looper.getMainLooper().getThread() == Thread.currentThread()) { runnable.run(); } else { q.post(runnable); } } @JavascriptInterface public void aSetUserBindRelation(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>aSetUserBindRelation"); a(new x0(str)); } public void addAdView(View view) { InnerWebView innerWebView = this.a; if (innerWebView != null) { innerWebView.addView(view); return; } X5WebView x5WebView = this.b; if (x5WebView != null) { x5WebView.addView(view); } } @JavascriptInterface public void beginReadH5BookWithBookId(int i2, int i3, long j2) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>beginReadH5BookWithBookId"); a(new z1(i2, i3, j2)); } @JavascriptInterface public int bookAwaradValid() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>bookAwaradValid"); return com.iBookStar.c.b.a(com.iBookStar.c.c.a("project_valid"), true) ? 1 : 0; } public boolean canGoBack() { InnerWebView innerWebView = this.a; if (innerWebView != null) { return innerWebView.canGoBack(); } X5WebView x5WebView = this.b; if (x5WebView != null) { return x5WebView.canGoBack(); } return false; } public void changeVisibility(int i2) { if (i2 == 0) { try { InnerWebView innerWebView = this.a; if (innerWebView != null) { innerWebView.resumeTimers(); } else { X5WebView x5WebView = this.b; if (x5WebView != null) { x5WebView.resumeTimers(); } } } catch (Throwable unused) { } try { loadUrl("javascript:if(window.onVisibilityChange){window.onVisibilityChange('visible')}"); } catch (Throwable unused2) { } System.out.println("tttttttttttttttttttttttonWindowVisibilityChanged"); refreshContent(); if (!this.m && com.iBookStar.utils.k.a(com.iBookStar.c.b.a(com.iBookStar.c.c.b("task_complete_time"), 0L))) { System.out.println("tttttttttttttttttttttttonWindowVisibilityChanged onTaskCenterComplete"); this.m = true; loadUrl("javascript:onTaskCenterComplete()"); return; } return; } try { loadUrl("javascript:if(window.onVisibilityChange){window.onVisibilityChange('hidden')}"); } catch (Throwable unused3) { } } public void clearCache(boolean z2) { InnerWebView innerWebView = this.a; if (innerWebView != null) { innerWebView.clearCache(z2); return; } X5WebView x5WebView = this.b; if (x5WebView != null) { x5WebView.clearCache(z2); } } public void clearHistory() { InnerWebView innerWebView = this.a; if (innerWebView != null) { innerWebView.clearHistory(); return; } X5WebView x5WebView = this.b; if (x5WebView != null) { x5WebView.clearHistory(); } } @JavascriptInterface public void clearJsAdCache() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>clearJsAdCache"); a(new y()); } public void clearView() { InnerWebView innerWebView = this.a; if (innerWebView != null) { innerWebView.clearView(); return; } X5WebView x5WebView = this.b; if (x5WebView != null) { x5WebView.clearView(); } } @JavascriptInterface public void clearWebCache(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>clearWebCache"); a(new z(str)); } @JavascriptInterface public void clearWebPageCache() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>clearWebPageCache"); a(new g1()); } @JavascriptInterface public void click(String str, int i2, int i3, int i4, int i5) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>click=" + str); a(new m(str, i2, i3, i4, i5)); } @JavascriptInterface public void clickForNewWindow(String str, int i2, int i3, int i4, int i5) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>clickForNewWindow=" + str); a(new n(str, i2, i3, i4, i5)); } @JavascriptInterface public void clickToPushSetting() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>clickToPushSetting"); a(new j1()); } @JavascriptInterface public void closeWindow() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>closeWindow"); a(new n0()); } public c2 copyBackForwardList() { InnerWebView innerWebView = this.a; if (innerWebView != null) { return innerWebView.innercopyBackForwardList(); } X5WebView x5WebView = this.b; if (x5WebView != null) { return x5WebView.x5copyBackForwardList(); } return null; } @JavascriptInterface public void createFloatAds(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>createFloatAds=" + str); a(new k1(str)); } @JavascriptInterface public void createPopupWindow(String str, String str2) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>createPopupWindow = " + str); a(new q0(str, str2)); } @JavascriptInterface public void dealPics(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>dealPics=" + str); a(new h1(str)); } @JavascriptInterface public void destoryAds() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>destoryAds"); a(new e0()); } public void destroy() { InnerWebView innerWebView = this.a; if (innerWebView != null) { innerWebView.destroy(); return; } X5WebView x5WebView = this.b; if (x5WebView != null) { x5WebView.destroy(); } } @JavascriptInterface public void destroyFloatAds() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>destroyFloatAds"); a(new m1()); } @JavascriptInterface public void destroyPopupWindow(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>destroyPopupWindow = " + str); a(new u0(str)); } public boolean dispatchTouchEvent(MotionEvent motionEvent) { if (motionEvent.getActionMasked() == 0) { setTouchByUser(); this.j.set((int) motionEvent.getX(), (int) motionEvent.getY()); } View.OnTouchListener onTouchListener = this.f; if (onTouchListener != null) { onTouchListener.onTouch(this, motionEvent); } return super.dispatchTouchEvent(motionEvent); } @JavascriptInterface public void endChapterReadH5BookWithBookId(int i2, int i3, long j2, String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>endChapterReadH5BookWithBookId"); a(new a2(i2, i3, j2, str)); } @JavascriptInterface public void fetchAd(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>fetchAd="); a(new j(str)); } public void finish() { this.l = true; try { com.iBookStar.a.k kVar = this.n; if (kVar != null) { kVar.a(true); } } catch (Throwable th) { th.printStackTrace(); } } @JavascriptInterface public void finishTask() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>finishTask"); a(new k0()); } public void freeMemory() { InnerWebView innerWebView = this.a; if (innerWebView != null) { innerWebView.freeMemory(); return; } X5WebView x5WebView = this.b; if (x5WebView != null) { x5WebView.freeMemory(); } } @JavascriptInterface public String getAdClickCount(int i2, int i3) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>getAdClickCount"); b2 b2Var = this.d; if (b2Var != null) { return b2Var.a(i2, i3); } return null; } @JavascriptInterface public String getCoinTaskProgress() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>getCoinTaskProgress"); g2 g2Var = this.c; if (g2Var != null) { return g2Var.getCoinTaskProgress(); } return null; } @JavascriptInterface public String getCurrentCoinTask() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>getCurrentCoinTask"); g2 g2Var = this.c; if (g2Var != null) { return g2Var.getCurrentCoinTask(); } return null; } public long getCurrentTaskId() { g2 g2Var = this.c; if (g2Var != null) { return g2Var.getCurrentTaskId(); } return 0; } @JavascriptInterface public String getFilterAdSource() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>getFilterAdSource"); b2 b2Var = this.d; return b2Var != null ? b2Var.n() : ""; } @JavascriptInterface public String getHeaders() { Location b3; com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>getHeaders"); try { JSONObject jSONObject = new JSONObject(); jSONObject.put("info-supgdt", "1"); jSONObject.put("info-source", "sdk"); jSONObject.put("info-adver", "76"); jSONObject.put("info-readerver", "3.0"); jSONObject.put("info-releasetime", com.iBookStar.b.a.b); jSONObject.put("info-imei", com.iBookStar.utils.d.b()); jSONObject.put("info-mac", com.iBookStar.utils.d.d()); jSONObject.put("info-imsi", com.iBookStar.utils.d.c()); jSONObject.put("info-androiid", com.iBookStar.utils.d.a()); jSONObject.put("info-channel", com.iBookStar.b.a.f); jSONObject.put("info-version", String.valueOf(com.iBookStar.b.a.c)); jSONObject.put("info-versionName", com.iBookStar.b.a.d); jSONObject.put("info-subversion", String.valueOf(com.iBookStar.b.a.e)); jSONObject.put("info-model", Build.MODEL); jSONObject.put("info-os", Build.VERSION.RELEASE); jSONObject.put("info-sdkint", String.valueOf(Build.VERSION.SDK_INT)); jSONObject.put("info-manufacturer", Build.MANUFACTURER); jSONObject.put("info-brand", Build.BRAND); jSONObject.put("info-vendor", Build.PRODUCT); jSONObject.put("info-device", Build.DEVICE); jSONObject.put("info-board", Build.BOARD); jSONObject.put("info-hardware", Build.HARDWARE); jSONObject.put("info-totalRam", String.valueOf(com.iBookStar.utils.d.h())); jSONObject.put("info-totalRom", String.valueOf(com.iBookStar.utils.d.i())); jSONObject.put("info-display", Build.DISPLAY); jSONObject.put("info-platform", FaceEnvironment.OS); jSONObject.put("info-dt", "phone"); if (com.iBookStar.utils.s.c(com.iBookStar.utils.d.e())) { jSONObject.put("info-oaid", com.iBookStar.utils.d.e()); } Time time = new Time(); time.setToNow(); String valueOf = String.valueOf(time.toMillis(true)); jSONObject.put("info-time", valueOf); jSONObject.put("info-vcode", com.iBookStar.d.c.a(valueOf + com.iBookStar.b.a.c)); jSONObject.put("info-userid", String.valueOf(com.iBookStar.c.b.j().c())); jSONObject.put("info-login", com.iBookStar.c.b.j().d() ? "1" : "0"); if (com.iBookStar.utils.s.c(com.iBookStar.c.b.j().a())) { jSONObject.put("info-uid", com.iBookStar.c.b.j().a()); } jSONObject.put("x-auth-token", com.iBookStar.c.b.j().b()); jSONObject.put("info-product", com.iBookStar.b.a.j); jSONObject.put("info-adproduct", com.iBookStar.b.a.i); jSONObject.put("info-sv", String.valueOf(7603)); jSONObject.put("info-network", String.valueOf(com.iBookStar.utils.k.a())); jSONObject.put("screen-width", String.valueOf(com.iBookStar.utils.d.f().x)); jSONObject.put("screen-height", String.valueOf(com.iBookStar.utils.d.f().y)); jSONObject.put("screen-inches", String.format("%.1f", Double.valueOf(com.iBookStar.utils.d.g()))); jSONObject.put("info-pkg", com.iBookStar.b.a.g); jSONObject.put("info-battery", com.iBookStar.utils.a.b()); if (this.i && (b3 = com.iBookStar.utils.o.b()) != null) { jSONObject.put("info-lon", String.format("%.2f", Double.valueOf(b3.getLongitude()))); jSONObject.put("info-lat", String.format("%.2f", Double.valueOf(b3.getLatitude()))); } jSONObject.put("info-city", com.iBookStar.b.a.m); if (isX5CoreLoaded()) { jSONObject.put("info-x5", "1"); } if (com.iBookStar.utils.s.c(com.iBookStar.b.a.s)) { jSONObject.put("info-tsv", com.iBookStar.b.a.s); } if (com.iBookStar.utils.s.c(com.iBookStar.b.a.t)) { jSONObject.put("info-tv", com.iBookStar.b.a.t); } return jSONObject.toString(); } catch (Exception e3) { e3.printStackTrace(); return "{}"; } } public InnerWebView getInnerWebView() { return this.a; } @JavascriptInterface public void getMonitorTime(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>getMonitorTime"); a(new p1(str)); } public String getOriginalUrl() { InnerWebView innerWebView = this.a; if (innerWebView != null) { return innerWebView.getOriginalUrl(); } X5WebView x5WebView = this.b; return x5WebView != null ? x5WebView.getOriginalUrl() : ""; } public float getScale() { InnerWebView innerWebView = this.a; if (innerWebView != null) { return innerWebView.getScale(); } X5WebView x5WebView = this.b; if (x5WebView != null) { return x5WebView.getScale(); } return 1.0f; } @JavascriptInterface public String getSetupConfig() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>getSetupConfig"); return com.iBookStar.c.b.i(); } public String getTaskParams() { g2 g2Var = this.c; if (g2Var != null) { return g2Var.getTaskParams(); } return null; } @JavascriptInterface public int getTaskStatus() { b2 b2Var = this.d; int i2 = b2Var != null ? b2Var.i() : 1; com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>getTaskStatus=" + i2); return i2; } @JavascriptInterface public String getTextFromClipboard(int i2) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>getTextFromClipboard"); try { String b3 = com.iBookStar.utils.k.b(); if (i2 == 1) { com.iBookStar.utils.k.d(); } return b3; } catch (Throwable th) { th.printStackTrace(); return ""; } } public String getTitle() { InnerWebView innerWebView = this.a; if (innerWebView != null) { return innerWebView.getTitle(); } X5WebView x5WebView = this.b; return x5WebView != null ? x5WebView.getTitle() : ""; } @JavascriptInterface public String getTopSafeAreaInset() { g2 g2Var = this.c; float topSafeAreaInset = (g2Var != null ? g2Var.getTopSafeAreaInset() : 0.0f) / getScale(); com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>getTopSafeAreaInset = " + topSafeAreaInset); return String.valueOf(topSafeAreaInset); } public String getUA() { InnerWebView innerWebView = this.a; if (innerWebView != null) { return innerWebView.getUA(); } X5WebView x5WebView = this.b; if (x5WebView != null) { return x5WebView.getUA(); } return null; } public String getUrl() { InnerWebView innerWebView = this.a; if (innerWebView != null) { return innerWebView.getUrl(); } X5WebView x5WebView = this.b; return x5WebView != null ? x5WebView.getUrl() : ""; } @JavascriptInterface public String getUserBindRelation() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>getUserBindRelation"); g2 g2Var = this.c; return g2Var != null ? g2Var.getUserBindRelation() : ""; } @JavascriptInterface public String getUserSpecialId() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>getUserSpecialId"); g2 g2Var = this.c; return g2Var != null ? g2Var.getUserSpecialId() : ""; } @JavascriptInterface public String getUtdid() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>getUtdid"); g2 g2Var = this.c; return g2Var != null ? g2Var.getUtdid() : ""; } @JavascriptInterface public int getWebViewEnvironment() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>getWebViewEnvironment"); g2 g2Var = this.c; if (g2Var != null) { return g2Var.getWebViewEnvironment(); } return 0; } @JavascriptInterface public String getYPProductData() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>getYPProductData"); g2 g2Var = this.c; return g2Var != null ? g2Var.getYPProductData() : ""; } public void goBack() { InnerWebView innerWebView = this.a; if (innerWebView != null) { innerWebView.goBack(); return; } X5WebView x5WebView = this.b; if (x5WebView != null) { x5WebView.goBack(); } } public void goBackOrForward(int i2) { InnerWebView innerWebView = this.a; if (innerWebView != null) { innerWebView.goBackOrForward(i2); return; } X5WebView x5WebView = this.b; if (x5WebView != null) { x5WebView.goBackOrForward(i2); } } @JavascriptInterface public void gotoTab(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>gotoTab"); a(new z0(str)); } @JavascriptInterface public int h5BookhasCoin() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>h5BookhasCoin"); b2 b2Var = this.d; return b2Var != null ? b2Var.l() : com.iBookStar.c.b.a(com.iBookStar.c.c.b("hascoin"), -1); } @com.iBookStar.utils.t public void handleH5Message(com.iBookStar.utils.f fVar) { if (!isFinished()) { loadUrl(String.format("javascript:if(window.onReceiveMessage){window.onReceiveMessage('%s')}", fVar.a())); } } @com.iBookStar.utils.t public void handleLoginResult(com.iBookStar.utils.g gVar) { if (com.iBookStar.utils.s.c(this.o) && this.o.equalsIgnoreCase(gVar.a())) { String b3 = gVar.b(); if (com.iBookStar.utils.s.c(b3) && !b3.equalsIgnoreCase("undefined")) { loadUrl(b3); } } } @JavascriptInterface public void hideAds() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>hideAds"); a(new f0()); } @JavascriptInterface public void hidePopupWindow(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>hidePopupWindow = " + str); a(new t0(str)); } @JavascriptInterface public void hideProgressView() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>hideProgressView"); a(new t()); } @JavascriptInterface public void hideTaskPrompt() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>hideTaskPrompt"); a(new e1()); } @JavascriptInterface public void hrefNumOnPage(int i2) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>hrefNumOnPage"); a(new a0(i2)); } public void initWebView(boolean z2) { a(); if (!z2 || !com.iBookStar.b.a.r) { InnerWebView innerWebView = new InnerWebView(getContext()); this.a = innerWebView; addView(innerWebView, new FrameLayout.LayoutParams(-1, -1)); this.a.a(this); this.a.setCommonWebViewClient(new f2()); this.a.setCommonWebChromeClient(new d2()); } else { X5WebView x5WebView = new X5WebView(getContext()); this.b = x5WebView; addView(x5WebView, new FrameLayout.LayoutParams(-1, -1)); this.b.a(this); this.b.setCommonWebViewClient(new f2()); this.b.setCommonWebChromeClient(new d2()); } getViewTreeObserver().addOnGlobalLayoutListener(new k()); } @JavascriptInterface public int isAllowRead() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>isAllowRead"); b2 b2Var = this.d; if (b2Var != null) { return b2Var.m(); } return 1; } @JavascriptInterface public String isEnterReaderFromTask() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>isEnterReaderFromTask"); g2 g2Var = this.c; return g2Var != null ? g2Var.isEnterReaderFromTask() : "0"; } public boolean isFinished() { return this.l; } @JavascriptInterface public String isTaskCenterComplete() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>isTaskCenterComplete"); try { return com.iBookStar.utils.k.a(com.iBookStar.c.b.a(com.iBookStar.c.c.b("task_complete_time"), 0)) ? "1" : "0"; } catch (Exception e3) { e3.printStackTrace(); return "0"; } } @JavascriptInterface public String isTaskFail() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>isTaskFail"); g2 g2Var = this.c; return g2Var != null ? g2Var.isTaskFail() : "0"; } public boolean isTouchByUser() { return this.k; } public boolean isUseX5() { return this.a == null && this.b != null; } @JavascriptInterface public boolean isValidAd() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>isValidAd"); InnerWebView innerWebView = this.a; if (innerWebView != null) { return innerWebView.b(); } X5WebView x5WebView = this.b; if (x5WebView != null) { return x5WebView.h(); } return true; } public boolean isX5CoreLoaded() { X5WebView x5WebView; if (this.a == null && (x5WebView = this.b) != null) { return x5WebView.isX5CoreLoaded(); } return false; } public void loadDataWithBaseURL(String str, String str2, String str3, String str4, String str5) { InnerWebView innerWebView = this.a; if (innerWebView != null) { innerWebView.loadDataWithBaseURL(str, str2, str3, str4, str5); return; } X5WebView x5WebView = this.b; if (x5WebView != null) { x5WebView.loadDataWithBaseURL(str, str2, str3, str4, str5); } } public void loadFloatNativeAd(com.iBookStar.a.f fVar, String str, String str2) { if (this.p == null) { FloatBannerView floatBannerView = new FloatBannerView(getContext()); this.p = floatBannerView; floatBannerView.setWebView(this); addView(this.p, new FrameLayout.LayoutParams(-1, -1)); } this.p.loadAd(fVar, str, str2); } public void loadNativeAd(com.iBookStar.a.f fVar, String str, String str2, boolean z2) { if (this.n == null) { this.n = new com.iBookStar.a.k(this); } this.n.a(fVar, str, str2, z2); } @JavascriptInterface public void loadReport(String str, int i2) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>loadReport=" + str); a(new o(this, str, i2)); } public void loadUrl(String str) { a(new v(str)); } @JavascriptInterface public void login() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>login"); a(new a()); } @JavascriptInterface public void login(String str, String str2) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>login, su=" + str + ", fu=" + str2); a(new b(str, str2)); } @JavascriptInterface public void login3(String str, String str2, String str3) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>login3"); a(new b1(str, str2, str3)); } @JavascriptInterface public void logout3() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>logout3"); try { com.iBookStar.utils.w.a().a(new com.iBookStar.utils.h()); } catch (Throwable th) { th.printStackTrace(); } } @JavascriptInterface public void moveFloatAds(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>moveFloatAds=" + str); a(new l1(str)); } @JavascriptInterface public void needPost() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>needPost"); a(new y1()); } @JavascriptInterface public void noticeProgressChanged(String str, float f3) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>noticeProgressChanged"); b2 b2Var = this.d; if (b2Var != null) { b2Var.a(str, f3); } } public void onActivityResult(int i2, int i3, Intent intent) { } @JavascriptInterface public void onBackAdReceived(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>onBackAdReceived = " + str); a(new l0(str)); } @JavascriptInterface public void onClickClose() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>onClickClose"); a(new h()); } @JavascriptInterface public void onClickPayBtn() { } @JavascriptInterface public void onClickTasksCenter() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>onClickTasksCenter"); a(new b0()); } @JavascriptInterface public void onContentLoaded(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>onContentLoaded"); a(new g(str)); } @JavascriptInterface public void onContinueAd() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>onContinueAd"); a(new x1()); } @JavascriptInterface public void onCopy(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>onCopy"); com.iBookStar.utils.k.a(str); Toast.makeText(getContext(), "已复制到剪贴板", 0).show(); } public void onDownloadStart(String str, String str2, String str3, String str4, long j2) { try { if (!a(str, str3, j2, false)) { getContext().startActivity(new Intent("android.intent.action.VIEW", Uri.parse(str))); } } catch (Exception e3) { e3.printStackTrace(); } } @JavascriptInterface public void onFloatAdShow() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>onFloatAdShow"); a(new t1()); } @JavascriptInterface public void onMonitorPhase(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>onMonitorPhase=" + str); a(new v1(str)); } @JavascriptInterface public void onMonitorTips(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>onMonitorTips=" + str); a(new u1(str)); } @JavascriptInterface public void onNeedRefresh() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>onNeedRefresh"); a(new c()); } @JavascriptInterface public void onPayCancel() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>onPayCancel"); a(new e()); } @JavascriptInterface public void onPayFinish() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>onPayFinish"); a(new f()); } @JavascriptInterface public void onPayStart() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>onPayStart"); a(new d()); } @JavascriptInterface public void onSkipAd() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>onSkipAd"); a(new w1()); } @JavascriptInterface public void openCouponPage(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>openCouponPage = " + str); a(new o0(str)); } @JavascriptInterface public void openItemDetailWithParams(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>openItemDetailWithParams = " + str); a(new m0(str)); } @JavascriptInterface public void openNextCoinTask() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>openNextCoinTask"); a(new c0()); } @JavascriptInterface public void openURLWithNewWindow(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>openURLWithNewWindow = " + str); a(new j0(str)); } @JavascriptInterface public void postAdPosition(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>postAdPosition = " + str); a(new i0(str)); } @JavascriptInterface public void postH5Message(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>postH5Message"); try { com.iBookStar.utils.w.a().a(new com.iBookStar.utils.f(str)); } catch (Throwable th) { th.printStackTrace(); } } @JavascriptInterface public void postPopupWindowHeight(String str, int i2) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>postPopupWindowHeight = " + str + "; height = " + i2); a(new v0(str, i2)); } @JavascriptInterface public void postPromotionPage(String str) { } @JavascriptInterface public void postRightBtn(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>postRightBtn=" + str); a(new s1(str)); } @JavascriptInterface public void postTaskCenterCloseMsg(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>postTaskCenterCloseMsg json=" + str); g2 g2Var = this.c; if (g2Var != null) { g2Var.postTaskCenterCloseMsg(str); } } @JavascriptInterface public void postTaskCondition(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>postTaskCondition=" + str); a(new n1(str)); } @JavascriptInterface public void refreshAdByPage(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>refreshAdByPage = " + str); a(new h0(str)); } @JavascriptInterface public void refreshAds() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>refreshAds"); a(new d0()); } public void refreshContent() { loadUrl("javascript:if(window.refreshView){window.refreshView()}"); } public void registerEventBus() { com.iBookStar.utils.w.a().b(this); } public void reload() { InnerWebView innerWebView = this.a; if (innerWebView != null) { innerWebView.reload(); return; } X5WebView x5WebView = this.b; if (x5WebView != null) { x5WebView.reload(); } } public boolean reloadFloatNativeAd(com.iBookStar.a.f fVar) { FloatBannerView floatBannerView = this.p; if (floatBannerView != null) { return floatBannerView.reloadAd(fVar); } return false; } public boolean reloadNativeAd(com.iBookStar.a.f fVar) { com.iBookStar.a.k kVar = this.n; if (kVar != null) { return kVar.a(fVar); } return false; } public void report2Web() { int i2; int i3; try { i3 = (int) (((float) this.j.x) / getScale()); i2 = (int) (((float) this.j.y) / getScale()); } catch (Exception unused) { Point point = this.j; int i4 = point.x; i2 = point.y; i3 = i4; } String format = String.format("{x:%d,y:%d}", Integer.valueOf(i3), Integer.valueOf(i2)); loadUrl("javascript:if(window.EventBus){window.EventBus.$emit('tap'," + format + ")}"); } @JavascriptInterface public void requestAd(String str, String str2) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>requestAd=" + str); a(new i(str, str2)); } public void resetTouchState() { this.k = false; } @JavascriptInterface public void screenCapture(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>screenCapture=" + str); a(new y0(str)); } @JavascriptInterface public void sendMessage(String str, String str2) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>sendMessage=" + str + "; msg=" + str2); a(new w0(str, str2)); } public void setAdItem(com.iBookStar.a.f fVar) { g2 g2Var = this.c; if (g2Var != null) { g2Var.setAdItem(fVar); } } public void setCacheMode(int i2) { InnerWebView innerWebView = this.a; if (innerWebView != null) { innerWebView.setCacheMode(i2); return; } X5WebView x5WebView = this.b; if (x5WebView != null) { x5WebView.setCacheMode(i2); } } public void setCommonWebChromeClient(d2 d2Var) { InnerWebView innerWebView = this.a; if (innerWebView != null) { innerWebView.setCommonWebChromeClient(d2Var); return; } X5WebView x5WebView = this.b; if (x5WebView != null) { x5WebView.setCommonWebChromeClient(d2Var); } } public void setCommonWebViewClient(f2 f2Var) { InnerWebView innerWebView = this.a; if (innerWebView != null) { innerWebView.setCommonWebViewClient(f2Var); return; } X5WebView x5WebView = this.b; if (x5WebView != null) { x5WebView.setCommonWebViewClient(f2Var); } } public void setCommonWebViewListener(g2 g2Var) { this.c = g2Var; } @JavascriptInterface public void setFloatAdsCarousel(boolean z2) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>setFloatAdsCarousel"); a(new q1(z2)); } @JavascriptInterface public void setFloatAdsItem(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>setFloatAdsItem"); a(new r1(str)); } public void setJavaScriptEnabled(boolean z2) { InnerWebView innerWebView = this.a; if (innerWebView != null) { innerWebView.setJavaScriptEnabled(z2); return; } X5WebView x5WebView = this.b; if (x5WebView != null) { x5WebView.setJavaScriptEnabled(z2); } } public void setMediaPlaybackRequiresUserGesture(boolean z2) { InnerWebView innerWebView = this.a; if (innerWebView != null) { innerWebView.setMediaPlaybackRequiresUserGesture(z2); return; } X5WebView x5WebView = this.b; if (x5WebView != null) { x5WebView.setMediaPlaybackRequiresUserGesture(z2); } } public void setOnAwardListener(b2 b2Var) { this.d = b2Var; } public void setOnScreenCaptureListener(h2 h2Var) { this.e = h2Var; } public void setOnTouchListener(View.OnTouchListener onTouchListener) { this.f = onTouchListener; } public void setOverrideDownload(boolean z2) { InnerWebView innerWebView = this.a; if (innerWebView != null) { innerWebView.setDownloadEnable(z2); return; } X5WebView x5WebView = this.b; if (x5WebView != null) { x5WebView.setDownloadEnable(z2); } } public void setPromptDownload(boolean z2) { this.h = z2; } @JavascriptInterface public void setSdkAdClickable(boolean z2, String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>setSdkAdClickable=" + z2 + ", params=" + str); a(new i1(z2, str)); } @JavascriptInterface public void setStatusBarMode(int i2) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>setStatusBarMode=" + i2); a(new f1(i2)); } public void setTouchByUser() { this.k = true; } @JavascriptInterface public void shareGoodsDetails(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>shareGoodsDetails"); a(new p0(str)); } @JavascriptInterface public void show(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>show=" + str); a(new l(this, str)); } @JavascriptInterface public void showAdTip() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>showAdTip"); a(new r()); } @JavascriptInterface public void showPopupWindow(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>showPopupWindow = " + str); a(new s0(str)); } @JavascriptInterface public void showProgressView() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>showProgressView"); a(new s()); } @JavascriptInterface public void showPromotionPage() { } @JavascriptInterface public void showTaskPrompt() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>showTaskPrompt"); a(new d1()); } public void stopLoading() { InnerWebView innerWebView = this.a; if (innerWebView != null) { innerWebView.stopLoading(); return; } X5WebView x5WebView = this.b; if (x5WebView != null) { x5WebView.stopLoading(); } } @JavascriptInterface public void taskAdDismiss() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>taskAdDismiss"); a(new w()); } @JavascriptInterface public void taskAdShow() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>taskAdShow"); a(new u()); } @JavascriptInterface public void taskAdSource(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>taskAdSource, adSource=" + str); a(new x(str)); } @JavascriptInterface public void timeMonitorComplete() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>timeMonitorComplete"); a(new o1()); } public void unregisterEventBus() { com.iBookStar.utils.w.a().c(this); } @JavascriptInterface public void updateUserCoin() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>updateUserCoin"); a(new c1()); } @JavascriptInterface public void userToLoginAndAuthorized(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>userToLoginAndAuthorized"); a(new a1(str)); } @JavascriptInterface public void webPageChanged(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>webPageChanged name=" + str); a(new p(str)); } @JavascriptInterface public int webviewGetJBMode() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>webviewGetJBMode"); b2 b2Var = this.d; if (b2Var != null) { return b2Var.c(); } return 2; } @JavascriptInterface public void webviewTitleChangeToString(String str) { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>webviewTitleChangeToString"); a(new r0(str)); } @JavascriptInterface public void withdraw() { com.iBookStar.utils.p.a("CommonWebView", ">>>>>>>>>>>>>>>>>>>>>>>>withdraw"); a(new q()); } }