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

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


package com.searchboxsdk.android.c;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Build;
import android.os.Handler;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ImageButton;
import android.widget.RelativeLayout;
import com.searchboxsdk.android.a.d;
import com.searchboxsdk.android.b.b;
import com.searchboxsdk.android.b.e;
import com.searchboxsdk.android.b.f;
import com.searchboxsdk.android.b.g;
import com.searchboxsdk.android.util.h;
import com.searchboxsdk.android.util.j;
import com.searchboxsdk.android.util.k;
import com.searchboxsdk.android.util.sliding.DrawerLayout;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Map;
public class c extends com.searchboxsdk.android.c.a {
    private Activity f;
    private WebView g;
    private DrawerLayout h;
    private Handler i;

    public class a extends WebViewClient {
        private a() {
        }

        @Override
        public void onPageFinished(WebView webView, String str) {
            h.a(2, "MyWebViewClient::onPageFinished - [" + str + "]");
            super.onPageFinished(webView, str);
        }

        @Override
        public void onPageStarted(WebView webView, String str, Bitmap bitmap) {
            h.a(2, "MyWebViewClient::onPageStarted - [" + str + "]");
            super.onPageStarted(webView, str, bitmap);
        }

        @Override
        public void onReceivedError(WebView webView, int i, String str, final String str2) {
            c.this.g.loadUrl("file://" + c.this.f95a.getFilesDir().getPath() + "/error.html");
            h.a(2, "MyWebViewClient::onReceivedError - [" + str + "], [" + str2 + "]");
            c.this.i.postDelayed(new Runnable() {
                @Override
                public void run() {
                    c.this.g.loadUrl(str2);
                }
            }, 5000L);
            super.onReceivedError(webView, i, str, str2);
        }

        @Override
        public boolean shouldOverrideUrlLoading(WebView webView, String str) {
            h.a(2, "MyWebViewClient::shouldOverrideUrlLoading - [" + str + "]");
            String lowerCase = str.toLowerCase();
            String str2 = "searchmobileonline";
            try {
                str2 = new URL(((d) c.this.b).b().get(0).a()).getHost();
            } catch (MalformedURLException e) {
            }
            if (lowerCase.contains(str2)) {
                return false;
            }
            Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(str));
            intent.addFlags(344457216);
            c.this.f.startActivity(intent);
            return true;
        }
    }

    public c(Activity activity, d dVar, com.searchboxsdk.android.b.b bVar, com.searchboxsdk.android.a.b bVar2) {
        super(activity, dVar, bVar, bVar2);
        this.i = new Handler();
        this.f = activity;
    }

    private void c() {
        this.g = new WebView(this.f95a) {
            @Override
            public boolean onKeyDown(int i, KeyEvent keyEvent) {
                if (keyEvent.getAction() == 0) {
                    switch (i) {
                        case 4:
                            if (c.this.g != null && c.this.g.canGoBack()) {
                                c.this.g.goBack();
                            } else if (c.this.h != null) {
                                c.this.h.b();
                            }
                            return true;
                    }
                }
                return super.onKeyDown(i, keyEvent);
            }
        };
        this.g.setOnTouchListener(new View.OnTouchListener() {
            @Override
            public boolean onTouch(View view, MotionEvent motionEvent) {
                c.this.h.requestDisallowInterceptTouchEvent(true);
                return false;
            }
        });
        this.g.setLayoutParams(new RelativeLayout.LayoutParams(-1, -1));
        this.g.getSettings().setJavaScriptEnabled(true);
        this.g.setWebChromeClient(new WebChromeClient());
        this.g.setHorizontalScrollBarEnabled(false);
        this.g.setVerticalScrollBarEnabled(true);
        if (Build.VERSION.SDK_INT > 10) {
            this.g.setLayerType(1, null);
        }
        this.g.setWebViewClient(new a());
        this.g.loadUrl(((d) this.b).b().get(0).a());
    }

    private void d() {
        if (k.a(this.f95a)) {
            ViewGroup viewGroup = (ViewGroup) this.f.findViewById(16908290);
            View childAt = viewGroup.getChildAt(0);
            viewGroup.removeView(childAt);
            this.h = new DrawerLayout(this.f95a);
            RelativeLayout relativeLayout = new RelativeLayout(this.f);
            relativeLayout.setLayoutParams(new RelativeLayout.LayoutParams(-1, -1));
            relativeLayout.addView(childAt);
            ImageButton imageButton = new ImageButton(this.f);
            if (Build.VERSION.SDK_INT >= 16) {
                imageButton.setBackground(null);
            } else {
                imageButton.setBackgroundDrawable(null);
            }
            imageButton.setPadding(0, 0, k.a(this.f, 10), 0);
            RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-2, -2);
            layoutParams.addRule(15);
            imageButton.setLayoutParams(layoutParams);
            imageButton.setImageBitmap(com.searchboxsdk.android.util.c.a(this.f, "tab_side.png"));
            relativeLayout.addView(imageButton);
            this.h.setLayoutParams(new DrawerLayout.c(-1, -1));
            this.h.addView(relativeLayout);
            final RelativeLayout relativeLayout2 = new RelativeLayout(this.f95a);
            DrawerLayout.c cVar = new DrawerLayout.c(k.a(this.f, 290), -1);
            cVar.f114a = 3;
            relativeLayout2.setLayoutParams(cVar);
            relativeLayout2.addView(this.g);
            this.h.addView(relativeLayout2);
            viewGroup.addView(this.h);
            imageButton.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    c.this.h.h(relativeLayout2);
                }
            });
            this.h.setDrawerListener(new DrawerLayout.b() {
                @Override
                public void a(int i) {
                }

                @Override
                public void a(View view) {
                }

                @Override
                public void a(View view, float f) {
                }

                @Override
                public void b(View view) {
                    ((InputMethodManager) c.this.f95a.getSystemService("input_method")).hideSoftInputFromWindow(c.this.g.getWindowToken(), 0);
                }
            });
        }
    }

    @Override
    public void onPostExecute(Boolean bool) {
        super.onPostExecute(bool);
        if (bool.booleanValue()) {
            c();
            d();
        }
    }

    @Override
    protected boolean a(Object obj) {
        boolean z = false;
        g gVar = (g) obj;
        if (obj == null) {
            h.a(6, "Error Empty Response");
            return false;
        } else if (!gVar.a()) {
            this.e = gVar.b();
            h.a(6, "Error msg = [" + this.e + "]");
            return false;
        } else {
            d dVar = (d) this.b;
            dVar.a(gVar.c());
            if (gVar.c() != null && gVar.c().size() > 0) {
                z = true;
            }
            if (z) {
                try {
                    com.searchboxsdk.android.d.b.a(this.f95a, dVar.b().get(0).b(), null);
                } catch (j e) {
                    h.a(6, "Unable to send traking event in GetSearchBoxService!!!!", e);
                }
            } else {
                this.e = "Empty Response";
            }
            return z;
        }
    }

    @Override
    public e a() {
        f fVar = new f();
        fVar.a(this.f95a);
        fVar.a(this.c, b.a.DEVICE_SIDEBAR);
        fVar.a(10);
        try {
            return (g) com.searchboxsdk.android.d.b.a(this.f95a, "http://www.ad-market.mobi/1.3/getads", fVar, (Map<String, String>) null, g.class);
        } catch (j e) {
            h.a(6, "Unable to handle GetSearchBoxService!!!!", e);
            this.e = e.getMessage();
            return null;
        }
    }
}