projects
/
pub
/
Android
/
ownCloud.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0308f46
)
OC-3016: Add option 'send_files_to_other_apps' with default value 'on'
author
masensio
<masensio@solidgear.es>
Wed, 19 Feb 2014 09:33:27 +0000
(10:33 +0100)
committer
masensio
<masensio@solidgear.es>
Wed, 19 Feb 2014 09:33:27 +0000
(10:33 +0100)
res/values/setup.xml
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/fragment/FileDetailFragment.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/fragment/OCFileListFragment.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/preview/PreviewImageFragment.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/ui/preview/PreviewMediaFragment.java
patch
|
blob
|
blame
|
history
diff --git
a/res/values/setup.xml
b/res/values/setup.xml
index
2e07ae4
..
c08f497
100644
(file)
--- a/
res/values/setup.xml
+++ b/
res/values/setup.xml
@@
-21,6
+21,10
@@
<string name="auth_method_oauth2">off</string>
<string name="auth_method_saml_web_sso">off</string>
<string name="auth_method_oauth2">off</string>
<string name="auth_method_saml_web_sso">off</string>
+ <!-- Flags to enable/disable some features -->
+ <string name = "send_files_to_other_apps">on</string>
+
+
<!-- Colors -->
<color name="login_background_color">#FFFFFF</color>
<color name="login_logo_background_color">#FFFFFF</color>
<!-- Colors -->
<color name="login_background_color">#FFFFFF</color>
<color name="login_logo_background_color">#FFFFFF</color>
diff --git
a/src/com/owncloud/android/ui/fragment/FileDetailFragment.java
b/src/com/owncloud/android/ui/fragment/FileDetailFragment.java
index
58edf6e
..
50faf04
100644
(file)
--- a/
src/com/owncloud/android/ui/fragment/FileDetailFragment.java
+++ b/
src/com/owncloud/android/ui/fragment/FileDetailFragment.java
@@
-252,6
+252,17
@@
public class FileDetailFragment extends FileFragment implements
item.setVisible(false);
item.setEnabled(false);
}
item.setVisible(false);
item.setEnabled(false);
}
+
+ // Send file
+ item = menu.findItem(R.id.action_send_file);
+ boolean sendEnabled = getString(R.string.send_files_to_other_apps).equalsIgnoreCase("on");
+ if (item != null && sendEnabled) {
+ item.setVisible(true);
+ item.setEnabled(true);
+ } else {
+ item.setVisible(false);
+ item.setEnabled(false);
+ }
}
}
diff --git
a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java
b/src/com/owncloud/android/ui/fragment/OCFileListFragment.java
index
a4919ca
..
e902b05
100644
(file)
--- a/
src/com/owncloud/android/ui/fragment/OCFileListFragment.java
+++ b/
src/com/owncloud/android/ui/fragment/OCFileListFragment.java
@@
-263,6
+263,12
@@
public class OCFileListFragment extends ExtendedListFragment implements EditName
toHide.add(R.id.action_unshare_file);
}
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) {
for (int i : toHide) {
item = menu.findItem(i);
if (item != null) {
diff --git
a/src/com/owncloud/android/ui/preview/PreviewImageFragment.java
b/src/com/owncloud/android/ui/preview/PreviewImageFragment.java
index
2ea1e1f
..
3a374e0
100644
(file)
--- a/
src/com/owncloud/android/ui/preview/PreviewImageFragment.java
+++ b/
src/com/owncloud/android/ui/preview/PreviewImageFragment.java
@@
-250,6
+250,12
@@
public class PreviewImageFragment extends FileFragment implements OnRemoteOper
toHide.add(R.id.action_unshare_file);
}
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) {
for (int i : toHide) {
item = menu.findItem(i);
if (item != null) {
diff --git
a/src/com/owncloud/android/ui/preview/PreviewMediaFragment.java
b/src/com/owncloud/android/ui/preview/PreviewMediaFragment.java
index
d2b5e50
..
7fa399a
100644
(file)
--- a/
src/com/owncloud/android/ui/preview/PreviewMediaFragment.java
+++ b/
src/com/owncloud/android/ui/preview/PreviewMediaFragment.java
@@
-295,6
+295,12
@@
public class PreviewMediaFragment extends FileFragment implements
toHide.add(R.id.action_unshare_file);
}
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) {
for (int i : toHide) {
item = menu.findItem(i);
if (item != null) {