update
authortobiasKaminsky <tobias@kaminsky.me>
Mon, 2 Nov 2015 21:02:24 +0000 (22:02 +0100)
committertobiasKaminsky <tobias@kaminsky.me>
Mon, 2 Nov 2015 21:02:24 +0000 (22:02 +0100)
owncloud-android-library
res/values/setup.xml
src/com/owncloud/android/files/FileOperationsHelper.java

index 59fb616..652cd28 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 59fb61601de4dd8bfcab1afb619e016e1a7b904d
+Subproject commit 652cd28bb15672eaedfe8c1d9a46cf293c909b89
index 76bdd9f..1c65801 100644 (file)
@@ -4,6 +4,7 @@
     <string name="app_name">ownCloud</string>
     <string name="account_type">owncloud</string>      <!-- better if was a domain name; but changing it now would require migrate accounts when the app is updated -->
     <string name="authority">org.owncloud</string>     <!-- better if was the app package with ".provider" appended ; it identifies the provider -->
+    <string name="authorityCache">org.owncloud.imageCache.provider</string>
     <string name ="db_file">owncloud.db</string>
     <string name ="db_name">ownCloud</string>
     <string name ="data_folder">owncloud</string>
index a4e23ae..7820662 100644 (file)
@@ -238,27 +238,21 @@ public class FileOperationsHelper {
     }
 
     public void setPictureAs(OCFile file) {
-        if (file != null) {
+        if (file != null){
             if (file.isDown()) {
-                File externalFile=new File(file.getStoragePath());
+                File externalFile = new File(file.getStoragePath());
                 Uri sendUri = Uri.fromFile(externalFile);
                 Intent intent = new Intent(Intent.ACTION_ATTACH_DATA);
                 intent.setDataAndType(sendUri, file.getMimetype());
                 intent.putExtra("mimeType", file.getMimetype());
                 mFileActivity.startActivityForResult(Intent.createChooser(intent, "Set As"), 200);
             } else {
-                // TODO re-enable after resized images is available
-//                Intent sendIntent = new Intent(android.content.Intent.ACTION_SEND);
-//                // set MimeType
-//                sendIntent.setType(file.getMimetype());
-////            sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("content://" + DiskLruImageCacheFileProvider.AUTHORITY + "/#" + file.getRemoteId() + "#" + file.getFileName()));
-//                sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("content://" + DiskLruImageCacheFileProvider.AUTHORITY + file.getRemotePath()));
-//                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);
-//                chooserDialog.show(mFileActivity.getSupportFragmentManager(), FTAG_CHOOSER_DIALOG);
+//                 TODO re-enable after resized images is available
+//                Uri sendUri = Uri.parse("content://" + DiskLruImageCacheFileProvider.AUTHORITY + file.getRemotePath());
+//                Intent intent = new Intent(Intent.ACTION_ATTACH_DATA);
+//                intent.setDataAndType(sendUri, file.getMimetype());
+//                intent.putExtra("mimeType", file.getMimetype());
+//                mFileActivity.startActivityForResult(Intent.createChooser(intent, "Set As"), 200);
             }
         } else {
             Log_OC.wtf(TAG, "Trying to send a NULL OCFile");