- * Performs the removal of the previewed file, both locally and in the server.
- */
- @Override
- public void onConfirmation(String callerTag) {
- OCFile file = getFile();
- FileDataStorageManager storageManager = mContainerActivity.getStorageManager();
- if (storageManager.getFileById(file.getFileId()) != null) { // check that the file is still there;
- stopPreview(true);
- mContainerActivity.getFileOperationsHelper().removeFile(file, true);
- }
- }
-
-
- /**
- * Removes the file from local storage
- */
- @Override
- public void onNeutral(String callerTag) {
- OCFile file = getFile();
- stopPreview(true);
- mContainerActivity.getStorageManager().removeFile(file, false, true); // TODO perform in background task / new thread
- finish();
- }
-
- /**
- * User cancelled the removal action.
- */
- @Override
- public void onCancel(String callerTag) {
- // nothing to do here
- }
-
-
- /**
- * Helper method to test if an {@link OCFile} can be passed to a {@link PreviewMediaFragment} to be previewed.
- *
- * @param file File to test if can be previewed.
- * @return 'True' if the file can be handled by the fragment.
+ * Helper method to test if an {@link OCFile} can be passed to a {@link PreviewMediaFragment}
+ * to be previewed.
+ *
+ * @param file File to test if can be previewed.
+ * @return 'True' if the file can be handled by the fragment.