OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046

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


package com.excelliance.kxqp;

import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.excelliance.kxqp.platforms.ExcellianceAppInfo;
import com.excelliance.kxqp.ui.TextShare;
import com.excelliance.kxqp.util.Reflecting;

public class ShareActivity extends Activity {
    public static final int CHANNEL = 0;
    public static final int CHANNEL_GOOGLE = 1;
    public static final int CHANNEL_MYAPPS = 0;
    public static final String[] DOWNLOAD_URL = {"http://app.qq.com/#id=detail&appid=1104777665", "https://play.google.com/store/apps/details?id=com.excelliance.multiaccount"};
    public static String DOWNLOAD_URL2 = "http://mp.weixin.qq.com/s?__biz=MzA3MTg0NTE0Nw==&mid=2650744992&idx=1&sn=f954b9e900c0f96d87e713fcacf53e03";

    private Context f2213a;

    private Object f2214b;
    private String c;
    private Object d;
    private Object e;
    private Bundle f;
    private Dialog g = null;

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        this.f = bundle;
        this.f2213a = this;
        if (Reflecting.mClassLoader == null) {
            Reflecting.mClassLoader = getApplicationContext().getClassLoader();
        }
        setTheme(getResources().getIdentifier("Dialog.transparent", "style", getPackageName()));
        String stringExtra = getIntent().getStringExtra(ExcellianceAppInfo.KEY_GPATH);
        this.c = stringExtra;
        oneKeyShare(stringExtra);
    }

    public void oneKeyShare(String str) {
        this.f2213a.getPackageName();
        String str2 = TextShare.textshare;
        if ("qq".equalsIgnoreCase(str)) {
            if (!com.excelliance.kxqp.util.a.a(this.f2213a, "com.tencent.mobileqq")) {
                finish();
            }
            this.e = Reflecting.getObj(new Class[]{Activity.class, String.class}, new Object[]{this, str2}, "com.excelliance.kxqp.share.exec.ShareQQ");
            return;
        }
        if ("googleplus".equalsIgnoreCase(str)) {
            this.f2214b = Reflecting.getObj(new Class[]{Activity.class, String.class}, new Object[]{this, str2}, "com.excelliance.kxqp.share.exec.ShareGooglePlus");
            return;
        }
        if ("facebook".equalsIgnoreCase(str)) {
            this.d = Reflecting.getObj(new Class[]{Activity.class, Bundle.class, String.class}, new Object[]{this, this.f, str2}, "com.excelliance.kxqp.share.exec.ShareFacebook");
            return;
        }
        if (str == null || str.length() == 0) {
            str = DOWNLOAD_URL[0];
        }
        a(this.f2213a.getResources().getString(this.f2213a.getResources().getIdentifier("wx_share_content", "string", this.f2213a.getPackageName())) + "\n" + this.f2213a.getResources().getString(this.f2213a.getResources().getIdentifier("download_url", "string", this.f2213a.getPackageName())) + " " + str);
    }

    @Override
    @Deprecated
    protected Dialog onCreateDialog(int i) {
        return super.onCreateDialog(i);
    }

    private void a(final String str) {
        if (this.g == null) {
            View inflate = LayoutInflater.from(this.f2213a).inflate(this.f2213a.getResources().getIdentifier("dialog_share_about", "layout", this.f2213a.getPackageName()), (ViewGroup) null, false);
            this.g = new Dialog(this.f2213a, this.f2213a.getResources().getIdentifier("custom_dialog_theme", "style", this.f2213a.getPackageName()));
            this.g.getWindow().setBackgroundDrawable(this.f2213a.getResources().getDrawable(this.f2213a.getResources().getIdentifier("dialog_transparent_bg", "drawable", this.f2213a.getPackageName())));
            this.g.setContentView(inflate);
            int identifier = this.f2213a.getResources().getIdentifier("about_top_lay", "id", this.f2213a.getPackageName());
            if (identifier > 0) {
                ((RelativeLayout) inflate.findViewById(identifier)).setBackgroundDrawable(this.f2213a.getResources().getDrawable(this.f2213a.getResources().getIdentifier("gamebox_top_bg", "drawable", this.f2213a.getPackageName())));
            }
            int identifier2 = this.f2213a.getResources().getIdentifier("about_viewswitcher", "id", this.f2213a.getPackageName());
            if (identifier2 > 0) {
                ((LinearLayout) inflate.findViewById(identifier2)).setBackgroundDrawable(this.f2213a.getResources().getDrawable(this.f2213a.getResources().getIdentifier("gamebox_bottom_bg", "drawable", this.f2213a.getPackageName())));
            }
            TextView textView = (TextView) inflate.findViewById(this.f2213a.getResources().getIdentifier("about_item_1", "id", this.f2213a.getPackageName()));
            textView.setTag(1);
            textView.setBackgroundDrawable(this.f2213a.getResources().getDrawable(this.f2213a.getResources().getIdentifier("seting_item_bg", "drawable", this.f2213a.getPackageName())));
            Drawable drawable = this.f2213a.getResources().getDrawable(this.f2213a.getResources().getIdentifier("icon64_wx_logo", "drawable", this.f2213a.getPackageName()));
            int dip2px = GameUtil.dip2px(this.f2213a, 50.0f);
            textView.setCompoundDrawablesWithIntrinsicBounds(GameUtil.a(drawable, dip2px, dip2px), (Drawable) null, (Drawable) null, (Drawable) null);
            TextView textView2 = (TextView) inflate.findViewById(this.f2213a.getResources().getIdentifier("about_item_2", "id", this.f2213a.getPackageName()));
            textView2.setTag(2);
            textView2.setBackgroundDrawable(this.f2213a.getResources().getDrawable(this.f2213a.getResources().getIdentifier("seting_item_bg", "drawable", this.f2213a.getPackageName())));
            textView2.setCompoundDrawablesWithIntrinsicBounds(GameUtil.a(this.f2213a.getResources().getDrawable(this.f2213a.getResources().getIdentifier("icon_res_download_moments", "drawable", this.f2213a.getPackageName())), dip2px, dip2px), (Drawable) null, (Drawable) null, (Drawable) null);
            ((TextView) inflate.findViewById(this.f2213a.getResources().getIdentifier("about_item_3", "id", this.f2213a.getPackageName()))).setVisibility(8);
            View.OnClickListener onClickListener = new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    Object invokeMethod = Reflecting.invokeMethod(Context.class, (Object) ShareActivity.this.f2213a, "getInstance", Reflecting.getClass("com.excelliance.kxqp.share.exec.WxUtil"));
                    switch (Integer.parseInt(view.getTag().toString())) {
                        case 1:
                            Reflecting.invokeMethod(new Class[]{Boolean.TYPE, Context.class}, new Object[]{false, str}, "shareText", invokeMethod);
                            if (ShareActivity.this.g != null) {
                                ShareActivity.this.g.dismiss();
                                break;
                            }
                            break;
                        case 2:
                            Reflecting.invokeMethod(new Class[]{Boolean.TYPE, Context.class}, new Object[]{true, str}, "shareText", invokeMethod);
                            if (ShareActivity.this.g != null) {
                                ShareActivity.this.g.dismiss();
                                break;
                            }
                            break;
                    }
                    ShareActivity.this.finish();
                }
            };
            textView.setOnClickListener(onClickListener);
            textView2.setOnClickListener(onClickListener);
        }
        if (this.g.isShowing()) {
            return;
        }
        this.g.show();
    }

    @Override
    protected void onActivityResult(int i, int i2, Intent intent) {
        if ("qq".equalsIgnoreCase(this.c)) {
            Reflecting.invokeMethod(new Class[]{Integer.TYPE, Integer.TYPE, Intent.class}, new Object[]{Integer.valueOf(i), Integer.valueOf(i2), intent}, "onActivityResult", this.e);
        }
        if ("googleplus".equalsIgnoreCase(this.c)) {
            Reflecting.invokeMethod(new Class[]{Integer.TYPE, Integer.TYPE, Intent.class}, new Object[]{Integer.valueOf(i), Integer.valueOf(i2), intent}, "isFromGooglePlus", this.f2214b);
        }
        if ("facebook".equalsIgnoreCase(this.c)) {
            Reflecting.invokeMethod(new Class[]{Integer.TYPE, Integer.TYPE, Intent.class}, new Object[]{Integer.valueOf(i), Integer.valueOf(i2), intent}, "onActivityResult", this.d);
        }
        if (isFinishing()) {
            return;
        }
        finish();
    }
}