|
|
@ -9,6 +9,7 @@ import android.preference.PreferenceManager;
|
|
|
|
import com.todoroo.astrid.api.AstridApiConstants;
|
|
|
|
import com.todoroo.astrid.api.AstridApiConstants;
|
|
|
|
import com.todoroo.astrid.core.SortHelper;
|
|
|
|
import com.todoroo.astrid.core.SortHelper;
|
|
|
|
import com.todoroo.astrid.utility.AstridDefaultPreferenceSpec;
|
|
|
|
import com.todoroo.astrid.utility.AstridDefaultPreferenceSpec;
|
|
|
|
|
|
|
|
import com.todoroo.astrid.widget.WidgetConfigActivity;
|
|
|
|
|
|
|
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
@ -50,6 +51,11 @@ public class Preferences {
|
|
|
|
publicPrefs = context.getSharedPreferences(AstridApiConstants.PUBLIC_PREFS, Context.MODE_WORLD_READABLE);
|
|
|
|
publicPrefs = context.getSharedPreferences(AstridApiConstants.PUBLIC_PREFS, Context.MODE_WORLD_READABLE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public boolean useDarkWidgetTheme(int widgetId) {
|
|
|
|
|
|
|
|
boolean legacySetting = getBoolean(R.string.p_use_dark_theme_widget, false);
|
|
|
|
|
|
|
|
return getBoolean(WidgetConfigActivity.PREF_DARK_THEME + widgetId, legacySetting);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void setIfUnset(SharedPreferences prefs, Editor editor, Resources r, int keyResource, int value) {
|
|
|
|
public void setIfUnset(SharedPreferences prefs, Editor editor, Resources r, int keyResource, int value) {
|
|
|
|
String key = r.getString(keyResource);
|
|
|
|
String key = r.getString(keyResource);
|
|
|
|
if (!prefs.contains(key)) {
|
|
|
|
if (!prefs.contains(key)) {
|
|
|
|