From 569625c677b131345631b15abece43b7a40d3267 Mon Sep 17 00:00:00 2001 From: purigarcia Date: Thu, 9 Jul 2015 09:30:30 +0200 Subject: [PATCH 1/4] encode the path --- src/com/owncloud/android/files/FileOperationsHelper.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/com/owncloud/android/files/FileOperationsHelper.java b/src/com/owncloud/android/files/FileOperationsHelper.java index 75fae3705f..e1568523a5 100644 --- a/src/com/owncloud/android/files/FileOperationsHelper.java +++ b/src/com/owncloud/android/files/FileOperationsHelper.java @@ -187,12 +187,14 @@ public class FileOperationsHelper { public void sendDownloadedFile(OCFile file) { if (file != null) { + String storagePath = file.getStoragePath(); + String encodedStoragePath = WebdavUtils.encodePath(storagePath); Intent sendIntent = new Intent(android.content.Intent.ACTION_SEND); // set MimeType sendIntent.setType(file.getMimetype()); - sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + file.getStoragePath())); + sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + encodedStoragePath)); sendIntent.putExtra(Intent.ACTION_SEND, true); // Send Action - + // Show dialog, without the own app String[] packagesToExclude = new String[] { mFileActivity.getPackageName() }; DialogFragment chooserDialog = ShareLinkToDialog.newInstance(sendIntent, packagesToExclude, file); From a09e4735553a85193912885d9f54ac662b583b4e Mon Sep 17 00:00:00 2001 From: purigarcia Date: Thu, 9 Jul 2015 09:35:28 +0200 Subject: [PATCH 2/4] Remove code that should not be in this pr --- .../ui/adapter/FileListListAdapter.java | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/com/owncloud/android/ui/adapter/FileListListAdapter.java b/src/com/owncloud/android/ui/adapter/FileListListAdapter.java index ab6ebf1f32..34028888fe 100644 --- a/src/com/owncloud/android/ui/adapter/FileListListAdapter.java +++ b/src/com/owncloud/android/ui/adapter/FileListListAdapter.java @@ -233,7 +233,6 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter { case GRID_IMAGE: // sharedIcon ImageView sharedIconV = (ImageView) view.findViewById(R.id.sharedIcon); - //if (file.isShareByLink() && ((mGridMode && !file.isFolder()) || !mGridMode)) { if (file.isShareByLink()) { sharedIconV.setVisibility(View.VISIBLE); sharedIconV.bringToFront(); @@ -241,7 +240,6 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter { sharedIconV.setVisibility(View.GONE); } - // local state ImageView localStateView = (ImageView) view.findViewById(R.id.localFileIndicator); localStateView.bringToFront(); @@ -270,18 +268,18 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter { } // share with me icon - ImageView sharedWithMeIconV = (ImageView) - view.findViewById(R.id.sharedWithMeIcon); - sharedWithMeIconV.bringToFront(); - if (checkIfFileIsSharedWithMe(file) && - ((mGridMode && !file.isFolder()) || !mGridMode)) { - sharedWithMeIconV.setVisibility(View.VISIBLE); - } else { - sharedWithMeIconV.setVisibility(View.GONE); + if (!file.isFolder()) { + ImageView sharedWithMeIconV = (ImageView) + view.findViewById(R.id.sharedWithMeIcon); + sharedWithMeIconV.bringToFront(); + if (checkIfFileIsSharedWithMe(file)) { + sharedWithMeIconV.setVisibility(View.VISIBLE); + } else { + sharedWithMeIconV.setVisibility(View.GONE); + } } - break; } From 6b82b98abfde7f31fd6433295e9988ae447088a7 Mon Sep 17 00:00:00 2001 From: purigarcia Date: Fri, 10 Jul 2015 08:49:35 +0200 Subject: [PATCH 3/4] remove a space --- src/com/owncloud/android/ui/adapter/FileListListAdapter.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/com/owncloud/android/ui/adapter/FileListListAdapter.java b/src/com/owncloud/android/ui/adapter/FileListListAdapter.java index 34028888fe..c6ea0344d1 100644 --- a/src/com/owncloud/android/ui/adapter/FileListListAdapter.java +++ b/src/com/owncloud/android/ui/adapter/FileListListAdapter.java @@ -279,7 +279,6 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter { } } - break; } From 65fe0be763fbbd29febae4c4c6e3825f887ec937 Mon Sep 17 00:00:00 2001 From: purigarcia Date: Tue, 28 Jul 2015 10:47:08 +0200 Subject: [PATCH 4/4] merge develop --- src/com/owncloud/android/ui/adapter/FileListListAdapter.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/com/owncloud/android/ui/adapter/FileListListAdapter.java b/src/com/owncloud/android/ui/adapter/FileListListAdapter.java index 58e92552a7..33fa57fd91 100644 --- a/src/com/owncloud/android/ui/adapter/FileListListAdapter.java +++ b/src/com/owncloud/android/ui/adapter/FileListListAdapter.java @@ -276,7 +276,6 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter { sharedWithMeIconV.setVisibility(View.VISIBLE); } else { sharedWithMeIconV.setVisibility(View.GONE); - } break;