History log of /packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
82fc72b94a54eb3c70bcfbb1effd9b3a9b775af9 29-Jul-2014 Ye Wen <ywen@google.com> Move archived column from pdu/sms to threads (3/4)

Add new update logic to change threads' archived column value

Change-Id: I24cb9b163471c1daebb767aff342fe588b8cf249
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
49776410646ba3eb7aef3ec34871a38aa69441c4 10-Jul-2014 Ye Wen <ywen@google.com> New SMS and MMS APIs and semantics (3/4)

New SMS and MMS database columns: archived and creator

b/14095333

Change-Id: I4d79014c12ac622b098c1b7892134ce842f70f83
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
8b6ec7667b9174188116d0ef6a5d2af22e0cb85a 12-Jul-2014 Colin Cross <ccross@google.com> Revert "New SMS and MMS APIs and semantics (3/4)"

This reverts commit 955261609370cfae1083974d3c815edfa3453a77.

Change-Id: I2f509217e0904359a8c37630f783097729d09709
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
955261609370cfae1083974d3c815edfa3453a77 10-Jul-2014 Ye Wen <ywen@google.com> New SMS and MMS APIs and semantics (3/4)

New SMS and MMS database columns: archived and creator

b/14095333

Change-Id: I6e7a91aa3a6371b621982083419341939d95e610
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
cfb8bbdc3932473966d043fbd72b6c067933f2c1 17-Jun-2014 Ye Wen <ywen@google.com> Add SUB_ID columns for SmsProvider and MmsProvider

b/15673719

Change-Id: I0f3d6c3bfaead109edef283ac45d7e5f8c3220b4
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
15156cd6afcc7ed57ac7be40ef2d32a615e83599 15-Nov-2012 Tom Taylor <tomtaylor@google.com> App crashed as it was moving to foreground and message was received

Bug 7540115

In the MmsSmsProvider, wrap the code that creates a new thread in a transaction.
Creating a new thread requires multiple database operations. It's possible
for the newly created thread to be deleted part of the way through the
operation.

Change-Id: I3cbf8ba4ad3f3f30b513280ac3defc276b4a70a0
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
1a45ce5c6e417fee13c55221a97c3d36b4bea846 17-Oct-2012 Tom Taylor <tomtaylor@google.com> Empty draft created on deleting a group MMS message

Bug 7360609

Cleanup pdu table on db upgrade to remove all rows with a NULL threadId.
An earlier change made sure we only inserted rows with a valid threadId or
with 0. A NULL threadId in the pdu table causes deleting a thread to fail.

Change-Id: I38824aa879fed80fe2385633c46d3c7eab0ae3b8
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
842e3110ccca88661d06c733b56ead009f90b988 27-Sep-2012 Tom Taylor <tomtaylor@google.com> SMS delete behavior odd

Bug 7175606

Wrap the delete operations in a transaction.

Change-Id: I6b07a83f2dbac6e2bdb4da872863708aac27f5bc
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
49c9ede3206cf2b9504cb9d06deeea8fd856900c 09-Sep-2012 Tom Taylor <tomtaylor@google.com> Old thumbnail shown

Bug 6602473

Don't reuse part and pdu ids because their uri's are used as keys for the
pdu and thumbnail caches. Change the part and pdu tables to use
AUTOINCREMENT keys. When copying over a table to a temp table, dropping the
original, and renaming the temp to the original, all triggers associated
with the original table are dropped. Those triggers have to be recreated.
The changes look more extensive than they really are. There were many mms-related
triggers in createCommonTriggers() that had to be moved to CreateMmsTriggers().
I used a diff tool to compare the schema dumps from the database before
and after to verify the tables and triggers are the same (and used
that same tool in the first place to identify those missing triggers).

Change-Id: I92a100db7479e28f3c1d62ff6adab961c5871113
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
f88d1d6733158144e9e0c87f29b446068edf0507 07-Sep-2012 Tom Taylor <tomtaylor@google.com> Group MMS flickers between white square and received message when initially checking

Bug 7113015

Add a new column in the pdu that keeps track of whether a message is
text-only. The UI can use that flag to decide whether to show the attachment
box or not.

Change-Id: I158dd07d415f24f0200c81f39de6feac03f37f8b
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
10a8c9b23ac380d728ecc839d753e26d9b21015a 05-Jun-2012 Tom Taylor <tomtaylor@google.com> Crash on deleting messaging thread

Bug 6609647

Change-Id: I6cce1746238cb02b112340298adfd23896c39b3f
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
4b14c35e9e44d5df2b5340141f2b24bab351c603 02-Jun-2012 Tom Taylor <tomtaylor@google.com> Thread can't be deleted

Bug 6593778

Delete all the messages in a thread and the thread comes back. If you
get a row in the pdu or sms table with an empty thread_id, the query to
delete threads that aren't referenced by any message fails. The query
has to weed out messages with no thread_ids.

Change-Id: I2a2121a27a4d4ce9ed02b8415dc50b0a59623d94
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
f409b0e23a37080c3b8c501671c4ea436a1e6346 19-Dec-2011 Tom Taylor <tomtaylor@google.com> Deleting a thread will mess up a multi-recipient thread with the same recipient

Bug 5763490
The previous DB query for deleting unreferenced recipient id's didn't work
on threads addressed to multiple recipients because the recipient id's are
stored as a space-separated list of ids in a single column. With this change,
the work for identifying unreferenced recipient id's is done in java,
rather than in an sqlite3 selection statement.

Change-Id: Id6ad32408a67dc7550b32ce8ab095635c324a799
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
09710cec4926bcd3708376face04507e661bcc02 07-Dec-2011 Tom Taylor <tomtaylor@google.com> Message received with wrong sender

Bug 5622048
If the last message of a thread is deleted which results in the very last
recipient in the canonical_addresses table getting deleted, and the messaging
app is still running, and a new message arrives for an address the messaging
app has never seen before, then the new message will appear to have been
sent from the recently deleted recipient. The recipient id cache in the
app doesn't know the recipient was deleted and its cache it out of date.
The fix is to never reuse recipient ids by setting the _id on the
canonical_addresses table to AUTOINCREMENT.

Change-Id: Ia3618fb906e09b3a305ac778b8d73983586fa938
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
3ce9cb8e04c821453dd7731b30309d508017f89c 28-Sep-2011 Tom Taylor <tomtaylor@google.com> Delete unreferenced phone numbers

Bug 5375782. Bug 5172594
The canonical_addresses table in mmssms.db is used to keep a reference
between recipientIds and phone numbers/email addresses. The threads
table contains references to these recipient ids. When a thread is
deleted, the recipients are orphaned. With this change, whenever a
thread is deleted, we delete unreferenced numbers.

Change-Id: I7e1b7a11317d2e6662fab3f434239fe21ca313ec
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
527fcced9fe9cf8525e33ffb098fd28650af24af 22-Sep-2011 Tom Taylor <tomtaylor@google.com> Fix a number of draft-related bugs

Remove the triggers that delete threads when there are no sms or pdu
entries referring to those threads. These triggers end up killing a
thread while we're saving drafts. Bug 5354900 among others.

Change-Id: I85879ad8ae819a5262fbaaed325b2e3a4b2b3e7d
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
10faf3f5f0c16a812c25f02d208715fabc556a7d 27-Apr-2011 Tom Taylor <tomtaylor@google.com> Make upgrading to AUTO INCREMENT more robust

If the upgrade fails, turn on a receiver that listens for storage ok.
When there's more storage try the upgrade again. Tested the normal upgrade
path with 10,000 threads. Tested the upgrade path with 10,000 threads and
low memory. Left the test code in, but turned off.

Change-Id: Ia273428af4e7f0160414ef49b4d18998c25725b4
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
1ab4800f1598cae72846ae4d24d6c545a5965d97 19-Apr-2011 Tom Taylor <tomtaylor@google.com> Auto-increment the thread_id

The thread_id is the row_id of the Mms provider's threads table. Threads
are created and deleted as various drafts come and go. Bugs in the past
have been linked to using the wrong thread. One issue was the result
of not clearing the app's thread cache when a thread was deleted. To
help avoid these sorts of problems, the thread_id is now an autoincrement
key. The threads table will never reuse a thread_id. A new thread will
always have a thread_id one greater than the max ever seen in the table.
The upgrade to add the AUTOINCREMENT keyword is only executed after the
other db upgrades have run.

Change-Id: Iaed04bc02af504d4132ff3f5cf9b732ebf9eaf47
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
ea5c40c18a83bd984da79ecda301bd5a7cd9daa1 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: If3dcfe7d3c86454f67dbdd432e54e94ad56c1c67
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
0ebbb48f9f83ad65d738d1910a38e4fbdb920ac7 13-May-2010 Jeff Hamilton <jham@android.com> Stop using private APIs that are going away.

Change-Id: I2e6ac42f577041aec889fa41c9d923b0f4657957
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
a882662df39eb5af84cc386fc09df4636166f48f 31-Mar-2010 Wei Huang <weih@google.com> bug #2553905: handle upgrading the "seen" column in sms/mms db better.

- when upgrading the sms and pdu tables from Donut, we add a new column called "seen". That's used to compute the statusbar notifications. "seen=0" means we need to throw up a notification. The bug is that we were adding the "seen" column with value=0, which makes the MMS app notify for all messages that are in the SMS/MMS database after the upgrade. Obviously that's no good. So, add some logic in the upgrade code to set the 'seen' value the same as the 'read' value for each message in the table. That will made the app notify only the unread messages.

Change-Id: I1bb5a10c84d165c5fb463628b35c4c49ed36f1d3
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
8a4060ec0c2433ceeb619a3a35fba5aabedbc1c6 23-Mar-2010 Tom Taylor <tomtaylor@google.com> Revert "Add metadata column"

This reverts commit fc0eb2f2905477c7200eb54584d2c104cd6d1adb.

Conflicts:

src/com/android/providers/telephony/MmsSmsDatabaseHelper.java

Change-Id: Ic0dd4a602763ef643539f14c3a78afaed2b328fe
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
1e47c4888938f8abbe581707b8762d49c12b9b7a 13-Mar-2010 Tom Taylor <tomtaylor@google.com> Fix thread not read

One of the triggers for setting a thread's "read" status wasn't narrowing
its search for message types that can be read. As a result, an unread
"deliver ind" in the pdu that isn't displayed to the user caused the
thread table's "read" column to be set to 0. The other triggers, such as
message_count, only count the pdu messages the user can see. Update this
particular trigger the same way. Bug 2511065

Change-Id: I259717f9692fe68fd15ab7cb1583bc109e93e5f7
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
fc0eb2f2905477c7200eb54584d2c104cd6d1adb 12-Mar-2010 Tom Taylor <tomtaylor@google.com> Add metadata column

Add a new column to sms and pdu tables.

Change-Id: Ib489d3d4bcdade3dbbd787fee472bc78e1562504
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
b1bae65bf18dc22762cf7b8210fdad836b3e4ee5 09-Mar-2010 Tom Taylor <tomtaylor@google.com> Remove mms-common lib

Refer to mms in its old location in the framework.

Change-Id: Id2e7fd636be814495c92c7aaf09a11c35ad92218
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
9565e7f07472931ccefbe6804234d3543f96c9b8 01-Mar-2010 Tom Taylor <tomtaylor@google.com> Speedup error column update

Follow the suggestions in bug 2467382 and do separate queries
to update the error column. Only do an update if the desired
error value doesn't match the current value.

Change-Id: I1c422565ceb1bf11dca584d26b1da4949185e29d
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
dfac57630db2993a1cda15ee4fb697ea1baadb0b 26-Feb-2010 Wei Huang <weih@google.com> bug 2030420: add the "seen" column for sms and pdu tables.

- add new "seen" columns for sms and pdu tables.
- implement onUpgrade to add the new columns.
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
a6e44cb0cc7866439acba48ea18bdac9862afbde 01-Mar-2010 Tom Taylor <tomtaylor@google.com> Add sms index

Add an index of threadid and type to the sms table.
Bug 2467372.

Change-Id: Ib6511361a15c8f72d6a0d4977642236546120145
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
94489f821be2401e4a9045901d9112d42273b362 23-Feb-2010 Tom Taylor <tomtaylor@google.com> Fix has_attachment triggers

If you create a thread by sending an MMS text message to an email
address and then create another thread by sending an MMS with an
attachment to a different address, both threads would show an
attachment icon in the conversation list. In the MMS provider, there
are four triggers that deal with setting the thread's has_attachment
column. Two of the triggers were wrong and needed an extra comparison
to only select parts that matched the target thread id. Bug 2235425.

Change-Id: I497a3243f56de216049f18eaa0e96898679f7c62
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
c71e770495e0b4597b4b3d947cbc68a0d35051be 28-Jan-2010 Tom Taylor <tomtaylor@google.com> Remove MMS from the framework

Reference the new mms-common library for MMS stuff that used
to live in the framework.

Change-Id: I79f35fa0ba0f51adbdf386688469318e40688ef6
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
7ad939ed205080002ab32d318414337fc9c3ce1f 15-Jan-2010 Tom Taylor <tomtaylor@google.com> Bump Mms database number

Bump the DB number so the database will get upgraded and the
new search tables built.

Change-Id: I75660c280dfbf6f06dd63d9c5f9d5446ae4df5ee
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
8e5ee782690175e9cfb9a37f600f207b952ba8a6 05-Jan-2010 Mark Wagner <mxw@google.com> search work

1. introduce an FTS3 indexed table called "words"
2. put all sms messages into the words table (done in the SmsProvider's insert).
3. put all part messages which are plain text into the words table (done in the MmsProvider's insert).
4. put triggers on the delete and update for sms and part and update words appropriately.
5. remove the search recents code (mainly commented out) within the mms app.
6. implement a suggest provider which queries the words table for matches.
7. modify the search activity to use the words table rather than a LIKE clause.
8. modify the search activity to use a regular expression (rather than String.indexOf) for
generating the snippet and highlighting the appropriate words within the snippet. NOTE
that originally I wanted to compute the matching words positions using the sql offsets
function but it doesn't work within the slightly complicated query which is used for
doing the search (two joins and a union, etc.)
9. modify the highlighting code within compose message activity to use regular expressions
rather than indexof to do the highlighting.
10. what else did I forget?
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
7d4e56b5fb5726342a3e0ebfba91dac48f56c107 04-Nov-2009 Tom Taylor <tomtaylor@google.com> Fix Mms DB

Missing a comma when creating new DB tables. Bug 2236361.
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
ddf267c20a697f66b8238538fb6ad31507724692 29-Oct-2009 Tom Taylor <tomtaylor@google.com> Add new error code column to SMS
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
1047ab43a2bcdad9b8e8cf27afabe40ab8608b3d 30-Sep-2009 Wei Huang <weih@google.com> bug 2155021: add sql trigger to update thread attachment column when pdu's thread_id column is modified.

- when the pdu's thread_id column is changed (the user changed the to address), we need to update the new
thread's has_attachment column.

Change-Id: I017835b0c4445618eb835bb63d16427558715743
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
075b10540170f65f868d283950216d543cfe38a0 25-Aug-2009 Wei Huang <weih@google.com> fix sms/mms db upgrade code. When upgrading from ver 43 to 46, the code stopped after upgrading to ver 44's schema, but failed to fall thru. to perform the rest of the upgrade for ver 45 and 46.

Change-Id: I7b23c83382d4034234e39e236fa620db7c3bfa69
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
f0a9e90721310bed023a9ff1f176f1b5e05a14f7 20-Jun-2009 Mark Wagner <mxw@google.com> mods to support searching of mms messages
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
3ddbfd0e8b3affa7cfb3b82078f122dd4533bd63 05-Jun-2009 Ficus Kirkpatrick <ficus@android.com> Remove trailing comma in SQL statement to create MMS database table.
Fixes MMS app crash on launch.
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
a48a9665519f98d1e89b24d17726d7a478e575f2 04-Jun-2009 Tom Taylor <tomtaylor@google.com> Add locked column to sms and pdu tables.

Add support for the ability to lock individual messages from getting automatically
deleted by the recycler. A new column was added to both the sms and mms side of the
messaging world.
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
2ad5ba8b1fc7b9197b78a9c3a0039522bdbd402f 25-Mar-2009 Wei Huang <> Automated import from //branches/master/...@141313,141313
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
5f1e43fe6163014d8c56325daf7af364c2ff077f 05-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@136594
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
7236c3ad7ff01dd5ece14a2cabbf5ce3a570d793 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
9812a61b6cc6a630b836d3c4d3a1a95ae25e3abb 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
692628d08125876df80f3ad06d7d7e3e7bc94c2a 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@132589
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
b7e851834b865657944db81476856b2bbc9b7a06 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@137055
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
fdf470d79a0ad961692c50eac9c956c6ce4c944a 20-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@132569
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
62f78e4e0ae991f0df285488a1af382bd5105483 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
15fe736a6429ed6e4cc0138ce88b241807af207e 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java