public void logout() {
   DialogUtils.showLoading(mContext, EventCode.HTTP_POST_SHOPMANAGERACCOUNT_LOGIN_OUT);
   AndroidEventManager.getInstance()
       .addEventListener(EventCode.HTTP_POST_SHOPMANAGERACCOUNT_LOGIN_OUT, this, true);
   AndroidEventManager.getInstance()
       .postEvent(
           EventCode.HTTP_POST_SHOPMANAGERACCOUNT_LOGIN_OUT,
           0,
           URLUtils.URL_SHOPMANAGERACCOUNT_LOGIN_OUT);
 }
 /**
  * @param username
  * @param pwd
  */
 public void login(String username, String pwd) {
   loginForCashierAppUp = new LoginForCashierAppUp(username, pwd);
   DialogUtils.showLoading(mContext, EventCode.HTTP_POST_SHOPMANAGERACCOUNT_LOGIN_IN);
   AndroidEventManager.getInstance()
       .addEventListener(EventCode.HTTP_POST_SHOPMANAGERACCOUNT_LOGIN_IN, this, true);
   AndroidEventManager.getInstance()
       .postEvent(
           EventCode.HTTP_POST_SHOPMANAGERACCOUNT_LOGIN_IN,
           0,
           URLUtils.URL_SHOPMANAGERACCOUNT_LOGIN_IN,
           loginForCashierAppUp);
 }
 /**
  * 移除事件
  *
  * @param nEventCode
  */
 protected void removeCallbackEventListener(int nEventCode) {
   if (codeToListenerMap == null) {
     return;
   }
   codeToListenerMap.remove(nEventCode);
   AndroidEventManager.getInstance().removeEventListener(nEventCode, this);
 }
 /**
  * 添加一次性事件
  *
  * @param nEventCode
  */
 protected void addOncesEventListener(int nEventCode) {
   if (codeToListenerMap == null) {
     codeToListenerMap = new SparseArray<OnEventListener>();
   }
   codeToListenerMap.put(nEventCode, this);
   AndroidEventManager.getInstance().addEventListener(nEventCode, this, true);
 }