- } else if (ACTION_CANCEL_SYNC_FOLDER.equals(intent.getAction())) {
- if (!intent.hasExtra(EXTRA_ACCOUNT) || !intent.hasExtra(EXTRA_FILE)) {
- Log_OC.e(TAG, "Not enough information provided in intent");
- return START_NOT_STICKY;
- }
- final Account account = intent.getParcelableExtra(EXTRA_ACCOUNT);
- final OCFile file = intent.getParcelableExtra(EXTRA_FILE);
- // Cancel operation
- new Thread(new Runnable() {
- public void run() {
- // Cancel the download
- mSyncFolderHandler.cancel(account,file);
- }
- }).start();
-