Merge "Import revised translations." into ics-mr1
diff --git a/chips/res/layout/chips_recipient_dropdown_item.xml b/chips/res/layout/chips_recipient_dropdown_item.xml
index 3f0497e..cd11d67 100644
--- a/chips/res/layout/chips_recipient_dropdown_item.xml
+++ b/chips/res/layout/chips_recipient_dropdown_item.xml
@@ -43,7 +43,8 @@
                   android:layout_height="wrap_content"
                   android:paddingLeft="16dip"
                   android:singleLine="true"
-                  android:ellipsize="end" />
+                  android:ellipsize="end"
+                  android:layout_marginTop="-4dip" />
     </LinearLayout>
     <ImageView
         android:id="@android:id/icon"
diff --git a/chips/res/values-sw600dp/styles.xml b/chips/res/values-sw600dp/styles.xml
index 912c368..b6014ea 100644
--- a/chips/res/values-sw600dp/styles.xml
+++ b/chips/res/values-sw600dp/styles.xml
@@ -24,6 +24,6 @@
         <item name="android:layout_height">wrap_content</item>
         <item name="android:layout_width">match_parent</item>
         <item name="android:dropDownVerticalOffset">0dip</item>
-        <item name="android:dropDownHorizontalOffset">0dip</item>
+        <item name="android:dropDownHorizontalOffset">-4dip</item>
     </style>
-</resources>
\ No newline at end of file
+</resources>
diff --git a/chips/res/values/styles.xml b/chips/res/values/styles.xml
index 4cf4f80..2b04b4f 100644
--- a/chips/res/values/styles.xml
+++ b/chips/res/values/styles.xml
@@ -22,7 +22,7 @@
         <item name="android:layout_height">wrap_content</item>
         <item name="android:layout_width">match_parent</item>
         <item name="android:dropDownVerticalOffset">-6dip</item>
-        <item name="android:dropDownHorizontalOffset">0dip</item>
+        <item name="android:dropDownHorizontalOffset">-16dip</item>
         <item name="android:minHeight">48dip</item>
         <item name="android:lineSpacingExtra">4dip</item>
     </style>
diff --git a/chips/src/com/android/ex/chips/RecipientEditTextView.java b/chips/src/com/android/ex/chips/RecipientEditTextView.java
index 4810087..ed73d71 100644
--- a/chips/src/com/android/ex/chips/RecipientEditTextView.java
+++ b/chips/src/com/android/ex/chips/RecipientEditTextView.java
@@ -1426,7 +1426,7 @@
         Editable editable = getText();
         QwertyKeyListener.markAsReplaced(editable, start, end, "");
         CharSequence chip = createChip(entry, false);
-        if (chip != null) {
+        if (chip != null && start >= 0 && end >= 0) {
             editable.replace(start, end, chip);
         }
         sanitizeBetween();