History log of /packages/apps/Mms/src/com/android/mms/data/Contact.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
1b8df494e49bf934fe160baea54ab5afc2ff3100 01-Dec-2011 Tom Taylor <tomtaylor@google.com> "Send calls to voicemail" should also mute SMS notications

Bug 5677944
When a user marks a contact with send-calls-to-voicemail, don't show
sms/mms notifications for that contact. Tested the changes with sms,
mms, and incoming messages with email addresses (a different code path
in Contact.java).

Change-Id: I7ac443dbee0659fc2f5782f5f2141a65a9c07071
/packages/apps/Mms/src/com/android/mms/data/Contact.java
0b0266636ea96d9e95542ffb3689b6c47f7edd43 18-Oct-2011 Tom Taylor <tomtaylor@google.com> am a3a45437: Merge "Device unable to send SMS message to nicknames which contains characters and numbers" into ics-mr0

* commit 'a3a45437efd765d5e6f51da7111badf552d0a160':
Device unable to send SMS message to nicknames which contains characters and numbers
d7fddfa20e7bfe9f0bf376f9cce9188bf9bf0354 18-Oct-2011 Tom Taylor <tomtaylor@google.com> Device unable to send SMS message to nicknames which contains characters and numbers

Bug 5453853
If an address looks like an alias and aliases are enabled, then treat the
alpha-numeric address as an address, rather than stripping non-dialable
digits and turning the address into a number. I tested this change in
conjunction with addresses such as "T-Mobile" to verify that those
addresses still work.

Change-Id: Ibd1a60ffddb481c977196c76bf13c8ce0a0da912
/packages/apps/Mms/src/com/android/mms/data/Contact.java
3e54d384bed81d27dbe15a2a69344d5e64a1c018 14-Oct-2011 Tom Taylor <tomtaylor@google.com> Unknown numbers are not formatted properly

Bug 5056289
When a contact is initially created, format the number based on the locale.
Just doing that will cause the number of be displayed in the UI correctly
and stored in the canonical_addresses table formatted as well.

Change-Id: I6434210034f28f3e9e031f926508d44708401e23
/packages/apps/Mms/src/com/android/mms/data/Contact.java
4f1871e8e85598c94d5f09d508c690c41fdcce16 30-Sep-2011 Tom Taylor <tomtaylor@google.com> My photo isn't displayed next to messages that I sent

Bug 5361233. Bug 5226635. Bug 5383721.
Add the concept of a "Me" contact to our contacts. It has the correct
uri of the profile so fastrack works. Also, it will load the profile
regardless of the state of the user's phone number. Tapping on your
own quick contact badge will show the profile.

Change-Id: Ib6ea288c9596a001f167a151aaeec6fe2c7c8e2c
/packages/apps/Mms/src/com/android/mms/data/Contact.java
6ac26ca62ba1e4252bf93672abd370966d3fb7c3 23-Sep-2011 Tom Taylor <tomtaylor@google.com> All SMS messages from non-contacts are grouped even if the numbers are different

Non-email and non-phone number addresses (such as T-Mobile) would end up
creating a contact with no name and number. Subsequently, all messages
from addresses like that would get appended to a single thread.
Bug 5331430

Change-Id: I54719f681446b7340b2b9c000b1e4e382046fa0c
/packages/apps/Mms/src/com/android/mms/data/Contact.java
8d54acc063c03b42c9b10dbd013a1552ebbe2d9f 23-Sep-2011 Tom Taylor <tomtaylor@google.com> My photo isn't displayed next to messages that I sent

Use the new profile uri to get the photo of "me". Bug 5226635

Change-Id: Ie133a2fd1c778d16c4cd693bbd92b48b9882da36
/packages/apps/Mms/src/com/android/mms/data/Contact.java
ad5cd4c952745600c8b5a0ca06455f5bae0dacdd 20-Sep-2011 Tom Taylor <tomtaylor@google.com> Viewing MMS thread goes into crazy "updateContact" loop

Trying to get the contact info for self (contact id 0) resulted in
an odd contact update loop when the contact info was empty. Detect
the empty case and don't notify the UI of the change in order to
break the loop. Bug 5075183

Change-Id: Ibda3335500ad7fb811ebd3ab4f0182640314d5e0
/packages/apps/Mms/src/com/android/mms/data/Contact.java
313d09ee558e6ac94ab28a205357885dc830cd0d 18-Jul-2011 Tom Taylor <tomtaylor@google.com> SMS messages sent from me do not show my picture

Remove an old avatar cache used for MessageListItems and use the
avatar found in Contacts. This is the same used by the Conversation.
Bug 3324364

Change-Id: Ie9235ae2efb0817f90346217aecc663d665e8b77
/packages/apps/Mms/src/com/android/mms/data/Contact.java
4759133e3c935e751815bf4f997d029caa64d889 29-Sep-2010 Bai Tao <michaelbai@google.com> Applied the new phone number formatting and caller id lookup method

Change-Id: I8caa7138e7ef58849530904cb371c0801b47883d
/packages/apps/Mms/src/com/android/mms/data/Contact.java
3487a66797bbf5339c59750c0d3d7fb703626730 18-May-2010 Mark Wagner <mxw@google.com> get this synchronization right

Bugfix 2680266. Finally get this right. We ended up synchronized in
one place on the Contact class object and in another place on the
ContactCache class object. Now, for simplicity, we just use the
list of listeners object to synchronize on.

Change-Id: I556cca4e992062211f88dd7e3b6247a44120ba01
/packages/apps/Mms/src/com/android/mms/data/Contact.java
7c4d1a499c2d836a56d516a71b0b282de3f17391 10-May-2010 Tom Taylor <tomtaylor@google.com> am 5857c040: am b142ea00: Handle anonymous sender
b142ea00f24f4b838e6b4d0f2761eedd0f14f625 07-May-2010 Tom Taylor <tomtaylor@google.com> Handle anonymous sender

In some places (such as Korea), it's possible to receive
a message without the sender's address. In this case,
all such anonymous messages will get added to the same
thread. Bug 2665039

Change-Id: Ic6bf7a7bfadfd3162d21ef4a59788b8886679872
/packages/apps/Mms/src/com/android/mms/data/Contact.java
b89b165c9966550383857e7db87d60a3ae6ff239 28-Apr-2010 Mark Wagner <mxw@google.com> am 23f763b0: am f49fc5b9: Merge "missing synchronization fix" into froyo
5e1e9052ebe2da73d3030676096c2bf12b2d06f7 28-Apr-2010 Mark Wagner <mxw@google.com> missing synchronization fix

Bugfix 2622197.

Modification of the static mListeners (hashmap) is synchronized on the ContactsCache
class object. This was missing, however, when we clone the hashmap in order to
send out updates. Cloning is done in case the callback modifies the list of listeners.

Change-Id: Ic09aaee91e448c4a7d610b6f72ad8122fefef7da
/packages/apps/Mms/src/com/android/mms/data/Contact.java
a6dd14dc0963aa8f30e625aa88e925e3fa0744f0 25-Jan-2010 Bai Tao <michaelbai@google.com> Provides a way to let user select the recipients from a list of phone numbers.
a. Add a buttion beside to recipients box.
b. The multiple phones picker which is implemented in Contacts is launched when user touch the button. The existent recpients are selected by default.
c. The user's selection will be populated to recipient's box when being back from multiple phones picker.

Also fix the related issue that the draft message is left once the recipient is changed.

Change-Id: I036b65dd1a651aae2fbb2e58a4b2b9e126ca4e74
/packages/apps/Mms/src/com/android/mms/data/Contact.java
60d7fa5f74463f22fe9a4cd81c0b2fcc95be7c09 19-Mar-2010 Tom Taylor <tomtaylor@google.com> Update after adding contact

After adding a contact, force the conversation to reload the associated
contacts. Bug 2524437.

Change-Id: I6c65bfe4f04c53f17a52ee62c678e97ade2aea80
/packages/apps/Mms/src/com/android/mms/data/Contact.java
0e3b231193556769f1d00d1a84073b652fccdd0d 18-Mar-2010 Mark Wagner <mxw@google.com> clone the list of listeners before iterating

Change-Id: I842766ee584037602446a09af273459dccb6d97a
/packages/apps/Mms/src/com/android/mms/data/Contact.java
f7e8281a223af6228e6399055a6197a1edd9bc3a 09-Mar-2010 Tom Taylor <tomtaylor@google.com> Remove mms-common

Get rid of the mms-common library and move the mms files back into the
framework where they originally came from.

Change-Id: I8ce2b0a2a3cfc6b7da13ce0e791173c09dd8f0f5
/packages/apps/Mms/src/com/android/mms/data/Contact.java
0a3684e0f1242518b522e2883fe275343768bb27 06-Mar-2010 Dmitri Plotnikov <dplotnikov@google.com> Making email matching case-insensitive.

Bug: 2254140
Change-Id: I403b14182b8d605a16a8f5b2f30ee75cfe2134ef
/packages/apps/Mms/src/com/android/mms/data/Contact.java
feb1aab54eabc98a04349af52e19ff9fbcd7c169 26-Jan-2010 Tom Taylor <tomtaylor@google.com> Enable GoogleVoice to intercept SMS sends

If GoogleVoice is installed, send it an intent and give it
a chance to handle sending the message. If it doesn't handle
the message or GoogleVoice isn't installed, then send the
message normally via the telephony layer.
Fixes bug: 2338847.
/packages/apps/Mms/src/com/android/mms/data/Contact.java
fd644551e8506266aad2b76463b51b44154ed62f 29-Jan-2010 Tom Taylor <tomtaylor@google.com> Update refs now that MMS is removed

Move MMS to mms-common library. Update imports.

Change-Id: I28fa24a68c27977eba58cb62f2667596d3abe2c4
/packages/apps/Mms/src/com/android/mms/data/Contact.java
dc7f95eaf3f1668e90e1add17e07fd3b4b839535 26-Jan-2010 Wei Huang <weih@google.com> clean up MMS contact more, manually integrate bug fixes from Eclair MR3.

- integrate change to speed up contact query.
- fixes contact query threading bug that could result in the contact cache containing the wrong number.
- fixes usage of synchronized block, synchronize on the contact object when updating the contact.
/packages/apps/Mms/src/com/android/mms/data/Contact.java
ea5e915b6104ff0e30c313bcb5a96f838997e57b 22-Jan-2010 Mark Wagner <mxw@google.com> Contact class cleanup

Register listeners on the class rather than on the individual contact.
This is easier to manage.
/packages/apps/Mms/src/com/android/mms/data/Contact.java
3451cbcbfb5a26dba9b6713e07ba9e279f90c7de 23-Dec-2009 Tom Taylor <tomtaylor@google.com> resolved conflicts for merge of 64c734ff to master
40ab55a4337738075adbda3642ce0415f3810c4c 18-Dec-2009 Mark Wagner <mxw@google.com> Use String rather than CharSequence as hash key

This is necessary because char sequence equality is object
equality as opposed to value equality. Strings are afforded
the special value equality property.
/packages/apps/Mms/src/com/android/mms/data/Contact.java
6be18bedb5b87dbbcdb54f37d5a0945bd0f71377 17-Dec-2009 Tom Taylor <tomtaylor@google.com> Unbundling work

This is the first step in unbundling the Mms app. Some of the changes include:
- moving some of the Mms code from the framework into the app itself.
- same with emoticons
- remove dependency on internal drawables and add local copy to mms
- some dependencies on various internal classes now moved to android-common library
/packages/apps/Mms/src/com/android/mms/data/Contact.java
513ec194e86409bac7d2ca61a4edcbbe6a36181e 09-Dec-2009 Mark Wagner <mxw@google.com> use a hashtable to speedup contacts cache lookup

The strategy is now as follows: for any given phone number take
the last 5 digits and use that as a key in a hashmap. Map to a
list of Contacts all of whom share that same key. Typically that
list will be very small.

Each "get" still requires at least one call to PhoneNumberUtils.compare.
We could eliminate that by introducing another hashtable which maps
from phone number to Contact object. In that case the existing mapping
function would only be used as a fallback when we didn't find anything
in the direct hash.

I recommend reviewing this change by looking at the new implementation of
"get". Trying to look at "diffs" won't work very well.
/packages/apps/Mms/src/com/android/mms/data/Contact.java
b54460a3af15ca85c2a7b6d5422e9e5eb4592fa8 08-Dec-2009 Mark Wagner <mxw@google.com> more Contacts code reorg

Merge the ContactInfoCache code into the Contacts code. The general organization
now is that all the interesting work happens in Contact.ContactsCache.
/packages/apps/Mms/src/com/android/mms/data/Contact.java
161c3cfe3480ab8b1b585cc0d3601f0cacc28c6d 07-Dec-2009 Mark Wagner <mxw@google.com> contacts cleanup

This is part one of series of code reorganizing.
/packages/apps/Mms/src/com/android/mms/data/Contact.java
53b4416f5b8c76f2f66d12645951e09554683092 03-Dec-2009 Mark Wagner <mxw@google.com> am c407b5e3: Merge change I2e5b602b into eclair

Merge commit 'c407b5e3443ff715b47c0c343de24aa052d93f04' into eclair-mr2

* commit 'c407b5e3443ff715b47c0c343de24aa052d93f04':
be sure to set mIsStale to false (bug 2299730)
e1b0c082f7ab1910acdf8783c3095b323f93f6e7 02-Dec-2009 Mark Wagner <mxw@google.com> be sure to set mIsStale to false (bug 2299730)
/packages/apps/Mms/src/com/android/mms/data/Contact.java
36991889eac09f621b14ffd5a7a47317a35870a3 20-Nov-2009 Tom Taylor <tomtaylor@google.com> resolved conflicts for merge of d2edbbb1 to eclair-mr2
d2edbbb15b418002e3c6542e092a8228ad39baaf 19-Nov-2009 Tom Taylor <tomtaylor@google.com> Fix two Messaging contact updating bugs

1) There's a situation where getting a contact could potentially
return a cached contact whose contents haven't been completely filled
in yet.
2) When a contact's info does change, update the messages in the thread
to reflect the current contact data.
Bug 2271800.

Change-Id: I48403c45c461b3c609400a3a5f55b99aaee01cbd
/packages/apps/Mms/src/com/android/mms/data/Contact.java
6646f0f7e8fa5797926f93938a3b4ab1018ea4d1 10-Nov-2009 Wei Huang <weih@google.com> am 431e11d4: bug 2236535: find a way to update the stale canonical_addresses entries with new SMS/MMS number.

Merge commit '431e11d429783c07eca6e789de0518d17b42fb74' into eclair-mr2

* commit '431e11d429783c07eca6e789de0518d17b42fb74':
bug 2236535: find a way to update the stale canonical_addresses entries with new SMS/MMS number.
431e11d429783c07eca6e789de0518d17b42fb74 07-Nov-2009 Wei Huang <weih@google.com> bug 2236535: find a way to update the stale canonical_addresses entries with new SMS/MMS number.

- when the user sends a message, let's check if the new message's address is different than the one
stored in the recipientId's cache. If it is, let's update the cache and the underlying canonical_addresses
table in the db, so we wouldn't keep using a bad number for future references.

Change-Id: I3ac9940fa3c37d29c7398cac4535915249469563
/packages/apps/Mms/src/com/android/mms/data/Contact.java
6ff4f59f843abe764725a64a29ff964a132298d6 06-Nov-2009 Tom Taylor <tomtaylor@google.com> Fix contact cache rebuilding

Don't toss and rebuild the ContactInfoCache on every contact change.
With this change, we mark a contact as stale and the next time we're
asked for the contact, we asynchronously update the contact in the
background. Helps speedup bug 2167799.

Change-Id: Idc1271776cddd43fedcd7f31608a3302c8861813
/packages/apps/Mms/src/com/android/mms/data/Contact.java
cab73c66f1b07a639cbb75b6510d425477cbcaec 05-Nov-2009 Tom Taylor <tomtaylor@google.com> resolved conflicts for merge of 25b939e5 to eclair-mr2
25b939e5a7ecb1e0879b684dc5bc55183cf468b4 04-Nov-2009 Wei Huang <weih@google.com> bug #2236535: use an initial bad address (from a merged contact) would lead to permanent failure for the messaging thread even after a good number is used.

- when the user selects/types a new number in the recipients editor, and we find a cached contact, set the contact's number to be the newly selected number. This will allow the user to correct the address, at least until the next time MMS rebuilds the contact cache with the bad number stored in the database. This will get us to par with the Cupcake behavior. Unfortunately, after MMS app is relaunched, the thread would use the bad initial adddress again (loaded from the 'canonical_address' table in the db). That's a much harder, riskier fix, so deferring to later.

Change-Id: If32958482b14848bd770cff50e4736457c47ac8a
/packages/apps/Mms/src/com/android/mms/data/Contact.java
ec317d32aec10389fa5832ae8a1164f0375efb2e 03-Nov-2009 Tom Taylor <tomtaylor@google.com> Fix "sent to self" bugs

The messaging app special cases the contact "Me". Bug 2205868 found two
cases that exposed bugs in handling messages sent to self.
/packages/apps/Mms/src/com/android/mms/data/Contact.java
d09e218e2278acb6276207bddfbef1761617e8f8 10-Oct-2009 Tom Taylor <tomtaylor@google.com> Fix contact cache rebuilding

Don't toss and rebuild the ContactInfoCache on every contact change.
With this change, we mark a contact as stale and the next time we're
asked for the contact, we asynchronously update the contact in the
background.
/packages/apps/Mms/src/com/android/mms/data/Contact.java
d63aeec78473feafc7e3edeeefd2f0d62604b283 28-Sep-2009 Wei Huang <weih@google.com> bug 2150183: fix SMS address comparison so "foo"=="foo".

- when comparing two identical SMS addresses that are not a phone number (or email address), the loose phone number comparison
in PhoneNumberUtils will return false because it's not meant to compare non phone numbers. Therefore we also need to
do String.equal().

Change-Id: I6842a231543f894c6cd33a34a52abfd62f69c7bc
/packages/apps/Mms/src/com/android/mms/data/Contact.java
d2f67de2dfb6c2e5b659c0018cd47015e0aefe7c 21-Sep-2009 Wei Huang <weih@google.com> fixing bug 1892808: use PhoneNumberUtils.compare() now it handles sms short code better.

Change-Id: I2207dad5a03ed46a563ab919b3fc0a7ab405bcf5
/packages/apps/Mms/src/com/android/mms/data/Contact.java
d9d7479a8c9e10b7b3f39137e28ed0f283e4a257 11-Sep-2009 Wei Huang <weih@google.com> fix memory leak in MMS (bug 2021095); don't rebuild Contact cache and draft cache as frequently.

- fix a memory leak reported by Motorola. We weren't registering a Recycler listener, so weren't getting called back for onMovedToScrapHeap() when done with the ConversationHeaderViews, and thus not exercising unregistration for contacts changed listener.

- moved some tasks from ConversationList.onResume() and onPause() to onStart(). We were rebuilding the draft cache and contact cache in onResume(), which was too aggressive. Also, we no longer rebuild the draft cache anymore. I think it was defensive to do so, and I think draft cache is getting updated correctly in the right places (in CMA.onStop and onNewIntent) so we don't have to to play safe by doing unnecessary work.

- don't register for presence and contacts changed. We don't display presence directly in CMA ourselves anymore, and instead use ContactHeaderWidget, so we don't need to listen for presence changes there; for contact changed observer, I think it's too much to rebuild the contact cache for any contacts changes in the contacts provider. Instead we compromise and rebuild the contact cache in ConversationList.onStart(). This is a tradeoff, as when sitting on the CMA or ConversationList screen, we won't update if Contact changed. However, re-entering ConversationList will trigger the update if there is any.

- beefed up logging a bit more...

Change-Id: I97f1d7eae3ca5d3d069977e2c9fa0d7b0500dc3e
/packages/apps/Mms/src/com/android/mms/data/Contact.java
32a1dcecca6ed0881431555a4218d0282814326c 27-Aug-2009 Wink Saville <wink@google.com> temporary fix for bug 1892808. If the SMS address is a short code addr, don't feed it to PhoneNumberUtils.compare() as that doesn't handle short phone numbers.

- if the SMS address is shorter than 6 digits, just do a straight string comparison now. SMS short codes don't usually have the separater characters like "(.- ", or the prefix '+'.
- when updating the contact cache, don't spin up one thread per contact. Do all the contacts update in a single thread.
- add a unit test for comparing SMS phone numbers and short codes. Disabled ConversationaListTest, it seems to get stuck for a long long time.

Change-Id: I9fca4734c235466671ff72d144842bbbb0d7dda9
/packages/apps/Mms/src/com/android/mms/data/Contact.java
2be1333ab5b265c0ff758354bac6a9eff97e1fac 21-Aug-2009 Dmitri Plotnikov <dplotnikov@google.com> Upgrading MMS to new Contacts API
/packages/apps/Mms/src/com/android/mms/data/Contact.java
f788737b03ff8f3f9f1302f944333b4e1d287820 03-Aug-2009 Mark Wagner <mxw@google.com> move to ContactHeaderWidget
/packages/apps/Mms/src/com/android/mms/data/Contact.java
1c59b33adcdc15a035fce8bd37cd02cd063b4274 30-Jul-2009 Mark Wagner <mxw@google.com> avatar work
/packages/apps/Mms/src/com/android/mms/data/Contact.java
458dea8d1858e418b6918f477d0139335b14ff45 10-Jun-2009 Tom Taylor <tomtaylor@google.com> Fix bug 1808964 - Remove presence polling.

Register a content observer to listen for presence changes and immediately update the
presence state of the header of the ComposeMessageActivity.
/packages/apps/Mms/src/com/android/mms/data/Contact.java
33a87f96f8c625aa10131a77a3968c97c4ec5a62 27-May-2009 Ficus Kirkpatrick <ficus@android.com> Remove all references to ContactInfoCache except those in Contact.

This is in preparation for moving the database logic from ContactInfoCache
into Contact and removing the old cache.
/packages/apps/Mms/src/com/android/mms/data/Contact.java
20b79e068c8aebff46f24fd3803cf7697df4eac4 27-May-2009 Ficus Kirkpatrick <ficus@android.com> Remove RecipientList, whose functionality has been subsumed by ContactList.
/packages/apps/Mms/src/com/android/mms/data/Contact.java
1d98ae0b203e01034ddead4214d1520ce863a23b 22-May-2009 Ficus Kirkpatrick <ficus@android.com> New data model for contact information.
/packages/apps/Mms/src/com/android/mms/data/Contact.java