setAccountAuthenticatorResult(intent.getExtras());\r
setResult(RESULT_OK, intent);\r
\r
- /// immediately request for the synchronization of the new account\r
- Bundle bundle = new Bundle();\r
- bundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);\r
- ContentResolver.requestSync(mAccount, MainApp.getAuthTokenType(), bundle);\r
- syncAccount();\r
-// Bundle bundle = new Bundle();\r
-// bundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);\r
-// ContentResolver.requestSync(mAccount, MainApp.getAuthTokenType(), bundle);\r
return true;\r
}\r
}\r
mAuthMessage.setVisibility(View.GONE);\r
}\r
\r
- private void syncAccount(){\r
- /// immediately request for the synchronization of the new account\r
- Bundle bundle = new Bundle();\r
- bundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);\r
- ContentResolver.requestSync(mAccount, MainApp.getAuthTokenType(), bundle);\r
- }\r
- \r
@Override\r
public boolean onTouchEvent(MotionEvent event) {\r
if (MainApp.getAuthTokenTypeSamlSessionCookie().equals(mAuthTokenType) &&\r
(mPreviousAccount != null && !mPreviousAccount.equals(current))) {
/// the account set as default changed since this activity was created
- // trigger synchronization
- ContentResolver.cancelSync(null, MainApp.getAuthTokenType());
- Bundle bundle = new Bundle();
- bundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
- ContentResolver.requestSync(AccountUtils.getCurrentOwnCloudAccount(this), MainApp.getAuthTokenType(), bundle);
-
// restart the main activity
Intent i = new Intent(this, FileDisplayActivity.class);
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);