From 509f29e0017a70ce526878954df92e02ce1f42d5 Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Mon, 15 Oct 2012 11:27:21 -0700 Subject: [PATCH] Make the advanced edit screen layout the default and remove ab test --- astrid/res/values/keys.xml | 8 +++--- .../astrid/activity/BeastModePreferences.java | 25 ------------------- .../astrid/service/abtesting/ABTests.java | 5 ---- .../astrid/utility/AstridPreferences.java | 7 ------ 4 files changed, 4 insertions(+), 41 deletions(-) diff --git a/astrid/res/values/keys.xml b/astrid/res/values/keys.xml index 6e7aee4b8..35e4ffbd0 100644 --- a/astrid/res/values/keys.xml +++ b/astrid/res/values/keys.xml @@ -410,15 +410,15 @@ @string/TEA_control_who @string/TEA_control_when - @string/TEA_control_more_section @string/TEA_control_importance @string/TEA_control_lists @string/TEA_control_notes @string/TEA_control_files + @string/TEA_control_more_section @string/TEA_control_reminders - @string/TEA_control_hidden_section @string/TEA_control_timer @string/TEA_control_share + @string/TEA_control_hidden_section TEA_ctrl_title_pref @@ -438,15 +438,15 @@ @string/TEA_ctrl_who_pref @string/TEA_ctrl_when_pref - @string/TEA_ctrl_more_pref @string/TEA_ctrl_importance_pref @string/TEA_ctrl_lists_pref @string/TEA_ctrl_notes_pref @string/TEA_ctrl_files_pref + @string/TEA_ctrl_more_pref @string/TEA_ctrl_reminders_pref - @string/TEA_ctrl_hide_section_pref @string/TEA_ctrl_timer_pref @string/TEA_ctrl_share_pref + @string/TEA_ctrl_hide_section_pref diff --git a/astrid/src/com/todoroo/astrid/activity/BeastModePreferences.java b/astrid/src/com/todoroo/astrid/activity/BeastModePreferences.java index ada29f88e..34fc9c7be 100644 --- a/astrid/src/com/todoroo/astrid/activity/BeastModePreferences.java +++ b/astrid/src/com/todoroo/astrid/activity/BeastModePreferences.java @@ -77,31 +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 a more advanced - * used for ab testing the effect of simple edit page - */ - public static String getAdvancedEditOrderForABTest(Context c) { - ArrayList defaultOrder = constructOrderedControlList(c); - String hideSectionPref = c.getString(R.string.TEA_ctrl_hide_section_pref); - String detailsSectionPref = c.getString(R.string.TEA_ctrl_more_pref); - - //Move hide section to the end of the list - defaultOrder.remove(hideSectionPref); - defaultOrder.add(hideSectionPref); - - // Put the last few items only under details - defaultOrder.remove(detailsSectionPref); - defaultOrder.add(defaultOrder.size() - 4, detailsSectionPref); - - 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); diff --git a/astrid/src/com/todoroo/astrid/service/abtesting/ABTests.java b/astrid/src/com/todoroo/astrid/service/abtesting/ABTests.java index e5a7f69cf..002d6a622 100644 --- a/astrid/src/com/todoroo/astrid/service/abtesting/ABTests.java +++ b/astrid/src/com/todoroo/astrid/service/abtesting/ABTests.java @@ -123,16 +123,11 @@ public class ABTests { public static final String AB_SIMPLE_TASK_ROW = "android_simple_task_row"; //$NON-NLS-1$ - public static final String AB_ADVANCED_EDIT = "android_advanced_edit"; //$NON-NLS-1$ - private void initialize() { 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$ - addTest(AB_ADVANCED_EDIT, new int[] { 1, 1 }, - new int[] { 1, 0 }, new String[] { "default_edit", "advanced_edit" }); //$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 } } diff --git a/astrid/src/com/todoroo/astrid/utility/AstridPreferences.java b/astrid/src/com/todoroo/astrid/utility/AstridPreferences.java index 4290b388a..318047108 100644 --- a/astrid/src/com/todoroo/astrid/utility/AstridPreferences.java +++ b/astrid/src/com/todoroo/astrid/utility/AstridPreferences.java @@ -17,7 +17,6 @@ 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; @@ -87,12 +86,6 @@ public class AstridPreferences { swipeEnabled = true; } - boolean advancedEdit = ABChooser.readChoiceForTest(ABTests.AB_ADVANCED_EDIT) != 0; - if (advancedEdit && !Preferences.isSet(BeastModePreferences.BEAST_MODE_ORDER_PREF)) { - Preferences.setString(BeastModePreferences.BEAST_MODE_ORDER_PREF, - BeastModePreferences.getAdvancedEditOrderForABTest(context)); - } - Preferences.setIfUnset(prefs, editor, r, R.string.p_swipe_lists_enabled, swipeEnabled); if ("white-blue".equals(Preferences.getStringValue(R.string.p_theme))) { //$NON-NLS-1$ migrate from when white-blue wasn't the default