Removed requests for synchronization of account when account is changed or created

This commit is contained in:
David A. Velasco 2013-11-08 14:01:34 +01:00
parent 628a406a77
commit f51b688ff4
3 changed files with 1 additions and 22 deletions

View file

@ -1276,14 +1276,6 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
setAccountAuthenticatorResult(intent.getExtras());
setResult(RESULT_OK, intent);
/// immediately request for the synchronization of the new account
Bundle bundle = new Bundle();
bundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
ContentResolver.requestSync(mAccount, MainApp.getAuthTokenType(), bundle);
syncAccount();
// Bundle bundle = new Bundle();
// bundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
// ContentResolver.requestSync(mAccount, MainApp.getAuthTokenType(), bundle);
return true;
}
}
@ -1653,13 +1645,6 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
mAuthMessage.setVisibility(View.GONE);
}
private void syncAccount(){
/// immediately request for the synchronization of the new account
Bundle bundle = new Bundle();
bundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
ContentResolver.requestSync(mAccount, MainApp.getAuthTokenType(), bundle);
}
@Override
public boolean onTouchEvent(MotionEvent event) {
if (MainApp.getAuthTokenTypeSamlSessionCookie().equals(mAuthTokenType) &&

View file

@ -95,12 +95,6 @@ public class AccountSelectActivity extends SherlockListActivity implements
(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);

View file

@ -1238,7 +1238,7 @@ OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
@Override
public void onSavedCertificate() {
startSynchronization();
startSyncFolderOperation(getCurrentDir());
}