aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-07-03 13:14:36 -0700
committerScott Jackson <daneren2005@gmail.com>2014-07-03 13:14:36 -0700
commit9f1cca9eb0ed3e88d37f239c21fc808ab155bb4f (patch)
tree4b780a2f8267692858dcc900aee8a8e4fe01f4ed
parent1b4dfc3bf40c11d375854e9d867d7c4d28bae780 (diff)
downloaddsub-9f1cca9eb0ed3e88d37f239c21fc808ab155bb4f.tar.gz
dsub-9f1cca9eb0ed3e88d37f239c21fc808ab155bb4f.tar.bz2
dsub-9f1cca9eb0ed3e88d37f239c21fc808ab155bb4f.zip
#361 Only save to store if not set to hide media
-rw-r--r--src/github/daneren2005/dsub/service/DownloadFile.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadFile.java b/src/github/daneren2005/dsub/service/DownloadFile.java
index 2d073d11..b1c78b24 100644
--- a/src/github/daneren2005/dsub/service/DownloadFile.java
+++ b/src/github/daneren2005/dsub/service/DownloadFile.java
@@ -352,10 +352,12 @@ public class DownloadFile implements BufferFile {
}
}
private void saveToStore() {
- try {
- mediaStoreService.saveInMediaStore(this);
- } catch(Exception e) {
- Log.w(TAG, "Failed to save in media store", e);
+ if(!Util.getPreferences(context).getBoolean(Constants.PREFERENCES_KEY_HIDE_MEDIA, false)) {
+ try {
+ mediaStoreService.saveInMediaStore(this);
+ } catch(Exception e) {
+ Log.w(TAG, "Failed to save in media store", e);
+ }
}
}