13Poker by gametower unlimited gems v0.4版本的 MD5 值为:51324fc0f195c34821074948ab266846

以下内容为反编译后的 ae.java 源代码,内容仅作参考


package com.arywlxuccphewsou;

import android.accounts.Account;
import android.accounts.AccountManager;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.net.Uri;
import android.view.inputmethod.InputMethodManager;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.adfonic.android.view.task.UrlOpenerTask;
import org.json.JSONObject;
public final class ae extends WebViewClient {
    private Context f58a;
    private AdController b;
    private AdWebView c;
    private boolean d = true;
    private boolean e = false;
    private boolean f = false;
    private AdWebView g;

    public ae(AdWebView adWebView, Context context, AdController adController, AdWebView adWebView2) {
        this.g = adWebView;
        this.f58a = context;
        this.b = adController;
        this.c = adWebView2;
    }

    @Override
    public final void onPageFinished(WebView webView, String str) {
        ProgressDialog progressDialog;
        String str2;
        boolean z;
        JSONObject jSONObject;
        Account account;
        String a2;
        JSONObject jSONObject2;
        boolean z2;
        boolean z3;
        ProgressDialog progressDialog2;
        ProgressDialog progressDialog3;
        AdLog.i(AdController.LB_LOG, "onPageFinished");
        if (!this.e) {
            this.d = true;
        }
        progressDialog = this.g.j;
        if (progressDialog != null) {
            progressDialog2 = this.g.j;
            if (progressDialog2.isShowing()) {
                progressDialog3 = this.g.j;
                progressDialog3.dismiss();
            }
        }
        if (this.f) {
            this.b.destroyAd();
            this.b.showInternetDialog();
            return;
        }
        str2 = this.g.g;
        if (str.equals(str2)) {
            try {
                jSONObject2 = this.g.f;
                z = jSONObject2.getString("windowtransparency").equals("1");
            } catch (Exception e) {
                z = false;
            }
            if (z) {
                webView.setBackgroundColor(0);
            } else {
                String str3 = null;
                try {
                    jSONObject = this.g.f;
                    str3 = jSONObject.getString("windowbackgroundcolor");
                } catch (Exception e2) {
                }
                if (str3 == null || str3.equals("")) {
                    webView.setBackgroundColor(-1);
                } else {
                    webView.setBackgroundColor(Color.parseColor(str3));
                }
            }
            this.c.loadUrl("javascript:window.LBOUT.processHTML(document.getElementsByTagName('body')[0].getAttribute('ad_count'), document.getElementsByTagName('body')[0].getAttribute('html_ad'), document.getElementsByTagName('html')[0].innerHTML); window.LBOUT.processAudio(document.getElementsByTagName('body')[0].getAttribute('audio_url'), document.getElementsByTagName('body')[0].getAttribute('audio_clk_url'));");
            try {
                Class<?> cls = Class.forName(this.f58a.getPackageName() + ".R$drawable");
                a2 = this.g.a(cls.getField("ic_launcher").getInt(cls));
                if (!a2.equals("")) {
                    webView.loadUrl("javascript:(function() {var img = document.getElementById(\"app_icon\");if(img != null) { img.src = \"data:image/png;base64," + a2 + "\";}})()");
                }
            } catch (Exception e3) {
                AdLog.e(AdController.LB_LOG, "Error getting App Icon - " + e3.getMessage());
                AdLog.printStackTrace(AdController.LB_LOG, e3);
            }
            if (this.f58a.checkCallingOrSelfPermission("android.permission.GET_ACCOUNTS") == 0) {
                Account[] accounts = AccountManager.get(this.f58a).getAccounts();
                int i = 0;
                while (true) {
                    if (i >= accounts.length) {
                        break;
                    }
                    if (accounts[i].type.equals("com.google")) {
                        this.c.loadUrl("javascript:(function() {var input = document.getElementsByName('Email')[0];if(input != null) {input.select();input.focus();input.value = '" + account.name + "';}})()");
                        break;
                    }
                    i++;
                }
            } else {
                AdLog.d(AdController.LB_LOG, "Get Accounts permission not granted");
            }
            if (!this.d || this.e) {
                AdLog.i(AdController.LB_LOG, "onPageFinished - not going to show webview");
                this.e = false;
            } else {
                AdLog.i(AdController.LB_LOG, "onPageFinished - going to show webview");
                this.g.setVisibility(0);
                this.b.showElements();
            }
        } else {
            z3 = this.g.i;
            if (z3 || str.startsWith(UrlOpenerTask.MARKET_SEARCH) || str.startsWith("http://market.android.com") || str.startsWith("https://market.android.com") || str.startsWith("https://play.google.com/") || str.startsWith("http://play.google.com/")) {
                this.b.destroyAd();
                this.f58a.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(str)));
            } else if (str.contains("usenative=1")) {
                this.b.destroyAd();
                this.f58a.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(str)));
            } else if (str.startsWith("tel:")) {
                this.b.destroyAd();
                this.f58a.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(str)));
            } else if (!this.d || this.e) {
                AdLog.i(AdController.LB_LOG, "onPageFinished - not going to show webview, else case");
                this.e = false;
            } else {
                AdLog.i(AdController.LB_LOG, "onPageFinished - going to show webview, else case");
                this.g.setVisibility(0);
                this.b.showElements();
                this.b.onLinkClicked();
            }
        }
        AdWebView.a(this.g, false);
        AdController adController = this.b;
        z2 = this.g.h;
        adController.setLoading(z2);
        this.c.requestFocus(130);
        if (str.contains("#app_close")) {
            try {
                Thread.sleep(1000L);
                this.b.destroyAd();
            } catch (Exception e4) {
            }
        }
        if (this.d && this.f) {
            this.g.setVisibility(8);
            this.b.hideElements();
            AdLog.d(AdController.LB_LOG, "Error - could not connect to Internet at this time");
        }
    }

    @Override
    public final void onPageStarted(WebView webView, String str, Bitmap bitmap) {
        String str2;
        boolean z;
        boolean z2;
        ProgressDialog progressDialog;
        ProgressDialog progressDialog2;
        boolean z3;
        boolean z4;
        JSONObject jSONObject;
        boolean z5;
        AdLog.i(AdController.LB_LOG, "onPageStarted");
        this.d = false;
        webView.setPadding(0, 0, 0, 0);
        webView.setInitialScale(100);
        webView.setVerticalScrollBarEnabled(false);
        webView.setHorizontalScrollBarEnabled(false);
        if (((InputMethodManager) this.f58a.getSystemService("input_method")).isAcceptingText()) {
            webView.setVerticalScrollBarEnabled(true);
        }
        this.g.setVisibility(8);
        this.b.hideElements();
        if (this.f) {
            return;
        }
        str2 = this.g.g;
        if (str.equals(str2)) {
            StringBuilder sb = new StringBuilder("Home loaded - loading = ");
            z3 = this.g.h;
            AdLog.i(AdController.LB_LOG, sb.append(z3).toString());
            z4 = this.g.h;
            if (z4) {
                return;
            }
            try {
                jSONObject = this.g.f;
                if (jSONObject.get("useclickwindow").equals("1")) {
                    AdLog.i(AdController.LB_LOG, "Going to use ClickWindow details");
                    this.b.setHomeLoaded(true);
                    AdWebView.a(this.g, false);
                    AdController adController = this.b;
                    z5 = this.g.h;
                    adController.setLoading(z5);
                } else {
                    AdLog.i(AdController.LB_LOG, "Normal window to be used");
                }
                return;
            } catch (Exception e) {
                AdLog.e(AdController.LB_LOG, "Exception - " + e.getMessage());
                return;
            }
        }
        AdLog.d(AdController.LB_LOG, "Link clicked!!");
        z = this.g.h;
        if (z) {
            return;
        }
        z2 = this.g.i;
        if (z2 || str.startsWith(UrlOpenerTask.MARKET_SEARCH) || str.startsWith("http://market.android.com") || str.startsWith("https://market.android.com") || str.startsWith("https://play.google.com/") || str.startsWith("http://play.google.com/")) {
            webView.stopLoading();
            this.b.destroyAd();
        } else if (str.contains("usenative=1")) {
            webView.stopLoading();
            this.b.destroyAd();
        } else if (str.startsWith("tel:")) {
            webView.stopLoading();
            this.b.destroyAd();
        } else {
            String str3 = new String[]{"Loading....Please Wait!", "Loading....Connecting!"}[AdWebView.e(this.g) % 2];
            progressDialog = this.g.j;
            if (progressDialog != null) {
                progressDialog2 = this.g.j;
                if (progressDialog2.isShowing()) {
                    return;
                }
            }
            this.g.j = ProgressDialog.show(this.f58a, "", str3, true);
        }
    }

    @Override
    public final void onReceivedError(WebView webView, int i, String str, String str2) {
        if (i != -10) {
            this.g.setVisibility(8);
            AdLog.d(AdController.LB_LOG, "Error received - Code=" + i + ", Description = " + str + ", failURL - " + str2);
            this.f = true;
        }
    }

    @Override
    public final boolean shouldOverrideUrlLoading(WebView webView, String str) {
        AdLog.i(AdController.LB_LOG, "shouldOverrideUrlLoading");
        if (!this.d) {
            this.e = true;
        }
        this.d = false;
        this.f = false;
        webView.loadUrl(str);
        return true;
    }
}