OC-3016: Add option 'send_files_to_other_apps' with default value 'on'
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / preview / PreviewMediaFragment.java
index d2b5e50..7fa399a 100644 (file)
@@ -295,6 +295,12 @@ public class PreviewMediaFragment extends FileFragment implements
             toHide.add(R.id.action_unshare_file);
         }
         
+        // Send file
+        boolean sendEnabled = getString(R.string.send_files_to_other_apps).equalsIgnoreCase("on");
+        if (!sendEnabled) {
+            toHide.add(R.id.action_send_file);
+        }
+        
         for (int i : toHide) {
             item = menu.findItem(i);
             if (item != null) {