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

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


package com.excelliance.kxqp.gs.ui.aboutus;

import android.app.Activity;
import android.app.Dialog;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.core.app.ActivityCompat;
import androidx.core.content.FileProvider;
import androidx.fragment.app.DialogFragment;
import androidx.work.WorkRequest;
import com.alipay.sdk.widget.j;
import com.excean.bytedancebi.manager.BiManager;
import com.excean.ggspace.main.R;
import com.excelliance.kxqp.GameUtil;
import com.excelliance.kxqp.VersionManager;
import com.excelliance.kxqp.bitmap.bean.RankingItem;
import com.excelliance.kxqp.gs.base.GSBaseActivity;
import com.excelliance.kxqp.gs.bean.AppVersionBean;
import com.excelliance.kxqp.gs.bean.ReginBean;
import com.excelliance.kxqp.gs.bean.TestHandleSetProxyBean;
import com.excelliance.kxqp.gs.thpool.tp;
import com.excelliance.kxqp.gs.ui.aboutus.a;
import com.excelliance.kxqp.gs.ui.aboutus.c;
import com.excelliance.kxqp.gs.ui.contactus.ContactUsActivity;
import com.excelliance.kxqp.gs.ui.question.CommonWebViewActivity;
import com.excelliance.kxqp.gs.ui.version.VersionActivity;
import com.excelliance.kxqp.gs.util.ad;
import com.excelliance.kxqp.gs.util.ao;
import com.excelliance.kxqp.gs.util.ba;
import com.excelliance.kxqp.gs.util.bs;
import com.excelliance.kxqp.gs.util.bx;
import com.excelliance.kxqp.gs.util.by;
import com.excelliance.kxqp.gs.util.cd;
import com.excelliance.kxqp.gs.util.cf;
import com.excelliance.kxqp.gs.util.w;
import com.excelliance.kxqp.info.DualaidApkInfoUser;
import com.excelliance.kxqp.platforms.ExcellianceAppInfo;
import com.excelliance.kxqp.swipe.h;
import com.excelliance.kxqp.util.ToastUtil;
import com.excelliance.kxqp.util.aa;
import com.excelliance.staticslio.StatisticsManager;
import com.excelliance.user.account.ui.dialog.ContainerDialog;
import com.tencent.open.SocialConstants;
import io.github.prototypez.appjoint.AppJoint;
import io.github.prototypez.service.adModule.IAdModule;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import org.apache.http.cookie.ClientCookie;
import org.json.JSONException;
import org.json.JSONObject;

public class AboutActivity extends GSBaseActivity<b> implements a.b {
    private static long l;
    private static long m;
    private View d;
    private TextView f;
    private c g;
    private c h;
    private c i;
    private c j;
    private a n;
    private long[] e = new long[5];

    long[] f8315a = new long[3];

    long[] f8316b = new long[5];
    long[] c = new long[3];
    private Handler k = new Handler();
    private c.a o = new c.a() {
        @Override
        public void a(int i, int i2) {
            if (AboutActivity.this.mPresenter != null) {
                ((b) AboutActivity.this.mPresenter).a(i, i2);
            }
        }
    };
    private long p = 0;
    private int q = 0;

    @Override
    public boolean customAnimation() {
        return true;
    }

    @Override
    public boolean deepStatus() {
        return true;
    }

    static int e(AboutActivity aboutActivity) {
        int i = aboutActivity.q;
        aboutActivity.q = i + 1;
        return i;
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        this.n = new a();
        IntentFilter intentFilter = new IntentFilter();
        intentFilter.addAction("notification_clicked_action");
        registerReceiver(this.n, intentFilter);
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        unregisterReceiver(this.n);
        this.n = null;
        ((b) this.mPresenter).a();
    }

    @Override
    protected View getLayout() {
        this.d = w.b(this.mContext, "activity_about");
        return this.d;
    }

    @Override
    protected void initId() {
        ao a2 = ao.a(this.mContext);
        boolean z = false;
        View a3 = a2.a(this.d, j.j, 0);
        View a4 = a2.a(this.d, "copyright", 1);
        View a5 = a2.a(this.d, "statement", 2);
        View a6 = a2.a(this.d, "channel", 3);
        View a7 = a2.a(this.d, "contact_us", 4);
        View a8 = a2.a(this.d, "about_title", 5);
        View a9 = a2.a(this.d, "statement_pri", 6);
        a9.setVisibility(8);
        a5.setVisibility(8);
        ViewGroup.LayoutParams layoutParams = a7.getLayoutParams();
        if (layoutParams instanceof RelativeLayout.LayoutParams) {
            ((RelativeLayout.LayoutParams) layoutParams).topMargin = ad.a(this.mContext, 38.0f);
        }
        this.f = (TextView) a2.a("appName", this.d);
        this.f.setText(getString(com.excelliance.kxqp.gs.ui.home.b.a(this.mContext).d() ? R.string.app_name64 : R.string.app_name32));
        View a10 = a2.a("about_fre_top", this.d);
        if (com.excelliance.kxqp.gs.newappstore.b.c.a(this.mContext)) {
            a10.setBackgroundColor(com.excelliance.kxqp.gs.newappstore.b.c.f7694a);
        }
        this.f.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                System.arraycopy(AboutActivity.this.f8315a, 1, AboutActivity.this.f8315a, 0, AboutActivity.this.f8315a.length - 1);
                AboutActivity.this.f8315a[AboutActivity.this.f8315a.length - 1] = System.currentTimeMillis();
                if (System.currentTimeMillis() - AboutActivity.this.f8315a[0] < 1000) {
                    AboutActivity.this.b();
                }
            }
        });
        if (a8 != null) {
            a8.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    long currentTimeMillis = System.currentTimeMillis();
                    if (currentTimeMillis - AboutActivity.this.p > 1000) {
                        AboutActivity.this.q = 0;
                    }
                    AboutActivity.this.p = currentTimeMillis;
                    AboutActivity.e(AboutActivity.this);
                    if (AboutActivity.this.q >= 5) {
                        AboutActivity.this.q = 0;
                        by a11 = by.a(AboutActivity.this.mContext, "extractInfo");
                        boolean booleanValue = a11.b("sp_extractInfo_log_enable", false).booleanValue();
                        Log.d(AboutActivity.this.TAG, String.format("AboutActivity/onClick:thread(%s) logon(%s)", Thread.currentThread().getName(), Boolean.valueOf(booleanValue)));
                        ba.f11881a = false;
                        if (booleanValue) {
                            AboutActivity.this.a(a11);
                        } else {
                            AboutActivity.this.b(a11);
                        }
                    }
                }
            });
        }
        View a11 = a2.a(RankingItem.KEY_ICON, this.d);
        a3.setOnClickListener(this);
        a4.setOnClickListener(this);
        a5.setOnClickListener(this);
        a9.setOnClickListener(this);
        a6.setOnClickListener(this);
        a7.setOnClickListener(this);
        if (a11 != null) {
            a11.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    for (int i = 0; i < AboutActivity.this.e.length; i++) {
                        if (i == 4) {
                            AboutActivity.this.e[4] = System.currentTimeMillis();
                        } else {
                            AboutActivity.this.e[i] = AboutActivity.this.e[i + 1];
                        }
                    }
                    if (AboutActivity.this.e[4] - AboutActivity.this.e[0] < 1000) {
                        AboutActivity.this.c();
                    }
                }
            });
        }
        TextView textView = (TextView) a2.a("version_name", this.d);
        if (textView != null) {
            try {
                String str = getPackageManager().getPackageInfo(getPackageName(), 0).versionName;
                if (!TextUtils.isEmpty("")) {
                    str = "";
                }
                if (!TextUtils.isEmpty(str)) {
                    textView.setText(w.e(getContext(), "current_version") + ":V " + str);
                }
            } catch (PackageManager.NameNotFoundException e) {
                e.printStackTrace();
            }
        }
        if (bs.c() && bs.p(this.mContext)) {
            z = true;
        }
        if (z) {
            a7.setVisibility(8);
        }
        this.d.findViewById(R.id.company1);
    }

    public static ReginBean a(Context context, String str) {
        ReginBean reginBean = new ReginBean();
        String b2 = by.a(context, "global_config").b(str, "");
        if (TextUtils.isEmpty(b2)) {
            return reginBean;
        }
        try {
            JSONObject jSONObject = new JSONObject(b2);
            reginBean.ip = jSONObject.optString("ip");
            reginBean.port = jSONObject.optString(ClientCookie.PORT_ATTR);
            reginBean.key = jSONObject.optString("key");
            reginBean.pwd = jSONObject.optString("pwd");
            reginBean.setSupportKcp(jSONObject.optInt("supportKcp"));
            if (!TextUtils.isEmpty(reginBean.ip) && !TextUtils.isEmpty(reginBean.port)) {
                cf.a(context, context.getResources().getString(R.string.hide_setting_fixed_proxy_node_using), 0);
            }
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return reginBean;
    }

    @Override
    public b initPresenter() {
        return new b(this.mContext, this);
    }

    @Override
    public void singleClick(View view) {
        int intValue = Integer.valueOf(view.getTag().toString()).intValue();
        if (intValue != 6) {
            switch (intValue) {
                case 0:
                    finish();
                    return;
                case 1:
                    startActivity(new Intent(this, (Class<?>) VersionActivity.class));
                    overridePendingTransition();
                    return;
                case 2:
                    Intent intent = new Intent(this.mContext, (Class<?>) CommonWebViewActivity.class);
                    intent.putExtra("title", w.e(this.mContext, "statement_user"));
                    intent.putExtra(SocialConstants.PARAM_URL, "https://h5.ourplay.com.cn/html/agreement/index.html");
                    startActivity(intent);
                    overridePendingTransition();
                    return;
                case 3:
                default:
                    return;
                case 4:
                    startActivity(new Intent(this, (Class<?>) ContactUsActivity.class));
                    overridePendingTransition();
                    return;
            }
        }
        Intent intent2 = new Intent(this.mContext, (Class<?>) CommonWebViewActivity.class);
        intent2.putExtra("title", w.e(this.mContext, "statement_pri"));
        intent2.putExtra(SocialConstants.PARAM_URL, "https://h5.ourplay.com.cn/privacy-new/");
        startActivity(intent2);
        overridePendingTransition();
    }

    public void b() {
        final Dialog dialog = new Dialog(this.mContext, com.excelliance.kxqp.swipe.a.a.getIdOfStyle(this.mContext, "pop_custom_dialog_theme"));
        int identifier = getResources().getIdentifier("dialog_abtest_setting", "layout", getPackageName());
        dialog.setCanceledOnTouchOutside(false);
        if (identifier != 0) {
            dialog.getWindow().setContentView(identifier);
        }
        final EditText editText = (EditText) dialog.findViewById(com.excelliance.kxqp.swipe.a.a.getId(this.mContext, "et_nickname"));
        editText.setHint(w.e(getContext(), "about_activity_nickname"));
        ((TextView) dialog.findViewById(com.excelliance.kxqp.swipe.a.a.getId(this.mContext, "tv_title"))).setText(w.e(getContext(), "about_activity_title"));
        this.k.postDelayed(new Runnable() {
            @Override
            public void run() {
                if (AboutActivity.this.f != null) {
                    AboutActivity.this.showKeyBoard(AboutActivity.this.f);
                }
            }
        }, 200L);
        final ImageView imageView = (ImageView) dialog.findViewById(com.excelliance.kxqp.swipe.a.a.getId(this.mContext, "iv_clear"));
        imageView.setVisibility(editText.getText().toString().isEmpty() ? 8 : 0);
        imageView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                editText.setText("");
            }
        });
        editText.addTextChangedListener(new TextWatcher() {
            @Override
            public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
            }

            @Override
            public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
            }

            @Override
            public void afterTextChanged(Editable editable) {
                ((TextView) dialog.findViewById(com.excelliance.kxqp.swipe.a.a.getId(AboutActivity.this.mContext, "tv_ok"))).setTextColor(com.excelliance.kxqp.swipe.a.a.getcolor(AboutActivity.this.mContext, TextUtils.isEmpty(editable) ? "button_cancel" : "button_ok"));
                imageView.setVisibility(TextUtils.isEmpty(editable) ? 8 : 0);
            }
        });
        editText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
            @Override
            public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {
                if (i != 2) {
                    return false;
                }
                AboutActivity.this.a(editText, dialog);
                return true;
            }
        });
        ((TextView) dialog.findViewById(com.excelliance.kxqp.swipe.a.a.getId(this.mContext, "tv_cancle"))).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                editText.setText("");
                editText.setSelection(0);
                GSBaseActivity.hideKeyboard(AboutActivity.this);
                dialog.dismiss();
            }
        });
        ((TextView) dialog.findViewById(com.excelliance.kxqp.swipe.a.a.getId(this.mContext, "tv_ok"))).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                AboutActivity.this.a(editText, dialog);
            }
        });
        if (dialog.isShowing() || ((Activity) this.mContext).isFinishing()) {
            return;
        }
        dialog.show();
    }

    public void a(EditText editText, final Dialog dialog) {
        if (!Environment.getExternalStorageState().equals("mounted") || editText == null) {
            return;
        }
        final File file = new File((Environment.getExternalStorageDirectory().toString() + "/." + this.mContext.getPackageName() + "/") + ".test.cfg");
        final String trim = editText.getText().toString().trim();
        Log.d(this.TAG, "handleChangeAbResult: " + trim);
        tp.f(new Runnable() {
            @Override
            public void run() {
                if (TextUtils.isEmpty(trim)) {
                    if (file == null || !file.exists()) {
                        AboutActivity.this.k.post(new Runnable() {
                            @Override
                            public void run() {
                                ToastUtil.showToast(AboutActivity.this.mContext, w.e(AboutActivity.this.mContext, "toast_clear_ab_test"));
                                if (dialog != null) {
                                    dialog.dismiss();
                                    GSBaseActivity.hideKeyboard(AboutActivity.this);
                                }
                            }
                        });
                        return;
                    } else {
                        if (file != null && file.exists() && file.delete()) {
                            AboutActivity.this.k.post(new Runnable() {
                                @Override
                                public void run() {
                                    ToastUtil.showToast(AboutActivity.this.mContext, w.e(AboutActivity.this.mContext, "toast_clear_ab_test"));
                                    if (dialog != null) {
                                        dialog.dismiss();
                                        GSBaseActivity.hideKeyboard(AboutActivity.this);
                                    }
                                }
                            });
                            return;
                        }
                        return;
                    }
                }
                if (file != null) {
                    if (file.exists()) {
                        file.delete();
                    }
                    if (!file.getParentFile().exists()) {
                        file.getParentFile().mkdirs();
                    }
                    try {
                        file.createNewFile();
                        BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), "UTF-8"));
                        Log.d(AboutActivity.this.TAG, "onClick: changeInfo = " + trim);
                        bufferedWriter.write(trim);
                        bufferedWriter.flush();
                        bufferedWriter.close();
                        AboutActivity.this.k.post(new Runnable() {
                            @Override
                            public void run() {
                                ToastUtil.showToast(AboutActivity.this.mContext, w.e(AboutActivity.this.mContext, "toast_has_update_ab_test"));
                                if (dialog != null) {
                                    dialog.dismiss();
                                    GSBaseActivity.hideKeyboard(AboutActivity.this);
                                }
                            }
                        });
                    } catch (IOException e) {
                        e.printStackTrace();
                    } catch (Exception e2) {
                        e2.printStackTrace();
                    }
                }
            }
        });
    }

    public void c() {
        String str;
        String e;
        String a2;
        String ssid;
        String c;
        List<String> l2;
        String f;
        int i;
        ExcellianceAppInfo b2;
        ExcellianceAppInfo b3;
        ExcellianceAppInfo b4;
        final Dialog dialog;
        Window window;
        AppVersionBean appVersion;
        AppVersionBean appVersion2;
        AppVersionBean appVersion3;
        final StringBuilder sb = new StringBuilder();
        String packageName = this.mContext.getPackageName();
        String substring = packageName.substring(packageName.lastIndexOf(".") + 1);
        PackageManager packageManager = getPackageManager();
        String str2 = "";
        com.excelliance.kxqp.gs.ui.home.b a3 = com.excelliance.kxqp.gs.ui.home.b.a(this);
        try {
            String str3 = packageManager.getPackageInfo(getPackageName(), 0).versionName;
            if (!TextUtils.isEmpty("")) {
                str3 = "";
            }
            String str4 = str3 + "/";
            try {
                StringBuilder sb2 = new StringBuilder();
                sb2.append(str4);
                sb2.append(a3.d() ? "64" : "32");
                str2 = sb2.toString();
                String e2 = a3.e();
                if (cd.a(e2)) {
                    str = null;
                } else {
                    String str5 = packageManager.getPackageInfo(e2, 0).versionName + "/";
                    try {
                        StringBuilder sb3 = new StringBuilder();
                        sb3.append(str5);
                        sb3.append(a3.d() ? "32" : "64");
                        str = sb3.toString();
                    } catch (PackageManager.NameNotFoundException e3) {
                        str = str5;
                        e = e3;
                        e.printStackTrace();
                        sb.append("VerCode: " + DualaidApkInfoUser.getApkVersion(this.mContext) + "-" + str2 + " (" + substring + ")\n");
                        sb.append("SouceCodeVer: 802\n");
                        StringBuilder sb4 = new StringBuilder();
                        sb4.append("Assist: ");
                        sb4.append(str);
                        sb4.append("\n");
                        sb.append(sb4.toString());
                        sb.append("AndroidVer:" + com.excelliance.kxqp.util.a.b.f() + "\n");
                        sb.append("ChId: " + DualaidApkInfoUser.getMainChId(this.mContext) + "-" + DualaidApkInfoUser.getSubChId(this.mContext));
                        e = com.excelliance.kxqp.info.a.e(this.mContext);
                        a2 = bx.a().a(this.mContext);
                        ssid = BiManager.getSSID();
                        c = com.excelliance.kxqp.info.a.c(this.mContext);
                        l2 = com.excelliance.kxqp.pay.ali.b.l(this.mContext);
                        if (!TextUtils.isEmpty(sb.toString())) {
                            sb.append("\n");
                        }
                        VersionManager versionManager = VersionManager.getInstance();
                        versionManager.a(this.mContext);
                        f = versionManager.f();
                        if (!TextUtils.isEmpty(f)) {
                        }
                        sb.append("Uqid: " + GameUtil.getIntance().F(this.mContext) + "\n");
                        int b5 = h.b(this.mContext);
                        sb.append("Group: " + b5 + " (" + com.excelliance.kxqp.gs.util.a.a(b5, false) + "-" + com.excelliance.kxqp.gs.util.a.b() + ")\n");
                        if (!TextUtils.isEmpty(e)) {
                        }
                        if (!cd.a(a2)) {
                        }
                        if (!cd.a(ssid)) {
                        }
                        sb.append("Device: ");
                        sb.append(Build.BRAND);
                        sb.append("/");
                        sb.append(Build.DEVICE);
                        sb.append("/");
                        sb.append(Build.MODEL);
                        sb.append("/");
                        sb.append(VersionManager.a("ro.product.name"));
                        if (!TextUtils.isEmpty(sb.toString())) {
                            sb.append("\n");
                        }
                        if (!TextUtils.isEmpty(c)) {
                        }
                        if (!TextUtils.isEmpty(sb.toString())) {
                            sb.append("\n");
                        }
                        while (i < l2.size()) {
                        }
                        sb.append("\nJar: " + ((IAdModule) AppJoint.service(IAdModule.class)).getAdJarVerJson(this.mContext) + "\n");
                        b2 = com.excelliance.kxqp.repository.a.a(this.mContext).b("com.google.android.gms");
                        if (b2 != null) {
                            sb.append("GMS: " + appVersion3.versionName + StatisticsManager.COMMA + appVersion3.versionCode + "\n");
                        }
                        b3 = com.excelliance.kxqp.repository.a.a(this.mContext).b("com.android.vending");
                        if (b3 != null) {
                            sb.append("Play: " + appVersion2.versionName + StatisticsManager.COMMA + appVersion2.versionCode + "\n");
                        }
                        b4 = com.excelliance.kxqp.repository.a.a(this.mContext).b("com.google.android.play.games");
                        if (b4 != null) {
                            sb.append("Games: " + appVersion.versionName + StatisticsManager.COMMA + appVersion.versionCode + "\n");
                        }
                        dialog = new Dialog(this.mContext, R.style.pop_custom_dialog_theme);
                        View inflate = LayoutInflater.from(this.mContext).inflate(R.layout.dialog_info_layout, (ViewGroup) null, false);
                        inflate.findViewById(R.id.tv_copy).setOnClickListener(new View.OnClickListener() {
                            @Override
                            public void onClick(View view) {
                                AboutActivity.this.b(AboutActivity.this.mContext, sb.toString());
                                if (dialog.isShowing()) {
                                    dialog.dismiss();
                                }
                            }
                        });
                        TextView textView = (TextView) inflate.findViewById(R.id.tv_content);
                        textView.setLineSpacing(15.0f, 1.0f);
                        textView.setText(sb);
                        dialog.setContentView(inflate);
                        window = dialog.getWindow();
                        if (window != null) {
                        }
                        if (dialog.isShowing()) {
                        }
                    }
                }
            } catch (PackageManager.NameNotFoundException e4) {
                e = e4;
                str = null;
                str2 = str4;
            }
        } catch (PackageManager.NameNotFoundException e5) {
            e = e5;
            str = null;
        }
        sb.append("VerCode: " + DualaidApkInfoUser.getApkVersion(this.mContext) + "-" + str2 + " (" + substring + ")\n");
        sb.append("SouceCodeVer: 802\n");
        StringBuilder sb42 = new StringBuilder();
        sb42.append("Assist: ");
        sb42.append(str);
        sb42.append("\n");
        sb.append(sb42.toString());
        sb.append("AndroidVer:" + com.excelliance.kxqp.util.a.b.f() + "\n");
        sb.append("ChId: " + DualaidApkInfoUser.getMainChId(this.mContext) + "-" + DualaidApkInfoUser.getSubChId(this.mContext));
        e = com.excelliance.kxqp.info.a.e(this.mContext);
        a2 = bx.a().a(this.mContext);
        ssid = BiManager.getSSID();
        c = com.excelliance.kxqp.info.a.c(this.mContext);
        l2 = com.excelliance.kxqp.pay.ali.b.l(this.mContext);
        if (!TextUtils.isEmpty(sb.toString()) && !TextUtils.isEmpty(e)) {
            sb.append("\n");
        }
        VersionManager versionManager2 = VersionManager.getInstance();
        versionManager2.a(this.mContext);
        f = versionManager2.f();
        if (!TextUtils.isEmpty(f)) {
            sb.append("Uid: " + f + "\n");
        }
        sb.append("Uqid: " + GameUtil.getIntance().F(this.mContext) + "\n");
        int b52 = h.b(this.mContext);
        sb.append("Group: " + b52 + " (" + com.excelliance.kxqp.gs.util.a.a(b52, false) + "-" + com.excelliance.kxqp.gs.util.a.b() + ")\n");
        if (!TextUtils.isEmpty(e)) {
            sb.append("AndroidId: " + e + "\n");
        }
        if (!cd.a(a2)) {
            sb.append("rid: " + a2 + "\n");
        }
        if (!cd.a(ssid)) {
            sb.append("ssid: " + ssid + "\n");
        }
        sb.append("Device: ");
        sb.append(Build.BRAND);
        sb.append("/");
        sb.append(Build.DEVICE);
        sb.append("/");
        sb.append(Build.MODEL);
        sb.append("/");
        sb.append(VersionManager.a("ro.product.name"));
        if (!TextUtils.isEmpty(sb.toString()) && !TextUtils.isEmpty(c)) {
            sb.append("\n");
        }
        if (!TextUtils.isEmpty(c)) {
            sb.append("IMEI: " + c);
        }
        if (!TextUtils.isEmpty(sb.toString()) && l2.size() > 0) {
            sb.append("\n");
        }
        for (i = 0; i < l2.size(); i++) {
            sb.append("IMIES[" + i + "]: " + l2.get(i));
            if (i < l2.size() - 1) {
                sb.append("\n");
            }
        }
        sb.append("\nJar: " + ((IAdModule) AppJoint.service(IAdModule.class)).getAdJarVerJson(this.mContext) + "\n");
        b2 = com.excelliance.kxqp.repository.a.a(this.mContext).b("com.google.android.gms");
        if (b2 != null && (appVersion3 = b2.getAppVersion(this.mContext)) != null) {
            sb.append("GMS: " + appVersion3.versionName + StatisticsManager.COMMA + appVersion3.versionCode + "\n");
        }
        b3 = com.excelliance.kxqp.repository.a.a(this.mContext).b("com.android.vending");
        if (b3 != null && (appVersion2 = b3.getAppVersion(this.mContext)) != null) {
            sb.append("Play: " + appVersion2.versionName + StatisticsManager.COMMA + appVersion2.versionCode + "\n");
        }
        b4 = com.excelliance.kxqp.repository.a.a(this.mContext).b("com.google.android.play.games");
        if (b4 != null && (appVersion = b4.getAppVersion(this.mContext)) != null) {
            sb.append("Games: " + appVersion.versionName + StatisticsManager.COMMA + appVersion.versionCode + "\n");
        }
        dialog = new Dialog(this.mContext, R.style.pop_custom_dialog_theme);
        View inflate2 = LayoutInflater.from(this.mContext).inflate(R.layout.dialog_info_layout, (ViewGroup) null, false);
        inflate2.findViewById(R.id.tv_copy).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                AboutActivity.this.b(AboutActivity.this.mContext, sb.toString());
                if (dialog.isShowing()) {
                    dialog.dismiss();
                }
            }
        });
        TextView textView2 = (TextView) inflate2.findViewById(R.id.tv_content);
        textView2.setLineSpacing(15.0f, 1.0f);
        textView2.setText(sb);
        dialog.setContentView(inflate2);
        window = dialog.getWindow();
        if (window != null) {
            int i2 = getResources().getDisplayMetrics().heightPixels;
            int i3 = getResources().getDisplayMetrics().widthPixels;
            WindowManager.LayoutParams attributes = window.getAttributes();
            attributes.width = i3 - ad.a(this.mContext, 50.0f);
            attributes.height = (i2 * 2) / 3;
            attributes.gravity = 17;
            window.setAttributes(attributes);
        }
        if (dialog.isShowing()) {
            dialog.show();
        }
    }

    public void b(Context context, String str) {
        try {
            ((ClipboardManager) context.getSystemService("clipboard")).setText(str);
            ToastUtil.showToast(context, w.e(this.mContext, "toast_copyed"));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void a(by byVar) {
        Uri fromFile;
        if (Math.abs(System.currentTimeMillis() - m) < 20000) {
            ToastUtil.showToast(getApplicationContext(), String.format(getString(R.string.log_close_tips), Integer.valueOf((int) ((20000 - Math.abs(System.currentTimeMillis() - m)) / 1000))));
            return;
        }
        m = 0L;
        l = System.currentTimeMillis();
        aa.a(this.mContext, 233);
        com.excean.a.b.a(false);
        ba a2 = ba.a(this.mContext.getApplicationContext());
        if (a2 != null) {
            a2.b();
        }
        byVar.a("sp_extractInfo_log_enable", false);
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        String str = Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "log" + File.separator + "Log-";
        String str2 = str + simpleDateFormat.format(new Date(System.currentTimeMillis())) + this.mContext.getPackageName() + ".log";
        String str3 = str + new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss").format(new Date(System.currentTimeMillis())) + this.mContext.getPackageName() + ".log";
        if (new File(str3).exists()) {
            new File(str3).delete();
        }
        new File(str2).renameTo(new File(str3));
        ToastUtil.showToast(this.mContext, String.format(w.e(this.mContext, "log_has_closed_and_saved"), str3));
        File file = new File(str3);
        if (file.exists()) {
            Intent intent = new Intent("android.intent.action.SEND");
            intent.addFlags(268435456);
            if (Build.VERSION.SDK_INT >= 24) {
                fromFile = FileProvider.getUriForFile(this.mContext, this.mContext.getPackageName() + ".fileProvider", file);
            } else {
                fromFile = Uri.fromFile(file);
            }
            intent.putExtra("android.intent.extra.STREAM", fromFile);
            intent.addFlags(1);
            intent.setDataAndType(fromFile, "text/csv");
            try {
                this.mContext.startActivity(intent);
            } catch (Exception e) {
                Log.e(this.TAG, "AboutActivity/closeLogger(),no activity can deal log sending");
                e.printStackTrace();
            }
        } else {
            Log.e(this.TAG, "AboutActivity/closeLogger(),log file not exist,fileName=【" + str3 + "】");
        }
        com.excelliance.kxqp.util.master.c.a(this.mContext, false);
    }

    public void b(by byVar) {
        if (ActivityCompat.checkSelfPermission(this, "android.permission.WRITE_EXTERNAL_STORAGE") != 0) {
            d();
            return;
        }
        long currentTimeMillis = System.currentTimeMillis() - l;
        if (currentTimeMillis < WorkRequest.MIN_BACKOFF_MILLIS) {
            ToastUtil.showToast(this.mContext, String.format(w.e(this.mContext, "log_open_so_frequent"), Long.valueOf((WorkRequest.MIN_BACKOFF_MILLIS - currentTimeMillis) / 1000)));
            return;
        }
        m = System.currentTimeMillis();
        l = 0L;
        ToastUtil.showToast(this.mContext, w.e(this.mContext, "log_has_opened_see_notify"));
        Intent intent = new Intent();
        intent.setAction("notification_clicked_action");
        intent.putExtra("type", 0);
        aa.a(this.mContext, null, w.e(this.mContext, "log_collect"), w.e(this.mContext, "log_collect_click_complete"), PendingIntent.getBroadcast(getApplicationContext(), 0, intent, 134217728), 3, 233, true, true);
        com.excean.a.b.a(true);
        byVar.a("sp_extractInfo_log_enable", true);
        ba a2 = ba.a(this.mContext.getApplicationContext());
        if (a2 != null) {
            a2.c(this.mContext.getApplicationContext());
            a2.a();
        }
        com.excelliance.kxqp.util.master.c.a(this.mContext, true);
        tp.d(new Runnable() {
            @Override
            public void run() {
                com.excelliance.kxqp.gs.ui.home.b.a(AboutActivity.this.getApplicationContext()).b();
            }
        });
    }

    private void d() {
        new ContainerDialog.a().b(String.format(getString(R.string.no_permission), getString(R.string.permission_external_storage_name))).a(true).c(getString(R.string.cancel)).a(new ContainerDialog.b() {
            @Override
            public void a(DialogFragment dialogFragment) {
                dialogFragment.dismissAllowingStateLoss();
            }
        }).d(getString(R.string.dialog_sure)).b(new ContainerDialog.b() {
            @Override
            public void a(DialogFragment dialogFragment) {
                dialogFragment.dismissAllowingStateLoss();
                ActivityCompat.requestPermissions(AboutActivity.this, new String[]{"android.permission.READ_EXTERNAL_STORAGE", "android.permission.WRITE_EXTERNAL_STORAGE"}, 1001);
            }
        }).a(getString(R.string.hint)).a().show(getSupportFragmentManager(), "AboutActivityShowRequestPermissionDialog");
    }

    private void e() {
        new ContainerDialog.a().b(String.format(getString(R.string.no_permission), getString(R.string.permission_external_storage_name))).a(true).c(getString(R.string.cancel)).a(new ContainerDialog.b() {
            @Override
            public void a(DialogFragment dialogFragment) {
                dialogFragment.dismissAllowingStateLoss();
            }
        }).d(getString(R.string.go_enable)).b(new ContainerDialog.b() {
            @Override
            public void a(DialogFragment dialogFragment) {
                dialogFragment.dismissAllowingStateLoss();
                try {
                    Intent intent = new Intent("android.settings.APPLICATION_DETAILS_SETTINGS");
                    intent.setData(Uri.fromParts("package", AboutActivity.this.mContext.getPackageName(), null));
                    AboutActivity.this.mContext.startActivity(intent);
                } catch (Exception e) {
                    e.printStackTrace();
                    ToastUtil.showToast(AboutActivity.this.mContext, AboutActivity.this.getString(R.string.to_permission_fail));
                }
            }
        }).a(getString(R.string.hint)).a().show(getSupportFragmentManager(), "AboutActivityShowRequestPermissionDialog");
    }

    @Override
    public void onRequestPermissionsResult(int i, String[] strArr, int[] iArr) {
        super.onRequestPermissionsResult(i, strArr, iArr);
        if (i == 1001) {
            if (iArr.length > 0 && iArr[0] == 0) {
                b(by.a(this.mContext, "extractInfo"));
            } else {
                if (ActivityCompat.shouldShowRequestPermissionRationale(this, "android.permission.WRITE_EXTERNAL_STORAGE")) {
                    return;
                }
                e();
            }
        }
    }

    private class a extends BroadcastReceiver {
        private a() {
        }

        @Override
        public void onReceive(Context context, Intent intent) {
            if (intent.getIntExtra("type", -1) != -1) {
                AboutActivity.this.a(by.a(AboutActivity.this.mContext, "extractInfo"));
            }
        }
    }

    @Override
    public void a(TestHandleSetProxyBean testHandleSetProxyBean, int i) {
        if (testHandleSetProxyBean != null) {
            ReginBean reginBean = new ReginBean();
            reginBean.ip = testHandleSetProxyBean.ip;
            reginBean.port = testHandleSetProxyBean.port;
            reginBean.pwd = testHandleSetProxyBean.pwd;
            reginBean.key = testHandleSetProxyBean.key;
            reginBean.setSupportKcp(testHandleSetProxyBean.supportKcp);
            if (i == 1) {
                if (this.g == null || !this.g.isShowing() || isFinishing()) {
                    return;
                }
                this.g.update(reginBean);
                return;
            }
            if (i == 2) {
                if (this.h == null || !this.h.isShowing() || isFinishing()) {
                    return;
                }
                this.h.update(reginBean);
                return;
            }
            if (i == 3) {
                if (this.i == null || !this.i.isShowing() || isFinishing()) {
                    return;
                }
                this.i.update(reginBean);
                return;
            }
            if (i != 4 || this.j == null || !this.j.isShowing() || isFinishing()) {
                return;
            }
            this.j.update(reginBean);
        }
    }

    @Override
    public void showLoading(String str) {
        super.showLoading(str);
    }

    @Override
    public void hideLoading() {
        super.hideLoading();
    }
}