History log of /packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
087ef9de80082cd001e75c15e1f93cc65d50ed27 19-Mar-2013 Roger Chen <cxr514033970@gmail.com> Process inactive msgs if Mms app is relaunched

Try to process all pending transations and queued smses
which maybe killed by user, OOM or Mms crashing and so on
after Mms app is (re)launched.

Since for Mms: Mms app only will retry failed transaction(
must be marked as failed) due to network issue or any known
reason, and for sms: Mms app only rely on SmsDispatcher to
retry to send at most 3 times.

Change-Id: Ifc46d1a86bf33342590313c29d6d4c0aff7c739f
Signed-off-by: Roger Chen <cxr514033970@gmail.com>
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
ddd2fdd5e80aa9d689c9ed982e1e003028fa8628 29-Jan-2013 Bin Li <libin@marvell.com> Send next message if current one fails

If there is an exception during sending current
message, it will not try to send next pending one.

How to reproduce:
1) Send a sms to 2 recipents. First one is a
invalid address, for example "invalid", and
the second one is a valid address;
2) Message to the first address fails;
3) It will not send the message to the second
address.

Change-Id: I9442711118a64d0d4b9b08a04cf717c97428bf46
Signed-off-by: Bin Li <libin@marvell.com>
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
d645c8b53ae904bc059ee1ca7232916637c223e5 25-Sep-2012 Tom Taylor <tomtaylor@google.com> Notifications ring many times

Bug 7190093

markAsRead() was causing multiple sound notifications. The code for playing
a half sound notification needed to check whether one of the outstanding
notification was actually for the focused conversation. I'll add this CL
to the list of CL's to turn off logging in.

Change-Id: I84ddc2434630ee60f2eabc273d40195c95cd6061
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
4c6c7c65a1033d5cc0d87cc8b0e07a69db1842e8 04-Sep-2012 Tom Taylor <tomtaylor@google.com> SmsReceiverService NullPointerException in replaceFormFeeds

Bug 7006780
Bug 7082042

Protect against a null message. When there's a null message, put an empty
message in the database (vs. "null"). While testing, I hit a crash in
MessagingNotification.updateNotification where calling:
NotificationInfo mostRecentNotification = sNotificationSet.first();
hit an exception. We should never be inside updateNotification without
there actually being a notification. updateNotification is called from
blockingUpdateNewMessageIndicator() which is called by several async
services, such as SmsReceiverService and TransactionService. The code
relied on a global variable. There's no need for the variable to be global.

Change-Id: I23b0a0ebed30905468832b2f0f80f2f0016768f0
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
d64419030e1fec1e751695dab3bd7236e2fb0214 02-Aug-2012 Roger Chen <cxr514033970@gmail.com> Clean and format all imported packages

Change-Id: I2e45f5ba1d56b9b17314a8b0f4c0fc1a5d8fc4d9
Signed-off-by: Roger Chen <cxr514033970@gmail.com>
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
6bbfdd3cc9cbe6b31dc64f122f3308563d19e077 02-May-2012 Tom Taylor <tomtaylor@google.com> Messaging app crashed

Bug 6350665

There's a race condition in Telephony.Threads.getOrCreateThreadId when it
calls MmsSmsProvider.getThreadId. If a user deletes a thread and a message
for that thread arrives at the same time, it's possible for the delete
to remove the thread found in getThreadId. With this change, getOrCreateThreadId
is wrapped by a function that blocks if we're doing a delete. I tested this
technique by adding a 10 second sleep in onDeleteComplete. The SmsReceiverService,
which calls getOrCreateThreadId is fine being blocked, since it does all of
its work on a background thread.

Change-Id: Ia9fc04052adac15c2252034006dd6cdd5c02f108
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
b0ef8fc2738b210a2bb0490e75eedc1e7b7b491f 29-Mar-2012 Tom Taylor <tomtaylor@google.com> Calling MessagingNotification.updateSendFailedNotification results in a DB query on the UI thread

Bug 6248511

An AsyncTask comes to the rescue. Do the query in the
background and do the UI work on the UI thread.

Change-Id: Id27790e08ba763df30a86fd0d4c3a0531e01fb8e
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
c7aa632be8e7d3ebe71f236f534ea2f0af71e04a 19-Mar-2012 Tom Taylor <tomtaylor@google.com> Add a widget for SMS/MMS

Bug 5935857

Change-Id: I1246487d974fef9de0f26e7b55fad2a940b084d5
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
c8d727902ff6976c45285a12aab176545a7848bb 28-Feb-2012 Todor Kalaydjiev <todor@google.com> Play sound at half-volume and don't show notification for new msgs in current thread

bug: 5928707
Change-Id: I6954f8f1700daa7d4bca971f72da55d153ab5d39
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
dc0014f123be2c475bdeed2aef09566b5127e2a2 06-Oct-2011 bi4004.lee <bi4004.lee@samsung.com> Fix the error when receiving Replace Type message with more than 2 pages.

Change-Id: I92e54c96b06c09a0f3da897d345bde7dc5693024
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
104d391ddcc251c4c26975c093d2df5dea9b15c1 20-Oct-2011 Tom Taylor <tomtaylor@google.com> NullPointerException at com.android.mms.ui.ClassZeroActivity.onCreate

Bug 5489822
We have to pass the new "format" parameter through to the ClassZeroActivity.
The format is required in createFromPdu(). Without that new param, the
function will return a null SmsMessage.

Change-Id: I38aa264336e2d5af2aaa2b3ae9a7e5fcec771cf2
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
7015fa3f96383fa8a34d6b9e28f61d228e234d7e 06-Oct-2011 Todor Kalaydjiev <todor@google.com> Don't send OUTBOX messages on reboot; instead, show a failure notification.

b/5172594
P.S. There will likely be a follow-up change to implement the same behavior
upon other triggers, not just reboot.

Change-Id: I0ed0f2fba2c097efd91f2d726f85b4f9559e2723
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
68be4f572123274aa67e13544482ca4d99e7b235 26-Sep-2011 Tom Taylor <tomtaylor@google.com> Always log an error

When sending an sms and the smsmanager reports an error, log the
error. Bug 5368219

Change-Id: I55fa1389c996b3eaf68a606583542b172752a709
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.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/transaction/SmsReceiverService.java
04db56904da453ac04f9f9d05fe1c2ce7a3d952f 21-Sep-2011 Tom Taylor <tomtaylor@google.com> Received SMS from "Jan 1, 2000"

If the system clock is reporting a weird time, use the timestamp
of the received message as the received time. Bug 5315874

Change-Id: I98e215078065169d94dcd8dab88109e00c3600b1
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
a0bda6a838d0c9bff996aa39d4f9750faa00adda 12-Sep-2011 Tom Taylor <tomtaylor@google.com> Add some debug code for double send

On reboot, one particular user reports that an old message gets resent.
Add debug logging code to print out when a message gets sent and when
the successful send confirmation comes back (where we move the message
from the outbox to the sent box). This code also gets triggered by
onBootCompleted, where the bug seems to manifest itself. Bug 5172594

Change-Id: Ic42fa877418c438a83186e249463566358a3e825
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
0856dec418d9838e09b1609439279e248355e0c4 16-Aug-2011 Tom Taylor <tomtaylor@google.com> Turn off send sms debugging

Add a simple debug function at the choke point so the next time
the telephony layer reports an error from the RIL, we'll print out
the error. Bug 5164371

Change-Id: Idb4b588e3e956248f429311361795b49ec2c9b70
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
0d2c0042be90f42635e3bc301f2a2e37460e6344 12-Aug-2011 Tom Taylor <tomtaylor@google.com> Add more debug log code for message not sent

Turning on for a day or two to capture some log info. Now printing out
the error code returned in the intent from the SmsManager. Bug 5144439

Change-Id: I687b030810dfff9d42a47f8908a8173fa43af8e9
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
c33ee154b6fd872439fd24a073f947339bbe4d22 11-Aug-2011 Tom Taylor <tomtaylor@google.com> Add debug log code for message not sent

Turning on for a day or two to capture some log info.
Bug 5144439

Change-Id: Icbbf8a4a0e485fb1ed49d7977220e7258b886a14
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
dca923722b6eb0bb3cd8ca1d4d7b478c2fa4352b 24-Jun-2011 Tom Taylor <tomtaylor@google.com> Fix NPE

If parsing a sms fails, it silently fails by internally catching an
exception and setting the internal SmsMessage guts to null. Catch
that situation. Bug 3236638

Change-Id: I71767bd5f2b2713840e9aa7e72d7073cccb98a75
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
54711acb7191269e0a4723320bd74f29dd2c9223 18-Nov-2010 Fredrik Roubert <roubert@google.com> Add the field date_sent to keep track of the date a message was sent.

Change-Id: I848511952589af86b57fc24d4a001958017887ec
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
9337760339d7d3a1cace8a2acfc2df7e50219a89 03-Jan-2011 Wei Huang <weih@google.com> Merge commit 'f9466d4b' into manualmerge

Conflicts:
src/com/android/mms/data/WorkingMessage.java
src/com/android/mms/ui/ComposeMessageActivity.java

Change-Id: If66a2c8d1573c09fc47b94c56915c916720a607c
858d59e9f4b0839ee014e52e0744ea910d9830ff 03-Jan-2011 Wei Huang <weih@google.com> bug #3057952: add bunch more debugging info to catch this bug.

Change-Id: I3ea9bd19adcf177697536cc56ab079957f863463
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
d2d14e8398a01d035f2703f4309c766f4acf2aa4 10-Aug-2010 Tom Taylor <tomtaylor@google.com> am a5c677a3: am 444f4d20: Merge "Move failed message to failed state" into gingerbread

Merge commit 'a5c677a390386d580a5077fdc920cc7f03d28b6d'

* commit 'a5c677a390386d580a5077fdc920cc7f03d28b6d':
Move failed message to failed state
13848bd88f29a358d13c2ce49f5c90c5858296f2 03-Aug-2010 Tom Taylor <tomtaylor@google.com> Move failed message to failed state

When we try and send a message and the telephony layer throws an
exception, move that message to the failed state. Otherwise, it
perpetually remains in the outbox and shows as "Sending..." to the
user. Bug 2885780.

Change-Id: Ic2ba789c24a9ed0842c51102c2e424ce1a2d9905
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
159cc76b6fa80c9f20549d8168216a5226fd0a4a 13-May-2010 The Android Open Source Project <initial-contribution@android.com> am 3c6eacd7: merge from open-source master
3c6eacd7f75aef4109f6ba8f1fbf2c957bd58ae2 13-May-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: Id75aa0c9ba9ad95cb8bbd5cf98d417b075de876a
f97cdd928bbc1953d422466d62807f07ae66119e 29-Mar-2010 Naveen Kalla <nkalla@codeaurora.org> Display message when operation fails since FDN being enabled

The terminal disallows SMS operations for numbers which are not in the Fixed
Dialing Number (FDN) list when the FDN service is enabled. FDN_CHECK_FAILURE
error is sent from by RIL when this happens. Display a message to the user.

Change-Id: I0c271db743997a24f12ef96f0162a62462f52569
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
beb7834e73f6bc94938cb448522df19edb60d8c8 19-Apr-2010 Tom Taylor <tomtaylor@google.com> Replace formfeeds

According to the spec, formfeeds should be replaced by linefeeds.
Add a unit test. Bug 2561999.

Change-Id: I40762bdf210baefe858e84e76fa50354f73715f7
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
bd2a8f5bd39ce46a43b5bcc759432ebea4f68369 15-Apr-2010 The Android Open Source Project <initial-contribution@android.com> merge from open-source master

Change-Id: Ib54a62360d01c059a4fc2ade5968e79009a4b201
6a7ba7cf4d775dbb29f3cafbee67d823149da5f1 08-Apr-2010 Naveen Kalla <nkalla@codeaurora.org> Fix memory leaks and corner cases in MMS app

The following problems will be fixed with these changes
1) IndexOutOfBounds exception when viewing a slide show. mCurrentElement should
not exceed the size of all entries. This caused IndexOutOfBounds exception
2) Redundant call for registerSimChangeObserver causes OOM issues.
SimChangeObserver is registered in onResume function. So the call in
onQueryComplete can be removed.
3) Check for empty sender address before trying to get associated contact number
when an SMS is received
4) Fix Cursor leak while receiving sms
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
3b21f6ab04db5936d73e9f53032f1587389380ff 22-Mar-2010 Tom Taylor <tomtaylor@google.com> Fix DB query on the UI thread

Move a notification query on the UI thread to a worker thread.
Any calls from UI threads (which includes receivers) are made
nonblocking. Calls from non-UI threads (which includes services)
are blocking. Tested various scenarios and checked threads in the
debugger. Bug 2524765 and bug 2533501.

Change-Id: I38213b7202957bdb103058b657be04bfe6b085dc
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
c36deab7d27940a07554cc424114d9c9ddd36552 11-Mar-2010 Tom Taylor <tomtaylor@google.com> Don't show toast

When the sms delivery report setting is turned on, only show a toast
on a delivery receipt, not for every received message. Bug 2501111

Change-Id: I29bf90ea250bd3d7f2e9f5a0bceac769bfa53e94
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.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/transaction/SmsReceiverService.java
627007213deb59ef938c80353c8f3598b01478b3 26-Feb-2010 Wei Huang <weih@google.com> Bug 2030420: fix SMS/MMS statusbar notification.

- don't show statusbar notification for sms/mms based on whether there are unread messages or not. Instead, add a "seen" column for the SMS and Mpdu (mms) table. Each SMS and MMS message will now have a "seen" flag in the db. If there are unseen messages, we'll show the statusbar notification. Once the user reads a thread, we'll mark a thread (and all messages in the thread) read and seen. If the user goes to the conversation list activity, we'll mark all messages "seen", but won't touch the read flag for the messages.

So now the user can have many unread messages, but still have seen all the messages, thus won't get notified repeatedly just because there are unread messages.

we'll mark a message "seen" flag to 0 for incoming SMS and MMS (pdu) messages.

to-do: mark all messages as seen when the user hits the clear notification button in the window shade.
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
4020be563f457ed2251b43928f14770246c886a2 11-Feb-2010 Tom Taylor <tomtaylor@google.com> Fix double display of outgoing messages

Prior to this fix, sending an SMS message would put the message
in the SMS table marked as pending. As the message was pulled off the queue
to be sent, a duplicate message was added to the SMS table and marked
as "outbox". Then the pending message was deleted out of the same table.
Meanwhile, the UI responded to these DB changes and momentarily flashed
two copies of the outgoing message in the ComposeMessageActivity. With
this change, we only keep a single copy of the message in the SMS table and
simple change the column value from pending to outbox. The result is a
lot less DB churn and a much smoother UI when sending an SMS. Tested with
short SMS messages and long, multi-part messages.

Change-Id: Iaad4f7a9732d79786b50aa19428f51bfec002d4a
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.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/transaction/SmsReceiverService.java
f31df323b2dc4b668d91b24dd3a5d34f5ccbb14c 16-Jan-2010 Tom Taylor <tomtaylor@google.com> Cleanup toast handler

This is for bug 2369881. The bug recommended removing the handler.
When I tried that (by calling the toast directly) the toast no longer
showed up. I stepped through the toast's show() method, but didn't see
anything wrong. I decided to follow the model of Activity's runOnUiThread()
and make the code a little more obvious.

Change-Id: Ice20fe9e8dff121ec2a54432bbccdab826537633
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
52b0fc717011d84dd25c1e88998eaae97c8161a8 13-Jan-2010 Bai Tao <michaelbai@google.com> Sending message one by one
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.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/transaction/SmsReceiverService.java
354b945e3d1cc4b6c38c94a5c74c1552ed5a83da 13-Nov-2009 Tom Taylor <tomtaylor@google.com> resolved conflicts for merge of cd88c0f1 to eclair-mr2
cd88c0f1da9bc67a67dd7174428ab3195a2dc11f 12-Nov-2009 Tom Taylor <tomtaylor@google.com> Only register for service changes when needed

The SmsReceiverService registered for SERVICE_STATE changes and this
was causing the Messaging app to be needlessly started up on every
SERVICE_STATE change. With this fix, we only register for that event
when we fail to send a SMS message because of no radio sig, etc.
Once we successfully send the queued message, we'll unregister the
event filter.

Change-Id: I12cbe0cb9a72bbf628bf9a4929680519e85057a2
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
91938f8d97bc071aa6aacce6d3fb7cbaf493f019 06-Nov-2009 Wei Huang <weih@google.com> resolved conflicts for merge of 67ec6c54 to eclair-mr2
67ec6c54e11c19caf894b4ffce7250fb3fd96d30 06-Nov-2009 Wei Huang <weih@google.com> bug #2236553: catch NPE thrown by SmsManager.sendMultipartTextMessage().

- need to catch the NPE and deal with it, like clean up and delete the queued message. Otherwise we not only get a crash in the app, but the queued message would keep getting retried, therefore grow the conversation thread everytime it retries.

- also catch a RuntimeException when we try to insert an existing conversation into the Conversation cache. That caused an app crash too!

Change-Id: Iba081955e19d7a5eb517c3a3aea5186534787c15
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
161375d2c4eff31add607fc0befa5c781c6fd7f1 28-Oct-2009 Tom Taylor <tomtaylor@google.com> Store and show error code

When we get an intent from the telephony layer, extract and
save any error codes bubbled up. Load the error code in MessageItem
and for now, display the code in the Message Details dialog.
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
35de139283bfeca8b2360c8b13b9cd8dee8e039b 29-Sep-2009 Tom Taylor <tomtaylor@google.com> Update our services

Use the new onStartCommand and return START_NOT_STICKY where appropriate.
Handle null intents.

Change-Id: I9c1f7caf32d4cd793d9328c5fb9ed77f988fa83c
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
2c77f17bc77af92e57c82cc1bfa44de2979e505a 24-Sep-2009 Tom Taylor <tomtaylor@google.com> Fix a null intent
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
23142979f43786098655229416cf1d07c5f78e09 03-Sep-2009 Tom Taylor <tomtaylor@google.com> Fix send order

When SMS messages can't be sent, they're queued up. When messaging
can continue (back in range or out of airplane mode) the messages
were pulled off the queue in the newest-to-oldest order, resulting in
them getting sent in the wrong order. With this change, messages are
send in the same order that they were composed.

Change-Id: Id7a190dc27ef975c9553fd33210c58bba07ef0dd
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
0d798c0853ead129b245ac7e8700f3a4aba92ecb 03-Sep-2009 Wei Huang <weih@google.com> tweak logging SMS sending and receiving.

Change-Id: Ia037cd8d63956c05c75f690df35a0dc4ef1b24f3
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
f3d4a23a76a4bbe0d48503ad7abf5d8f4fc38c31 02-Sep-2009 Tom Taylor <tomtaylor@google.com> Add logging info

Add logging info for receiving and sending SMS messages, hoping to track
down the bug where the receiver gets multiple copies of a message.

Change-Id: I75398140d67ed5b9dc7b21d288a6e4fc7dc00790
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
812391ad832f3fdac054ad3a50af563da16e99b5 25-Aug-2009 Wei Huang <weih@google.com> Add onNewIntent() to ComposeMessageActivity, and add the launchmode="singleTop" to AndroidManifest.xml. Just specifying the intent flag Intent.FLAG_ACTIVITY_SINGLE_TOP doesn't make the activity single top.

(cc: Dianne only for the activity launch mode flags in AndroidManifest.xml)

- the singletop launch mode is needed for the case when we receive a new message notification for the same contact that's on CMA already. If CMA has a MMS draft on screen (but not saved to db yet), not going thru. onNewIntent() would cause the following bad sequence.

- onCreate() would load any draft saved in db, but in this case there isn't draft saved in db yet because we only save draft in CMA.onStop(). So loadDraft() would load the empty draft.
- onStop() on the old CMA activity would now save the in-memory MMS draft to db.
- the new CMA lost the MMS draft that's there before clicking on the notification. But resulting db has the MMS draft, which is now orphaned and not associated with the conversation. From here on out, entering and exiting the CMA for this conversation would not see the MMS draft, but it's there in the part table in db. VERY BAD!

so with onNewIntent(), we can check if the new intent's recipient is the same as the old one, and skip the whole shenanigan.

- add debug logging for draft cache. Changed the log tag for draft cache to "Mms:draft", and CMA to "Mms:compose".
- guard against null cursor returned from Contacts query. Contacts is very flaky right now, and I am getting a null cursor from it all the time.
- reorg logging. Add new LogTag class. Log MMS app logs using "Mms:app" and transaction logs using "Mms:transaction".

Change-Id: I5e12c87ab378ff9b6ff326e136598f64bd423129
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
baf7fec7d1a5b8d52ae7be04865f9e869742c261 27-Jul-2009 repo sync <dxn738@motorola.com> SMS to own number creates two threads and crashes

Send an SMS from a test phone to itself (say the number is 9243176013).
A thread gets created. But when this SMS gets received (of course from
the test phone itself), the number gets received as '09243176013'. And
one more thread is created. But in the conversation list, 2 threads are
shown with the same number (9243176013). When it is tried to add this
new conversation thread to the cache, it throws an Exception which is
not caught.

From this time onwards, everytime we launch Messaging, we keep getting
the Uncaught Exception, and the application closes.

To fix, in Conversation.java handled the exception by catching it from
wherever this function is called. In files Conversation.java and
SmsReceiverService.java did changes to consider 9243176013 and 09243176013
as a same 'from address', so that only one thread id gets created.
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
4da6513065fbcfbf7fee9a18176ce62d2f62c825 24-Jun-2009 Yong Liu <yong.liu@motorola.com> Display Mode 00 for CDMA Messaging

The Message Display Mode subparameter is used to indicate to the mobile
station when to display the received message.

The Message Display Mode subparameter can take on the following parameters:

'00': Immediate Display: The mobile station is to display the received
message as soon as possible.
'01': Mobile default setting: The mobile station is to display the received
message based on a pre-defined mode in the mobile station.
'10': User Invoke: The mobile station is to display the received message
based on the mode selected by the user.
'11': Reserved

So when phone receives SMS with display mode 00, the message has to be displayed
immediately. The current android code supports Display mode 00 but it does not
give the additional requirements. User has choice to save it or discard it after
reading. If the user doesn't respond in 5 minutes, the message will be saved to
the database automatically.
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
23da10700b189ccca64b8e729631763572a0f15f 05-Jun-2009 Tom Taylor <tomtaylor@google.com> Fix bug 1895010 - Need to delete excess messages by single thread, rather than processing all threads.

This change calls the recycler with a specific thread id when sending or receiving a sms or mms message.
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
3239889e9a417617b755d4cde22070843e5c070b 01-Jun-2009 Tom Taylor <tomtaylor@google.com> Checkpoint work on MMS/SMS Recycler

A user can enable a setting to limit the number of saved messages
per thread. Eventually, UI will allow a user to lock a message and
prevent it from getting automatically deleted when hitting the limit
of saved messages. Work to do includes adding a saved column to the
sms and pdu tables and then implementing the UI to modify/view the
lock per message.
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
e995b84b783c4a430bf3899372a337cc9c896b38 17-Apr-2009 Ficus Kirkpatrick <ficus@android.com> Scrub the MMS app for dead code.
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
37321876549776417f035118f157d9531f73de6b 02-Apr-2009 Wink Saville <> AI 144245: Fix merge conflict for megering in the CDMA changes in to master from donutburger.

Automated import of CL 144245
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
b3cb9bbf929f70cb4855f03e4bfbed749022cf1b 25-Mar-2009 Ficus Kirkpatrick <> Automated import from //branches/master/...@142128,142128
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
5d2d0046ada7b53205e537d8675d32a8785e8d1d 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@140373
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
72735c62aba8fd2a9420a0f9f83d22543e3c164f 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
892f2c5bf965b1431ae107b602444a93f4aad4a3 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
0f236f55349f070ac94e12cca963847173393da8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java
8eed706474910ccb978acda03e85d3261037da6e 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/packages/apps/Mms/src/com/android/mms/transaction/SmsReceiverService.java