diff options
-rw-r--r-- | carousel/Android.mk | 3 | ||||
-rw-r--r-- | chips/res/values-sw/strings.xml | 2 | ||||
-rw-r--r-- | chips/src/com/android/ex/chips/RecipientEditTextView.java | 13 |
3 files changed, 10 insertions, 8 deletions
diff --git a/carousel/Android.mk b/carousel/Android.mk index 403773a..1f2592f 100644 --- a/carousel/Android.mk +++ b/carousel/Android.mk @@ -25,6 +25,3 @@ LOCAL_SRC_FILES := \ $(call all-renderscript-files-under, java) include $(BUILD_STATIC_JAVA_LIBRARY) - -# Include this library in the build server's output directory -$(call dist-for-goals, droidcore, $(LOCAL_BUILT_MODULE):android-common-carousel.jar) diff --git a/chips/res/values-sw/strings.xml b/chips/res/values-sw/strings.xml index 8734bc5..edea133 100644 --- a/chips/res/values-sw/strings.xml +++ b/chips/res/values-sw/strings.xml @@ -19,5 +19,5 @@ <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$s</xliff:g>"</string> <string name="copy_email" msgid="7869435992461603532">"Nakili anwani ya barua pepe"</string> <string name="copy_number" msgid="530057841276106843">"Nakili namba ya simu"</string> - <string name="done" msgid="2356320650733788862">"Leta"</string> + <string name="done" msgid="2356320650733788862">"Inayofuata"</string> </resources> diff --git a/chips/src/com/android/ex/chips/RecipientEditTextView.java b/chips/src/com/android/ex/chips/RecipientEditTextView.java index 8b6367f..d2e5806 100644 --- a/chips/src/com/android/ex/chips/RecipientEditTextView.java +++ b/chips/src/com/android/ex/chips/RecipientEditTextView.java @@ -417,6 +417,7 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements return sExcessTopPadding; } + @Override public <T extends ListAdapter & Filterable> void setAdapter(T adapter) { super.setAdapter(adapter); ((BaseRecipientAdapter) adapter) @@ -1459,6 +1460,7 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements return createAlternatesAdapter(currentChip); } + @Override protected void onPostExecute(final ListAdapter result) { int line = getLayout().getLineForOffset(getChipStart(currentChip)); int bottom; @@ -2490,10 +2492,12 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements addresses.add(createAddressText(chip.getEntry())); } } + final BaseRecipientAdapter adapter = (BaseRecipientAdapter) getAdapter(); + if (adapter == null) { + return null; + } RecipientAlternatesAdapter.getMatchingRecipients(getContext(), addresses, - ((BaseRecipientAdapter) getAdapter()).getAccount(), - new RecipientMatchCallback() { - + adapter.getAccount(), new RecipientMatchCallback() { @Override public void matchesFound(Map<String, RecipientEntry> entries) { final ArrayList<DrawableRecipientChip> replacements = @@ -2566,7 +2570,8 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements if (start != -1) { // Replacing the entirety of what the chip represented, // including the extra space dividing it from other chips. - final int end = text.getSpanEnd(chip) + 1; + final int end = + Math.min(text.getSpanEnd(chip) + 1, text.length()); text.removeSpan(chip); // Make sure we always have just 1 space at the end to // separate this chip from the next chip. |