Пример #1
0
 @Override
 public void onFailure(Object failedReason) {
   // 登录失败
   SysManager.logout();
   SysManager.exitSystem(BaseActivity.this);
   startActivity(new Intent(BaseActivity.this, LoginActivity_.class));
 }
Пример #2
0
 @Override
 public void onReceive(Context context, Intent intent) {
   int code = intent.getIntExtra("code", 0);
   if (99999 == code) {
     ToastUtil.toast(BaseActivity.this, intent.getStringExtra("reLoginReason"));
     // 重新登录
     RequestCenter.login(
         SharedPreferenceManager.getInstance().getString("lastLoginName", ""),
         SharedPreferenceManager.getInstance().getString("lastLoginPassword", ""),
         loginListener);
   } else if (30001 == code) {
     ToastUtil.toast(BaseActivity.this, intent.getStringExtra("reLoginReason"));
     // 登录失败
     SysManager.logout();
     SysManager.exitSystem(BaseActivity.this);
     startActivity(new Intent(BaseActivity.this, LoginActivity_.class));
   }
 }