History log of /frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4b01e3b35a9634336e5de163ba7c4110785bf221 30-Jul-2015 Milos Stankovic <miloss@google.com> Adding listener thats notified when chips checks permission.

Change-Id: I0b55b459a2ad013fa5a1b0a14ff7b099c78d76e3
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
f1ad4f6dba7c6ea28f529736b8662faa6fb498f8 16-Jul-2015 Milos Stankovic <miloss@google.com> Adding support for permission.

Change-Id: I01956311049afb887808d24119a2649cbe7cda4d
mocks: https://folio.googleplex.com/gmailq/Android/UR18/03_M_permission#%2F01_autocomplete.png%3Fz=width&f=hidden
see: http://cl/97951906
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
4db8cccf3332ad7c6fb1915f9f0f169953c3953a 30-Jul-2014 Jin Cao <jinyan@google.com> [Quantum chips] add delete button in dropdown

For single/alternate recipient dropdown there is
now a delete button next to the currently selected
contact for easier removal of the selected chip.

b/16383133

Change-Id: Ied238b91b42673142de88a159b50772bd6b7b937
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
4ddcdaed9ef5ea83910a0513e87538130270e2e4 29-Jul-2014 Jin Cao <jinyan@google.com> [Quantum] chips autocomplete to quantum style

Separate layout for chips that have icons on the lefthand
side and icons on the righthand side.

b/15934812

Change-Id: I7b58197e46ad48bb838ee5e0c34bb06b0b74dfba
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
8af0d3b6f34e03c08c8e67be2190da01c59889da 03-May-2014 Andrew Sapperstein <asapperstein@google.com> Allow support for alternate data sources.

BaseRecipientAdapter adds a bunch of methods that can be
overridden to change the default behavior. Also makes a bunch
of private methods protected so that derived classes can use those
methods.

Abstracts the calls to update the various internal data structures
so that derived classes can utilize their own structures by just
overriding a few methods.

Refactors photo loading into the PhotoManager interface
with a default implementation living in DefaultPhotoManager.

Provides the ability to not use the RecipientAlternatesAdapter
and instead just use SingleRecipientAddressAdapter when showing
a dropdown after clicking on a chip.

Also allows overriding the default behavior for creating chips
when pasting in email addresses or editing drafts.

b/11387812

Change-Id: I826c30edeee1752b7a3d4108e777f90b79d0f7f8
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
7a4e67708498ec46c2e9b3bad69d3807d88c064e 21-Nov-2013 Scott Kennedy <skennedy@google.com> Fix directory lookups

The previous "fix" disabled the lookups.

Now we will do the lookups, with the proper lookup key and
directory id. We also do a much better job of showing directory
images.

Bug: 11693322
Bug: 12793279

Change-Id: I372711fd7b485f3183516fce2b11f9eff46a9b23
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
b10d1c652d0416c284d9792fc9a0a92b3acd51ca 24-Jan-2014 Kevin Lin <linkevin@google.com> Main changes to the chips library:
Changed attribute styles
- Added an avatar position (left, right) inside the chip
- Added a disableDelete boolean
- Removed chipsAlternateLayout

Changed how to layout contacts in autocomplete list.
Added a separate class to handle layout and binding information. (This way clients can extend this class and have a customizable layout)
This new class lives inside RecipientEditTextView and is passed onto each adapter.

Merged code paths for createSelectedChip and createUnselectedChip.
Merged code paths for getView() in each of the 3 adapters by using DropdownChipLayouter.

All tests still pass since this CL is mostly infrastructure layout changes.

There are some non-backwards compatible changes with this if other clients are using this library.
BaseRecipientAdapter no longer has protected methods to override the layout and id's.
The attribute file no longer has chipsAlternateLaytout.
Both these features can still be used through the new DropdownChipLayouter class.

Change-Id: I4496232eddd194be2df6a047f75637114f2eaa52
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
514f8a75f72fa2e735418ffb5d6e30aa914fbe7b 14-Nov-2013 Scott Kennedy <skennedy@google.com> Don't show the alternates dialog for GAL contacts

There's a bug in the chips code that causes this to show either no
alternates, or a different person, which is scaring people.

The proper future fix is to store some more information about GAL
contacts so we can do a proper lookup.

Bug: 11535331

Change-Id: Id8b6fc834446afe33bd6ec4e99b3d2b75b985bde
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
76f1f2d4eb66956814254b0e4f86da7aa8261bcb 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/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
771e417fe305e0aa65f0a864f2b4f4da7606b6b1 07-Jun-2013 Scott Kennedy <skennedy@google.com> Fix a NPE

We may not get a cursor back from query(), and if that happens, we
shouldn't try to use the null cursor.

Bug: 9287151
Change-Id: Ie91d8003f51ea160e5b709a5cd6bcabefc3c687a
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
539c2b12cca5e9bccd9acabc4721c876058a68d4 14-Mar-2013 Scott Kennedy <skennedy@google.com> Always close this cursor

Bug: 8375851

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

Change-Id: I56a3dd5968a3ea435d6dcae9256021bac1f74ee6
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
87b683e238bbf8f64237fd4cf20950e8e84fd763 26-Feb-2013 Scott Kennedy <skennedy@google.com> Unit test for getBetterRecipient()

Follow-up to Ic53d290431fcabce9607685a6eca45063fea0c9a

Change-Id: I28094ce9744838a1ab859470b22714d539ee8f4c
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
78f38a09c9753c0ac1838ce0bfd3a6bc1a307ff7 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/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
ef3f76c8c0e4fc83a0ab7fbe8db9a98cc1e2a357 25-Feb-2013 Scott Kennedy <skennedy@google.com> Use the best contact result for chips

In situations where multiple results are returned for one contact
lookup, we were taking the last result. Instead, we should determine
which result is best (based on display name and photo availability),
and use it.

Bug: 8254525
Change-Id: Ic53d290431fcabce9607685a6eca45063fea0c9a
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
94fa301de71cc110671802eba8376c275b4055a4 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/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
16923ee63a79fce4be3f62b08bcd1f80617c1205 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/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
ccb8e237ec80934d1c983bb61f66b75541786ddc 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/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
03cfe3eee5635e419ab1d70d463b2b8beac72f00 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/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
43a3fc6494a37810e047a1154e19c9e991dd5353 03-May-2012 Mindy Pereira <mindyp@google.com> Fix alternate reverse lookup query.

Fixes b/6428194 Chips misbehave when re-editing a draft

Change-Id: I6589ece36aac7dcfb4ac2650d555f8ce914f337e
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
a5d37c8a968edf94755215617b593d3f61738a92 03-May-2012 Makoto Onuki <omakoto@google.com> Don't show duplicate destinations in alternate popup

There isn't much thing we can do from the contacts provider side, so let's just
remove duplicates manually...

Bug 6428328

Change-Id: I78e7fc7ed66d7cf977935611c8fb0318ffa7c83b
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
00adb32f3cea49ec82467c0e1a9e42659b556836 02-May-2012 Makoto Onuki <omakoto@google.com> Don't use DISPLAY_NAME for chips if name is email or phone

Don't use contact's display name, if the name source is EMAIL
or PHONE (or UNDEFINED). Just use the destination (i.e. the actual email
address or phone number) as the name.

Bug 5414496
Bug 6425953

Change-Id: Id0e7e57122a4840b075710309306b074143199bf
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
9c17ab5f3bf0f88e3641faf98931c4f9e7d65366 25-Apr-2012 Tom Taylor <tomtaylor@google.com> Fix alternates adapter

Make the same change for phone number chips as email chips:
tapping a chip was not showing the alternates for that contact.

Change-Id: I1fbac88a9869dbe97599e4d125709b4861f031d8
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
a62ba492f901e024b249e0138e96374b09766a36 25-Apr-2012 Mindy Pereira <mindyp@google.com> Fix alternates adapter.

Tapping a chip was not showing the alternats for that contact.

Change-Id: I747ddd8a46c6e60a3068cb21d6e5ea16c2d9fd0a
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
80f4abfb682426384e88fb1dddc682be1c8a6c7f 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/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
52c441e2c03e0f48572348953b985a4bf989c057 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/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
b4e244af14950aee7d612612d5406981315d3454 14-Oct-2011 Mindy Pereira <mindyp@google.com> Make sure we perform reverse lookup on pasted recips

Change-Id: Iff0d8670962f279e4fa3158a1acc3395f9e9ddc9
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
f908b64e75e0bb38ff2806232ca57c93189156ea 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/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
750e6e52d9e560d5fbf687f15bf388a947e98eb2 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/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
102cf10189b2c13045b885a5479333ae3b304491 21-Jul-2011 Daisuke Miyakawa <dmiyakawa@google.com> show type correctly in alternate listing

Change-Id: I8ca30df876a33d7dde544f1f2a9f59af51cae6d0
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
7211747e51623ae1305053f533c09dd335e013a2 20-Jul-2011 Daisuke Miyakawa <dmiyakawa@google.com> Show address type in auto-complete list

Also tweak layout file for better layouting.

Bug: 5028342
Change-Id: Iff81ed0c3013c65e6a293575f89c12606832838f
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
18987c44006700a2bfe614ec1e39a29ed5b23d78 11-Jul-2011 Mindy Pereira <mindyp@google.com> Print debug info for reverse lookup.

Change-Id: I8102bbe4d63e0c87e0603966b58d5773b20b4302
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
1852931de1e24e77cb708f4ba010eaa269426657 28-Jun-2011 Mindy Pereira <mindyp@google.com> Do reverse lookups on pre-appended recipient chips.

Change-Id: I338a07f89264606a58942520791f39908fedbedb
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
3bb52162b7e842243d4a14e73c15b20dbd1804d7 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/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
5086391a478c3b1badbb86074c3cef72126c7d0f 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/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
007a76baab414c9d432d31c661668b1bd07e3f80 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/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
67ad489cd290f7d2b468b4d69ce679edeac9bb7a 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/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
84dd9a88f0d9984996e951e59e73cb76cd2eaa5e 01-Jun-2011 Mindy Pereira <mindyp@google.com> Make RecipientEditTextViewInner package private.

Also add license and make EmailQuery values package private.
Change-Id: I366ca01ac54f04fbc999377be59dbaa139307550
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
97d7768576ff27d779d68f77e23925b69f3290bc 01-Jun-2011 Mindy Pereira <mindyp@google.com> Show alternate addresses when the user taps on a contact.

Change-Id: I9a88dd1612b98587e560c1e50030e36a28e30db9
/frameworks/opt/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java