|
|
@ -11,8 +11,6 @@ import com.todoroo.andlib.utility.Preferences;
|
|
|
|
import com.todoroo.astrid.api.AstridApiConstants;
|
|
|
|
import com.todoroo.astrid.api.AstridApiConstants;
|
|
|
|
import com.todoroo.astrid.data.Task;
|
|
|
|
import com.todoroo.astrid.data.Task;
|
|
|
|
import com.todoroo.astrid.service.ThemeService;
|
|
|
|
import com.todoroo.astrid.service.ThemeService;
|
|
|
|
import com.todoroo.astrid.service.abtesting.ABChooser;
|
|
|
|
|
|
|
|
import com.todoroo.astrid.service.abtesting.ABTests;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class AstridPreferences {
|
|
|
|
public class AstridPreferences {
|
|
|
|
|
|
|
|
|
|
|
@ -49,14 +47,9 @@ public class AstridPreferences {
|
|
|
|
Preferences.setIfUnset(prefs, editor, r, R.string.p_fontSize, 18);
|
|
|
|
Preferences.setIfUnset(prefs, editor, r, R.string.p_fontSize, 18);
|
|
|
|
Preferences.setIfUnset(prefs, editor, r, R.string.p_showNotes, false);
|
|
|
|
Preferences.setIfUnset(prefs, editor, r, R.string.p_showNotes, false);
|
|
|
|
|
|
|
|
|
|
|
|
boolean swipeEnabled = (ABChooser.readChoiceForTest(ABTests.AB_TEST_SWIPE_ENABLED_KEY) == 1);
|
|
|
|
Preferences.setIfUnset(prefs, editor, r, R.string.p_swipe_lists_performance_key, 0);
|
|
|
|
Preferences.setIfUnset(prefs, editor, r, R.string.p_swipe_lists_performance_key, swipeEnabled ? 3 : 0);
|
|
|
|
Preferences.setIfUnset(prefs, editor, r, R.string.p_use_contact_picker, true);
|
|
|
|
|
|
|
|
Preferences.setIfUnset(prefs, editor, r, R.string.p_field_missed_calls, true);
|
|
|
|
boolean contactsPickerEnabled = (ABChooser.readChoiceForTest(ABTests.AB_TEST_CONTACTS_PICKER_ENABLED) == 1);
|
|
|
|
|
|
|
|
Preferences.setIfUnset(prefs, editor, r, R.string.p_use_contact_picker, contactsPickerEnabled);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean missedCallsEnabled = (ABChooser.readChoiceForTest(ABTests.AB_TEST_MISSED_CALLS_ENABLED) == 1);
|
|
|
|
|
|
|
|
Preferences.setIfUnset(prefs, editor, r, R.string.p_field_missed_calls, missedCallsEnabled);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ("white-blue".equals(Preferences.getStringValue(R.string.p_theme))) { //$NON-NLS-1$ migrate from when white-blue wasn't the default
|
|
|
|
if ("white-blue".equals(Preferences.getStringValue(R.string.p_theme))) { //$NON-NLS-1$ migrate from when white-blue wasn't the default
|
|
|
|
Preferences.setString(R.string.p_theme, ThemeService.THEME_WHITE);
|
|
|
|
Preferences.setString(R.string.p_theme, ThemeService.THEME_WHITE);
|
|
|
|