Home | History | Annotate | Download | only in telephony

Lines Matching refs:Threads

38 import android.provider.Telephony.Threads;
75 " UPDATE threads SET read = " +
79 " AND " + Sms.THREAD_ID + " = threads._id)" +
83 " WHERE threads._id = new." + Sms.THREAD_ID + "; ";
86 " UPDATE threads SET message_count = " +
87 " (SELECT COUNT(sms._id) FROM sms LEFT JOIN threads " +
88 " ON threads._id = " + Sms.THREAD_ID +
91 " (SELECT COUNT(pdu._id) FROM pdu LEFT JOIN threads " +
92 " ON threads._id = " + Mms.THREAD_ID +
96 " WHERE threads._id = new.thread_id; ";
99 " UPDATE threads SET message_count = " +
100 " (SELECT COUNT(sms._id) FROM sms LEFT JOIN threads " +
101 " ON threads._id = " + Sms.THREAD_ID +
104 " (SELECT COUNT(pdu._id) FROM pdu LEFT JOIN threads " +
105 " ON threads._id = " + Mms.THREAD_ID +
109 " WHERE threads._id = old.thread_id; ";
113 " UPDATE threads SET" +
117 " WHERE threads._id = new." + Sms.THREAD_ID + "; " +
138 " UPDATE threads SET read = " +
142 " AND " + Mms.THREAD_ID + " = threads._id " +
147 " WHERE threads._id = new." + Mms.THREAD_ID + "; ";
151 " UPDATE threads SET" +
155 " WHERE threads._id = new." + Mms.THREAD_ID + "; " +
161 " UPDATE threads SET snippet = " +
166 " WHERE threads._id = OLD.thread_id; " +
167 " UPDATE threads SET snippet_cs = " +
172 " WHERE threads._id = OLD.thread_id; ";
177 // Set has_attachment=1 in the threads table for the thread in question.
183 " UPDATE threads SET has_attachment=1 WHERE _id IN " +
189 // the threads table's has_attachment column, if the part is an attachment.
195 " UPDATE threads SET has_attachment=1 WHERE _id IN " +
202 // we set has_attachment), update the threads table for all threads.
211 " UPDATE threads SET has_attachment = " +
214 " WHERE pdu.thread_id = threads._id " +
223 // the threads table's has_attachment column, if the message has an attachment in 'part' table
228 " UPDATE threads SET has_attachment=1 WHERE _id IN " +
284 * Look through all the recipientIds referenced by the threads and then delete any
293 // no threads, delete all addresses
296 // Find all the referenced recipient_ids from the threads. recipientIds is
337 * Update all threads containing SMS matching the 'where' condition. Note that the condition
338 * is applied to individual messages in the sms table, NOT the threads table.
349 // Delete rows in the threads table if
364 // Update the message count in the threads table as the sum
367 " UPDATE threads" +
370 " WHERE " + Sms.THREAD_ID + " = threads._id" +
374 " WHERE " + Mms.THREAD_ID + " = threads._id" +
381 " WHERE thread_id = threads._id" +
388 // the threads table to be that of the most recent message in
394 " WHERE thread_id = threads._id" +
398 " WHERE thread_id = threads._id" +
402 " UPDATE threads" +
409 " WHERE thread_id = threads._id" +
419 " UPDATE threads" +
424 " AND thread_id = threads._id" +
429 " WHERE thread_id = threads._id" +
812 // Updates threads table whenever a message in pdu is updated.
820 // Update threads table whenever a message in pdu is deleted
825 " UPDATE threads SET " +
827 " WHERE threads._id = old." + Mms.THREAD_ID + "; " +
832 // Updates threads table whenever a message is added to pdu.
839 // Updates threads table whenever a message in pdu is updated.
849 // Update the error flag of threads when delete pending message.
857 " UPDATE threads SET error = error - 1" +
861 // Update the error flag of threads while moving an MM out of Outbox,
871 " UPDATE threads SET error = error - 1" +
981 db.execSQL("CREATE TABLE threads (" +
982 Threads._ID + " INTEGER PRIMARY KEY AUTOINCREMENT," +
983 Threads.DATE + " INTEGER DEFAULT 0," +
984 Threads.MESSAGE_COUNT + " INTEGER DEFAULT 0," +
985 Threads.RECIPIENT_IDS + " TEXT," +
986 Threads.SNIPPET + " TEXT," +
987 Threads.SNIPPET_CHARSET + " INTEGER DEFAULT 0," +
988 Threads.READ + " INTEGER DEFAULT 1," +
989 Threads.ARCHIVED + " INTEGER DEFAULT 0," +
990 Threads.TYPE + " INTEGER DEFAULT 0," +
991 Threads.ERROR + " INTEGER DEFAULT 0," +
992 Threads.HAS_ATTACHMENT + " INTEGER DEFAULT 0);");
1014 // Updates threads table whenever a message is added to sms.
1018 // Updates threads table whenever a message in sms is updated.
1024 // Updates threads table whenever a message in sms is updated.
1032 // As of DATABASE_VERSION 55, we've removed these triggers that delete empty threads.
1033 // These triggers interfere with saving drafts on brand new threads. Instead of
1034 // triggers cleaning up empty threads, the empty threads should be cleaned up by
1035 // an explicit call to delete with Threads.OBSOLETE_THREADS_URI.
1039 // // from the threads table.
1043 // " DELETE FROM threads " +
1055 // " DELETE FROM threads " +
1065 // Update the error flag of threads when the error type of
1072 " UPDATE threads SET error = " +
1083 // Update the error flag of threads after a text message was
1090 " UPDATE threads SET error = " +
1538 db.execSQL("DROP TABLE IF EXISTS threads");
1561 " UPDATE threads SET error = error - 1" +
1573 // Add 'has_attachment' column to threads table.
1574 db.execSQL("ALTER TABLE threads ADD COLUMN has_attachment INTEGER DEFAULT 0");
1586 // add the update trigger for keeping the threads up to date.
1659 // add the update trigger for keeping the threads up to date.
1691 // Updates threads table whenever a message in pdu is updated.
1750 + Threads.ARCHIVED + " INTEGER DEFAULT 0");
1856 Log.e(TAG, "Failed to add autoIncrement to threads;: " + ex.getMessage(), ex);
1968 // the threads table. This could fail if the user has a lot of conversations and not enough
1969 // storage to make a copy of the threads table. That's ok. This upgrade is optional. It'll
1978 // Make the _id of the threads table autoincrement so we never re-use thread ids
1979 // Have to create a new temp threads table. Copy all the info from the old table.
1982 Threads._ID + " INTEGER PRIMARY KEY AUTOINCREMENT," +
1983 Threads.DATE + " INTEGER DEFAULT 0," +
1984 Threads.MESSAGE_COUNT + " INTEGER DEFAULT 0," +
1985 Threads.RECIPIENT_IDS + " TEXT," +
1986 Threads.SNIPPET + " TEXT," +
1987 Threads.SNIPPET_CHARSET + " INTEGER DEFAULT 0," +
1988 Threads.READ + " INTEGER DEFAULT 1," +
1989 Threads.TYPE + " INTEGER DEFAULT 0," +
1990 Threads.ERROR + " INTEGER DEFAULT 0," +
1991 Threads.HAS_ATTACHMENT + " INTEGER DEFAULT 0);");
1993 db.execSQL("INSERT INTO threads_temp SELECT * from threads;");
1994 db.execSQL("DROP TABLE threads;");
1995 db.execSQL("ALTER TABLE threads_temp RENAME TO threads;");
2137 db.execSQL("UPDATE threads SET has_attachment=1 WHERE _id IN " +