import com.owncloud.android.datamodel.FileDataStorageManager;\r
import com.owncloud.android.datamodel.OCFile;\r
import com.owncloud.android.files.services.FileDownloader;\r
+import com.owncloud.android.operations.RemoteOperationResult;\r
import com.owncloud.android.utils.OwnCloudVersion;\r
\r
import android.accounts.Account;\r
\r
Log.d(TAG, "syncing owncloud account " + account.name);\r
\r
- sendStickyBroadcast(true, null); // message to signal the start to the UI\r
+ sendStickyBroadcast(true, null, null); // message to signal the start to the UI\r
\r
updateOCVersion();\r
\r
Notification notification = new Notification(R.drawable.icon, getContext().getString(R.string.sync_fail_ticker), System.currentTimeMillis());\r
notification.flags |= Notification.FLAG_AUTO_CANCEL;\r
// TODO put something smart in the contentIntent below\r
- notification.contentIntent = PendingIntent.getActivity(getContext().getApplicationContext(), 0, new Intent(), PendingIntent.FLAG_UPDATE_CURRENT);\r
+ notification.contentIntent = PendingIntent.getActivity(getContext().getApplicationContext(), (int)System.currentTimeMillis(), new Intent(), 0);\r
notification.setLatestEventInfo(getContext().getApplicationContext(), \r
getContext().getString(R.string.sync_fail_ticker), \r
String.format(getContext().getString(R.string.sync_fail_content), account.name), \r
}\r
\r
\r
- private void sendStickyBroadcast(boolean inProgress, String dirRemotePath) {\r
+ private void sendStickyBroadcast(boolean inProgress, String dirRemotePath, RemoteOperationResult result) {\r
Intent i = new Intent(FileSyncService.SYNC_MESSAGE);\r
i.putExtra(FileSyncService.IN_PROGRESS, inProgress);\r
i.putExtra(FileSyncService.ACCOUNT_NAME, getAccount().name);\r
if (dirRemotePath != null) {\r
i.putExtra(FileSyncService.SYNC_FOLDER_REMOTE_PATH, dirRemotePath);\r
}\r
+ if (result != null) {\r
+ i.putExtra(FileSyncService.SYNC_RESULT, result);\r
+ }\r
getContext().sendStickyBroadcast(i);\r
}\r
\r