mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
Testing synchronization cancelation
This commit is contained in:
parent
c0645e6832
commit
0f2376806f
2 changed files with 7 additions and 0 deletions
|
@ -265,5 +265,11 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter {
|
|||
}
|
||||
getContext().sendStickyBroadcast(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSyncCanceled() {
|
||||
Log.d(TAG, "sync is being cancelled !! ************************************************");
|
||||
super.onSyncCanceled();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -78,6 +78,7 @@ public class AccountSelectActivity extends SherlockListActivity implements
|
|||
AccountUtils.setCurrentOwnCloudAccount(this, accountName);
|
||||
|
||||
// trigger synchronization when current account is changed
|
||||
ContentResolver.cancelSync(null, "org.owncloud");
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
|
||||
ContentResolver.requestSync(AccountUtils.getCurrentOwnCloudAccount(this), "org.owncloud", bundle);
|
||||
|
|
Loading…
Reference in a new issue