Browse Source

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

David A. Velasco 11 years ago
parent
commit
f51b688ff4

+ 0 - 15
src/com/owncloud/android/authentication/AuthenticatorActivity.java

@@ -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) &&

+ 0 - 6
src/com/owncloud/android/ui/activity/AccountSelectActivity.java

@@ -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);

+ 1 - 1
src/com/owncloud/android/ui/activity/FileDisplayActivity.java

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