Exemplo n.º 1
0
  protected boolean isInValidCheck(VolleyError error) {
    if (mIsDestroy || !isAdded()) {
      return true;
    }
    if (error == null) {
      return false;
    }
    if (error.getSessionExpire()) {
      mContext = getActivity();
      if (mPopup == null) {
        mPopup = new Popup(mContext);
      } else {
        mPopup.dismiss();
      }
      mPopup.show(
          PopupType.ALERT,
          getString(R.string.info),
          getString(R.string.login_expire),
          new OnPopupClickListener() {
            @Override
            public void OnNegative() {}

            @Override
            public void OnPositive() {
              LocalBroadcastManager.getInstance(mContext)
                  .sendBroadcast(new Intent(Setting.BROADCAST_CLEAR));
            }
          },
          getString(R.string.ok),
          null,
          false);
      return true;
    }
    return false;
  }
Exemplo n.º 2
0
 @Override
 public void onDestroy() {
   if (BuildConfig.DEBUG) {
     Log.i(TAG, "onDestroy");
   }
   if (mCommonDataProvider != null) {
     mCommonDataProvider.cancelAll(TAG);
   }
   if (mBaseFragmentLayout != null) {
     mBaseFragmentLayout.onDestroy();
   }
   if (mPopup != null) {
     mPopup.dismiss();
   }
   mIsDestroy = true;
   unRegisterBroadcast();
   super.onDestroy();
 }