Finalize many ab tests

pull/14/head
Sam Bosley 12 years ago
parent a41e94756d
commit 40e9098a40

@ -165,7 +165,7 @@ public class ReminderDialog extends Dialog {
addTagFaces(task.getId(), pictureUrls, isSharedTask);
}
if (pictureUrls.size() > 0 && Preferences.getBoolean(R.string.p_social_reminders, false)) {
if (pictureUrls.size() > 0) {
DisplayMetrics metrics = activity.getResources().getDisplayMetrics();
LinearLayout layout = new LinearLayout(activity);
LinearLayout.LayoutParams containerParams = new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);

@ -67,9 +67,6 @@
<!-- show featured lists -->
<string name="p_show_featured_lists">show_featured_lists_labs</string>
<!-- social reminders (show faces) -->
<string name="p_social_reminders">social_reminders</string>
<!-- account status section key -->
<string name="p_account">account</string>

@ -88,8 +88,6 @@ import com.todoroo.astrid.service.StatisticsConstants;
import com.todoroo.astrid.service.StatisticsService;
import com.todoroo.astrid.service.TaskService;
import com.todoroo.astrid.service.ThemeService;
import com.todoroo.astrid.service.abtesting.ABChooser;
import com.todoroo.astrid.service.abtesting.ABTests;
import com.todoroo.astrid.tags.TagsControlSet;
import com.todoroo.astrid.taskrabbit.TaskRabbitControlSet;
import com.todoroo.astrid.timers.TimerActionControlSet;
@ -419,22 +417,15 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener {
commentsBar.setVisibility(View.VISIBLE);
moreTab.setVisibility(View.VISIBLE);
if ((tabStyle & TaskEditViewPager.TAB_SHOW_MORE) > 0
&& ABChooser.readChoiceForTest(ABTests.AB_DEFAULT_EDIT_TAB) != 0) {
setCurrentTab(TAB_VIEW_MORE);
setPagerHeightForPosition(TAB_VIEW_MORE);
} else {
setCurrentTab(TAB_VIEW_UPDATES);
setPagerHeightForPosition(TAB_VIEW_UPDATES);
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
updatesChanged();
}
}, 500L);
}
setCurrentTab(TAB_VIEW_UPDATES);
setPagerHeightForPosition(TAB_VIEW_UPDATES);
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
updatesChanged();
}
}, 500L);
}
private void setCurrentTab(int position) {

@ -150,30 +150,11 @@ public class ABTests {
}
}
public static final String AB_FEATURED_LISTS = "android_featured_lists"; //$NON-NLS-1$
public static final String AB_SOCIAL_REMINDERS = "android_social_reminders"; //$NON-NLS-1$
public static final String AB_DRAG_DROP = "android_drag_drop"; //$NON-NLS-1$
public static final String AB_DEFAULT_EDIT_TAB = "android_default_edit_tab"; //$NON-NLS-1$
public static final String AB_NEW_LOGIN_NO_GOOGLE = "android_new_login_n_google"; //$NON-NLS-1$
public static final String AB_NEW_LOGIN_YES_GOOGLE = "android_new_login_y_google"; //$NON-NLS-1$
private void initialize() {
addTest(AB_FEATURED_LISTS, new int[] { 1, 1 },
new int[] { 1, 1 }, new String[] { "featured-lists-disabled", "featured-lists-enabled" }, false); //$NON-NLS-1$ //$NON-NLS-2$
addTest(AB_SOCIAL_REMINDERS, new int[] { 1, 1 },
new int[] { 1, 1 }, new String[] { "no-faces", "show-faces" }, true); //$NON-NLS-1$ //$NON-NLS-2$
addTest(AB_DRAG_DROP, new int[] { 3, 1 },
new int[] { 1, 0 }, new String[] { "off-by-default", "on-by-default" }, false); //$NON-NLS-1$ //$NON-NLS-2$
addTest(AB_DEFAULT_EDIT_TAB, new int[] { 1, 1 },
new int[] { 1, 1 }, new String[] { "activity-tab", "details-tab" }, true); //$NON-NLS-1$ //$NON-NLS-2$
//
}
}

@ -27,8 +27,6 @@ import com.todoroo.astrid.data.Task;
import com.todoroo.astrid.data.User;
import com.todoroo.astrid.service.ThemeService;
import com.todoroo.astrid.service.UpgradeService;
import com.todoroo.astrid.service.abtesting.ABChooser;
import com.todoroo.astrid.service.abtesting.ABTests;
import com.todoroo.astrid.tags.reusable.FeaturedListFilterExposer;
public class AstridPreferences {
@ -83,31 +81,21 @@ public class AstridPreferences {
Preferences.setIfUnset(prefs, editor, r, R.string.p_ideas_tab_enabled, true);
Preferences.setIfUnset(prefs, editor, r, R.string.p_show_featured_lists,
ABChooser.readChoiceForTest(ABTests.AB_FEATURED_LISTS) != 0);
Preferences.setIfUnset(prefs, editor, r, R.string.p_show_featured_lists, true);
Preferences.setIfUnset(prefs, editor, r, R.string.p_taskRowStyle, false);
Preferences.setIfUnset(prefs, editor, r, R.string.p_calendar_reminders, true);
Preferences.setIfUnset(prefs, editor, r, R.string.p_social_reminders,
ABChooser.readChoiceForTest(ABTests.AB_SOCIAL_REMINDERS) != 0);
String dragDropTestInitialized = ABTests.AB_DRAG_DROP + "_initialized"; //$NON-NLS-1$
if (!Preferences.getBoolean(dragDropTestInitialized, false)) {
if (ABChooser.readChoiceForTest(ABTests.AB_DRAG_DROP) != 0) {
SharedPreferences publicPrefs = getPublicPrefs(context);
if (publicPrefs != null) {
Editor edit = publicPrefs.edit();
if (edit != null) {
edit.putInt(SortHelper.PREF_SORT_FLAGS, SortHelper.FLAG_DRAG_DROP);
edit.putInt(SortHelper.PREF_SORT_SORT, SortHelper.SORT_AUTO);
edit.commit();
Preferences.setInt(P_SUBTASKS_HELP, 1);
}
}
SharedPreferences publicPrefs = getPublicPrefs(context);
if (publicPrefs != null) {
Editor edit = publicPrefs.edit();
if (edit != null) {
edit.putInt(SortHelper.PREF_SORT_FLAGS, SortHelper.FLAG_DRAG_DROP);
edit.putInt(SortHelper.PREF_SORT_SORT, SortHelper.SORT_AUTO);
edit.commit();
Preferences.setInt(P_SUBTASKS_HELP, 1);
}
Preferences.setBoolean(dragDropTestInitialized, true);
}
if ("white-blue".equals(Preferences.getStringValue(R.string.p_theme))) { //$NON-NLS-1$ migrate from when white-blue wasn't the default
@ -158,9 +146,6 @@ public class AstridPreferences {
Preferences.setIfUnset(prefs, editor, r, R.string.p_calendar_reminders, true);
Preferences.setIfUnset(prefs, editor, r, R.string.p_social_reminders,
ABChooser.readChoiceForTest(ABTests.AB_SOCIAL_REMINDERS) != 0);
Preferences.setIfUnset(prefs, editor, r, R.string.p_use_filters, false);
Preferences.setIfUnset(prefs, editor, r, R.string.p_simple_input_boxes, true);

Loading…
Cancel
Save