Fix warning icon behavior for RTL languages.
am: 1c4ebfe46e

Change-Id: I6b17c6b3e4ae7861fd9f12fa6918fa598a8975dd
diff --git a/res/values-be-rBY/strings.xml b/res/values-be-rBY/strings.xml
index 274d05f..ad61e95 100644
--- a/res/values-be-rBY/strings.xml
+++ b/res/values-be-rBY/strings.xml
@@ -21,11 +21,9 @@
     <string name="copy_number" msgid="530057841276106843">"Скапіраваць нумар тэлефона"</string>
     <string name="action_label" msgid="1318401633653605424">"Вярнуцца"</string>
     <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"Прапановы кантактаў адкрыты"</string>
-    <!-- no translation found for accessbility_suggestion_dropdown_closed (5545766162855459747) -->
-    <skip />
+    <string name="accessbility_suggestion_dropdown_closed" msgid="5545766162855459747">"Няма даступных прапаноў"</string>
     <string name="dropdown_delete_button_desc" msgid="8506791557733906887">"Выдаліць <xliff:g id="CONTACT">%s</xliff:g> з атрымальнікаў"</string>
     <string name="chips_action_copy" msgid="1929144660075507103">"Капіраваць"</string>
     <string name="chips_action_cancel" msgid="6077877438943543501">"Скасаваць"</string>
-    <!-- no translation found for chips_permission_text (1978301259208877495) -->
-    <skip />
+    <string name="chips_permission_text" msgid="1978301259208877495">"Дазволіць прапаноўваць кантакты"</string>
 </resources>
diff --git a/res/values-bn-rBD/strings.xml b/res/values-bn-rBD/strings.xml
index 4c80e16..9a200b1 100644
--- a/res/values-bn-rBD/strings.xml
+++ b/res/values-bn-rBD/strings.xml
@@ -17,8 +17,8 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <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="copy_email" msgid="7869435992461603532">"ইমেল ঠিকানা কপি করুন"</string>
+    <string name="copy_number" msgid="530057841276106843">"ফোন নম্বর কপি করুন"</string>
     <string name="action_label" msgid="1318401633653605424">"ফেরত যান"</string>
     <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"যোগাযোগের পরামর্শগুলি খোলা হয়েছে"</string>
     <string name="accessbility_suggestion_dropdown_closed" msgid="5545766162855459747">"কোনো প্রস্তাবনা উপলব্ধ নেই"</string>
diff --git a/res/values-bs-rBA/strings.xml b/res/values-bs-rBA/strings.xml
index 59a9f2a..2747c1a 100644
--- a/res/values-bs-rBA/strings.xml
+++ b/res/values-bs-rBA/strings.xml
@@ -21,11 +21,9 @@
     <string name="copy_number" msgid="530057841276106843">"Kopiraj telefonski broj"</string>
     <string name="action_label" msgid="1318401633653605424">"Vrati se"</string>
     <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"Otvoreni su prijedlozi kontakata"</string>
-    <!-- no translation found for accessbility_suggestion_dropdown_closed (5545766162855459747) -->
-    <skip />
+    <string name="accessbility_suggestion_dropdown_closed" msgid="5545766162855459747">"Nema dostupnih prijedloga"</string>
     <string name="dropdown_delete_button_desc" msgid="8506791557733906887">"Ukloni kontakt <xliff:g id="CONTACT">%s</xliff:g> iz primalaca"</string>
     <string name="chips_action_copy" msgid="1929144660075507103">"Kopiraj"</string>
     <string name="chips_action_cancel" msgid="6077877438943543501">"Otkaži"</string>
-    <!-- no translation found for chips_permission_text (1978301259208877495) -->
-    <skip />
+    <string name="chips_permission_text" msgid="1978301259208877495">"Omogućite prijedloge za kontakte"</string>
 </resources>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 74988ed..3ee98b6 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -22,7 +22,7 @@
     <string name="action_label" msgid="1318401633653605424">"Intro"</string>
     <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"Sugerencias de contacto disponibles"</string>
     <string name="accessbility_suggestion_dropdown_closed" msgid="5545766162855459747">"No hay sugerencias disponibles"</string>
-    <string name="dropdown_delete_button_desc" msgid="8506791557733906887">"Eliminar a <xliff:g id="CONTACT">%s</xliff:g> de los destinatarios"</string>
+    <string name="dropdown_delete_button_desc" msgid="8506791557733906887">"Quitar a <xliff:g id="CONTACT">%s</xliff:g> de los destinatarios"</string>
     <string name="chips_action_copy" msgid="1929144660075507103">"Copiar"</string>
     <string name="chips_action_cancel" msgid="6077877438943543501">"Cancelar"</string>
     <string name="chips_permission_text" msgid="1978301259208877495">"Permitir sugerencias de contactos"</string>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index 1a2f277..7e79ff6 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -17,7 +17,7 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <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_email" msgid="7869435992461603532">"کپی آدرس رایانامه"</string>
     <string name="copy_number" msgid="530057841276106843">"کپی شماره تلفن"</string>
     <string name="action_label" msgid="1318401633653605424">"بازگشت"</string>
     <string name="accessbility_suggestion_dropdown_opened" msgid="3231589819168382515">"پیشنهادات مخاطب باز شد"</string>
diff --git a/res/values-my-rMM/strings.xml b/res/values-my-rMM/strings.xml
index 9c16141..52d6ab6 100644
--- a/res/values-my-rMM/strings.xml
+++ b/res/values-my-rMM/strings.xml
@@ -24,6 +24,6 @@
     <string name="accessbility_suggestion_dropdown_closed" msgid="5545766162855459747">"အကြံပြုချက်များ မရှိပါ"</string>
     <string name="dropdown_delete_button_desc" msgid="8506791557733906887">"လက်ခံသူများ မှ<xliff:g id="CONTACT">%s</xliff:g> အားဖယ်ရှားရန်"</string>
     <string name="chips_action_copy" msgid="1929144660075507103">"ကူးယူရန်"</string>
-    <string name="chips_action_cancel" msgid="6077877438943543501">"ဖျက်သိမ်းရန်"</string>
+    <string name="chips_action_cancel" msgid="6077877438943543501">"မလုပ်တော့ပါ"</string>
     <string name="chips_permission_text" msgid="1978301259208877495">"အဆက်အသွယ်အကြံပြုချက်များကို ခွင့်ပြုမည်"</string>
 </resources>
diff --git a/sample/res/values-fa/strings.xml b/sample/res/values-fa/strings.xml
index d31e347..049d4cc 100644
--- a/sample/res/values-fa/strings.xml
+++ b/sample/res/values-fa/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 904169b..d9655a5 100644
--- a/src/com/android/ex/chips/RecipientEditTextView.java
+++ b/src/com/android/ex/chips/RecipientEditTextView.java
@@ -427,7 +427,6 @@
     protected void onDetachedFromWindow() {
         super.onDetachedFromWindow();
         mAttachedToWindow = false;
-        dismissPopups();
     }
 
     @Override
@@ -897,7 +896,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);
@@ -2617,6 +2615,7 @@
             @Override
             public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                 unselectChip(currentChip);
+                popup.dismiss();
             }
         });
         popup.show();
@@ -2654,7 +2653,9 @@
         }
         setCursorVisible(true);
         setSelection(editable.length());
-        dismissPopups();
+        if (mAlternatesPopup != null && mAlternatesPopup.isShowing()) {
+            mAlternatesPopup.dismiss();
+        }
     }
 
     @Override
diff --git a/src/com/android/ex/chips/RecipientEntry.java b/src/com/android/ex/chips/RecipientEntry.java
index b4aaed2..2669242 100644
--- a/src/com/android/ex/chips/RecipientEntry.java
+++ b/src/com/android/ex/chips/RecipientEntry.java
@@ -130,6 +130,15 @@
         mPermissions = permissions;
     }
 
+    protected RecipientEntry(int entryType, String displayName, String destination,
+            int destinationType, String destinationLabel, long contactId, Long directoryId,
+            long dataId, Uri photoThumbnailUri, boolean isFirstLevel, boolean isValid,
+            String lookupKey) {
+        this(entryType, displayName, destination, destinationType, destinationLabel,
+                contactId, directoryId, dataId, photoThumbnailUri, isFirstLevel, isValid,
+                lookupKey, null);
+    }
+
     public boolean isValid() {
         return mIsValid;
     }