X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/3ef64834e94d4f2f21e3fceafec0987e67e5c893..6cfa24f55ab605770df08a6bed889bfccf0c0888:/src/com/owncloud/android/syncadapter/FileSyncAdapter.java?ds=inline diff --git a/src/com/owncloud/android/syncadapter/FileSyncAdapter.java b/src/com/owncloud/android/syncadapter/FileSyncAdapter.java index 2d88646e..f66980cb 100644 --- a/src/com/owncloud/android/syncadapter/FileSyncAdapter.java +++ b/src/com/owncloud/android/syncadapter/FileSyncAdapter.java @@ -35,7 +35,7 @@ import com.owncloud.android.operations.RemoteOperationResult; import com.owncloud.android.operations.SynchronizeFolderOperation; import com.owncloud.android.operations.UpdateOCVersionOperation; import com.owncloud.android.operations.RemoteOperationResult.ResultCode; -import com.owncloud.android.ui.activity.GenericExplanationActivity; +import com.owncloud.android.ui.activity.ErrorsWhileCopyingHandlerActivity; import android.accounts.Account; import android.app.Notification; import android.app.NotificationManager; @@ -346,23 +346,20 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter { notification.flags |= Notification.FLAG_AUTO_CANCEL; /// includes a pending intent in the notification showing a more detailed explanation - Intent explanationIntent = new Intent(getContext(), GenericExplanationActivity.class); - String message = String.format(getContext().getString(R.string.sync_foreign_files_forgotten_explanation), getContext().getString(R.string.app_name), getAccount().name); - explanationIntent.putExtra(GenericExplanationActivity.MESSAGE, message); + Intent explanationIntent = new Intent(getContext(), ErrorsWhileCopyingHandlerActivity.class); + explanationIntent.putExtra(ErrorsWhileCopyingHandlerActivity.EXTRA_ACCOUNT, getAccount()); ArrayList remotePaths = new ArrayList(); ArrayList localPaths = new ArrayList(); - for (String remote : mForgottenLocalFiles.keySet()) { - remotePaths.add(getContext().getString(R.string.sync_foreign_files_forgotten_remote_prefix) + remote); - localPaths.add(getContext().getString(R.string.sync_foreign_files_forgotten_local_prefix) + mForgottenLocalFiles.get(remote)); - } - explanationIntent.putExtra(GenericExplanationActivity.EXTRA_LIST, localPaths); - explanationIntent.putExtra(GenericExplanationActivity.EXTRA_LIST_2, remotePaths); + remotePaths.addAll(mForgottenLocalFiles.keySet()); + localPaths.addAll(mForgottenLocalFiles.values()); + explanationIntent.putExtra(ErrorsWhileCopyingHandlerActivity.EXTRA_LOCAL_PATHS, localPaths); + explanationIntent.putExtra(ErrorsWhileCopyingHandlerActivity.EXTRA_REMOTE_PATHS, remotePaths); explanationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); notification.contentIntent = PendingIntent.getActivity(getContext().getApplicationContext(), (int)System.currentTimeMillis(), explanationIntent, 0); notification.setLatestEventInfo(getContext().getApplicationContext(), getContext().getString(R.string.sync_foreign_files_forgotten_ticker), - String.format(getContext().getString(R.string.sync_foreign_files_forgotten_content), mForgottenLocalFiles.size()), + String.format(getContext().getString(R.string.sync_foreign_files_forgotten_content), mForgottenLocalFiles.size(), getContext().getString(R.string.app_name)), notification.contentIntent); ((NotificationManager) getContext().getSystemService(Context.NOTIFICATION_SERVICE)).notify(R.string.sync_foreign_files_forgotten_ticker, notification);