diff --git a/astrid/src/com/todoroo/astrid/service/UpgradeService.java b/astrid/src/com/todoroo/astrid/service/UpgradeService.java index 68583c91a..58e027410 100644 --- a/astrid/src/com/todoroo/astrid/service/UpgradeService.java +++ b/astrid/src/com/todoroo/astrid/service/UpgradeService.java @@ -33,7 +33,6 @@ import com.todoroo.astrid.gtasks.GtasksPreferenceService; import com.todoroo.astrid.notes.NoteMetadata; import com.todoroo.astrid.producteev.sync.ProducteevDataService; import com.todoroo.astrid.service.abtesting.ABChooser; -import com.todoroo.astrid.service.abtesting.ABOptions; import com.todoroo.astrid.tags.TagCaseMigrator; import com.todoroo.astrid.utility.AstridPreferences; @@ -114,9 +113,6 @@ public final class UpgradeService { Preferences.setInt(AstridPreferences.P_UPGRADE_FROM, from); - if (from <= V3_8_3_1) // This needs to happen synchronously - abChooser.setChoiceForOption(ABOptions.AB_OPTION_FIRST_ACTIVITY, 0); - new Thread(new Runnable() { @Override public void run() { diff --git a/astrid/src/com/todoroo/astrid/service/abtesting/ABOptions.java b/astrid/src/com/todoroo/astrid/service/abtesting/ABOptions.java index 0f4ea9438..8df0fef67 100644 --- a/astrid/src/com/todoroo/astrid/service/abtesting/ABOptions.java +++ b/astrid/src/com/todoroo/astrid/service/abtesting/ABOptions.java @@ -4,8 +4,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import com.todoroo.astrid.service.StatisticsConstants; - /** * Helper class to define options with their probabilities and descriptions * @author Sam Bosley @@ -168,29 +166,29 @@ public class ABOptions { } private void initialize() { // Set up - addOption(AB_OPTION_FIRST_ACTIVITY, AB_OPTION_FIRST_ACTIVITY_PROBS, - AB_OPTION_FIRST_ACTIVITY_DESCRIPTIONS, AB_OPTION_FIRST_ACTIVITY_RELEVANT_EVENTS); - - addOption(AB_OPTION_WELCOME_LOGIN, AB_OPTION_WELCOME_LOGIN_PROBS, - AB_OPTION_WELCOME_LOGIN_DESCRIPTIONS, AB_OPTION_WELCOME_LOGIN_RELEVANT_EVENTS); +// addOption(AB_OPTION_FIRST_ACTIVITY, AB_OPTION_FIRST_ACTIVITY_PROBS, +// AB_OPTION_FIRST_ACTIVITY_DESCRIPTIONS, AB_OPTION_FIRST_ACTIVITY_RELEVANT_EVENTS); +// +// addOption(AB_OPTION_WELCOME_LOGIN, AB_OPTION_WELCOME_LOGIN_PROBS, +// AB_OPTION_WELCOME_LOGIN_DESCRIPTIONS, AB_OPTION_WELCOME_LOGIN_RELEVANT_EVENTS); } - - - public static final String AB_OPTION_FIRST_ACTIVITY = "ab_first_activity"; - private static final int[] AB_OPTION_FIRST_ACTIVITY_PROBS = { 9, 1 }; - private static final String[] AB_OPTION_FIRST_ACTIVITY_DESCRIPTIONS = { "ab-show-tasks-first", "ab-show-lists-first" }; - private static final String[] AB_OPTION_FIRST_ACTIVITY_RELEVANT_EVENTS = { StatisticsConstants.CREATE_TASK, - StatisticsConstants.TASK_CREATED_TASKLIST, - StatisticsConstants.USER_FIRST_TASK, - StatisticsConstants.ACTFM_LIST_SHARED, - StatisticsConstants.ACTFM_NEW_USER };//*/ - - public static final String AB_OPTION_WELCOME_LOGIN = "ab_welcome_login"; - private static final int[] AB_OPTION_WELCOME_LOGIN_PROBS = { 9, 1 }; - private static final String[] AB_OPTION_WELCOME_LOGIN_DESCRIPTIONS = { "ab-welcome-login-show", "ab-welcome-login-skip" }; - private static final String[] AB_OPTION_WELCOME_LOGIN_RELEVANT_EVENTS = { StatisticsConstants.CREATE_TASK, - StatisticsConstants.TASK_CREATED_TASKLIST, - StatisticsConstants.USER_FIRST_TASK, - StatisticsConstants.ACTFM_LIST_SHARED, - StatisticsConstants.ACTFM_NEW_USER };//*/ +// +// +// public static final String AB_OPTION_FIRST_ACTIVITY = "ab_first_activity"; +// private static final int[] AB_OPTION_FIRST_ACTIVITY_PROBS = { 9, 1 }; +// private static final String[] AB_OPTION_FIRST_ACTIVITY_DESCRIPTIONS = { "ab-show-tasks-first", "ab-show-lists-first" }; +// private static final String[] AB_OPTION_FIRST_ACTIVITY_RELEVANT_EVENTS = { StatisticsConstants.CREATE_TASK, +// StatisticsConstants.TASK_CREATED_TASKLIST, +// StatisticsConstants.USER_FIRST_TASK, +// StatisticsConstants.ACTFM_LIST_SHARED, +// StatisticsConstants.ACTFM_NEW_USER };//*/ +// +// public static final String AB_OPTION_WELCOME_LOGIN = "ab_welcome_login"; +// private static final int[] AB_OPTION_WELCOME_LOGIN_PROBS = { 9, 1 }; +// private static final String[] AB_OPTION_WELCOME_LOGIN_DESCRIPTIONS = { "ab-welcome-login-show", "ab-welcome-login-skip" }; +// private static final String[] AB_OPTION_WELCOME_LOGIN_RELEVANT_EVENTS = { StatisticsConstants.CREATE_TASK, +// StatisticsConstants.TASK_CREATED_TASKLIST, +// StatisticsConstants.USER_FIRST_TASK, +// StatisticsConstants.ACTFM_LIST_SHARED, +// StatisticsConstants.ACTFM_NEW_USER };//*/ } diff --git a/astrid/src/com/todoroo/astrid/welcome/SplashScreenLauncher.java b/astrid/src/com/todoroo/astrid/welcome/SplashScreenLauncher.java index a5b59404a..696e39f75 100644 --- a/astrid/src/com/todoroo/astrid/welcome/SplashScreenLauncher.java +++ b/astrid/src/com/todoroo/astrid/welcome/SplashScreenLauncher.java @@ -9,13 +9,11 @@ import com.timsu.astrid.R; import com.todoroo.andlib.service.Autowired; import com.todoroo.andlib.service.ContextManager; import com.todoroo.andlib.service.DependencyInjectionService; -import com.todoroo.astrid.activity.FilterListActivity; import com.todoroo.astrid.activity.TaskListActivity; import com.todoroo.astrid.service.AstridDependencyInjector; import com.todoroo.astrid.service.StartupService; import com.todoroo.astrid.service.StatisticsService; import com.todoroo.astrid.service.abtesting.ABChooser; -import com.todoroo.astrid.service.abtesting.ABOptions; import com.todoroo.astrid.utility.AstridPreferences; public class SplashScreenLauncher extends Activity { @@ -43,46 +41,22 @@ public class SplashScreenLauncher extends Activity { private void finishAndShowNext(boolean isNewUser) { if (isNewUser) { - int welcomeLoginChoice = abChooser.getChoiceForOption(ABOptions.AB_OPTION_WELCOME_LOGIN); - welcomeLoginPath(welcomeLoginChoice); + welcomeLoginPath(); } else { - int tasksOrListsChoice = abChooser.getChoiceForOption(ABOptions.AB_OPTION_FIRST_ACTIVITY); - mainActivityPath(tasksOrListsChoice); + mainActivityPath(); } } - private void welcomeLoginPath(int welcomeLoginChoice) { + private void welcomeLoginPath() { Intent intent = new Intent(); - switch(welcomeLoginChoice) { - case 0: // Show welcome login, then welcome screen - intent.setClass(this, WelcomeLogin.class); - break; - case 1: // Go straight to welcome screen - intent.setClass(this, WelcomeGraphic.class); - intent.putExtra(WelcomeGraphic.KEY_SHOW_EULA, true); - break; - default: - intent.setClass(this, WelcomeLogin.class); - break; - } + intent.setClass(this, WelcomeLogin.class); startActivity(intent); finish(); } - private void mainActivityPath(int tasksOrListsChoice) { + private void mainActivityPath() { Intent intent = new Intent(); - switch (tasksOrListsChoice) { - case 0: - intent.setClass(this, TaskListActivity.class); // Go to task list activity - break; - case 1: - intent.setClass(this, FilterListActivity.class); // Go to filter list activity - intent.putExtra(FilterListActivity.SHOW_BACK_BUTTON, false); - break; - default: - intent.setClass(this, TaskListActivity.class); - break; - } + intent.setClass(this, TaskListActivity.class); // Go to task list activity startActivity(intent); finish(); } diff --git a/astrid/src/com/todoroo/astrid/welcome/WelcomeGraphic.java b/astrid/src/com/todoroo/astrid/welcome/WelcomeGraphic.java index a5cffa569..aeb06369e 100644 --- a/astrid/src/com/todoroo/astrid/welcome/WelcomeGraphic.java +++ b/astrid/src/com/todoroo/astrid/welcome/WelcomeGraphic.java @@ -15,12 +15,10 @@ import com.todoroo.andlib.service.DependencyInjectionService; import com.todoroo.andlib.utility.AndroidUtilities; import com.todoroo.astrid.actfm.sync.ActFmSyncProvider; import com.todoroo.astrid.activity.Eula; -import com.todoroo.astrid.activity.FilterListActivity; import com.todoroo.astrid.activity.TaskListActivity; import com.todoroo.astrid.service.StartupService; import com.todoroo.astrid.service.StatisticsService; import com.todoroo.astrid.service.abtesting.ABChooser; -import com.todoroo.astrid.service.abtesting.ABOptions; public class WelcomeGraphic extends Activity { @@ -99,18 +97,7 @@ public class WelcomeGraphic extends Activity { private Intent getNextIntent() { Intent intent = new Intent(); - int choice = abChooser.getChoiceForOption(ABOptions.AB_OPTION_FIRST_ACTIVITY); - switch (choice) { - case 0: - intent.setClass(this, TaskListActivity.class); - break; - case 1: - intent.setClass(this, FilterListActivity.class); - intent.putExtra(FilterListActivity.SHOW_BACK_BUTTON, false); - break; - default: - intent.setClass(this, TaskListActivity.class); - } + intent.setClass(this, TaskListActivity.class); return intent; } }