@OnClick(R.id.btnBind) public void btnBindClick(View view) { if (StringUtils.isEmpty(editAccount.getText().toString()) || StringUtils.isEmpty(etPwd.getText().toString())) { showToast(getString(R.string.please_fill_in_full)); return; } httpUtils = new HttpUtils(); showProcessDialog( new OnDismissListener() { @Override public void onDismiss(DialogInterface dialog) { logic.stopRequest(); } }); Blowfish blowfish = new Blowfish(KEY); logic.setData(mHandler); logic.registerIpp( editAccount.getText().toString(), blowfish.encryptString(etPwd.getText().toString()), httpUtils); }
@Override public void handleMsg(Message msg) { switch (msg.what) { case MsgWhat.MSGWHAT_FOUNDATION_CHECK_UPDATE_SUCCESS: { BusinessInfo plugin = getPackageInfo(null); if (null != plugin) { if (!StringUtils.isEmpty(logic.vi.getVersionCode()) && !plugin.getVersionName().equals(logic.vi.getVersionCode())) { showAlertDialog( 0, getString(R.string.tip), getString(R.string.tip_to_update), null, ok, null, null, false, false); } else { goToMainActivity(); } } break; } case CONNECT_ERROR_MSGWHAT: { showToast(getString(R.string.error_net)); goToMainActivity(); break; } case DATA_FORMAT_ERROR_MSGWHAT: { showToast(getString(R.string.date_format_error)); goToMainActivity(); break; } } dismissProgress(); }