diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-07-03 13:14:36 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-07-03 13:14:36 -0700 |
commit | 9f1cca9eb0ed3e88d37f239c21fc808ab155bb4f (patch) | |
tree | 4b780a2f8267692858dcc900aee8a8e4fe01f4ed | |
parent | 1b4dfc3bf40c11d375854e9d867d7c4d28bae780 (diff) | |
download | dsub-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.java | 10 |
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); + } } } |