summaryrefslogtreecommitdiffstats
path: root/chips
diff options
context:
space:
mode:
authorTom Taylor <tomtaylor@google.com>2013-03-19 13:35:29 -0700
committerScott Kennedy <skennedy@google.com>2013-03-19 14:03:11 -0700
commit52dba50b0e2dfe735484248c6f729950fe4fb7b8 (patch)
treed5ea47627444e67962d508fd1d8e67e8522148cd /chips
parent8b7e1e5760f236a505ce2e91563e8ac5d75af7cc (diff)
downloadandroid_frameworks_ex-52dba50b0e2dfe735484248c6f729950fe4fb7b8.tar.gz
android_frameworks_ex-52dba50b0e2dfe735484248c6f729950fe4fb7b8.tar.bz2
android_frameworks_ex-52dba50b0e2dfe735484248c6f729950fe4fb7b8.zip
ArrayIndexOutOfBoundsException in RecipientEntry.constructFakeEntry
Bug 8423230 Fix a monkey bug that is showing up a lot in MR2. Use the original address when tokenizing an address fails to return anything. Cherry-pick of: I4ac42f81aa6e4cbdad058f73bb3a1fd62ab2e138 Change-Id: I0f41f3e169086dcd89e51cdf211985e9bf1a3ade
Diffstat (limited to 'chips')
-rw-r--r--chips/src/com/android/ex/chips/RecipientEntry.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/chips/src/com/android/ex/chips/RecipientEntry.java b/chips/src/com/android/ex/chips/RecipientEntry.java
index 14b11e1..f7155b0 100644
--- a/chips/src/com/android/ex/chips/RecipientEntry.java
+++ b/chips/src/com/android/ex/chips/RecipientEntry.java
@@ -110,7 +110,7 @@ public class RecipientEntry {
*/
public static RecipientEntry constructFakeEntry(final String address, final boolean isValid) {
final Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(address);
- final String tokenizedAddress = tokens[0].getAddress();
+ final String tokenizedAddress = tokens.length > 0 ? tokens[0].getAddress() : address;
return new RecipientEntry(ENTRY_TYPE_PERSON, tokenizedAddress, tokenizedAddress,
INVALID_DESTINATION_TYPE, null,