diff --git a/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java b/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
index 3fc2dd3..abe7ffd 100644
--- a/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
+++ b/src/com/android/providers/telephony/MmsSmsDatabaseHelper.java
@@ -420,6 +420,54 @@
         }
     }
 
+    private static void updateThreadDate(SQLiteDatabase db, long thread_id) {
+        if (thread_id <= 0) {
+            return;
+        }
+
+        try {
+            db.execSQL(
+            "  UPDATE threads" +
+            "  SET" +
+            "  date =" +
+            "    (SELECT date FROM" +
+            "        (SELECT date * 1000 AS date, thread_id FROM pdu" +
+            "         UNION SELECT date, thread_id FROM sms)" +
+            "     WHERE thread_id = " + thread_id + " ORDER BY date DESC LIMIT 1)" +
+            "  WHERE threads._id = " + thread_id + ";");
+        } catch (Throwable ex) {
+            Log.e(TAG, ex.getMessage(), ex);
+        }
+    }
+
+    public static void updateThreadsDate(SQLiteDatabase db, String where, String[] whereArgs) {
+        db.beginTransaction();
+        try {
+            if (where == null) {
+                where = "";
+            } else {
+                where = "WHERE (" + where + ")";
+            }
+            String query = "SELECT _id FROM threads " + where;
+            Cursor c = db.rawQuery(query, whereArgs);
+            if (c != null) {
+                try {
+                    Log.d(TAG, "updateThread count : " + c.getCount());
+                    while (c.moveToNext()) {
+                        updateThreadDate(db, c.getInt(0));
+                    }
+                } finally {
+                    c.close();
+                }
+            }
+            db.setTransactionSuccessful();
+        } catch (Throwable ex) {
+            Log.e(TAG, ex.getMessage(), ex);
+        } finally {
+            db.endTransaction();
+        }
+    }
+
     public static void updateAllThreads(SQLiteDatabase db, String where, String[] whereArgs) {
         db.beginTransaction();
         try {
diff --git a/src/com/android/providers/telephony/MmsSmsProvider.java b/src/com/android/providers/telephony/MmsSmsProvider.java
index 0cf56ad..23229db 100644
--- a/src/com/android/providers/telephony/MmsSmsProvider.java
+++ b/src/com/android/providers/telephony/MmsSmsProvider.java
@@ -100,6 +100,7 @@
     private static final int URI_FIRST_LOCKED_MESSAGE_BY_THREAD_ID = 17;
     private static final int URI_MESSAGE_ID_TO_THREAD              = 18;
     private static final int URI_MESSAGES_COUNT            = 19;
+    private static final int URI_UPDATE_THREAD_DATE                = 20;
 
     /**
      * the name of the table that is used to store the queue of
@@ -268,6 +269,8 @@
         // may be present.
         URI_MATCHER.addURI(AUTHORITY, "threadID", URI_THREAD_ID);
 
+        URI_MATCHER.addURI(AUTHORITY, "update-date", URI_UPDATE_THREAD_DATE);
+
         // Use this pattern to query the canonical address by given ID.
         URI_MATCHER.addURI(AUTHORITY, "canonical-address/#", URI_CANONICAL_ADDRESS);
 
@@ -1330,6 +1333,9 @@
                 break;
             }
 
+            case URI_UPDATE_THREAD_DATE:
+                MmsSmsDatabaseHelper.updateThreadsDate(db, selection, selectionArgs);
+                break;
             default:
                 throw new UnsupportedOperationException(
                         NO_DELETES_INSERTS_OR_UPDATES + uri);
