From 3bd9bc9165e8a52332ecd1ca172627281b295168 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Tue, 26 Aug 2014 15:56:10 -0700 Subject: #387 Add util to check if sync is enabled for server --- src/github/daneren2005/dsub/util/Util.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/github') diff --git a/src/github/daneren2005/dsub/util/Util.java b/src/github/daneren2005/dsub/util/Util.java index 258e4eb8..56a66b8a 100644 --- a/src/github/daneren2005/dsub/util/Util.java +++ b/src/github/daneren2005/dsub/util/Util.java @@ -384,6 +384,11 @@ public final class Util { SharedPreferences prefs = getPreferences(context); return prefs.getBoolean(Constants.PREFERENCES_KEY_BROWSE_TAGS + instance, false); } + + public static boolean isSyncEnabled(Context context, int instance) { + SharedPreferences prefs = getPreferences(context); + return prefs.getBoolean(Constants.PREFERENCES_KEY_SERVER_SYNC + instance, true); + } public static String getParentFromEntry(Context context, MusicDirectory.Entry entry) { if(Util.isTagBrowsing(context)) { -- cgit v1.2.3