From 9f1cca9eb0ed3e88d37f239c21fc808ab155bb4f Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Thu, 3 Jul 2014 13:14:36 -0700 Subject: #361 Only save to store if not set to hide media --- src/github/daneren2005/dsub/service/DownloadFile.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/github') 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); + } } } -- cgit v1.2.3