Removed and finalized AB tests

pull/14/head
Sam Bosley 13 years ago
parent aa284bdee4
commit bb6ac500f5

@ -31,8 +31,6 @@ import com.todoroo.astrid.dao.TaskDao;
import com.todoroo.astrid.dao.TaskDao.TaskCriteria;
import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.data.TaskApiDao;
import com.todoroo.astrid.service.abtesting.ABChooser;
import com.todoroo.astrid.service.abtesting.ABTests;
import com.todoroo.astrid.utility.Constants;
@ -116,8 +114,7 @@ public final class ReminderService {
Preferences.setIfUnset(prefs, editor, r, R.string.p_rmd_default_random_hours, 0);
Preferences.setIfUnset(prefs, editor, r, R.string.p_rmd_time, 18);
Preferences.setIfUnset(prefs, editor, r, R.string.p_rmd_nagging, true);
Preferences.setIfUnset(prefs, editor, r, R.string.p_rmd_persistent,
ABChooser.readChoiceForTest(ABTests.AB_TEST_PERSISTENT_REMINDERS) != 0);
Preferences.setIfUnset(prefs, editor, r, R.string.p_rmd_persistent, true);
editor.commit();
preferencesInitialized = true;

@ -422,8 +422,8 @@
<item >@string/TEA_control_lists</item>
<item >@string/TEA_control_notes</item>
<item >@string/TEA_control_files</item>
<item >@string/TEA_control_hidden_section</item>
<item >@string/TEA_control_reminders</item>
<item >@string/TEA_control_hidden_section</item>
<item >@string/TEA_control_timer</item>
<item >@string/TEA_control_share</item>
</string-array>
@ -450,8 +450,8 @@
<item>@string/TEA_ctrl_lists_pref</item>
<item>@string/TEA_ctrl_notes_pref</item>
<item>@string/TEA_ctrl_files_pref</item>
<item>@string/TEA_ctrl_hide_section_pref</item>
<item>@string/TEA_ctrl_reminders_pref</item>
<item>@string/TEA_ctrl_hide_section_pref</item>
<item>@string/TEA_ctrl_timer_pref</item>
<item>@string/TEA_ctrl_share_pref</item>
</string-array>

@ -77,28 +77,6 @@ public class BeastModePreferences extends ListActivity {
Preferences.setBoolean(BEAST_MODE_ASSERTED_HIDE_ALWAYS, true);
}
/**
* returns the beast mode preference string that would correspond to almost everything hidden
* used for ab testing the effect of simple edit page
*/
public static String getSimpleEditOrderForABTest(Context c) {
ArrayList<String> defaultOrder = constructOrderedControlList(c);
String hideSectionPref = c.getString(R.string.TEA_ctrl_hide_section_pref);
String detailsSectionPref = c.getString(R.string.TEA_ctrl_more_pref);
int moreIndex = defaultOrder.indexOf(detailsSectionPref);
if (moreIndex > - 1) {
defaultOrder.remove(hideSectionPref);
defaultOrder.add(moreIndex + 1, hideSectionPref);
}
StringBuilder builder = new StringBuilder();
for (int i = 0; i < defaultOrder.size(); i++) {
builder.append(defaultOrder.get(i));
builder.append(BEAST_MODE_PREF_ITEM_SEPARATOR);
}
return builder.toString();
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

@ -119,15 +119,7 @@ public class ABTests {
bundles.put(testKey, bundle);
}
public static final String AB_TEST_PERSISTENT_REMINDERS = "android_persist_rmd"; //$NON-NLS-1$
public static final String AB_TEST_SIMPLE_EDIT = "android_simple_edit"; //$NON-NLS-1$
private void initialize() {
addTest(AB_TEST_PERSISTENT_REMINDERS, new int[] { 1, 1 },
new int[] { 0, 1 }, new String[] { "rmd-not-persistent", "rmd-persistent" }); //$NON-NLS-1$ //$NON-NLS-2$
addTest(AB_TEST_SIMPLE_EDIT, new int[] { 9, 1 },
new int[] { 1, 0 }, new String[] { "regular-edit", "simple-edit" }); //$NON-NLS-1$ //$NON-NLS-2$
//
}
}

@ -17,15 +17,12 @@ import com.todoroo.andlib.sql.Functions;
import com.todoroo.andlib.sql.Query;
import com.todoroo.andlib.utility.AndroidUtilities;
import com.todoroo.andlib.utility.Preferences;
import com.todoroo.astrid.activity.BeastModePreferences;
import com.todoroo.astrid.api.AstridApiConstants;
import com.todoroo.astrid.core.PluginServices;
import com.todoroo.astrid.data.TagData;
import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.data.User;
import com.todoroo.astrid.service.ThemeService;
import com.todoroo.astrid.service.abtesting.ABChooser;
import com.todoroo.astrid.service.abtesting.ABTests;
public class AstridPreferences {
@ -69,15 +66,9 @@ public class AstridPreferences {
Preferences.setIfUnset(prefs, editor, r, R.string.p_third_party_addons, false);
Preferences.setIfUnset(prefs, editor, r, R.string.p_end_at_deadline, true);
Preferences.setIfUnset(prefs, editor, r, R.string.p_rmd_persistent,
ABChooser.readChoiceForTest(ABTests.AB_TEST_PERSISTENT_REMINDERS) != 0);
Preferences.setIfUnset(prefs, editor, r, R.string.p_rmd_persistent, true);
boolean simpleEdit = ABChooser.readChoiceForTest(ABTests.AB_TEST_SIMPLE_EDIT) != 0;
if (simpleEdit && !Preferences.isSet(BeastModePreferences.BEAST_MODE_ORDER_PREF)) {
Preferences.setString(BeastModePreferences.BEAST_MODE_ORDER_PREF,
BeastModePreferences.getSimpleEditOrderForABTest(context));
}
Preferences.setIfUnset(prefs, editor, r, R.string.p_ideas_tab_enabled, !simpleEdit);
Preferences.setIfUnset(prefs, editor, r, R.string.p_ideas_tab_enabled, true);
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