手机管家 v4.8.2版本的 MD5 值为:d088856dab74371c94855b8b0f117ae3

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


package com.tencent.qqpimsecure.plugin.passwordsystem.fg.view;

import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.os.Message;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.tencent.qqpimsecure.R;
import com.tencent.qqpimsecure.plugin.passwordsystem.fg.PiPasswordSystem;
import java.util.ArrayList;
import meri.pluginsdk.PluginIntent;
import tcs.aig;
import tcs.ajt;
import tcs.akn;
import tcs.ako;
import tcs.apa;
import tcs.bry;
import tcs.bsj;
import tcs.ks;
import tcs.vj;
import tcs.wn;
import tcs.xh;
import uilib.components.QButton;
import uilib.components.QEditText;

public class j extends uilib.frame.a {
    private uilib.components.f dVY;
    private ImageView eyN;
    private xh eyP;
    protected String flS;
    private int fmN;
    private apa fmm;
    private TextView fmt;
    private QEditText fmu;
    private TextView fmv;
    private TextWatcher fmw;

    public j(Context context) {
        super(context, R.layout.base_privacy_qq_safe);
        this.fmu = null;
        this.fmw = new TextWatcher() {
            @Override
            public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
                ((uilib.templates.b) j.this.dqi).d(j.this.fmm).setEnabled(j.this.fmu.getText().toString().length() > 0);
            }

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

            @Override
            public void afterTextChanged(Editable editable) {
            }
        };
    }

    @Override
    public uilib.frame.b Zl() {
        aKe();
        ArrayList arrayList = new ArrayList();
        this.fmm = new apa(bry.aIE().gh(R.string.WAN_CHENG), 19, new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                j.this.aJX();
            }
        });
        this.fmm.setEnabled(false);
        arrayList.add(this.fmm);
        uilib.templates.b bVar = new uilib.templates.b(this.mContext, bry.aIE().gh(R.string.psw_protect), null, null, arrayList);
        bVar.p(bry.aIE().gi(R.drawable.titlebar_icon_switch_to_pattern_pwd));
        bVar.fd(true);
        bVar.c(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                j.this.aKh();
            }
        });
        return bVar;
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        wG();
        this.fmu.requestFocus();
        this.eyP = wn.C(this.mContext);
        this.fmu.addTextChangedListener(this.fmw);
        this.fmN = 0;
        this.fmt.setText(String.format(bry.aIE().gh(R.string.connect_qq), this.flS));
    }

    protected void aKe() {
        this.flS = bsj.aIY().aIV();
    }

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

    private void wG() {
        this.fmt = (TextView) bry.b(this, R.id.connect_qq);
        this.fmu = (QEditText) bry.b(this.dqh, R.id.qq_psw);
        this.fmv = (TextView) bry.b(this, R.id.forget_psw);
        this.fmv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                akn.b(j.this.mContext, "http://aq.qq.com/lost_pwd?lang=zh_cn&login_type=normal?source_id=2671", 0);
            }
        });
    }

    private void aKf() {
        this.fmN++;
        int i = this.fmN;
    }

    public void aJX() {
        String obj = this.fmu.getText().toString();
        if (!ajt.aM(this.mContext)) {
            aJY();
        } else if (obj.equals("")) {
            uilib.components.g.F(this.mContext, bry.aIE().gh(R.string.please_enter_psw));
        } else {
            at(this.flS, obj);
        }
    }

    private uilib.components.c aJY() {
        final uilib.components.c cVar = new uilib.components.c(Zr());
        cVar.setTitle(R.string.str_qq_error_not_connet_net);
        cVar.setMessage(R.string.str_qq_error_net_setting);
        cVar.setPositiveButton(R.string.str_qq_net_work_setting, new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                cVar.dismiss();
                j.this.dm(j.this.mContext);
            }
        });
        cVar.setNegativeButton(R.string.cancel, new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                cVar.dismiss();
            }
        });
        cVar.show();
        return cVar;
    }

    public boolean dm(Context context) {
        Intent intent = new Intent("android.settings.WIRELESS_SETTINGS");
        if (context == null) {
            return false;
        }
        try {
            context.startActivity(intent);
            return true;
        } catch (ActivityNotFoundException e) {
            return false;
        }
    }

    private void at(final String str, final String str2) {
        this.dVY = new uilib.components.f(Zr());
        this.dVY.setTitle(bry.aIE().gh(R.string.sync_dialog_tips));
        this.dVY.setMessage(bry.aIE().gh(R.string.sync_dialog_login));
        this.dVY.setOnCancelListener(new DialogInterface.OnCancelListener() {
            @Override
            public void onCancel(DialogInterface dialogInterface) {
                if (j.this.eyP != null) {
                    j.this.eyP.stop();
                }
                if (j.this.dVY != null) {
                    j.this.dVY.dismiss();
                }
            }
        });
        this.dVY.show();
        ((aig) PiPasswordSystem.aJf().kH().gf(4)).c(new Runnable() {
            @Override
            public void run() {
                int O = j.this.eyP.O(str, str2);
                if (O == 0) {
                    j.this.getHandler().sendMessage(j.this.getHandler().obtainMessage(100000));
                } else {
                    j.this.getHandler().sendMessage(j.this.getHandler().obtainMessage(100001, Integer.valueOf(O)));
                }
            }
        }, null);
    }

    @Override
    public void a(Message message) {
        switch (message.what) {
            case 100000:
                aKg();
                return;
            case 100001:
                awv();
                sD(((Integer) message.obj).intValue());
                return;
            case 100002:
                Bitmap bitmap = (Bitmap) message.obj;
                if (this.eyN != null && bitmap != null) {
                    this.eyN.setImageBitmap(bitmap);
                    return;
                } else {
                    if (this.eyN != null && bitmap == null) {
                        this.eyN.setImageDrawable(bry.aIE().gi(R.drawable.login_verify_image_fail));
                        uilib.components.g.B(this.mContext, bry.aIE().gh(R.string.passwordsystem_sync_load_verify_code_fail));
                        return;
                    }
                    return;
                }
            default:
                return;
        }
    }

    protected void aKg() {
        Intent intent = new Intent();
        intent.putExtra(vj.d.aSp, true);
        Zr().setResult(-1, intent);
        awv();
        Zr().finish();
    }

    private void sD(int i) {
        switch (i) {
            case -1000:
                uilib.components.g.B(this.mContext, bry.aIE().gh(R.string.str_login_cancel));
                aKf();
                return;
            case -100:
                uilib.components.g.B(this.mContext, bry.aIE().gh(R.string.str_mobileregister_err_neterr));
                aKf();
                return;
            case 0:
                return;
            case 101:
                awt();
                return;
            case 203:
                uilib.components.g.B(this.mContext, bry.aIE().gh(R.string.wrong_password));
                this.fmu.setText("");
                aKf();
                return;
            case 205:
                uilib.components.g.B(this.mContext, bry.aIE().gh(R.string.sync_wrong_account));
                aKf();
                return;
            case 209:
                uilib.components.g.B(this.mContext, bry.aIE().gh(R.string.sync_wrong_verify_code));
                awt();
                aKf();
                return;
            case 1003:
                getHandler().sendMessage(getHandler().obtainMessage(100000));
                return;
            default:
                uilib.components.g.B(this.mContext, String.format(bry.aIE().gh(R.string.sync_unknow_error), Integer.valueOf(i)));
                aKf();
                return;
        }
    }

    private void awt() {
        View inflate = bry.aIE().inflate(this.mContext, R.layout.dialog_login_verify_image, null);
        this.eyN = (ImageView) bry.b(inflate, R.id.verifyImage);
        this.eyN.setImageDrawable(bry.aIE().gi(R.drawable.login_verify_image));
        QButton qButton = (QButton) bry.b(inflate, R.id.changeImageButton);
        qButton.setText(bry.aIE().gh(R.string.sync_change_verify_image));
        qButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                j.this.awu();
            }
        });
        final QEditText qEditText = (QEditText) bry.b(inflate, R.id.verifyCode);
        awu();
        final uilib.components.c cVar = new uilib.components.c(Zr());
        cVar.setTitle(bry.aIE().gh(R.string.sync_image_verify));
        cVar.setContentView(inflate);
        cVar.setPositiveButton(R.string.ok, new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                j.this.rw(qEditText.getText().toString());
                cVar.dismiss();
            }
        });
        cVar.setNeutralButton(R.string.cancel, new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                cVar.dismiss();
            }
        });
        cVar.show();
    }

    public void awu() {
        ((aig) PiPasswordSystem.aJf().kH().gf(4)).c(new Runnable() {
            @Override
            public void run() {
                j.this.getHandler().sendMessage(j.this.getHandler().obtainMessage(100002, ako.mp(j.this.eyP.kc())));
            }
        }, null);
    }

    public void rw(final String str) {
        this.dVY = new uilib.components.f(Zr());
        this.dVY.setTitle(bry.aIE().gh(R.string.sync_dialog_tips));
        this.dVY.setMessage(bry.aIE().gh(R.string.sync_dialog_verifying));
        this.dVY.show();
        ((aig) PiPasswordSystem.aJf().kH().gf(4)).c(new Runnable() {
            @Override
            public void run() {
                int h = j.this.eyP.h(str, false);
                if (h == 0) {
                    j.this.getHandler().sendMessage(j.this.getHandler().obtainMessage(100000));
                } else {
                    j.this.getHandler().sendMessage(j.this.getHandler().obtainMessage(100001, Integer.valueOf(h)));
                }
            }
        }, null);
    }

    public void awv() {
        if (this.dVY != null && this.dVY.isShowing()) {
            this.dVY.dismiss();
        }
        this.dVY = null;
    }

    protected void aKh() {
        PluginIntent pluginIntent = new PluginIntent(8060936);
        pluginIntent.setFlags(ks.dxv);
        PiPasswordSystem.aJf().a(pluginIntent, false);
        Zr().finish();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        awv();
    }
}