private void onSetVideoParam(int flag) { mTipDlg.dismiss(); if (0 != flag) { toast(R.string.dlg_set_video_capture_param_fail_tip); } else { m_video_config = m_new_video_config; toast(R.string.dlg_set_video_capture_param_succeed_tip); finish(); } }
private void onGetVideoParam(int flag, NetSDK_Media_Video_Config cfg) { mTipDlg.dismiss(); if (flag != 0 || null == cfg) { toast(R.string.dlg_get_media_param_fail_tip); finish(); return; } m_video_config = cfg; if (cfg.encode.EncodeList.size() < 2) { toast(R.string.dlg_get_media_param_format_incorrect_tip); return; } // 根据获取到的数据设置界面 m_tb_h_flip.setChecked(1 == Integer.parseInt(m_video_config.capture.HFlip)); m_tb_v_flip.setChecked(1 == Integer.parseInt(m_video_config.capture.VFlip)); }
public void dismiss() { if (mProgressDialog != null && mProgressDialog.isShowing()) { mProgressDialog.dismiss(); } }
public void handleMessage(Message msg) { super.handleMessage(msg); try { prog.dismiss(); } catch ( IllegalArgumentException e) { // this may happen due to race conditions on activity shutdown? e.printStackTrace(); } switch (msg.what) { case QH_OK: buildView(); break; case QH_EMPTY: doAlert(null, "Server gave an unexpected response (no signon acknowledgement?)"); break; case QH_ERR_OFX: { OfxError e = (OfxError) msg.obj; switch (e.getErrorCode()) { // case StatusResponse.STATUS_ERROR: // General error (ERROR) // case StatusResponse.STATUS_MFA_REQUIRED: // User credentials are correct, but // further authentication required (ERROR) // case StatusResponse.STATUS_MFA_INVALID: // MFACHALLENGEA contains invalid // information (ERROR) case StatusResponse .STATUS_FI_INVALID: // <FI> Missing or Invalid in <SONRQ> (ERROR) doAlert(e, "Server is rejecting connection details (FI_ID or FI_ORG)"); break; // case StatusResponse.STATUS_PINCH_NEEDED: // Must change USERPASS (INFO) case StatusResponse .STATUS_AUTHTOKEN_REQUIRED: // OFX server requires AUTHTOKEN in signon during // the next session (ERROR) case StatusResponse .STATUS_BAD_LOGIN: // Signon invalid (see section 2.5.1) (ERROR) case StatusResponse.STATUS_AUTHTOKEN_INVALID: // AUTHTOKEN invalid (ERROR) loginFailure(); break; case StatusResponse.STATUS_ACCT_BUSY: // Customer account already in use (ERROR) doAlert(e, "Your account is currently in use"); break; case StatusResponse.STATUS_ACCT_LOCKED: // USERPASS Lockout (ERROR) doAlert(e, "Your account has been locked"); break; // case StatusResponse.STATUS_EMPTY_REQUEST: // Empty signon transaction not // supported (ERROR) // case StatusResponse.STATUS_PINCH_REQUIRED: // Signon invalid without // supporting pin change request (ERROR) // case StatusResponse.STATUS_CLIENTUID_REJECTED: // CLIENTUID error (ERROR) case StatusResponse .STATUS_CALL_US: // User should contact financial institution (ERROR) doAlert(e, "Please contact your financial institution"); break; default: doAlert(e, "Server refused the login"); break; } } case QH_ERR_HTTP: case QH_ERR_TIMEOUT: case QH_ERR_CONN: case QH_ERR_SSL: doRetryableAlert((Exception) msg.obj, "Unable to connect to server"); break; default: doAlert((Exception) msg.obj, OfxProfile.exceptionComment((Exception) msg.obj)); break; } }
private static void fermerProgress() { mProgressDialog.dismiss(); }