Swipe between lists disabled by default

pull/14/head
Sam Bosley 12 years ago
parent 509f29e001
commit 8f268dfe30

@ -195,16 +195,6 @@ public class StartupService {
final int finalLatestVersion = latestSetVersion;
// For any uninitialized ab test, make sure an option is chosen
if (!AstridPreferences.useTabletLayout(context)
&& Preferences.getIntegerFromString(R.string.p_swipe_lists_performance_key, 0) == 0) { // Have to add this here because a non-null context is needed
abTests.addTest(ABTests.AB_SWIPE_BETWEEN, new int[] { 3, 1 },
new int[] { 3, 1 }, new String[] { "swipe-disabled", "swipe-enabled" }); //$NON-NLS-1$ //$NON-NLS-2$
// Haven't yet initialized this test--need to clear the pref once so setIfUnset will trigger correctly in setPreferenceDefaults
if (ABChooser.readChoiceForTest(ABTests.AB_SWIPE_BETWEEN) == ABChooser.NO_OPTION)
Preferences.clear(context.getString(R.string.p_swipe_lists_performance_key));
}
abChooser.makeChoicesForAllTests(latestSetVersion == 0, taskService.getUserActivationStatus());
abTestInvoker.reportAcquisition();

@ -119,8 +119,6 @@ public class ABTests {
bundles.put(testKey, bundle);
}
public static final String AB_SWIPE_BETWEEN = "android_swipe_v3"; //$NON-NLS-1$
public static final String AB_SIMPLE_TASK_ROW = "android_simple_task_row"; //$NON-NLS-1$
private void initialize() {
@ -128,6 +126,5 @@ public class ABTests {
addTest(AB_SIMPLE_TASK_ROW, new int[] { 1, 1 },
new int[] { 1, 0 }, new String[] { "original-row-style", "simple-row-style" });//$NON-NLS-1$ //$NON-NLS-2$
// AB_SWIPE_BETWEEN has to be added in the startup service since it needs a non-null context for initialization
}
}

@ -74,19 +74,7 @@ public class AstridPreferences {
Preferences.setIfUnset(prefs, editor, r, R.string.p_taskRowStyle,
ABChooser.readChoiceForTest(ABTests.AB_SIMPLE_TASK_ROW) != 0);
boolean swipeEnabled = false;
String swipePerformanceKey = context.getString(R.string.p_swipe_lists_performance_key);
if (Preferences.isSet(swipePerformanceKey)) {
int setting = Preferences.getIntegerFromString(R.string.p_swipe_lists_performance_key, 3);
if (setting > 0) {
swipeEnabled = true;
}
Preferences.clear(swipePerformanceKey);
} else if (ABChooser.readChoiceForTest(ABTests.AB_SWIPE_BETWEEN) == 1) {
swipeEnabled = true;
}
Preferences.setIfUnset(prefs, editor, r, R.string.p_swipe_lists_enabled, swipeEnabled);
Preferences.setIfUnset(prefs, editor, r, R.string.p_swipe_lists_enabled, false);
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);

Loading…
Cancel
Save