@Override protected void onCancelled(DBResult dbResult) { super.onCancelled(dbResult); if (progressFragment != null) { progressFragment.dismissAllowingStateLoss(); } if (e != null) Toast.makeText(OAuthActivity.this, e.getError(), Toast.LENGTH_SHORT).show(); webView.loadUrl(getWeiboOAuthUrl()); }
@Override protected void onPostExecute(DBResult dbResult) { if (progressFragment.isVisible()) { progressFragment.dismissAllowingStateLoss(); } switch (dbResult) { case add_successfuly: Toast.makeText(OAuthActivity.this, getString(R.string.login_success), Toast.LENGTH_SHORT) .show(); break; case update_successfully: Toast.makeText( OAuthActivity.this, getString(R.string.update_account_success), Toast.LENGTH_SHORT) .show(); break; } finish(); }