Turn off chips A/B test.
Change-Id: If8338b26401ba6a0d4659ef32a9c9540fc5fe7db
diff --git a/src/com/android/mail/compose/ComposeActivity.java b/src/com/android/mail/compose/ComposeActivity.java
index a4300ff..97faf20 100644
--- a/src/com/android/mail/compose/ComposeActivity.java
+++ b/src/com/android/mail/compose/ComposeActivity.java
@@ -267,8 +267,6 @@
SEND_SAVE_TASK_HANDLER = new Handler(handlerThread.getLooper());
}
- private boolean mUseNewChips = false;
-
private RecipientEditTextView mTo;
private RecipientEditTextView mCc;
private RecipientEditTextView mBcc;
@@ -479,21 +477,6 @@
checkValidAccounts();
}
- private boolean shouldUseNewChips() {
- // Get the Android ID from this device
- String androidId = android.provider.Settings.Secure
- .getString(getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
-
- // If we don't have a valid android id, just use account name hash code
- if (TextUtils.isEmpty(androidId)) {
- LogUtils.d(LOG_TAG, "Fallback to email address");
- androidId = mAccount.getEmailAddress();
- }
-
- // randomly cut our userbase in half
- return (androidId.hashCode() % 2) == 1;
- }
-
private void finishCreate() {
final Bundle savedState = mInnerSavedState;
findViews();
@@ -539,7 +522,6 @@
return;
}
- mUseNewChips = shouldUseNewChips();
initRecipients();
// Clear the notification and mark the conversation as seen, if necessary
@@ -2186,16 +2168,11 @@
}
private void setupRecipients(RecipientEditTextView view) {
- // todo - remove this experiment
- if (LogUtils.isLoggable("NewChips", LogUtils.DEBUG) || mUseNewChips) {
- final DropdownChipLayouter layouter = getDropdownChipLayouter();
- if (layouter != null) {
- view.setDropdownChipLayouter(layouter);
- }
- view.setAdapter(getRecipientAdapter());
- } else {
- view.setAdapter(new RecipientAdapter(this, mAccount));
+ final DropdownChipLayouter layouter = getDropdownChipLayouter();
+ if (layouter != null) {
+ view.setDropdownChipLayouter(layouter);
}
+ view.setAdapter(getRecipientAdapter());
view.setRecipientEntryItemClickedListener(this);
if (mValidator == null) {
final String accountName = mAccount.getEmailAddress();
@@ -2384,9 +2361,8 @@
@Override
public void onRecipientEntryItemClicked(int charactersTyped, int position) {
// Send analytics of characters typed and position in dropdown selected.
- final String category = mUseNewChips ? "suggest_click_new" : "suggest_click_old";
Analytics.getInstance().sendEvent(
- category, Integer.toString(charactersTyped), Integer.toString(position), 0);
+ "suggest_click", Integer.toString(charactersTyped), Integer.toString(position), 0);
}
@VisibleForTesting