History log of /frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e444c661c53b942eea0daa120b3e5dcc58a0bdbe 16-Oct-2013 Tony Mantler <nicoya@google.com> am eaf43ea2: Don\'t show pop-ups and dialogs if we\'re not attached to a valid window.

* commit 'eaf43ea2c3b00af22f0aa106fd3dde142f52d471':
Don't show pop-ups and dialogs if we're not attached to a valid window.
eaf43ea2c3b00af22f0aa106fd3dde142f52d471 15-Oct-2013 Tony Mantler <nicoya@google.com> Don't show pop-ups and dialogs if we're not attached to a valid window.

b/11229200

Change-Id: Ic44da79e441017ac4ccdb4a254c13965da0cc2f9
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
db7eabe04254528c048737a0b92966473ea2f319 06-Aug-2013 Scott Kennedy <skennedy@google.com> am bc742af5: Make Chips work on API 11+

* commit 'bc742af5bb568ed39dc37764587120928d068330':
Make Chips work on API 11+
bc742af5bb568ed39dc37764587120928d068330 03-Aug-2013 Scott Kennedy <skennedy@google.com> Make Chips work on API 11+

By using the support library, and copying a few methods from TextView
into RecipientEditTextView, we can support chips back to API 11.

Bug: 8744878
Change-Id: I2d9bb43e71556504e929dcdccff9dae347020f28
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
4f8b198aeac24fbbc73fcb1fe644d520a7902939 01-Aug-2013 Scott Kennedy <skennedy@google.com> resolved conflicts for merge of b6c18ed6 to master

Change-Id: I7617af351d1fa7e4ce9ff401beffe21690b429d3
b6c18ed611a22d01e901d05911392d7cff89f783 01-Aug-2013 Scott Kennedy <skennedy@google.com> Remove an unnecessary null check

Bug: 9497893
Change-Id: Ib363fc4b93a53c343e0e4cd4766038fee8324850
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
dc660babb68131f3fd9c62c1c1e640869d21bd92 14-Jul-2013 Alon Albert <aalbert@google.com> Support an External Dictionary of Contacts

Allow support for an external custom source of contacts. By making
some classes & methods protected rather than private, it's possible
to allow for a derived class to extend the Chips behavior to load
contacts from an arbitrary source.

Most of the changes here are just access modifier changes but there's
one more substantial change:
Intruduced BaseRecipientAdapter#getMatchingRecipients() which matches
generated recipients with proper chips recipients from the external
sources.
Ideally RecipientAlternatesAdapter#getMatchingRecipients() should reside
in the adaper too but the goal of this CL was to do this minimal
modifications.

There's also a small change that beileve was a bug in IndividualReplacementTask:
The matchesFound() callback gets a list of matches found. It then iterates all
the original recipients and looks for those that have matches and replaces them.
So far so good but, if the original recipient doesn't have a match and is not a
phone number, the old code still replaces it with itself when it can simply skip
it I think.

Change-Id: I24e89f93ec15154ed8912664cd061fa2b5b18bd8
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
c438c7b3b8a621c3aeccfeaa56f66935fdb1b177 19-Jun-2013 Scott Kennedy <skennedy@google.com> Prepare to remove a null check

I am fairly convinced that the fix for 9408464 will also fix the
underlying problem of this adapter being null.

If this log method is ever called, then I'll know it didn't work, but
I believe this will never be called.

Bug: 9497893
Change-Id: I08518ceecee6985462d0165fb16b1dea95181b07
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
f881a0565252fe947775d499768ef6a46490348a 26-Apr-2013 Alice Yang <alice@google.com> Prevent NPE in chips

Bug 8733626

Change-Id: Id74ed7de4f16f9a7e716b4e9f2152dded97a91e9
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
d259fd2d897c741fa5ca1067a4596beeb2e0a938 22-Apr-2013 Paul Westbrook <pwestbro@google.com> Prevent IOOB exception

The chips code was expecting a space after an email
address when replacing it with a chip. If there is no
extra space (which can happen when receiving an intent)
don't walk off the end of the string

Bug: 8635860
Change-Id: I1d40a08f1cbf11740172b0ea62ab11d656fb23f9
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
49f52e22c9a56c79490f91a4cba54a0a515e6754 15-Apr-2013 Tom Taylor <tomtaylor@google.com> Merge "Messaging crash on selecting a contact from the auto complete list in landscape mode" into jb-mr2-dev
c9daed7a40dbbae4b5fd5b60f32cdca9253644aa 11-Apr-2013 Scott Kennedy <skennedy@google.com> Don't do chip resolving in place

Make a copy of the text, and do the replacements in this copy, so
that we aren't calling back to any TextView watchers. This speeds up
the process by over 90%.

Bug: 8513563
Change-Id: Iff289f8fe24792f1aef657a9b5b4f3457bcbb946
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
cab5557079c64288867f6c04220b9c9c8860164c 10-Apr-2013 Tom Taylor <tomtaylor@google.com> Messaging crash on selecting a contact from the auto complete list in landscape mode

Bug 8540624

Change-Id: If95d1d35cfd0018280ba31a6ef66e9f42f8e1980
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
c3a17c96b86bff4e387c361127e04d60173a9ca6 06-Apr-2013 Scott Kennedy <skennedy@google.com> am da491f04: Prevent a potential ANR

* commit 'da491f048fb33b572713b4287436c1cac6898670':
Prevent a potential ANR
da491f048fb33b572713b4287436c1cac6898670 06-Apr-2013 Scott Kennedy <skennedy@google.com> Prevent a potential ANR

Move this code into an AsyncTask, since createAlternatesAdapter() can
take a while to return.

Bug: 8519276
Change-Id: I7b3f30ab13ed894e80ac26c365dcb3cbe178dd37
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
4fc5c95c966615b971a8d67dc63b384ae691fb11 26-Mar-2013 Tom Taylor <tomtaylor@google.com> StringIndexOutOfBoundsException in Chips during monkey run

Bug 8478568

The code was looking for a comma and not finding one, but since the length
of the token was zero, the "if" clause was executed and tried to make
a substring of length -1.

Change-Id: Ic876fd6b5880c452b27083fb23cf78da994e0225
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
8f0f70c88a16f784deddfc1511503226b17798ca 22-Mar-2013 Scott Kennedy <skennedy@google.com> am f5ecf6ad: Add unit test for creating fake phone entries

* commit 'f5ecf6ad067fb1036199ad5125949aae7ffd9689':
Add unit test for creating fake phone entries
f5ecf6ad067fb1036199ad5125949aae7ffd9689 22-Mar-2013 Scott Kennedy <skennedy@google.com> Add unit test for creating fake phone entries

There was a problem with numbers formatted like:
"(888) 555-1234".

Bug: 8449554
Change-Id: Ic70998104bd5151aba2dca5202bc4f99ced362be
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
f9171bb324685aef7d274cd43427512a56f22522 21-Mar-2013 Tom Taylor <tomtaylor@google.com> Cherry-pick: Area code gets eaten in Chips

Bug 8436028

New code for tokenizing an address stripped the area code from a manually
entered phone number. When chips is in "phone number" mode, call a new
function (essentially the old function before the change) to create
a fake entry directly from the phone number.

Cherry-pick of: I2d62ff24aacd8eadb9086840bd4d003cf39db177

Change-Id: I08d98c2e358fc1b8a70bacf358497a511fd71069
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
6413ac6689b3d33cf2e42715575d3119d2c90f00 21-Mar-2013 Tom Taylor <tomtaylor@google.com> Area code gets eaten in Chips

Bug 8436028

New code for tokenizing an address stripped the area code from a manually
entered phone number. When chips is in "phone number" mode, call a new
function (essentially the old function before the change) to create
a fake entry directly from the phone number.

Change-Id: I2d62ff24aacd8eadb9086840bd4d003cf39db177
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
8b7e1e5760f236a505ce2e91563e8ac5d75af7cc 17-Oct-2012 jli119X <jianpingx.li@intel.com> Cherry-pick Fix a Dead Loop issue in RecipientEditTextView

From AOSP: I01183680289919105dadc28ffd40c8e60dfd6b7e

The old code logic will cause dead loop when pasting phone number
to recipient.

Change-Id: I608f1bf2a5d5651f51be419f7b6125358f2389e2
Author: Jianping Li <jianpingx.li@intel.com>
Signed-off-by: Jianping Li <jianpingx.li@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 58793
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
5727eeebd6f7afc15b773dd851a121f51a4ccd75 14-Mar-2013 Scott Kennedy <skennedy@google.com> resolved conflicts for merge of 35d3af70 to jb-mr2-dev

Change-Id: If85946ef3dbf82eb3a790adf320765e4a25d91dc
8682651d24b0c2cb733b4ef58982aa05f247b3d6 14-Mar-2013 Scott Kennedy <skennedy@android.com> Merge "Fix a Dead Loop issue in RecipientEditTextView"
4aa10b1bc14290397756b05e97ff9bc8a3b7564b 14-Mar-2013 Alice Yang <alice@google.com> Merge remote-tracking branch 'goog/jb-ub-mail-ur9' into merge

Merge UR8 into MR2.

Change-Id: Ia04852cf84c05ab2ee4898662d347a06d40e5f11
f1d0416bad440e015c8f09c3827acc19d939d71a 07-Mar-2013 Scott Kennedy <skennedy@google.com> Refactor some of thie chips code

VisibleRecipientChip and InvisibleRecipientChip had a lot of the same
code, so I moved it all into a delegate class. This resulted in a
bunch of "RecipientChip" classes, so I moved them all into their own
sub-package.

Change-Id: I01dfc931e006270dd37721c73e7bc3c0e7b67515
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
3201470720e62e3d76f0748468fb5c107df1a6c8 04-Mar-2013 Scott Kennedy <skennedy@google.com> Ensure appended emails have a comma separator

There was some code that checked for comma placement, but that is no
longer necessary. Instead, we verify that the email address has a
trailing comma (plus optional whitespace), and if not, we append a
comma and space, to ensure the address is later chipified correctly.

Bug: 8272316
Change-Id: Ifbb1bae466e3ae15c39d6b90a4bc22edc72a096f
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
563bbd3883a226dd1529170a6df937c8f9c8bd43 07-Mar-2013 Scott Kennedy <skennedy@google.com> Add a test case for b/8321211

Emails like:
"Ex Ample" <example@example.com>
were displaying improperly.

Change-Id: Idd43814352e0c4455733adc13b89eb6fc1aca1bb
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
e5d82228c1960115e31f67eb6a3a254d6902e3c5 07-Mar-2013 Scott Kennedy <skennedy@google.com> Initial clean up of the chips code

Change-Id: I56a3dd5968a3ea435d6dcae9256021bac1f74ee6
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
c4f64095df2561916f047274d78fd3a40563f7dd 05-Mar-2013 Scott Kennedy <skennedy@google.com> am 5863e75e: Ensure we chipify the original text

* commit '5863e75e34f565429bd943af692d2fa104441901':
Ensure we chipify the original text
e15950dfd05ee4224fb00bc345240ec7a501a487 05-Mar-2013 Scott Kennedy <skennedy@google.com> am 5863e75e: Ensure we chipify the original text

* commit '5863e75e34f565429bd943af692d2fa104441901':
Ensure we chipify the original text
5863e75e34f565429bd943af692d2fa104441901 05-Mar-2013 Scott Kennedy <skennedy@google.com> Ensure we chipify the original text

We were tokenizing the addresses, then attempting to chipify what we
believed was the ideal way to represent that address as a string. If
this did not match the actual text, it resulted in not everything
being turned into a chip.

By actually using the original text to determine what we make a chip,
we can ensure that everything is always turned into a chip.

Bug: 8321211
Change-Id: I5e7b4d57b6b8895ae5211818451075f461c14eaf
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
23559121fd0a8aead2dea988672e84e80cf82240 05-Mar-2013 Scott Kennedy <skennedy@google.com> am 0159508d: Merge "Fix some jank" into jb-ub-mail-ur8

* commit '0159508d07186a3bf9fcc9a7227047f1bd82084d':
Fix some jank
2a7f40a289501e749edc017ddc02e627bbe4fd0f 05-Mar-2013 Alice Yang <alice@google.com> am 48ad5213: Fix NPE.

* commit '48ad5213e18a67b3a7ec3375214e3900240b889c':
Fix NPE.
2f0b1678a5cfebc8395bc776c837f63cbcfaf6dd 05-Mar-2013 Scott Kennedy <skennedy@google.com> Revert an unnecessary change

I5e9631f258b8d273777c65f3f5460f1aa71f10b1 no longer appears to be
necessary, and was causing jank. It was effectively reverted in Gmail
UR8, and this change just removes the remaining code.

Bug: 8316009
Change-Id: I9c1309cccf57a1e6e7d75eb017aa09add57d2c4a
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
3018e9acbdae15abe69c0f9423da52f23048d360 04-Mar-2013 Scott Kennedy <skennedy@google.com> Ensure appended emails have a comma separator

There was some code that checked for comma placement, but that is no
longer necessary. Instead, we verify that the email address has a
trailing comma (plus optional whitespace), and if not, we append a
comma and space, to ensure the address is later chipified correctly.

Bug: 8272316
Change-Id: Ifbb1bae466e3ae15c39d6b90a4bc22edc72a096f
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
8ede04dbd5c09fa6a350e7af2aa49a0bde71725b 05-Mar-2013 Alice Yang <alice@google.com> resolved conflicts for merge of c4d46df7 to jb-mr2-dev

Change-Id: I8d4c64832f989c70ef432730ab584e3dc71ad004
ffe5fa1168bc6192b50a5585e637ed507fd5a7de 05-Mar-2013 Scott Kennedy <skennedy@google.com> am 0159508d: Merge "Fix some jank" into jb-ub-mail-ur8

* commit '0159508d07186a3bf9fcc9a7227047f1bd82084d':
Fix some jank
0159508d07186a3bf9fcc9a7227047f1bd82084d 05-Mar-2013 Scott Kennedy <skennedy@google.com> Merge "Fix some jank" into jb-ub-mail-ur8
37aec262244072caea607146ba6d2f247ea2c20d 05-Mar-2013 Scott Kennedy <skennedy@google.com> Fix some jank

Removing this line does not bring back the issue this code was
supposed to fix, and it does eliminate the jank.

We can remove all traces of I5e9631f258b8d273777c65f3f5460f1aa71f10b1
in UR9.

Bug: 8254380
Change-Id: I3af3f5e2745aca2667a5a50df306560fe61df5fc
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
e6fee79da937b1ebad3f44ea11274f0b9f80e4ab 05-Mar-2013 Alice Yang <alice@google.com> am 48ad5213: Fix NPE.

* commit '48ad5213e18a67b3a7ec3375214e3900240b889c':
Fix NPE.
48ad5213e18a67b3a7ec3375214e3900240b889c 04-Mar-2013 Alice Yang <alice@google.com> Fix NPE.

Missed another place we need null check.

Bug 8312541

Change-Id: I769e1b6ea5e9c028ca46ee896575f0b4a6c4cea5
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
4b77fac23c07c7e49df796cf7de83d6a4aa90ae2 04-Mar-2013 Alice Yang <alice@google.com> am c4d46df7: Fix NPE.

* commit 'c4d46df70d525cb2289bd76fb0b0b12637dbbe23':
Fix NPE.
c4d46df70d525cb2289bd76fb0b0b12637dbbe23 04-Mar-2013 Alice Yang <alice@google.com> Fix NPE.

Change-Id: Ibb2f12a2b7728fe0e6c5bc454bf9bce96f6e827c
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
2416ccd3f57e9eaf7ddda487b29964437514e389 28-Feb-2013 Scott Kennedy <skennedy@google.com> am 211ae635: Reduce chip jank

* commit '211ae63525c02ec914ef020af625ea4e7d8a3b29':
Reduce chip jank
27696303e8e8bebbeff0faf876b215ed3ca11ead 28-Feb-2013 Scott Kennedy <skennedy@google.com> am 211ae635: Reduce chip jank

* commit '211ae63525c02ec914ef020af625ea4e7d8a3b29':
Reduce chip jank
211ae63525c02ec914ef020af625ea4e7d8a3b29 27-Feb-2013 Scott Kennedy <skennedy@google.com> Reduce chip jank

Put every email address in a chip, so we don't have jank as text
addresses are replaced with chips.

Bug: 8254380
Change-Id: I39d435a9e29c6d9cb2b5f5f69a103ac7a7ab4a3d
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
8189b1c116661428247585c56c8b16d98509becd 21-Feb-2013 Alice Yang <alice@google.com> Merge 'goog/jb-ub-mail-ur8' into master

Change-Id: I7d1e9583bca936a770334252dc0046417b642298
438972e5da3a847e0717b4d030cb579f53195b43 19-Feb-2013 Scott Kennedy <skennedy@google.com> am 2727f969: Ensure all addresses turn into chips

* commit '2727f969d0ce46cdd16cd77e1dc21f3a636217d2':
Ensure all addresses turn into chips
2727f969d0ce46cdd16cd77e1dc21f3a636217d2 16-Feb-2013 Scott Kennedy <skennedy@google.com> Ensure all addresses turn into chips

If an address wasn't properly resolved, it was left as text. This
change processes all unresolved addresses into chips.

Bug: 8201904
Change-Id: Iae7718d97c7c1167bdc464ef372b171743524712
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
1a76449a643ab1e544da54514cf09f6f17f4d075 15-Feb-2013 Paul Westbrook <pwestbro@google.com> Merge branch 'goog/jb-ub-mail-ur8' into master

Conflicts:
photoviewer/AndroidManifest.xml
photoviewer/res/values/dimen.xml
photoviewer/src/com/android/ex/photo/Intents.java
photoviewer/src/com/android/ex/photo/PhotoViewActivity.java
photoviewer/src/com/android/ex/photo/adapters/BaseCursorPagerAdapter.java
photoviewer/src/com/android/ex/photo/adapters/BaseFragmentPagerAdapter.java
photoviewer/src/com/android/ex/photo/adapters/PhotoPagerAdapter.java
photoviewer/src/com/android/ex/photo/fragments/PhotoViewFragment.java
photoviewer/src/com/android/ex/photo/provider/PhotoContract.java
photoviewer/src/com/android/ex/photo/util/ImageUtils.java
photoviewer/src/com/android/ex/photo/views/PhotoView.java

Change-Id: Icb06b228f0eab1f828a21507ec2fbe7ede998536
b305f499d4a2f7fe783cc11ecf68eab70a8c6d83 15-Feb-2013 Scott Kennedy <skennedy@google.com> Merge "Don't jump focus out of the View when the Activity starts" into jb-ub-mail-ur9
348c459fd722f115ffeb3d5cec5950088fa1bde8 15-Feb-2013 Scott Kennedy <skennedy@google.com> Don't jump focus out of the View when the Activity starts

In an Activity where a RecipientEditTextView has initial focus, if
you start the Activity by pressing the enter key on a keyboard (like
on a button), it would appear the onKeyUp event is handled in the new
Activity, causing this View's enter-handling logic to run.

By moving the logic into onKeyDown, we can avoid this situation.

Bug: 8013052
Change-Id: I48d3e903071954f5b73f4860ea87733c6eacd2dd
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
a90eaa29effcb64a96847ad07173032d7ca3be41 15-Feb-2013 Scott Kennedy <skennedy@google.com> Prevent the tab key from double-tabbing

Tabbing from this field results in skipping ahead two fields.
The platform (TextView#dokeyDown()) catches the tab in onKeyDown(),
and we were catching it in onKeyUp(), causing it to be handled twice.

Everything seems to work as expected with this code removed.

Change-Id: I1386b374e93c8de2a9dfb4c57804222a2ad88002
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
e032f315b6f95896ff471e92a20a42159d53fa6a 01-Feb-2013 Scott Kennedy <skennedy@google.com> Hitting enter on a physical keyboard should auto-complete

We need to treat KEYCODE_ENTER the same way as KEYCODE_DPAD_CENTER.

Bug: 8077506
Change-Id: Ib129068f851c3927bd572edb0ae0edfb6c422ceb
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
31f3038a4d5cde24c1f61653af682bd6cc033471 30-Jan-2013 Scott Kennedy <skennedy@google.com> Show contact addresses while chips load

When the "more" chip (eg +3) is expanded, we need to display the
addresses as text while we go searching for the real contacts.

Bug: 8099861
Change-Id: I5e9631f258b8d273777c65f3f5460f1aa71f10b1
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
a0856791ae8d9393bf6e4c2c809bac1a19dd837b 30-Jan-2013 Scott Kennedy <skennedy@google.com> Fix advancing to the next field when "Return" is pressed

The onEditorActionListener was not being called.

By explicitly setting EditorInfo.actionId in addition to actionLabel,
the onEditorActionListner is being called again.

Bug: 8091676
Change-Id: I349e77abe64ab8492678e1c8dda4fb70f4503a85
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
64da517d8aad0fb63644a29ff8797fc9b46839c9 15-Jan-2013 Tom Taylor <tomtaylor@google.com> Repeatable ANR when pasting text into the recipient field

Bug 7998195

Add an escape clause to an infinite loop. The bug is 100% repro.

Change-Id: If4d4409a992ce29176ac8ef544a71b3649c1e6ee
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
05a1a8479839a7feb3e765c0ce5223b7a20826ce 17-Oct-2012 jli119X <jianpingx.li@intel.com> Fix a Dead Loop issue in RecipientEditTextView

The old code logic will cause dead loop when pasting phone number
to recipient.

Change-Id: I01183680289919105dadc28ffd40c8e60dfd6b7e
Author: Jianping Li <jianpingx.li@intel.com>
Signed-off-by: Jianping Li <jianpingx.li@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 58793
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
f1673f4320c6514fa6f6d2854c1656bcf8075ab5 21-Dec-2012 mindyp <mindyp@google.com> Properly handle keyboard selection

Fixes b/7909211 Gmail compose always select the first recipient when selecting different recipient using down arrow keys of connected BT keyboard

Change-Id: Ib59045ae33e8fd6d4b7a5e2767fda356c6b6ca7a
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
bbac6435112320972b60a74d0e39273520740a39 18-Dec-2012 mindyp <mindyp@google.com> Make sure we correctly handle the " " at the end of a chip

Fixes b/7727633 After reply focusing on To field puts cursor right next to chip

Change-Id: I13e7ede4385cf96e6eb0588adaccf0f67424b0ce
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
f6679792c7bf6b4f917b65af049c4b1301e463fe 17-Dec-2012 mindyp <mindyp@google.com> am 9f662b7d: am a918fec5: Merge "Eliminate jank when the user deletes a character thereby removing all contact results in the popup." into jb-mr1.1-dev

* commit '9f662b7d0561a46a0250702385084c48efe9ca24':
Eliminate jank when the user deletes a character thereby removing all contact results in the popup.
8371daf249e72d33cf1652a8d52570fb56dd064b 17-Dec-2012 mindyp <mindyp@google.com> Eliminate jank when adding/ removing character

Change-Id: If09ad14830f5ccb490006cc342d83806057ffa34
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
09bb480c04705138b7329d425181a9869b34f8e9 17-Dec-2012 mindyp <mindyp@google.com> Eliminate jank when the user deletes a character thereby removing all contact results in the popup.

part of b/7727257] Jank when replying to or forwarding a message in gmail

Change-Id: If95716847260d802e527a4ad012ea7f8085d6930
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
e53c7a6b1fe833d400ae06ad17f4be406d1653ff 15-Dec-2012 mindyp <mindyp@google.com> Merge commit 'f54b3505' into manualmerge

Conflicts:
chips/src/com/android/ex/chips/RecipientEditTextView.java

Change-Id: I2a8d55d6db3fdb4aab6ea788b685a047dcf9ed9d
3665fb7aaf0948f694e2d28ab76e1f5e4befb45d 14-Dec-2012 mindyp <mindyp@google.com> Scroll when result of a contacts lookup appear

Fixes b/7727257 Jank when replying to or forwarding a message in gmail
Change-Id: I620fb31adcb80ca7a6a86c64c987969bc630429d
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
70d41146a39058c47eee5c505cae6a6a2c1409f9 14-Dec-2012 mindyp <mindyp@google.com> Scroll when results appear

Fixes b/7727257 Jank when replying to or forwarding a message in gmail

Change-Id: I6fbb574ac724772d541d063192a5e0e59b776360
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
0cf347e69473d2259194257d5a4b9aa103c8e448 10-Dec-2012 mindyp <mindyp@google.com> Extend reverse lookup to also check GAL

Fixes b/7499733 gal address sometimes treated as message-only address in chips

Change-Id: I3fa79a43c672b1d2eac72dae6a9dfaf8701be977
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
ab5b5b7bb592d8c7281c0bba3c5d62f9c9ad3cd4 10-Dec-2012 mindyp <mindyp@google.com> Use same default contact photo for list items and chips

Fixes b/7706601 which asset do we want to use for the default contact icon?

Change-Id: I0bd414aefb783a4a64ce0041dcd8f7f8d5911b83
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
44eb5f95c00a748e3a391f34ee27ddedd3ec9500 03-Dec-2012 mindyp <mindyp@google.com> Merge from ur8

Merges in:
Fixup delete logic

Its only a delete if the user has removed a single character,
otherwise, we are looking at replacement, probably from a reverse lookup
Ia7c7b94d9e2fb037cb19abdb6696f7df0d351856

Make sure we only use the invisible chips optimization if we are showing the "more" chip

In the case of calendar, we never shrink the field, so this optimization
can't be used
I30e3312b8e686be5143f96d3d2820e023158957d

mMaxLines was not being set correctly; dont draw hidden chips on first render pass

mMaxLines was always zero
Setting the value correctly avoids an extra layout which makes it faster
to render chips
Use an "invisible" recipient chip for anything > than max chips we can show before
showing the more chip; this avoids a lot of unnecessary drawing and decoding of 9 patches
in the first pass; once these are resolved (or the user makes them visible), they will be correctly
drawn as visible chips
Part of b/7492291 First 2 contacts takes too long to resolve into chips when there are many contacts
I37817381f93efb968940031d8a8b77fb62c8919a
Change-Id: I4cbe5eacaa6fc5d1d94a5663133da82621582824
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
5a96b360e51cd4c0fd808e6f29e4e6377718be55 03-Dec-2012 mindyp <mindyp@google.com> Fixup delete logic

Its only a delete if the user has removed a single character,
otherwise, we are looking at replacement, probably from a reverse lookup

Change-Id: Ia7c7b94d9e2fb037cb19abdb6696f7df0d351856
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
d5e65e2e3ab0407ac9b538074b0695d18c49b649 03-Dec-2012 mindyp <mindyp@google.com> Make sure we only use the invisible chips optimization if we are showing the "more" chip

In the case of calendar, we never shrink the field, so this optimization
can't be used

Change-Id: I30e3312b8e686be5143f96d3d2820e023158957d
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
0a9b6b9d977cb4a51a5920721eb3f594e35aca98 01-Dec-2012 mindyp <mindyp@google.com> mMaxLines was not being set correctly; dont draw hidden chips on first render pass

mMaxLines was always zero
Setting the value correctly avoids an extra layout which makes it faster
to render chips
Use an "invisible" recipient chip for anything > than max chips we can show before
showing the more chip; this avoids a lot of unnecessary drawing and decoding of 9 patches
in the first pass; once these are resolved (or the user makes them visible), they will be correctly
drawn as visible chips
Part of b/7492291 First 2 contacts takes too long to resolve into chips when there are many contacts

Change-Id: I37817381f93efb968940031d8a8b77fb62c8919a
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
eec98f9f7701a66f3f9f0eaceefbf5a87e218978 01-Dec-2012 mindyp <mindyp@google.com> Remove unnecessary call to tokenize

the address is already tokenized

Part of b/7492291 First 2 contacts takes too long to resolve into chips when there are many contacts

Change-Id: Ibefe1ce45ea8309e51c9cf25bf058d88ebf75ec1
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
4bfa1dafa1b7cc2ada704c4501a03eea693626f7 27-Nov-2012 mindyp <mindyp@google.com> Make sure we proplerly edit created chips.

We need to edit the created chips before the text is changed so that we
don't count the existing "," when deleting

Also, make sure to move chips that are being edited as text to the end
of the field
Fixes b/7547813 When I try to delect an email address for each charater, it blocks automatically again.

Change-Id: I60661945b75ab0f4ffbb04e71971d16e2900c26c
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
93be01ea0cb2b9871d45d0f1b13a84556b026e8d 27-Nov-2012 mindyp <mindyp@google.com> Merge in sms fixes

merges:
https://googleplex-android-review.googlesource.com/#/c/252609/1

Change-Id: I04a0ffa4feb36683f1392ec730742f5f7e10fa32
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
18bc55d173000f05b10fd547fd67522abfa95523 20-Nov-2012 Paul Westbrook <pwestbro@google.com> Merge remote-tracking branch 'goog/jb-ub-mail' into gmailmerge

Conflicts:
chips/src/com/android/ex/chips/RecipientEditTextView.java

Change-Id: I160582b77ead921df187bdcf41a1f53cd0d5e425
f5ac32862370c6dd004baa0ac838bced8794a0d8 15-Nov-2012 Tom Taylor <tomtaylor@google.com> SMS text messaging omits numbers in parentheses

Bug 7355280

Very localized fix. Tweak the phone number matching pattern to handle a
"1" before parens. This change was originally incorporated in MR1, but
wiped out by some automerger change. Bringing the change back for MR1.1.

Change-Id: Ifd11762fb7253fab69ca912dff6b62c5673bf216
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
8027ca533990240d0883163abb17a1b0231a168b 14-Nov-2012 mindyp <mindyp@google.com> Remove the unneeded call to "findtokenstart"; we already have the token start

Part of b/7492291 First 2 contacts takes too long to resolve into chips when there are many contacts
and general speed improvements
4ms faster to create a chip
Change-Id: Ib016492cf63aa87ee3ace8e6bb7988fbe0a37749
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
fbe2d2113c0d00e7f7c7197a3727bb0728d220d8 14-Nov-2012 mindyp <mindyp@google.com> Don't validate the recipient text each time

Instead, validate once.

Saves ~10ms per chip creation
Win.

Part of b/7492291 First 2 contacts takes too long to resolve into chips when there are many contacts
and general speed improvements

Change-Id: I6f3da136da23942c8bec25cee7038d475e7005e6
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
99ea997e237f6941bed7bdfbc221ad78643650c5 09-Nov-2012 mindyp <mindyp@google.com> Reduce time until first revision of a chip is drawn.

Means less time showing plain text.
replace call is expensive.

Change-Id: I1be571af78497c2dfff724b612d60ededc98ff36
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
e719fc8a822b3db583f82a6de1b8690267e14d96 09-Nov-2012 mindyp <mindyp@google.com> dont replace the text in the text field when editing a fake or generated entry

We are editing the entire text in there, and that includes the display name
and any other information...so just remove the span
This means we dont trigger a text change that triggers a scroll
Fixes b/7499873 Odd scroll when touch non-contact chips with quote text enabled

Change-Id: I0c537e7fec663abe3cec96a5b59bc52caa009a30
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
797b22f945b65ecebbf86e45265f9403f6ff257c 07-Nov-2012 mindyp <mindyp@google.com> Merge changes to chips from unbundled branch: update behavior to match new ux spec

Fixes part of b/7481045 recipient address briefly drawn w/o friendly name

Change-Id: I523b960fd044f054ec32befc10599d4d0e485eaf
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
bc8820f28fae94349e41ad09e166b0537ddd1377 07-Nov-2012 mindyp <mindyp@google.com> Make sure that we take the existng temporary contact, where available.

Temporary contact entry will give us display name and address if it has it
when there is no contact match

Fixes part of b/7481045 recipient address briefly drawn w/o friendly name

Change-Id: Id5cf6b770d1179c81d9c9b808af4681e632d18a7
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
dab17fcff4efe640287a8cce7f82bd305e2c1fcf 07-Nov-2012 mindyp <mindyp@google.com> Make sure that the last "fake entry" chip is correctly committed

Fix logic to correctly determine that this "recipient chip" is really
text

Fixes part of b/7481045 recipient address briefly drawn w/o friendly name

Change-Id: I4c5244581a4fce5de58d6d9c510e1df16674c338
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
d5f7739013e4e4e392bcfca04c0cf1ed07c04819 06-Nov-2012 mindyp <mindyp@google.com> Update chips to follow new ux spec for replacement

Part of b/7481045 recipient address briefly drawn w/o friendly name

Change-Id: I2f3c63f555143c66b3d4f466b60e0ca884d6302b
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
06208d075bdc260410847806300fd5fcd8c43b49 06-Nov-2012 mindyp <mindyp@google.com> cherrypick: Reset maxlines when the user expands text

To avoid an initial jump when changing over a possibly large numbers of contacts to chips,
start with maxlines of 2 from some apps, and eliminate this when the user chooses to expand.

Part of b/7481045 recipient address briefly drawn w/o friendly name

Change-Id: I5c8cd5c1569befa28a67ddb1f4153e03e896c25a
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
c270a161307eeeee3aac5f5ef91424fbe25ce1e9 06-Nov-2012 mindyp <mindyp@google.com> Reset maxlines when the user expands text

To avoid an initial jump when changing over a possibly large numbers of contacts to chips,
start with maxlines of 2 from some apps, and eliminate this when the user chooses to expand.

Part of b/7481045 recipient address briefly drawn w/o friendly name

Change-Id: I5c8cd5c1569befa28a67ddb1f4153e03e896c25a
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
b32dd40aaa11a850f2ed273dd55bf25cea5d7b9d 16-Oct-2012 Tom Taylor <tomtaylor@google.com> SMS text messaging omits numbers in parentheses

Bug 7355280

Very localized fix. Tweak the phone number matching pattern to handle a
"1" before parens.

Change-Id: I67d878145fbc0b0ac17197043ea84f68e52b8156
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
c16fb2a3bcc168fb69a92f43aebf6cfa4bf3a007 03-Oct-2012 mindyp <mindyp@google.com> cherrypick: Make sure we check the most up to date text for the token offsets.

The issue here was that we were using the old version of the editable string
(cached in var text) to look for the start/end of tokens, but the result
of calling commitChip may have updated the text (added corrective rfc822
formatting, or a display name)

Fixes b/7268603 [Manta] List of email addresses pasted into the To field is broken

Change-Id: Iccc8dbf78a018c84fd818582d10ff2b02a787276
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
17c922958f2a9bad8b22675e7daf9b40bf6ef2ce 03-Oct-2012 mindyp <mindyp@google.com> Make sure we check the most up to date text for the token offsets.

The issue here was that we were using the old version of the editable string
(cached in var text) to look for the start/end of tokens, but the result
of calling commitChip may have updated the text (added corrective rfc822
formatting, or a display name)

Fixes b/7268603 [Manta] List of email addresses pasted into the To field is broken

Change-Id: Iccc8dbf78a018c84fd818582d10ff2b02a787276
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
afca3691912c1986f4ef2dae3c2187340c1c19c1 01-Oct-2012 mindyp <mindyp@google.com> Add comments to the recipientedittextview replace code.

makes it easier for others to debug/ review

Change-Id: Icdcbaa9074c81ef33943b24e8e0b544513360d8a
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
0c6fe7e60e7550e56ad1982d0d5833b64eea6f97 29-Sep-2012 mindyp <mindyp@google.com> cherrypick: Fix crashes associated with new logic to replace entire address with name + address

Fixes b/7257614 crash when replying to a message

Change-Id: I6dcda376073f941fba4b09a647bdb00a92e4ccce
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
d5f17a870bd131c4c1a8e4731671a6980b6bcbf6 29-Sep-2012 mindyp <mindyp@google.com> Fix crashes associated with new logic to replace entire address with name + address

Fixes b/7257614 crash when replying to a message

Change-Id: I6dcda376073f941fba4b09a647bdb00a92e4ccce
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
3817205ea94886f05f026b25c61e30288dd3fb8b 26-Sep-2012 mindyp <mindyp@google.com> am 215b1c80: The "original text" is just what we are putting in the text view, which is displaytext

* commit '215b1c80111ccc8d42256fa8f38f3d00e0171cf2':
The "original text" is just what we are putting in the text view, which is displaytext
215b1c80111ccc8d42256fa8f38f3d00e0171cf2 26-Sep-2012 mindyp <mindyp@google.com> The "original text" is just what we are putting in the text view, which is displaytext

Fixes b/7233276 Crash at clicking Email - ReplyAll on Manta

Change-Id: Icd5e2c0c2afb625a6b181592b2da27a008266a33
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
65a0f02472df7c28f356822993142f6fff3eacc4 24-Sep-2012 mindyp <mindyp@google.com> am b6641931: Make sure when we reverse lookup a recipient, we replace the underlying text string as well.

* commit 'b6641931653e19766025820fb78c7142e597545e':
Make sure when we reverse lookup a recipient, we replace the underlying text string as well.
b6641931653e19766025820fb78c7142e597545e 24-Sep-2012 mindyp <mindyp@google.com> Make sure when we reverse lookup a recipient, we replace the underlying text string as well.

Fixes b/7146034 Conversation message header doesn't show friendly names

Change-Id: I043d352e1c6546e5a8c07854e832f31c3a71d24d
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
7ef1f6e93f3a8267dcfc32d0ab48e57498f9dc3b 11-Sep-2012 mindyp <mindyp@google.com> am 6c668476: We add the separator ourselves later if it wasnt specified in append.

* commit '6c66847624945b3caca9607c61669f4766e7f39e':
We add the separator ourselves later if it wasnt specified in append.
6c66847624945b3caca9607c61669f4766e7f39e 11-Sep-2012 mindyp <mindyp@google.com> We add the separator ourselves later if it wasnt specified in append.

Fixes b/7137725 Attendees are lost after editing

Change-Id: I48cecde9e5e2e9e8648393c8b71e6911cd1cbc9f
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
168c284055805f84a054f8a52c60ef2cb37a6dae 10-Sep-2012 mindyp <mindyp@google.com> am 3aa118e7: Be extra careful with commas in recipient chips

* commit '3aa118e72c877b4c176d025c56bfad2e518bf1ce':
Be extra careful with commas in recipient chips
3aa118e72c877b4c176d025c56bfad2e518bf1ce 10-Sep-2012 mindyp <mindyp@google.com> Be extra careful with commas in recipient chips

Fixes b/7132543 email addresses not recognized when using Gmail ICS

I added 2 in a row to be extra certain, and always check for the
LAST instance of ","

Change-Id: Id963971303a99642865a79c6264264e62a920151
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
feffe9dd89757533ade5926afc284f9369c8a9c4 27-Aug-2012 mindyp <mindyp@google.com> am 26e3f68a: Deal with commas within quoted text

* commit '26e3f68ae8342cedd57353e399e7d0e920228a4e':
Deal with commas within quoted text
26e3f68ae8342cedd57353e399e7d0e920228a4e 27-Aug-2012 mindyp <mindyp@google.com> Deal with commas within quoted text

If there is a comma within quoted text, it is NOT a chip ending token

Fixes b/7001805 Names appended to email ids like "Mathew, Deepthi E" are split into two chips while replying

Change-Id: I87f34a44282b3baf8d106dd21f8211ad301395be
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
a9721f38340e84806b8ffae28b858b689892f7c0 16-Jul-2012 Mindy Pereira <mindyp@google.com> Merge change from jb-dev to master

This is the change that fixes the random scrolling when switching
between reply/reply all

Merge of: https://android-git.corp.google.com/g/#/c/203483/1

Change-Id: I6b11016b4f48b297a2c6c40413cf6d6a52a193b4
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
23d6f4d56d905d5377f6ceff4f2c0747343cf667 28-Jun-2012 Mindy Pereira <mindyp@google.com> am 1a71f76d: Check for null adapter.

* commit '1a71f76db0880a572b1443e8a0ac31a4bb584a8b':
Check for null adapter.
1a71f76db0880a572b1443e8a0ac31a4bb584a8b 28-Jun-2012 Mindy Pereira <mindyp@google.com> Check for null adapter.

If its not set, that would cause this crash in the monkey.

Fixes b/6746348 java.lang.NullPointerException at com.android.ex.chips.RecipientEditTextView.isPhoneQuery(RecipientEditTextView.java:2574)

Change-Id: I420bbae15180d0d53c674b00907bc361a519c165
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
ea9eeb8781cf1494cb17b2839a1d43e19e813e14 25-Jun-2012 Tom Taylor <tomtaylor@google.com> Area code truncated for the phone number in messaging app

Bug 6717762

When launching mms from the contacts app, numbers sometimes get munged,
either by losing the area code (if in parens) or losing the number
completely and just ending up with a contact name.
Parse all the parts of a contact "fred flinstone <512-123-1231>" looking
for the phone number. Also handle the case where the area code is lost when
in parens (i.e. (800) 891-8923).

Change-Id: I76976fa8004c1d7c03a651b3915537245fee16e4
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
ba14c7b002c0ef9357bcaea64b5c5255183b1b52 25-Jun-2012 Mindy Pereira <mindyp@google.com> Don't scroll when we are clearing text.

Only scroll when the user adds text.

Fixes b/6696682 Compose email field is out of view after changing from Reply to Reply all for a message

Change-Id: I188f9be0b4993edab282256d647501b6734242f7
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
87a5af3ed31a18c66aa62154e66e3d841dc02a27 05-Jun-2012 Mindy Pereira <mindyp@google.com> Break out of infinite loop once we detect an error.

Fixes b/6606808 Crash in Gmail {OutOfMemoryError- at android.graphics.Bitmap.nativeCreate(Native Method) }

Change-Id: Ic62c15bd59060f552aef5be0cc06e26b56efd462
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
3a36cf75590c4c4c134bbdd0688b33250af5a607 24-May-2012 Mindy Pereira <mindyp@google.com> Merge "Dont hide the keyboard when showing alternates/ selecting a chip." into jb-dev
c75bea26b81d1075fac128188a594aa511d94d9b 24-May-2012 Mindy Pereira <mindyp@google.com> Dont hide the keyboard when showing alternates/ selecting a chip.

Fixes b/5557044 Chips replace-email-window shouldn't close the keyboard

Change-Id: I93829983346de77ee79dd602ae84152d262ce01d
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
932ec21b60a7829e0535b105172045daaed3278e 24-May-2012 Mindy Pereira <mindyp@google.com> Merge "Null check; back behavior" into jb-dev
441b417f05bf807429281e6ad7cd43c9bdba87a6 24-May-2012 Mindy Pereira <mindyp@google.com> Null check; back behavior

Since its possible there was no chip formed for an address, it is
possible there is no address in some part of the inAddresses array, so
build it up as an arraylist so we don't have null spots.

Fixes b/6555471 NPE in com.android.ex.chips.RecipientAlternatesAdapter.getMatchingRecipients

Fixes b/6556107 when contact chip is selected back button should dismiss the popup and unselct the chip
Change-Id: If74b13ccc5f51aafc3638817b5fbef54cd57548c
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
9c5e04038d482571b9373a118c9dfc50e4e18505 24-May-2012 Mindy Pereira <mindyp@google.com> Fix offset of alternates list dropdown.

Fixes b/6546711 Chips suggestion is below selected chip

Change-Id: I14821855b510b30e8eb4798eb4cc4a9c69f4dca9
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
291e619b2b2ced9abe53fc97613f5707319325bb 23-May-2012 Mindy Pereira <mindyp@google.com> Try this out with experimenters to see if the scrolling is reasonable.

It seems that what annoyed arubin was that focusing the item changed the scroll
position
So I am now just changing it when the user actually starts entering text

Change-Id: I8868cde2fc90b1e253c50fd3fad900f811442e6d
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
1896ac000251e74f4939421d3d4d28b69717c52a 09-May-2012 Mindy Pereira <mindyp@google.com> Change text on "done" to say "return"

Fixes b/6468243 While adding chips to the To field display label "Return" instead of "Done"

Change-Id: I42f9a845c553f0aa01971c5b3221ce5d0504c810
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
ab2c50697fd2ff580c308984b8f313536ff83b30 04-May-2012 Tom Taylor <tomtaylor@google.com> Contact added to the "To" field of the Messaging app is not getting deleted

Bug 6435466

If you have a chip representing a phone number with the area code in parens
with a space (i.e.: "(425) 234-4322"), the chip would get committed when
the user was deleting chars and hit the space char. Ignore the special
email handling code for this case when in phone number mode.

Change-Id: I998e273a88b9f30b651dedb41a39b7d37794be97
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
577223c7c81bd5fe0c00a1b8eeeecd50f61369a8 04-May-2012 Tom Taylor <tomtaylor@google.com> Don't autoselect first item in dropdown

Bug 6434183

When in phone mode and the user types something that happens to bring up
the dropdown, don't auto-select the first item if they don't choose
something. This was preventing users from entering numbers and shortcuts
that happened to be close matches to existing contacts. Unless the user
selects an item, keep what they manually entered. The change looks much
bigger than is really is. The only real change is in commitChip. The rest
of the changes are to call a helper function, rather than duplicating the
same code throughout the file.

Change-Id: Ia0ec24a3667770fa5d43ff870ed87019b732627e
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
c0fe38a3774aac16645530ce854d3f22fa3b79f1 02-May-2012 Mindy Pereira <mindyp@google.com> Merge "Recycle styleable attributes after use." into jb-dev
f1c61197ef28085c8c848cfebd8824231004d581 02-May-2012 Mindy Pereira <mindyp@google.com> Recycle styleable attributes after use.

Change-Id: I43319c0a36d45e8afa90ae1871ff17cbc6ecf961
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
e41d39ea07455834b402f35a84a2fbb8bf5888c7 30-Apr-2012 Mindy Pereira <mindyp@google.com> Merge "Vertically center text in chips." into jb-dev
c791a39d4041f0e7513c93660d6cc94fdf43e6dd 27-Apr-2012 Mindy Pereira <mindyp@google.com> Vertically center text in chips.

Was kind of off.
Fixes b/6370062 Text spacing in the error case chip should be centered

Change-Id: I4ac88f5bf2f7b61008728cec92abb3da9e5ee1be
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
7ccedccdc10a58d94d2d4895c9637a5b77cf0427 27-Apr-2012 Mindy Pereira <mindyp@google.com> Merge "Use ime actions to commit when the user presses enter." into jb-dev
824aef7306c6a2e07e6157c25efe925f048597ed 27-Apr-2012 Mindy Pereira <mindyp@google.com> Use ime actions to commit when the user presses enter.

TODO: is the enter key saying "done" ok?

Fixes b/6370021 Pressing return after entering address results in text not becoming chip, leaves text

Change-Id: I2d054335fdc0bd175d12a31dcab15f2ad956e9ec
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
9fe03f325deaf514a07bafe4a4d10fe1a8c5cd8a 27-Apr-2012 Tom Taylor <tomtaylor@google.com> Merge "Fix an crash if you pass a SpannableString" into jb-dev
5e05ba80bdb12dfb5f40f202f57c55f5b68a311a 27-Apr-2012 Tom Taylor <tomtaylor@google.com> Fix an crash if you pass a SpannableString

If a derived class passes a SpannableString to append, the code will
crash with an invalid cast. Simple fix.

Change-Id: I28f33b4eadabb8fce1ddba8cc1ece20b1d919764
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
f82e176c81d15a4b33ed4918b6dd76e1e84fd8ef 27-Apr-2012 Mindy Pereira <mindyp@google.com> Dont commit by commit char if we cant tokenize.

Fixes b/6386831 Crash in Gmail on editing the To field after capturing a bugreport
fixes b/6394257 com.google.android.email: java.lang.NullPointerExceptionat com.android.ex.chips.RecipientEditTextView.commitDefault(RecipientEditTextView.java:1024)
Change-Id: I2c5fdde54d8b36cab05b88f6506d58a884ae0bf2
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
c3af1324ab95cd3a02557b3ed82102f6be80d6ed 25-Apr-2012 Mindy Pereira <mindyp@google.com> Fix alternates.

Change-Id: I2cd2a2f50696e3059d1b579e10eda5d6ad1fe50b
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
a0f2aab8f22b6f334938579cd6f336cfb338a554 25-Apr-2012 Mindy Pereira <mindyp@google.com> Check span before deleting.

Fixes b/6389344 gmail on JRN19F dies when I try to edit the To Email address in a bugreport

Change-Id: I84e7a01d2f443a08ae7708c87fb8ab9fdaa20e77
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
82c1c753695a3bfb8928ec1a3e11d9910b5f13fa 17-Apr-2012 Tom Taylor <tomtaylor@google.com> Better support for phone numbers in Chips

Bug 6332661, 6321866

When in phone number phone, Chips needs to recognize numbers and not try
to parse the numbers as Rfc822Tokens.

Change-Id: Ib96ad310fae195776746e14e6e9ee57a85198d1a
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
75f1f6994f77a6538c71df720aa2250fe71fed4b 06-Apr-2012 Tom Taylor <tomtaylor@google.com> Support phone numbers in Chips UI

Bug 5066294

Add Zak's work for supporting phone numbers in the Chips UI. The default
remains email-centric, but the phone number option works great for
apps like Messaging.

Change-Id: I17cd8460f1b96f28ced8bbb32e145581dae6d807
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
2b34f22154da3a0c0df951d65c3250a1b11e1ed1 23-Feb-2012 Mindy Pereira <mindyp@google.com> am e67e5aab: am 06b38bf7: am 665ba9e4: Don\'t adjust scroll on focus changes.

* commit 'e67e5aabd555f3862d8f8e640582d63a6f46357d':
Don't adjust scroll on focus changes.
665ba9e4ef5a8af30cffe6df6baee7e311dd0e65 21-Feb-2012 Mindy Pereira <mindyp@google.com> Don't adjust scroll on focus changes.

Fixes b/6037251 Switching input fields causes line loss
Since the ime suggestions area may also be going up/ down
we can't really trust offset measurements. Adamp says
this should be addressed in the j timeframe.
Change-Id: I5f5eeb33e0fd9397873451cb1d1325deb451542d
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
a7ae9beadd2ae677d028edbadf55b02220cb3fb6 17-Feb-2012 Mindy Pereira <mindyp@google.com> Make sure we don't run off the end when deleting chips.

Fixes b/5997197 Gmail crash when trying to delete the address chip [IOBE at android.text.SpannableStringBuilder.checkRange]

Change-Id: I931da8017a92f145c13f36c765613f16fecf97ab
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
eb83a7dfc716851d1dc0cc160191cdda8f064e35 06-Feb-2012 Mindy Pereira <mindyp@google.com> Since the delete key can't be guaranteed, use text changed listeners.

Per IME team, the delete key isn't/ was never guaranteed to be sent.
Therefore, I cannot depend on the QwertyKeyListener
Therefore, I am working around them

Change-Id: I2dea39beee22f7c181be2b33b7be66a388f42262
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
bf342b7d5efcc3284f2b790b0ccd9defc1ddb7e2 04-Feb-2012 Mindy Pereira <mindyp@google.com> Need to set the resource for the dialog.

Fixes b/5965686 hc/ics unbundled gmail: long press on contact chip causes crash

Change-Id: I186a0a1e84a29f48060a3f855a08017f41b93463
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
d086b83ffa568b592ee6f20445ad3f8d50ab834a 11-Jan-2012 Mindy Pereira <mindyp@google.com> Make chips less fragile for testing purposes.

There might not be a tokenizer.

Change-Id: I356b1e901742f86dca0822720ee0cb7dfb7a31fb
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
a8065d50c1a9561375661d5eb32db2fd23750bc9 10-Jan-2012 Mindy Pereira <mindyp@google.com> DO NOT MERGE. Dont sanitize before/ after/ between chips while waiting to create pending chips.

fixes b/5848985 if you try to add a new recipient before other chips have resolved, the existing recipients get erased
Change-Id: Ic1bdb5f6632158e19d38c35ffc527dabbf55dd36
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
2302f672de1b8e7c205412397b0b79514f5426c3 10-Jan-2012 Mindy Pereira <mindyp@google.com> Dont sanitize before/ after/ between chips while waiting to create pending chips.

fixes b/5848985 if you try to add a new recipient before other chips have resolved, the existing recipients get erased
Change-Id: Ic1bdb5f6632158e19d38c35ffc527dabbf55dd36
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
407f669c2d2108e6732c41b53f5d12355c92bb49 16-Dec-2011 Mindy Pereira <mindyp@google.com> Make attributes related to chip backgrounds styleable.

Change-Id: I8d4f944e91e12f2a0779ac863c1862110dffb832
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
3da5aa0ceb8e870d43fa6747330064d6ddf4775e 16-Dec-2011 Mindy Pereira <mindyp@google.com> Add styleable attributes to chips. This first one is a test.

We will need this in order to be able to support both dark and
light themes for chips fields. If nothing is specified, just falls
back to the default background.

Change-Id: Ibc0e5391969bfee1615b14bafe83f065d81c6331
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
a11c2b0e1ea043aa4d8745285f2dcbe20448b417 15-Dec-2011 Mindy Pereira <mindyp@google.com> Update build file to allow us to have resources in static libs.

Depends on: Change Ifb4d2300: Support to build static Java library with Android resource

Change-Id: Ie1ac8c93cb3f12a7d4e9afd873a13607ed72b932
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
07a230a45345b16793463e32194f820eafa2a626 13-Dec-2011 Mindy Pereira <mindyp@google.com> If there is no tokenizer, don't bother shrinking.

Unlikely case, but found it while creating a new app.

Change-Id: I15e37791530044c990e3e1d6b36348fe85258df1
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
039c9266e72538fd40d382de56807408385fc3da 07-Dec-2011 Mindy Pereira <mindyp@google.com> Make sure there is a recipient to replace before adding an entry for it.

Its possible if the chip is moved between fields that there was no original
recipient to replace.

Fixes b/5720810 Crash on drag & drop recipient to cc & bcc fields

Change-Id: Ide0a498fb63886a9afc2522649442d6ce62ed98c
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
ec35d9975b61c84cda7081ebfce9e017229fb3d5 17-Nov-2011 Mindy Pereira <mindyp@google.com> Verify that the start of the delete sequence is before the end.

Fixes b/5541436 java.lang.IndexOutOfBoundsException: replace (23 ... 0) has end before start

Change-Id: Ic39d41d53fe59e4c19fc9b2d4af265791b165986
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
4ef6086da2f4bcac5a6cba773f828734a399a879 16-Nov-2011 Mindy Pereira <mindyp@google.com> Make sure we correctly identify an edit vs a commit

Fixes b/5615358 At the end of the recipient's email address, some additional texts (ex. j@gmail.com or just @gmail.com) were randomly added

Change-Id: Ie40012ee91f8a570ce6952364c70237078a2d759
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
8faa56ff909edb20154219f8d2ba6feecf1b5238 02-Nov-2011 Mindy Pereira <mindyp@google.com> If message starts with > 50 chips, dont chipify anything.

Also added test cases for new plain text version when there are too many
recips.
fixes b/5556474 Gmail ANR when replyi-all to a msg with many recipients

Change-Id: I69ba560bf8d8112b81a582aee17a07bf3da1aa65
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
920c95167574395b1ff9ecc16e41e13853269bbc 01-Nov-2011 Mindy Pereira <mindyp@google.com> Protect against negative offsets when calling replace.

Only seems to happen via the monkey.

Fixes bug:5541885 java.lang.ArrayIndexOutOfBoundsException: length=122; index=-5

Change-Id: Iba684c53982f5363990947d2b5b9d7544c952d85
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
6fe9af5b1cc380243f0fad9354ab7bd41ac2983b 21-Oct-2011 Mindy Pereira <mindyp@google.com> Protect against monkey crash.

Fixes bug:5486900 java.lang.ArrayIndexOutOfBoundsException: length=122; index=-3

Change-Id: I2daa941670276d5d65d8d7f14a4d07789aae3a87
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
253c9e347c5ca122ec6a668c3ac7a3d4dcdf1cf1 17-Oct-2011 Mindy Pereira <mindyp@google.com> Merge "Make sure we shrink available width by the width of the space character."
e73c4ce189c70e7f9f4d44b26fce458e3385988a 15-Oct-2011 Mindy Pereira <mindyp@google.com> Make sure we shrink available width by the width of the space character.

Change-Id: I2dccaf1252f36bb73769d57b7ba19e72ef4e5f8a
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
3e9631982511d9692e4bc0dbd724240fae91cf1f 12-Oct-2011 Minh Pham <phamm@google.com> Experiment drag and drop for contact chip

- Make RecipientEditTextView start drag mode on long press
- Make RecipientEditTextView handle drag event
- Enable via a public setter

Change-Id: Iccfb099078d7be12bdf473a3ff607ac5267f4256
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
1e12ddb8232423b09b8df6c59f2e65189a0eea0a 14-Oct-2011 Mindy Pereira <mindyp@google.com> Make sure we perform reverse lookup on pasted recips

Change-Id: Iff0d8670962f279e4fa3158a1acc3395f9e9ddc9
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
00be4ce28569ae7d1871a2f95453b0e6a6a47852 14-Oct-2011 Mindy Pereira <mindyp@google.com> General cleanup of the chips view.

1) remove extra code
2) make sure we use convenience methods where possible
3) always make sure that we use sorted recipient chips when looking
for the position of a chip
4) test the convenience methods
5) rempove unused code
6) make methods package private that don't have to be public
Change-Id: I586eac795a548456ec29bd384abd2e7611a24a03
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
49ce9866ae314b3513e17008f107ceded23f9cf0 12-Oct-2011 Mindy Pereira <mindyp@google.com> Update pasting to handle more cases.

Fixes bug:5026774 pasting in email addresses changes

Change-Id: Id16e7470eb10a998fdb5efde06cb4449bb9d49e7
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
2e157c2b6e02a8648a87aa33163ecb89a641c2b0 12-Oct-2011 Mindy Pereira <mindyp@google.com> Use settext to instead of clearing.

will cherrypick this to mr0.

Fixes bug:5444923 Gmail crash when replying

Change-Id: Ie43f10959a72ea471122811761ea4446e93aa5a4
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
7de942db0527a19e8291fed5c399128177660c1e 05-Oct-2011 Mindy Pereira <mindyp@google.com> Avoid unnecessary clearing of text.

Clearing the text sent an extra text changed event that enabled auto
saving when it wasn't necessary. Clearing the spans and replacing the text
works just as well.
Second part of fix for bug:5420705 Gmail saves empty draft when triggered from Contacts

Change-Id: Icdca5be1ca0cdfd8cbf926baacec54e757480d89
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
a1ecf3cc31e72b56d51690ae6524e8a26e9dd358 05-Oct-2011 Mindy Pereira <mindyp@google.com> Fix case where we may have an empty string.

Fixes b/5416986 RTE found in Android Problem Reports

Change-Id: I498bdff301ea3b3aa61e90e4d5c370abde4d1e43
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
8893cb7ccc0d3de108b6b42effe9ece565f0cc0c 03-Oct-2011 Mindy Pereira <mindyp@google.com> Merge "Protect against negative offsets for a chip."
7741b6a691077734661bf01101f7d747b863a80f 03-Oct-2011 Mindy Pereira <mindyp@google.com> Merge "Close selected chip on rotation."
71fa24bfb96744cf28d368d58172c14638e14693 03-Oct-2011 Mindy Pereira <mindyp@google.com> Protect against negative offsets for a chip.

Fixes b/5397113 java.lang.ArrayIndexOutOfBoundsException: length=506; index=-2

Change-Id: Ib0e4cd18016701f45a5abcb9cf95431f478f07d8
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
7c61ef07ed148922a0b71c4e8ebb741cff2c5ae7 03-Oct-2011 Mindy Pereira <mindyp@google.com> Close selected chip on rotation.

Fixes bug:5387848 Email selection box is wrongly pointed after changing orientation

Change-Id: I16b781455de842e10197f15d13ab1be1d334264e
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
b3e42aaf97e476719cede047394718fd001fd79b 03-Oct-2011 Mindy Pereira <mindyp@google.com> Revert "Make the space part of the replacement image span."

This reverts commit a1d52e9203ea3cdfc0d1c69a8a4f99445fdd5ca1
Also reverts later change:
https://android-git.corp.google.com/g/#/c/138160/3
That was made to remove code that took into account having a space not
covered by the span character.
Fixes tests cases to respect the space character again.
Change-Id: I96d52a5df4d01e757f72949cbcf3b1f582679a46
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
ae7e41106f289f2668c54fff6c457c6fc91ab4a9 27-Sep-2011 Mindy Pereira <mindyp@google.com> Add more tests.

Tests verifying where a chip is position, removing a chip,
and creating a chip.

Change-Id: I2e9c6719a6efc365ab73c4d3c32bb29209b73e48
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
53958d6d0ba2a0765fd3d272295b81c6d89a68d8 26-Sep-2011 Mindy Pereira <mindyp@google.com> Remeasure chips created from saved instance state after we have the field width.

Fixes bug:5367531 Recipient with very long name duplicated while composing a mail on changing orientation

Change-Id: Id14d74d028aa203dfb061b32438eccc5abb949a0
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
a1d52e9203ea3cdfc0d1c69a8a4f99445fdd5ca1 23-Sep-2011 Mindy Pereira <mindyp@google.com> Make the space part of the replacement image span.

This eliminates the need for manually adding extra spaces at the end.
This also fixes bug:5323325 Chips sometimes have no spacing between them on deleting
since now the space is ALWAYS deleted when the chip is deleted.

Change-Id: I8923940a070bcc1ce6894af3efa1449e98aa4830
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
8a518e93aef58d5ced2d0223a5fd89b996930e26 22-Sep-2011 Mindy Pereira <mindyp@google.com> Fix reported crash.

Make sure we dont look for a char when there is nothing.

Change-Id: I70536ac57541ad9b7c0ae824c4b61dc0a57febac
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
a3806ce9e97ef635dc6d4495f9664b690de74960 22-Sep-2011 Mindy Pereira <mindyp@google.com> Protect against focus lost before drawing/uesrs already tokenized.

Fixes bug:5339625 odd behavior on orientation change in the "to field"

Also, added more test cases around adding/ removing more chip.
Change-Id: I1b24526b5be82835b5ec7c0345b7d73a31169a8f
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
a63e3fa13ddf1370125b7b005775c538ec22b83a 21-Sep-2011 Mindy Pereira <mindyp@google.com> More tests for sanitizing text between chips.

This specifically tests sanitizing content that is before
a chip when there is only 1 chip around.
Also, makes sure we don't look for a chip that isn't
attached (startLooking or end < 0)
Change-Id: I2591f29490a53c23527bbee487f1446b18c3f161
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
4031c89f46edea42c64e183e46d49484f1f203c0 20-Sep-2011 Mindy Pereira <mindyp@google.com> Add test cases for creating display tex and sanitzing spans.

Also, fixed a case we didn't catch where if the span start
was -1, we would crash.
Change-Id: Ia7d70dee117632ef2064c1f592fdc09694014846
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
c7afc9841ee6dd3bc5e19ee7269fecd466a8c6e9 20-Sep-2011 Mindy Pereira <mindyp@google.com> Fix crash in calendar.

Protect against walking off the end.
Fixes bug:5347150 Calendar crash on selecting guest suggestion after changing device orientation (java.lang.IndexOutOfBoundsException: charAt: 52 >= length 52) in IRK82

Change-Id: I6216a770175adac34416dfabda202ac9846c95ac
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
c10739cc694a0248b6187de2d7b9e8d2298bf0d3 20-Sep-2011 Mindy Pereira <mindyp@google.com> Fix monkey crash related to empty recips array/ bad tokenization.

Fixes bug:5343254 java.lang.ArrayIndexOutOfBoundsException: length=0; index=-1 at com.android.ex.chips.RecipientEditTextView.removeMoreChip(RecipientEditTextView.java:1408)
Fixes bug:5345831 ArrayIndexOutOfBoundsException in RecipientEditTextView.createDisplayText
Change-Id: Ie487c23dc54449d53f68d73c33e18cb946ec4284
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
f6b6b0a26cdebf436dbee3eb4a7118081db7b4cc 20-Sep-2011 Mindy Pereira <mindyp@google.com> Sanitize content after committing a new chip.

Fixes bug:5332719 check special characters in the chips implementation

- User goes to To field
- types , or ;
- adds another chip
Remove , or ; in between

Similarly
- User adds a chip using the return key
- Explicitly adds a , or ;
- Adds another chip
Remove the , or ; in between

-User add , or ; and moves to another field using return
- Keep the , or ;
When the user adds a new chip sanitize and remove them

Change-Id: I00b28f913230b7a60399e27a327a2152dd29e631
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
a590df861d7a42cd2889ee96d0b9e51b47d28755 20-Sep-2011 Mindy Pereira <mindyp@google.com> Catch a couple of interesting/ odd cases for creating display text.

1) User Name <User Name <username@username.com>>
2) User Name,Jr <user@username.com>

Change-Id: Ic148def8d3dd630af3fc5765958d59a682e1accd
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
262d3542612f3e40cd76c488f66b13ad1d617aaf 19-Sep-2011 Mindy Pereira <mindyp@google.com> Merge "Make chips keep the user friendly information around."
8659fc7fa4a245c962f8bc29b351acc56d02dfaa 19-Sep-2011 Mindy Pereira <mindyp@google.com> Make chips keep the user friendly information around.

Fixes bug:5339963 chips not maintaining user friendly labels

Change-Id: Ie6e29887882081f56e40ff4845363d6538c814d4
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
22b680b63446e2b50f0f5e7d5307c7198387cebf 17-Sep-2011 Mindy Pereira <mindyp@google.com> Make sure we get the correct more chip on orientation changes.

Fixes bug:5334556 Turning device orientation to landscape is deleting recipient from compose mail.

Change-Id: I5b96c7288ef84bc9585d8a553106bdc044c55b61
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
a9c5969299cf942278391a569bb6fdd1c4a8bb6b 16-Sep-2011 Mindy Pereira <mindyp@google.com> Handle special characters correctly.

Part of fix for bug:5332719 check special characters in the chips implementation

Change-Id: If525159ea03064805d01a4a793234a530a4155a7
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
3b646f13eb127b26d45ead7f819b943b2b01ce91 16-Sep-2011 Mindy Pereira <mindyp@google.com> Don't allow ppl to accidentally create empty chips

Fixes bug:5318460 com.google.android.gm: java.lang.IndexOutOfBoundsException: setSpan (33 ... 31) has end before start at android.text.SpannableStringInternal.checkRange(SpannableStringInternal.java:341)
As a user reproduced it
not sure if it fixes the monkey crash, but probably does

Change-Id: Ibed7e4f806f9f290c39d1c4834d8d67a8ccd179f
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
5ac77e6db71c0bc45bcc40cc5cb721333dcb5857 15-Sep-2011 Mindy Pereira <mindyp@google.com> Check for null chip text before committing chip.

Fixes bug:5324605 java.lang.NullPointerException at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:420)

Change-Id: Iabe38276c4a7f8e206745ad4944a783462e067f7
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
5753143e03a6b8a61b2ffd6cbb04f1d54f406956 14-Sep-2011 Mindy Pereira <mindyp@google.com> Handle the case where a user is editing an invalid contact chip correctly.

We now treat an invalid contact chip (ie just text the user is editing
that was a chip) as being a selected chip. Make sure we handle the
edit cases for this correctly.

Fixes bug:5288176 Email address not distinguished in Email application

Change-Id: Ia9d3803f22d6d2f92cf280fc65b9d95b1a21c713
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
39f40bde5f9af410126c64d29c045fe8bf03c1bb 13-Sep-2011 Mindy Pereira <mindyp@google.com> Protect against editing a chip that is no longer spanning text in the field.

Result of a moneky crash. No idea how a person could repro this, but the
protection step is easy.

Fixes bug:5278667 com.google.android.calendar: java.lang.ArrayIndexOutOfBoundsException: length=2; index=-1 at android.text.MeasuredText.setPara(MeasuredText.java:113)

Change-Id: I3bf35b94dfd474d5d6604799b848b5817f747a4c
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
f9b3dcb83c869528b7679a5b181f936aa8fbecdd 12-Sep-2011 Mindy Pereira <mindyp@google.com> Make photo and delete icons fit within the chip background.

Fixes bug:5289589 Chip thumbnail image should not extend outside the chip

Change-Id: I8191c52a531b47e45073a9a08b879051ec10af37
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
e0d95425cbadd7aaff5f8fdbb30ac40cb22c0aa4 10-Sep-2011 Mindy Pereira <mindyp@google.com> Dont allow this to scroll when a chip gets selected.

The way we accomplish this is by setting the field to disabled
when a chip is selected so the IME does not pop up and change
the position of the field.

Fixes bug:5277127 No way to remove a recipient from a long list of recipients using chip UI

Change-Id: Id0783ddb159c98daeb1738d10a0660dd03819649
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
64077e9710ac8e8df1b7c9828ea985cccb3d8446 09-Sep-2011 Mindy Pereira <mindyp@google.com> Update logic to look for the correct token if there are multiple entries.

This was mistaken for a bug with paste but the actual issue is:
1) enter a recipient
2) enter a few more other recipients
3) enter recipient from step 1 again
4) remove focus to create "more chip"
5) focus: we were not getting the correct recipient position from step
4; we were getting the first instance which was the chip from step 1

Fixes bug:5267557 duplicating an address causes odd behavior

Change-Id: I3fdc27c22820056f5470832e1ed634768283703f
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
6caf49d02e7b2a719fc9fdf57e3f8e96dfdf082a 09-Sep-2011 Mindy Pereira <mindyp@google.com> Fix excess copy dialogs showing up.

Make sure we send through all events so that long press gets cancelled
by a move (that will scroll)

Fixes bug:5277603 Scrolling a long recipient list falsely triggers copy-paste dialog

Change-Id: I65c1bd6bf0d2055cbfc1758be13d21c5bd16f98a
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
5a197cb9af43e1db6b882d89c23949577ceba9a4 08-Sep-2011 Mindy Pereira <mindyp@google.com> Mke sure we commit chips that are being edited

The isse was that text editing of a chip now holds the chip
in the selected chip field. This makes sure that we commit any chip
that has an invalid id before continuing.

Fixes bug:5277118 Chip layout is weird if there are "+x more" text and a recipient not in your contact list

Change-Id: I7480a3677e1fa1d17e365c3057dd74ae46ede858
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
d9ae83e0bb529af5c97f9aba73df3e02d1484218 08-Sep-2011 Mindy Pereira <mindyp@google.com> Merge "Clear the checked position and reset it always."
e9278b0f8b883a987a913c5d785455f5d0e646a9 08-Sep-2011 Mindy Pereira <mindyp@google.com> Clear the checked position and reset it always.

I beleive this fixes the issues reported internally this morning, as
previously the checked position ws being incorrectly cached.

fixes bug:5274898 trouble picking the right email addresses for people in gmail

Change-Id: I442a9a3c1b147de41a48bb8b3e72492083bf1f03
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
0436c36bd529ea8ee1864a3017f9ac29d2311c08 07-Sep-2011 Mindy Pereira <mindyp@google.com> Create dialog at the beginning so we have a "safe" context.

I believe this fixes bug:5268040 com.google.android.gm: android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@412b42e8 is not valid; is your activity running? at android.view.ViewRootImpl.setView(ViewRootImpl.java:494)

Change-Id: I94e7be1d18d2df955f49eefe2d57b608e907b3ac
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
2f5589283d93933751c20791ef42dc7eab87061a 29-Aug-2011 Mindy Pereira <mindyp@google.com> Dont show copy dialog when the user is editing a contact. Fix crash.

Fixes bug:5210400 Email address only chips sometimes display "Copy email adress" even on tap
Also fixed crash in the alternates adapter where it was still looking for a dest type.

Change-Id: I97b68c3f3e45f3d654551953ac4356ff76dfba26
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
97b873c0ba4f31b7e14abad8d873c35e66f7dc41 17-Aug-2011 Mindy Pereira <mindyp@google.com> Center text in chip; fix dropdown item spacing

Part of bug:5162602 Alignment of elements in compose screen seems off (master/tot/prime)
Change-Id: I6ed2063c164ff7dbe3aa7b030a500176b16eb301
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
b67763f7bccadc3a34037d9d47c7f3107f639195 17-Aug-2011 Mindy Pereira <mindyp@google.com> Fix focus issues for chips fields.

Since its the validation part we don't want, just override that part.
Let the calls that handle focus go through as planned otherwise.

fixes b/5177339 Compose screen broken in Gmail

Change-Id: If00069e975449bc338ad52356c44124664f1b909
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
6f9f2858818228eaa1f2a2c562f4d2da6a4216b3 16-Aug-2011 Mindy Pereira <mindyp@google.com> Fix bugs with shrinking/expanding chips field.

fixes Bug:5161746 Address chips lose chippiness after expanding/collapsing the textview
Also, fixup change from @debunne: the field is textMultiline
Change-Id: I379fe6a4833a9f08cad9168f22178ebd3492ac6e
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
572fa15d4b847c2d890b972d4f69d4d2aad5ebd7 16-Aug-2011 Gilles Debunne <debunne@google.com> Suggestions disabled using input type text flag.

Change-Id: I8e5b25425bc463dac7a423af4daf479c23328892
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
719cef49a6c16c1aa089ab9d8c34194777adbaa6 10-Aug-2011 Mindy Pereira <mindyp@google.com> Deprecate old setChipDimensions.

Unused.

Change-Id: I1ee69bfb316a8d2fe527d8c07ad956ec19da7bca
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
b8208f24b2768acf369ad58309031feac87ce79c 10-Aug-2011 Mindy Pereira <mindyp@google.com> Add ability to copy a single recipient chip.

Fixes b/5143564 implement single chip copy

Change-Id: I598a53a60ba29b99637b2d1633b3884811938317
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
6ccb1744887c175ced43491433b382f7c8f51e83 09-Aug-2011 Mindy Pereira <mindyp@google.com> Always tokenize the address if possible before creating a chip.

Change-Id: I0bf39bb0c0f49a674731a7f1a7b518a4913f6a51
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
454eaf31f312fd2f2e6bc3d30bb050d65079a9a0 08-Aug-2011 Mindy Pereira <mindyp@google.com> Make sure that email addresses are editable when tapped when there is no associated display name.

fixes Bug:5135630 email chip issue

Change-Id: I9fccc192bfa4e97cbae9dbb527090b1e437264e8
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
bfa63c7c85405200eb6a049c7209657440a4b1fd 08-Aug-2011 Mindy Pereira <mindyp@google.com> Create way to allow applications to still show all recips when focus is lost.

Fixes Bug:5123976 RecipientEditTextView has no way to turn off the 'X more' collapsing of names

Change-Id: I5c7f5fca9a6bf278cb2e043ea796f9d2646d6087
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
490556a764a879cd0eaff358e90705cc1335c92e 05-Aug-2011 Erik <epastern@google.com> b/5122753 Make Rfc822Validator a bit smarter

Change-Id: Iffea9735b906466077ce03a97ab49b614917dbf3
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
311576adc68a068ab583d794e064329b0f71b8d1 05-Aug-2011 Mindy Pereira <mindyp@google.com> Make sure we clear our local text watcher variable when removing text watcher.

Fixes Bug:5124057 RecipientEditTextView stops chipifying things when you switch between enabled and not enabled

Change-Id: I7c2708033d5574621ab95065077a3ff39595cd5b
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
a0751874f5bbdb39f2024c69a5024df60f0344d9 05-Aug-2011 Andy Stadler <stadler@google.com> Fix eclipse error and a couple of warnings.

Change-Id: I25f13e7a5113078a5f8fe4e33eabd0603277a1b4
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
d58667fc7a460b8b56ccf9f0c35b92a2a9e0419c 28-Jul-2011 Mindy Pereira <mindyp@google.com> Protect againt emtpy strings/ null tokens.

fixes b/5090742 java.lang.ArrayIndexOutOfBoundsException: length=0; index=0

Change-Id: I23fdbe6ebbd94e3ce0f7ac19b52ac02ae755fb01
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
4221a1d7cab69fd886c03abf53f2250025367f5e 26-Jul-2011 Mindy Pereira <mindyp@google.com> Protect against empty display or address.

Fixes bug: 5080535 NPE observed in Email when entered invalid email address

Change-Id: If7517dd5283c2215eff5ff88b89b4d314c2d079b
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
6ebf62290f81d267b85f0237a49daa4c9b3846ef 25-Jul-2011 Mindy Pereira <mindyp@google.com> Update chips to match new spec for validation.

Fixes bug:5051766 autocomplete a recipient with the sender's domain
Spec is defined in the bug notes.

Also fixes 2 small issues:
1) when not appending text, we werent adding the text watcher.
Adds it automatically now and just removes it as necessary.
2) the cursor was not apeparing when editing a recipient
Change-Id: I6bebc418fccf4ef52a3913cb83bdc3bacc5000d3
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
c0f97e4f56bc35d99d181c5f604b26fbb89c113f 25-Jul-2011 Mindy Pereira <mindyp@google.com> Make more chip, dropdown match pixel perfects.

1) the destination type should be uppercase; there is not
textview style to do this
2) fix the heights of the dropdown items to be 48dip
3) text for more says "NUMBER more..." and is styled

Change-Id: I8a391bbd3703c1ccd1415b78d5e843107b1d2095
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
1e70f1a4c71895213a1ea65a1e68ab9cc0b12ad2 24-Jul-2011 Mindy Pereira <mindyp@google.com> When the application clears the text, make sure we clear all the chips.

Fixes Bug:5051774 chips: odd behavior on rotate with some addresses
Gmail was keeping the same recipientedittextfields around, clearing them
by calling setText("") and then re-appending text
However, the old chips were STILL there, just applied to the empty string
This also makes sure we dont put 2 chips in 1 location

Change-Id: I76245a648e71a05018077fcc59f5dfa284d93490
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
7bffb1a8fd8e479207e6ce1ea6c7622a079b8dc4 20-Jul-2011 Mindy Pereira <mindyp@google.com> Fix case where pending chips called before the widget has size.

If there was no size for the widget, we could not determine how
much text to display, so this wasd showing nothing.
Change-Id: I35bc7373fa2a7a4cfd68cfaf68517a0d1381bac6
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
a40ef1489593ee115d2734141cacaace585755b4 20-Jul-2011 Mindy Pereira <mindyp@google.com> Instead of waiting for size changes, always post a runnable when recips appended.

Fixes Bug: 5039293 reply / reply all switching behaves inconsistently

Change-Id: I3a169df3520eac3d88135d65cf491e843894f286
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
1174eca98d1dbd263a9e72c5a9e35a1039aae979 16-Jul-2011 Mindy Pereira <mindyp@google.com> fix appended recipients that have an associated name

Fixes Bug:5037859 Populating a To: field from a mailto: link always shows an empty chip
The issue here was I was just pulling out the address and
leaving that in the field
Now I pull out the address for display purposes only, and leave the address
and any associated display info with it
NOTE: if the info before the address was invalid, it will stay invalid, as before
Fixes Bug: 5043134 chips: name and rfc email address
Change-Id: I6b0d0de56dd9752b189919554617b101792425ef
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
1e85502fdc04a44f76ffa9904be9ab6ab80292ce 15-Jul-2011 Erik <epastern@google.com> b/5021471 Don't try to chipify null entries

Change-Id: I6f89fcdb5373df4fba48681ad6e7bd260dad0f8d
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
aaa3d987e07bb8f1ae4bd06d26bb6e26d679f6aa 13-Jul-2011 Daisuke Miyakawa <dmiyakawa@google.com> Stop warm-up query.

We should introduce similar mechanism, but right now not.

Bug: 5009038
Bug: 5012014
Change-Id: I883f312fdcef1ef209fb6e620a74d90aa23241a0
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
c1564e400a60414db1eccbdf6de3913a3e1a8504 13-Jul-2011 Mindy Pereira <mindyp@google.com> Handle case where the contact name is null.

When the contact name is null, set the contact name to the destination.
Fixes Bug: 5022659 NPE during auto-complete; appears to be chips related

Change-Id: If081be06ed4babb7484eec7d10fdedf713a4f240
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
001f6063c1a2f447bb4dc90a31d2fd0a745c7fc1 13-Jul-2011 Mindy Pereira <mindyp@google.com> Make sure we always check that we have committed all chips on shrink.

Fixes Bug:5010791 ICS email: addressee details lost when retrieving a saved draft on IMAP

Change-Id: I0ee06a983c5ec8814681890c20778cefeffecb2b
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
7baf165a97b878f404fef258586328d0fdca4b73 12-Jul-2011 Mindy Pereira <mindyp@google.com> Merge "Enable pasting of text into the recipient edit text field."
090139db34b366608b60e73f312833d84cf42259 12-Jul-2011 Mindy Pereira <mindyp@google.com> Enable pasting of text into the recipient edit text field.

The issue was that we were hiding the cursor whenever the field was touched
and it should have just been when the field was touched AND a chip was selected.

fixes Bug:5016914 ICS email: cannot paste text into "to:" field in portrait mode compose message

Also fix the case where there is content and the user changes focus.
This had not been committing as committing chips depended on having focus.
Change-Id: I43fae67a399ae7df4862861144ed42b608718a2c
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
bbf141b605f92729864984229e6e1062d9a462be 08-Jul-2011 Mindy Pereira <mindyp@google.com> Never set a span if we dont have matching text.

Fixes b/5004459 java.lang.IndexOutOfBoundsException: setSpan (-1 ... 3) starts before 0

Change-Id: Icc60924cfab8393ff3da2116e8a5eb6130aa8261
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
b1dd0ac0f11ff3d6352f67311f14aa95185d224b 07-Jul-2011 Mindy Pereira <mindyp@google.com> Make sure we leave a space when processing appended recipients.

Also, the bug I was working around for aligning the alternates dropdown
doesnt appear after this fix, so removed the workaround.
Change-Id: I680e39bd9d1a43d559225d4665876a82d6ced7ce
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
8b308552260807ba6611a4ab3bb23f0211608767 07-Jul-2011 Mindy Pereira <mindyp@google.com> Fix extra spaces that had been getting added when the user selectd/unselected a chip.

This also prevents us from having to make an extra string and replace it
as all we were REALLY doing was replacng the span.
Also fixes the issue where we were leaving an extra space after deleting
a chip by pressing the X. This was an off by 1 error.
Change-Id: I9d2dbe4647119a64857766ee9b45207c6d365497
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
c6e6141037bf299cabf4a1ba6b3664f5bc426bd0 06-Jul-2011 Mindy Pereira <mindyp@google.com> Scroll before showing the alternates list.

This allows us to have the alternates list properly positioned
AND prevents the dialog from appearing ABOVE the contact.

Change-Id: I78fd1d6ef6b08a1274e7299439b8679f43d1ba86
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
77056d7532cd26e869964a52456ef18c96f6cbd7 28-Jun-2011 Mindy Pereira <mindyp@google.com> Do reverse lookups on pre-appended recipient chips.

Change-Id: I338a07f89264606a58942520791f39908fedbedb
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
0fc929e5fb977fe028d7db04a3ad57e74f42e654 01-Jul-2011 Mindy Pereira <mindyp@google.com> Always show the more chip for a collapsed recipient view if there are too many recipients.

Previously, this would not get shrunk until the user focused/ unfocusd
the field. Now, if the field doesn't have focus, it starts out
in the shrunk mode.
Also, when appending a contact, properly tokenizes the contact
so that we show just the email address.
Change-Id: I085ed00dc94b38d22e871d7e80589e5b2d74f98f
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
416e1307e57a36650bd15a06bb0ac2915a195a2e 01-Jul-2011 Mindy Pereira <mindyp@google.com> Fix the offset of the popup window.

If I use the view as the anchor and the vertical offset, then
the popup appears correctly even after a scroll.
I believe this will also take care of the cases where the popup
had been appearing above chips, as the view will be scrolled
to fit the popup if possible.

Fixes Bug:4723677 chips: sometimes popup appears ABOVE the chips field
Change-Id: I976be8e4e06ff44a093f8a93c65a63d433b1e774
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
379c70a85c105ed2b003f0525fab2914eb79d1d1 28-Jun-2011 Mindy Pereira <mindyp@google.com> Move contact picture to the right of the chip where the delete icon shows.

Change-Id: I0d74965c98f96384a7c0b01d4a9a05b34524301e
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
76ebe80e9fc58b31452d1a0724dd88d420a5b580 28-Jun-2011 Mindy Pereira <mindyp@google.com> If the selection happens to be at zero, dont look for the char before.

Fixes Bug:4969660 java.lang.IndexOutOfBoundsException: charAt: -1 < 0

Change-Id: Ie307b3088be32e2cf9afdfdcf1c0106046dbc805
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
c0eff46d5c8ed061a7e103b94cedada6fd71b1b5 25-Jun-2011 Mindy Pereira <mindyp@google.com> make sure there is a position after the comma before moving to it.

Fixes Bug:4948080 ANR when tried to attach a picture in Gmail Compose

Change-Id: Idf13eec6bf36cba14fae2c633de98049b04c3f8f
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
7a4d7e4b70201ccbc321584f84b5ac29005a3bb1 24-Jun-2011 Mindy Pereira <mindyp@google.com> If the user chooses a contact with an invalid address, make this an editable address chip.

Per new spec:
Don't display alternates, always treat as an invalid email to enable editing.
When the user is in edit mode then can back up which displays suggestions again

Change-Id: Ie59101940eaf8f306d482c3ae8a5c04d5aa69560
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
054b3caa7d695ff5bd6cebfb79067e731f334934 24-Jun-2011 Mindy Pereira <mindyp@google.com> If the user put a commit char in the middle of text, make a chip up to the commit char.

Ex:
1234567
I insert a comma between 3 and 4
123 becomes a chip
4567 remains as text and the cursor goes to the end of it
Change-Id: Ibd4f54b26fb4ae6c6f267232c03f76e0850e4d7e
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
a501d9f79683be8d82c348ae50c97e2655d79cce 24-Jun-2011 Mindy Pereira <mindyp@google.com> When recipients are appended, take them as is without ANY parsing of tokens.

Change-Id: I7ecc16cc032e7a6f4809ba1a323f7e445b8f74fd
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
368f569ffda5dc5fb85ee1eebc023759a46e31c8 24-Jun-2011 Mindy Pereira <mindyp@google.com> Make sure we dont use textwatchers or commit chips incorrectly.

1) Never use textwatchers when there are any pending chips. These
may be because there are recipients that were hidden when the more
chip was shown, or because we are parsing appended recipients.
2) turn off item clicks for alternates before we send the dismiss event,
since we dont dismiss immediately and we want to be sure the user cannot
click 2 recipients if the device is running slowly.

Change-Id: I53ae04a0f7c23f4ef7396ea203d8d1bb0a1b6e34
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
e0bf819fff34b7678dd336e4fd010f04bb343eea 21-Jun-2011 Mindy Pereira <mindyp@google.com> Reenable space handling for chips.

The issue was that I was cutting off spaces too soon when
removing commit chars.
Seperated commit via enter/tab/lost focus
from editing and from enter via a character
Since I can't watch for key events, I have to have a textwatcher
This makes sure the textwatcher is not instantied until AFTEr all
reply/reply all recipients have been parsed and created.
Change-Id: Ib9f2228595a77c96b1e72f38c0269c4ad0c92033
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
348213cfe650d4110214c3fd653bfccc501cc69d 22-Jun-2011 Mindy Pereira <mindyp@google.com> Merge "Clearselectedchip and unselectchip should not call each other."
25b611d9deac1827bda847c388da1af0160986d7 21-Jun-2011 Mindy Pereira <mindyp@google.com> Fix the left offset of the alternates popup.

Change-Id: I9029fd370e95cbd7ab7a34f200b87e2b873482e3
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
c57ee19c891696a126fe8b6dec74aa4f6a00c6a5 21-Jun-2011 Mindy Pereira <mindyp@google.com> Clearselectedchip and unselectchip should not call each other.

Fixes Bug:4768416 StackOverflowError when clicking on chips

Change-Id: I8151cee90390df834eef87f60af96da9b910daca
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
ed58ebd3f54ae5e73129f7f12c8342f177ed1fc3 21-Jun-2011 Erik <epastern@google.com> Don't start the filter until we have an adapter

This is to prevent a crash if an adapter isn't set during creation.

Change-Id: I328659889b42f9c02fdde2a1074916f6b4fed354
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
3bb285bed15583819aa01efd127ee095b180f613 21-Jun-2011 Mindy Pereira <mindyp@google.com> Remove space handling for now.

This needs to be run only on NEWLY added recipients, notappended ones.

Change-Id: I2754528ae660928d75b6a1e097976a151995944d
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
dfa1d391014fac824be4ba48582f160ffcac7303 20-Jun-2011 Mindy Pereira <mindyp@google.com> Follow defined logic for committing when the user presses space.

If valid email address commit the chip
Fixes Bug:4725531 chips: implement logic to handle space key

Also simplifies the logic for editing in the middle of a chip
(we don't need the submitText flag)

Change-Id: Id4af8d5840f75bf7bb4066e481761a885536dd20
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
cb041c294cd3fe41062f1b76d3bfc7d1cb1981d9 20-Jun-2011 Mindy Pereira <mindyp@google.com> Force services to be launched as soon as possible when chips are instantiated.

This will redue the pause before seeing result from the first query.
Bug:4691146 butter - warm up contacts autocomplete before user types on compose activity
Change-Id: I6f07284f44824dfe6f25fec27cdd300d9adf7da1
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
b3f8574ad18184f5a9392fc7773863f59f9f5192 18-Jun-2011 Mindy Pereira <mindyp@google.com> Fix rotation crash.

On orientation changed or activity paused/ restarted, the window
and context were not being properly refreshed for this widget.
This led to crashes when the user tried to show the alternates popup.
The reason the context/ window were not being refreshed
is that references were being held by the chips to one or both of these.
The chips were also retaining references to the spannable, which caused
issues in that the spannable was not being updated in the chips, and
after a rotation, the chip would no longer be able to find where
it had been attached to the spannable. To fix all these issus,
I made the RecipientChip class a seperate, simple data holding
class and allowed the RecipientEditTExtview to do the heavy lifting
as it contains the correct contextual information. This has
solved the crashes I had been seeing.
Change-Id: I4123f7bb2a5195c084efa602c5409d87596275d7
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
e98f079e157d2872100174ba67beef8ebbc0cec0 17-Jun-2011 Mindy Pereira <mindyp@google.com> When the user starts editing mid address and submit, always submit all the text.

Previously, when the user hit enter in the middle
of text they were editing, it would divide at the cursor and create
a chip to the left and leave text on the right. This fixes that issue.

Change-Id: If9fd92e4d07008e86351de85de0115d51aca204b
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
e24cb318a0e07fce3db99e1ef6234a196f256bef 17-Jun-2011 Mindy Pereira <mindyp@google.com> If there are no chips to chipify and the user hits enter, focus the next view.

Per UX and user studies.
For tab, commit and then focus the next view.
Change-Id: I9f226cb82191b4866b3ddd1c2cc4f1ae185e65e3
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
3656f7e97c58dc8443132d2d8297629b6a04cce7 17-Jun-2011 Mindy Pereira <mindyp@google.com> Fix race condition.

Crash was reported where the checked item position had yet to be
set when the list tried to get it. This uses a listener to make sure
that the checked item isnt set in the list until the adapter has it.

Change-Id: I2b5170ab9440bbb0a69989657313b1a4b6d653cd
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
5519208c37aea65dab7edf555ab27844e12cdd71 17-Jun-2011 Mindy Pereira <mindyp@google.com> Every chip should take into account bottom padding for the alternates popup.

Every line will be affected by the padding, not just the bottom.
Fixes the offset of the alternates popup from the bottom of the chip
and prevents it from overlapping the delete icon at all.

Change-Id: I3c45255ffa1252b6d7ebcf95663b35f7ca952190
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
1585be84a5d70550b8f2871899dab3528a51fae5 16-Jun-2011 Mindy Pereira <mindyp@google.com> Fixed bug where appended chips might be added twice.

Since email focuses the compose field instead of the to field
the to field received an immediate unfocus event, which caused any
defaults in the field to be committed. This caused double commits
of a single contact as a chip. This makes sure we dont commit
a pending chip in onSizeChanged that has already been handled.
Integrating into Email revealed this bug.

Change-Id: I65f0f38f1dabe0b1434f0d2e4bcd2ff9a579e621
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
77db539da02cf42742330f1969fd94bb94a61db8 16-Jun-2011 Mindy Pereira <mindyp@google.com> Visual tweaks requested by UX.

1) Text on selected chips should be white
2) new delete asset
3) new background selected asset
4) align the alternates popup with the left of the
text field regardless of the position of the chip
5) dont get the position to put the popup at until the user
has tapped it; we cant cache it as other chips changing may have
moved this chip to a different line.
Also cleaned out unused assets.
Change-Id: I7cff1b945ca7a0c7e04430c66c5976de2dee468d
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
05522aeae1948f776e618f69d34d4a5e48a0471c 15-Jun-2011 Mindy Pereira <mindyp@google.com> Make semi colon and comma commit default contact chips.

Change-Id: I372275746d7c903f17268df808ec8896ea0fa38b
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
74e701b8da11fb1840169945b4b494f28d44ca79 15-Jun-2011 Mindy Pereira <mindyp@google.com> When user has a focused chip and starts typing, unfocus it.

Brings back that previously removed change in a better way.

Change-Id: Ibd5d3f17b918e36c01836aa3d01472e59c92f03e
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
4f5f0328efbd5f72e30adf08ba7d89a66b4659ce 15-Jun-2011 Mindy Pereira <mindyp@google.com> Fix issue where extra commas were inserted.

Some applications provide recipients of the form:
append(address);
append(",")

and some provide:
append(address+",");
this makes sure we cover both cases.

Change-Id: I302d562783005466d1f06f17069e1af36ddf0584
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
1426d714da911130b643f7039590eceaa6420aa7 15-Jun-2011 Mindy Pereira <mindyp@google.com> Remove deprecated method.

Change-Id: I1fbd80bb0ae496b27da56e0abc330b80a057b8c2
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
d79e1a0e1a12944c6b9bae1dcfd5c602693281c0 14-Jun-2011 Mindy Pereira <mindyp@google.com> Deprecate one of the setChipDimen methods.

2 stage. I will update Gmail in a CL and then remove the deprecated method.

Change-Id: I06078c4a71022176f9097360a98eff269ce334db
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
c72429f17e12ec39e61a7efdb7312b7f5d8a5cbc 10-Jun-2011 Mindy Pereira <mindyp@google.com> Create chips when text is appended.

When text is appended to the multiautocompletetextfield,
we need to make sure we make chips of the added text.
Since in many cases it will be added before the view
is measured, we may need to wait for onSizeChanged to get
called. This stores chip info for later use in creating chips
once we can measure the width / height of the view.
Change-Id: Ifc9b8bdf089fb0293bb76ea9cd7aeacfc3f9da87
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
156467329e276c9bc90945bea916ce3ac4849574 14-Jun-2011 Mindy Pereira <mindyp@google.com> Delay closing the alternates popup when the user selects an alternate.

Per UX, this gives the user a better idea of what has just occured.
Using temporary assets.

Change-Id: Ied49f899d7999356cc01a672ecb22f492901d55c
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
4f7412c084ad344e94a320b51270ac6480a47a84 10-Jun-2011 Mindy Pereira <mindyp@google.com> Remve deprecated version of setChipDimensions function.

Change-Id: I8988e3fc2120ab720ff93d31f07db22837f449e3
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
045e80b59ef5e9a709b6e5843d2301a02e0872f2 10-Jun-2011 Mindy Pereira <mindyp@google.com> Added invalid chips, fixed comments.

Add an invalid background for chips that cannot be validated.
If there is a validator, and a chip is invalid, set it to a red
background for now.
Note: I left the old method for setChipDimensions so that
I don't break Gmail.
Updated comments in the code to be clearer.
Change-Id: I01553cf0c3b3a6c7c59da5016d32be364535f7f2
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
8684974e4befb4c9dcc21c995c4ff3af7103ab10 10-Jun-2011 Mindy Pereira <mindyp@google.com> Commented most of the public methods of the RecipientEditTextView.

Also, when the user taps another chip and there is text leftover
at the end, complete the text with the default chip behavior.
Change-Id: I6d0f16ed67efad50bc890e7ed5461857e6126675
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
7a424984849627457aa27ac19c0d23cbe0887c85 09-Jun-2011 Mindy Pereira <mindyp@google.com> Small changes to make this more easily integrated into apps.

1) created interface for old adapter and new adapter
to implement so they can be used interchangeable
2) did null checks for chips when getting data/ contacdt ids
Change-Id: I7f47230c5cf35426b73b477f374641b271455411
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
83e4ae382ffbec673b16c85c35e3cfe19ada98dc 09-Jun-2011 Mindy Pereira <mindyp@google.com> Remove mRecipients cache and put in error protections.

Stopped tracking recipients in mRecipients so that I didn't have
to have another cache of recipients to keep up to date (this is cleaner)
Also where its possible that there would have been a crash, i have now
added log.e handling so that we can go to droidfood and get logs
telling us what happened.

Change-Id: I133fbe9bf837a6b93af860147fd1923ee8191a4c
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
fab0afdc6742dcba55cfbe802cd143434d48f413 08-Jun-2011 Mindy Pereira <mindyp@google.com> Make sure select/unselect follow the same pattern for making chips.

Change-Id: I9aa08ca535e80f7c41a324aa445d5dabed58fafa
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
90081ee88c7eb216ea22f426aa6856e310a867e1 08-Jun-2011 Mindy Pereira <mindyp@google.com> Make sure even second level addresses have a photo uri.

When a second level item is chosen, we still want to show
the associated contact photo. We need to set the uri but can get the
photo on the fly later.

Change-Id: Idc9e02452ad5e1d6291776a94a6f3c3c6ada14b4
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
fcdaf46366afd32e8b35406216dbb3c6961793aa 08-Jun-2011 Mindy Pereira <mindyp@google.com> Remove tricksy workaround.

Since I was unable to get key events in the text field, this was
the suggested workaround, but it is causing many issues, so removing
it.

Change-Id: I62547953b59c735e426b330fe946ca2f1b8a4773
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
e6f595ab1f8409f23978baae564ad3cb9e0b5f41 07-Jun-2011 Mindy Pereira <mindyp@google.com> Asset updates from Ux.

Larger chips, better delete asset, better fonts.
Change-Id: I1d706d5b56bd496e51c772e65d3456d0f3239a43
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
9024e5c88fde2f878eea4bca6923ad57a3f0cfe0 07-Jun-2011 Mindy Pereira <mindyp@google.com> Fix issue where deleting did not allow the user to start typing again.

Also dont draw a contact photo for any typed in recipient.
Per UX, if the email address and display name are the same,
make this a chip that is editable.
Also dont store the start/ end positions for the chip
as they may change.
Change-Id: I05a2543d92564c2ec275d0d882cf4a766bad6f92
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
95d81e62a0abb2f81624796f1fca9665cdb1a79e 07-Jun-2011 Mindy Pereira <mindyp@google.com> On back key, clear any selected chips.

Change-Id: I764b312f3ffd2ba74be65b8f6bad0cc15bf2e8df
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
4e1f6098a731be3d0be1f9e02a1fa2677e4de187 06-Jun-2011 Mindy Pereira <mindyp@google.com> When the recipientedittextfield is not focused, shrink it.

When focus is list, the field should only display X recipient chips,
where X is currently 2 lines worth with X+ more text at the end.

Change-Id: Iea73d5d3682e4b8cd3adf4a671271cca4ab3c1f2
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
c55843a69549bcac0380211335530a99ba677049 03-Jun-2011 Mindy Pereira <mindyp@google.com> When the field loses focus, commit the default chip.

If there were any filterable results, this is the first entry
provided by the adapter.
If not, this is whatever the user was typing in.

Change-Id: I966382dbe38adb20d4123b53443b0fd8d8cf9c89
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
1e9f1deb091a9552d746a69685e59a2bf48b6971 03-Jun-2011 Mindy Pereira <mindyp@google.com> Show the contact picture in an unselected chip.

Change-Id: Id9341b0365e40144de0ac74438395121fda30c01
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
d9b57273c1f5c3bcd94e662136446cd6fd465ebc 03-Jun-2011 Mindy Pereira <mindyp@google.com> Add handling for focus changed.

When the recipientedittextview loses focus:

1) unselect any selected chips (do not commit)

When it gains focus:
1) show all the chips
2) place the cursor at the end

When a chip gains focus:
and its a real contact: hide the cursor
and its not a real contact: show the cursor

Never show "no suggestions" popup
Change-Id: Id104c62c47bc2f97bcf72514e39760205596eefd
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
1a8bbbf9aa203287f53736a680f96b16d5c878a7 03-Jun-2011 Mindy Pereira <mindyp@google.com> De-select on tap. Also give min width to a chip.

If the user clicks a selected chip, unselect it.
Make sure all chips have a minimum width (right now
2X the width of the delete icon) so that there is
always a tappable area regardless of how short the name is.
Also make sure the bounds of the chip do not change in selected
vs unselected mode.
Change-Id: I8bc2302cc7602c62eac727cf77306aac37c27ed4
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
36d720eb2b7a8d3466d221944a00b8bae7de8e9c 02-Jun-2011 Mindy Pereira <mindyp@google.com> If a chip is selected, hide the cursor.

This change got lost when I was removing the wrapper class.

Change-Id: I787f5cca6ba6d2226b383f07418e24ccbfbde122
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
55bb2833b29945c08b809408ff94ddf7703e911a 02-Jun-2011 Mindy Pereira <mindyp@google.com> Fix a crash in the removeChip logic. Update alternates dropdown.

There was a crash that could happen if you deleted the first item.
The change in RecipientEditTextView to check that toDelete >= 0 fixes
this.
Also, made the icon and the recipient display name show for the topmost
entry only.

Change-Id: I56b8768c8ead282e2477f91a130bf8cc6fb72b15
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
c4ad472c11324428ac9c75bcf7d52263ff4699f1 02-Jun-2011 Mindy Pereira <mindyp@google.com> Make the delete target EXTREMELY large and tweak tapping algorithm

Experimenting with a really large tap target for the delete icon.
Also tweaked the search algorithm to start at the beginning of
the spans when looking for a chip.
Also was able to get rid of the handler and delayed focus since
the code now watches for selection changes and always keeps
the cursor just past the last chip.
Change-Id: I105a7cb72ceb77f4f21b662a978e819fba3d9875
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
4fef2782b06043dbf73c896c4d1962be0b8dcd50 02-Jun-2011 Mindy Pereira <mindyp@google.com> Improvement to tap detection for the delete button.

This improvement works as follows:

1) If the user has tapped near the end of the text
and there is some text near where they tapped that is
not a chip, don't send the tap to the chip
and there is no text near where they tapped, send
the tap to the chip

Change-Id: Ifb93ec716d4a9ff1b9dcc2548465280c39d834cf
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
c7ea4602c84a8fed20488337b8d1a00d8a205f6a 02-Jun-2011 Mindy Pereira <mindyp@google.com> Remove wrapper.

getText now also returns the correct comma seperated values.
Change-Id: I109f80df507cc377c53615e7f19c21f9b3fb47dd
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
699c1e37a1bf26daab34f2117a14c6e883636077 01-Jun-2011 Mindy Pereira <mindyp@google.com> Show alternate addresses when the user taps on a contact.

Change-Id: I9a88dd1612b98587e560c1e50030e36a28e30db9
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
5e6306039bca3ad3897182a8d8bf45abe80680e5 01-Jun-2011 Mindy Pereira <mindyp@google.com> Create wrapper for RecipientEditTextView.

Hide that this isn;t just a normal MultiAutoCompleteTextView
by wrapping getRecipients in getText

Change-Id: Ib11777b4fbf55bfb9aafb1cda18fd1ed246895ad
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
6594c740b78d9d9aa97489bb3b307fa94c2fc905 01-Jun-2011 Daisuke Miyakawa <dmiyakawa@google.com> Merge "Use long for ids"
9376c61306efb52a098c140ea503058152e3b0dd 01-Jun-2011 Mindy Pereira <mindyp@google.com> Fix issues with deleting.

The chip span does not encompass the delete token, so we need to
check for taps as well.

Change-Id: I094cd3df04b8d51a54cd9fc1717c515383b08870
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
65b8c0327b00beda9309c7b7c116013d03b06d90 01-Jun-2011 Daisuke Miyakawa <dmiyakawa@google.com> Use long for ids

Also optimize update method

Bug: 4443828
Change-Id: Ie51a3b40e0852cfab8f81c2a56cbc13f5072ad6c
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
b5ebb8916a1bb178062a0ccb59e80de27ec1bb2d 01-Jun-2011 Daisuke Miyakawa <dmiyakawa@google.com> Add data Id support and account support.

Also add utility methods for chips UI.

Bug: 4371572
Change-Id: Iec086c06ac844ca19c776f82b127a48804bab8e6
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
0f93fba1c7da8cb2d209e5e37831600c3b86852c 01-Jun-2011 Mindy Pereira <mindyp@google.com> Add getRecipients

Method gives the calling application a plain editable containing
all of the recipient addresses

Also added larger assets for the delete icon as the others were
untappable!
Change-Id: Ib02dfcffc3d9e739586f5b502cf92f726cd5c0ef
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
43876560a507b0672cd2732c74bdbdec84ed3893 01-Jun-2011 Mindy Pereira <mindyp@google.com> Setup a really cheesy delete icon.

This allows us to:
1) set a pressed state
2) get taps on the "delete icon" (the world remains thankful that I am
not a visual designer)
3) get the correctly tapped chip regardless of presses near the end
Change-Id: I286de87b05ac46aca1511a2c7108c6778438386e
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
b5dd668995d80a9bc9a6c5ed9f24a9d32a269634 31-May-2011 Mindy Pereira <mindyp@google.com> Fix tap logic and make moving tapped non complete contact to end work.

This change:
1) makes taps work more correctly to click / delete the correct items
2) takes a tapped on non-real contact and moves it to the end for editing.
3) make real contact show the rest of the information for the selected address
when tapped
Change-Id: Iaa778216dc3f0dc9880fdec2e84057a893d9211e
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
f566dee91901e44db63df3bf393afb1d43a36f78 31-May-2011 Mindy Pereira <mindyp@google.com> Multiple updates to chips.

1) Eliminate hardcoded 200 value for width of popup; this is just
the same as the width of the autocomplete view
2) eliminate need for offset padding; can calculate the correct position
(see calculateLineBottom for the full algo)
3) use recipientlistentry to track the contents of a chip; differentiate
between completed real contacts and filled in content. don't show popup
for non real contacts.
4) Change RecipientListEntry to just RecipientEntry
Change-Id: Icf2a47a845f1b3cad2fbae3d31c38179ca1b26c8
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
078509f1fd42ec04b46565ecc26f4f527b277c5c 28-May-2011 Mindy Pereira <mindyp@google.com> Back to static library.

Give the library dimensions that the apps can use.
Change-Id: If55883a0f599baac3e4f9122620fc01b376fb512
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java
f026dfb761c894942354060746a8ab7dd563386c 28-May-2011 Mindy Pereira <mindyp@google.com> Make chips included source instead of static java library.

Get rid of abstract methods in BaseRecipientAdapter
Update makefile
Change-Id: I3415c73446c605e69c0c2145e98a7e66abc33a6e
/frameworks/ex/chips/src/com/android/ex/chips/RecipientEditTextView.java