resolved conflicts for merge of ffc0111f to master

Change-Id: I92bcf75bdb01503aa652890859c589441d0a1a0f
diff --git a/res/values-bn-rBD/strings.xml b/res/values-bn-rBD/strings.xml
index 29918e4..46bf3d1 100644
--- a/res/values-bn-rBD/strings.xml
+++ b/res/values-bn-rBD/strings.xml
@@ -19,5 +19,6 @@
     <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$d</xliff:g>টি"</string>
     <string name="copy_email" msgid="7869435992461603532">"ইমেল ঠিকানা অনুলিপি করুন"</string>
     <string name="copy_number" msgid="530057841276106843">"ফোন নম্বর অনুলিপি করুন"</string>
-    <string name="done" msgid="2356320650733788862">"ফেরত যান"</string>
+    <string name="action_label" msgid="1318401633653605424">"ফেরত যান"</string>
+    <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"যোগাযোগের পরামর্শগুলি খোলা হয়েছে"</string>
 </resources>
diff --git a/res/values-eu-rES/strings.xml b/res/values-eu-rES/strings.xml
index 39a62d2..0c4b635 100644
--- a/res/values-eu-rES/strings.xml
+++ b/res/values-eu-rES/strings.xml
@@ -19,5 +19,6 @@
     <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$d</xliff:g>"</string>
     <string name="copy_email" msgid="7869435992461603532">"Kopiatu helbide elektronikoa"</string>
     <string name="copy_number" msgid="530057841276106843">"Kopiatu telefono-zenbakia"</string>
-    <string name="done" msgid="2356320650733788862">"Itzuli"</string>
+    <string name="action_label" msgid="1318401633653605424">"Itzuli"</string>
+    <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"Kontaktuen iradokizunak ireki dira"</string>
 </resources>
diff --git a/res/values-gl-rES/strings.xml b/res/values-gl-rES/strings.xml
index d8fea9a..e9a9c6e 100644
--- a/res/values-gl-rES/strings.xml
+++ b/res/values-gl-rES/strings.xml
@@ -19,5 +19,6 @@
     <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$d</xliff:g>"</string>
     <string name="copy_email" msgid="7869435992461603532">"Copiar enderezo de correo electrónico"</string>
     <string name="copy_number" msgid="530057841276106843">"Copiar número de teléfono"</string>
-    <string name="done" msgid="2356320650733788862">"Volver"</string>
+    <string name="action_label" msgid="1318401633653605424">"Volver"</string>
+    <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"Suxestións de contactos abertas"</string>
 </resources>
diff --git a/res/values-is-rIS/strings.xml b/res/values-is-rIS/strings.xml
index d5521b2..5a5bcab 100644
--- a/res/values-is-rIS/strings.xml
+++ b/res/values-is-rIS/strings.xml
@@ -19,5 +19,6 @@
     <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$d</xliff:g>"</string>
     <string name="copy_email" msgid="7869435992461603532">"Afrita netfang"</string>
     <string name="copy_number" msgid="530057841276106843">"Afrita símanúmer"</string>
-    <string name="done" msgid="2356320650733788862">"Til baka"</string>
+    <string name="action_label" msgid="1318401633653605424">"Venda"</string>
+    <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"Tillögur um tengiliði opnaðar"</string>
 </resources>
diff --git a/res/values-kk-rKZ/strings.xml b/res/values-kk-rKZ/strings.xml
index 1508566..17d10d2 100644
--- a/res/values-kk-rKZ/strings.xml
+++ b/res/values-kk-rKZ/strings.xml
@@ -19,5 +19,6 @@
     <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$d</xliff:g>"</string>
     <string name="copy_email" msgid="7869435992461603532">"Эл.поштаның көшірмесін жасау"</string>
     <string name="copy_number" msgid="530057841276106843">"Телефон нөмірінің көшірмесін жасау"</string>
-    <string name="done" msgid="2356320650733788862">"Қалпына келтіру"</string>
+    <string name="action_label" msgid="1318401633653605424">"Қайтару"</string>
+    <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"Контакт ұсыныстары ашық"</string>
 </resources>
diff --git a/res/values-kn-rIN/strings.xml b/res/values-kn-rIN/strings.xml
index 5679fc8..617ca7b 100644
--- a/res/values-kn-rIN/strings.xml
+++ b/res/values-kn-rIN/strings.xml
@@ -19,5 +19,6 @@
     <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$d</xliff:g>"</string>
     <string name="copy_email" msgid="7869435992461603532">"ಇಮೇಲ್ ವಿಳಾಸವನ್ನು ನಕಲಿಸಿ"</string>
     <string name="copy_number" msgid="530057841276106843">"ಫೋನ್ ಸಂಖ್ಯೆಯನ್ನು ನಕಲಿಸಿ"</string>
-    <string name="done" msgid="2356320650733788862">"ಹಿಂತಿರುಗು"</string>
+    <string name="action_label" msgid="1318401633653605424">"ಹಿಂತಿರುಗು"</string>
+    <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"ಸಂಪರ್ಕ ಸಲಹೆಗಳನ್ನು ತೆರೆಯಲಾಗಿದೆ"</string>
 </resources>
diff --git a/res/values-ky-rKG/strings.xml b/res/values-ky-rKG/strings.xml
index d41ed6e..4a8cecd 100644
--- a/res/values-ky-rKG/strings.xml
+++ b/res/values-ky-rKG/strings.xml
@@ -19,5 +19,6 @@
     <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$d</xliff:g>"</string>
     <string name="copy_email" msgid="7869435992461603532">"Эмейл даректи көчүрүү"</string>
     <string name="copy_number" msgid="530057841276106843">"Телефон номурун көчүрүү"</string>
-    <string name="done" msgid="2356320650733788862">"Кайтуу"</string>
+    <string name="action_label" msgid="1318401633653605424">"Кайтуу"</string>
+    <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"Байланыш сунуштары ачылды"</string>
 </resources>
diff --git a/res/values-mk-rMK/strings.xml b/res/values-mk-rMK/strings.xml
index fddc627..425aeb2 100644
--- a/res/values-mk-rMK/strings.xml
+++ b/res/values-mk-rMK/strings.xml
@@ -19,5 +19,6 @@
     <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$d</xliff:g>"</string>
     <string name="copy_email" msgid="7869435992461603532">"Копирај адреса на е-пошта"</string>
     <string name="copy_number" msgid="530057841276106843">"Копирај телефонски број"</string>
-    <string name="done" msgid="2356320650733788862">"Врати"</string>
+    <string name="action_label" msgid="1318401633653605424">"Врати"</string>
+    <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"Предлозите за контактот се отворени"</string>
 </resources>
diff --git a/res/values-ml-rIN/strings.xml b/res/values-ml-rIN/strings.xml
index 40a9df2..39b58ab 100644
--- a/res/values-ml-rIN/strings.xml
+++ b/res/values-ml-rIN/strings.xml
@@ -19,5 +19,6 @@
     <string name="more_string" msgid="8495478259330621990">"<xliff:g id="COUNT">%1$d</xliff:g> എണ്ണം കൂടി"</string>
     <string name="copy_email" msgid="7869435992461603532">"ഇമെയിൽ വിലാസം പകർത്തുക"</string>
     <string name="copy_number" msgid="530057841276106843">"ഫോൺ നമ്പർ പകർത്തുക"</string>
-    <string name="done" msgid="2356320650733788862">"മടങ്ങുക"</string>
+    <string name="action_label" msgid="1318401633653605424">"മടങ്ങുക"</string>
+    <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"കോൺടാക്‌റ്റ് നിർദ്ദേശങ്ങൾ ലഭ്യമാണ്"</string>
 </resources>
diff --git a/res/values-mr-rIN/strings.xml b/res/values-mr-rIN/strings.xml
index 861d8c1..453d62f 100644
--- a/res/values-mr-rIN/strings.xml
+++ b/res/values-mr-rIN/strings.xml
@@ -19,5 +19,6 @@
     <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$d</xliff:g>"</string>
     <string name="copy_email" msgid="7869435992461603532">"ईमेल पत्ता कॉपी करा"</string>
     <string name="copy_number" msgid="530057841276106843">"फोन नंबर कॉपी करा"</string>
-    <string name="done" msgid="2356320650733788862">"परत"</string>
+    <string name="action_label" msgid="1318401633653605424">"परत"</string>
+    <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"संपर्क सूचना उघडल्या"</string>
 </resources>
diff --git a/res/values-my-rMM/strings.xml b/res/values-my-rMM/strings.xml
index 3fa7a05..c1d7356 100644
--- a/res/values-my-rMM/strings.xml
+++ b/res/values-my-rMM/strings.xml
@@ -19,5 +19,6 @@
     <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$d</xliff:g>"</string>
     <string name="copy_email" msgid="7869435992461603532">"အီးမေးလ်လိပ်စာ ကူးထည့်ရန်"</string>
     <string name="copy_number" msgid="530057841276106843">"ဖုန်းနံပါတ် ကူးထည့်ရန်"</string>
-    <string name="done" msgid="2356320650733788862">"ရယူရန်"</string>
+    <string name="action_label" msgid="1318401633653605424">"နောက်ပြန်ရန်"</string>
+    <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"အဆက်အသွယ် အကြံပေးချက်များ ဖွင့်ထား"</string>
 </resources>
diff --git a/res/values-ne-rNP/strings.xml b/res/values-ne-rNP/strings.xml
index c124d76..4c61fb2 100644
--- a/res/values-ne-rNP/strings.xml
+++ b/res/values-ne-rNP/strings.xml
@@ -19,5 +19,6 @@
     <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$d</xliff:g>"</string>
     <string name="copy_email" msgid="7869435992461603532">"इमेल ठेगानाको प्रतिलिपि बनाउनुहोस्"</string>
     <string name="copy_number" msgid="530057841276106843">"फोन नम्बरको प्रतिलिपि गर्नुहोस्"</string>
-    <string name="done" msgid="2356320650733788862">"फिर्ता हुनुहोस्"</string>
+    <string name="action_label" msgid="1318401633653605424">"फर्कनुहोस्"</string>
+    <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"सम्पर्क सुझाव खोलियो"</string>
 </resources>
diff --git a/res/values-si-rLK/strings.xml b/res/values-si-rLK/strings.xml
index 9bfe76c..4a04bab 100644
--- a/res/values-si-rLK/strings.xml
+++ b/res/values-si-rLK/strings.xml
@@ -19,5 +19,6 @@
     <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$d</xliff:g>"</string>
     <string name="copy_email" msgid="7869435992461603532">"ඊ-තැපැල් ලිපිනය පිටපත් කරන්න"</string>
     <string name="copy_number" msgid="530057841276106843">"දුරකථන අංකය පිටපත් කරන්න"</string>
-    <string name="done" msgid="2356320650733788862">"ආපසු එවන්න"</string>
+    <string name="action_label" msgid="1318401633653605424">"ආපසු එවන්න"</string>
+    <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"සම්බන්ධතා යෝජනා විවෘත කරන"</string>
 </resources>
diff --git a/res/values-ta-rIN/strings.xml b/res/values-ta-rIN/strings.xml
index 67819a5..cc0106b 100644
--- a/res/values-ta-rIN/strings.xml
+++ b/res/values-ta-rIN/strings.xml
@@ -19,5 +19,6 @@
     <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$d</xliff:g>"</string>
     <string name="copy_email" msgid="7869435992461603532">"மின்னஞ்சல் முகவரியை நகலெடு"</string>
     <string name="copy_number" msgid="530057841276106843">"மொபைல் எண்ணை நகலெடு"</string>
-    <string name="done" msgid="2356320650733788862">"திரும்பு"</string>
+    <string name="action_label" msgid="1318401633653605424">"திரும்பு"</string>
+    <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"திறந்துள்ள தொடர்புப் பரிந்துரைகள்"</string>
 </resources>
diff --git a/res/values-te-rIN/strings.xml b/res/values-te-rIN/strings.xml
index 82a3272..f6fdccb 100644
--- a/res/values-te-rIN/strings.xml
+++ b/res/values-te-rIN/strings.xml
@@ -19,5 +19,6 @@
     <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$d</xliff:g>"</string>
     <string name="copy_email" msgid="7869435992461603532">"ఇమెయిల్ చిరునామాను కాపీ చేయండి"</string>
     <string name="copy_number" msgid="530057841276106843">"ఫోన్ నంబర్‌ను కాపీ చేయండి"</string>
-    <string name="done" msgid="2356320650733788862">"తిరిగి వెళ్లు"</string>
+    <string name="action_label" msgid="1318401633653605424">"తిరిగివెళ్లు"</string>
+    <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"పరిచయ సూచనలు తెరవబడ్డాయి"</string>
 </resources>
diff --git a/res/values-ur-rPK/strings.xml b/res/values-ur-rPK/strings.xml
index a67fd5a..86d077c 100644
--- a/res/values-ur-rPK/strings.xml
+++ b/res/values-ur-rPK/strings.xml
@@ -19,5 +19,6 @@
     <string name="more_string" msgid="8495478259330621990">"‎+<xliff:g id="COUNT">%1$d</xliff:g>"</string>
     <string name="copy_email" msgid="7869435992461603532">"ای میل پتہ کاپی کریں"</string>
     <string name="copy_number" msgid="530057841276106843">"فون نمبر کاپی کریں"</string>
-    <string name="done" msgid="2356320650733788862">"واپس جائیں"</string>
+    <string name="action_label" msgid="1318401633653605424">"واپس جائیں"</string>
+    <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"رابطہ کی تجاویز کھلی ہوئی ہیں"</string>
 </resources>
diff --git a/res/values-uz-rUZ/strings.xml b/res/values-uz-rUZ/strings.xml
index 6b88ba9..5981b00 100644
--- a/res/values-uz-rUZ/strings.xml
+++ b/res/values-uz-rUZ/strings.xml
@@ -19,5 +19,6 @@
     <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$d</xliff:g> ta"</string>
     <string name="copy_email" msgid="7869435992461603532">"E-pochta manzilidan nusxa olish"</string>
     <string name="copy_number" msgid="530057841276106843">"Telefon raqamidan nusxa olish"</string>
-    <string name="done" msgid="2356320650733788862">"Qaytish"</string>
+    <string name="action_label" msgid="1318401633653605424">"Enter"</string>
+    <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"Taklif qilingan kontaktlar ochildi"</string>
 </resources>
diff --git a/sample/res/values-iw/strings.xml b/sample/res/values-iw/strings.xml
index 7ead2ae..c295c34 100644
--- a/sample/res/values-iw/strings.xml
+++ b/sample/res/values-iw/strings.xml
@@ -16,6 +16,6 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="email_addresses" msgid="5320415175940315400">"כתובות דוא\"ל"</string>
+    <string name="email_addresses" msgid="5320415175940315400">"כתובות אימייל"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"מספרי טלפון"</string>
 </resources>
diff --git a/src/com/android/ex/chips/RecipientEditTextView.java b/src/com/android/ex/chips/RecipientEditTextView.java
index dd83360..ae27c32 100644
--- a/src/com/android/ex/chips/RecipientEditTextView.java
+++ b/src/com/android/ex/chips/RecipientEditTextView.java
@@ -352,7 +352,6 @@
     protected void onDetachedFromWindow() {
         super.onDetachedFromWindow();
         mAttachedToWindow = false;
-        dismissPopups();
     }
 
     @Override
@@ -730,7 +729,6 @@
             // Draw the default chip background
             mWorkPaint.reset();
             mWorkPaint.setColor(backgroundColor);
-            mWorkPaint.setAntiAlias(true);
             final float radius = height / 2;
             canvas.drawRoundRect(new RectF(0, 0, width, height), radius, radius,
                     mWorkPaint);
@@ -2260,6 +2258,7 @@
             @Override
             public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                 unselectChip(currentChip);
+                popup.dismiss();
             }
         });
         popup.show();
@@ -2297,7 +2296,9 @@
         }
         setCursorVisible(true);
         setSelection(editable.length());
-        dismissPopups();
+        if (mAlternatesPopup != null && mAlternatesPopup.isShowing()) {
+            mAlternatesPopup.dismiss();
+        }
     }
 
     @Override