Loading android-smsmms/src/main/java/com/android/mms/service_alt/DownloadRequest.java +6 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.os.Binder; import android.os.Bundle; import android.provider.Telephony; import android.text.TextUtils; import com.android.mms.service_alt.exception.MmsHttpException; import com.google.android.mms.MmsException; import com.google.android.mms.pdu_alt.GenericPdu; Loading @@ -37,6 +38,7 @@ import com.google.android.mms.pdu_alt.RetrieveConf; import com.google.android.mms.util_alt.SqliteWrapper; import com.klinker.android.send_message.BroadcastUtils; import com.klinker.android.send_message.Transaction; import timber.log.Timber; /** Loading Loading @@ -176,6 +178,10 @@ public class DownloadRequest extends MmsRequest { // Update some of the properties of the message final ContentValues values = new ContentValues(); values.put(Telephony.Mms.DATE, System.currentTimeMillis() / 1000L); try { values.put(Telephony.Mms.DATE_SENT, retrieveConf.getDate()); } catch (Exception ignored) { } values.put(Telephony.Mms.READ, 0); values.put(Telephony.Mms.SEEN, 0); if (!TextUtils.isEmpty(creator)) { Loading android-smsmms/src/main/java/com/android/mms/transaction/NotificationTransaction.java +18 −4 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.provider.Telephony.Mms; import android.provider.Telephony.Mms.Inbox; import android.provider.Telephony.Threads; import android.telephony.TelephonyManager; import com.android.mms.MmsConfig; import com.android.mms.util.DownloadManager; import com.google.android.mms.MmsException; Loading @@ -38,13 +39,20 @@ import com.google.android.mms.pdu_alt.PduComposer; import com.google.android.mms.pdu_alt.PduHeaders; import com.google.android.mms.pdu_alt.PduParser; import com.google.android.mms.pdu_alt.PduPersister; import com.google.android.mms.pdu_alt.RetrieveConf; import com.klinker.android.send_message.BroadcastUtils; import timber.log.Timber; import java.io.IOException; import static com.android.mms.transaction.TransactionState.*; import static com.google.android.mms.pdu_alt.PduHeaders.*; import timber.log.Timber; import static com.android.mms.transaction.TransactionState.FAILED; import static com.android.mms.transaction.TransactionState.INITIALIZED; import static com.android.mms.transaction.TransactionState.SUCCESS; import static com.google.android.mms.pdu_alt.PduHeaders.MESSAGE_TYPE_RETRIEVE_CONF; import static com.google.android.mms.pdu_alt.PduHeaders.STATUS_DEFERRED; import static com.google.android.mms.pdu_alt.PduHeaders.STATUS_RETRIEVED; import static com.google.android.mms.pdu_alt.PduHeaders.STATUS_UNRECOGNIZED; /** * The NotificationTransaction is responsible for handling multimedia Loading Loading @@ -180,9 +188,15 @@ public class NotificationTransaction extends Transaction implements Runnable { Uri uri = p.persist(pdu, Inbox.CONTENT_URI, true, true, null); RetrieveConf retrieveConf = (RetrieveConf) pdu; // Use local time instead of PDU time ContentValues values = new ContentValues(1); ContentValues values = new ContentValues(2); values.put(Mms.DATE, System.currentTimeMillis() / 1000L); try { values.put(Mms.DATE_SENT, retrieveConf.getDate()); } catch (Exception ignored) { } SqliteWrapper.update(mContext, mContext.getContentResolver(), uri, values, null, null); Loading android-smsmms/src/main/java/com/android/mms/transaction/RetrieveTransaction.java +8 −2 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.net.Uri; import android.provider.Telephony.Mms; import android.provider.Telephony.Mms.Inbox; import android.text.TextUtils; import com.android.mms.MmsConfig; import com.android.mms.util.DownloadManager; import com.google.android.mms.MmsException; Loading @@ -35,10 +36,11 @@ import com.google.android.mms.pdu_alt.PduParser; import com.google.android.mms.pdu_alt.PduPersister; import com.google.android.mms.pdu_alt.RetrieveConf; import com.klinker.android.send_message.Utils; import timber.log.Timber; import java.io.IOException; import timber.log.Timber; /** * The RetrieveTransaction is responsible for retrieving multimedia * messages (M-Retrieve.conf) from the MMSC server. It: Loading Loading @@ -155,8 +157,12 @@ public class RetrieveTransaction extends Transaction implements Runnable { true, null); // Use local time instead of PDU time ContentValues values = new ContentValues(2); ContentValues values = new ContentValues(3); values.put(Mms.DATE, System.currentTimeMillis() / 1000L); try { values.put(Mms.DATE_SENT, retrieveConf.getDate()); } catch (Exception ignored) { } values.put(Mms.MESSAGE_SIZE, resp.length); SqliteWrapper.update(mContext, mContext.getContentResolver(), msgUri, values, null, null); Loading Loading
android-smsmms/src/main/java/com/android/mms/service_alt/DownloadRequest.java +6 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.os.Binder; import android.os.Bundle; import android.provider.Telephony; import android.text.TextUtils; import com.android.mms.service_alt.exception.MmsHttpException; import com.google.android.mms.MmsException; import com.google.android.mms.pdu_alt.GenericPdu; Loading @@ -37,6 +38,7 @@ import com.google.android.mms.pdu_alt.RetrieveConf; import com.google.android.mms.util_alt.SqliteWrapper; import com.klinker.android.send_message.BroadcastUtils; import com.klinker.android.send_message.Transaction; import timber.log.Timber; /** Loading Loading @@ -176,6 +178,10 @@ public class DownloadRequest extends MmsRequest { // Update some of the properties of the message final ContentValues values = new ContentValues(); values.put(Telephony.Mms.DATE, System.currentTimeMillis() / 1000L); try { values.put(Telephony.Mms.DATE_SENT, retrieveConf.getDate()); } catch (Exception ignored) { } values.put(Telephony.Mms.READ, 0); values.put(Telephony.Mms.SEEN, 0); if (!TextUtils.isEmpty(creator)) { Loading
android-smsmms/src/main/java/com/android/mms/transaction/NotificationTransaction.java +18 −4 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.provider.Telephony.Mms; import android.provider.Telephony.Mms.Inbox; import android.provider.Telephony.Threads; import android.telephony.TelephonyManager; import com.android.mms.MmsConfig; import com.android.mms.util.DownloadManager; import com.google.android.mms.MmsException; Loading @@ -38,13 +39,20 @@ import com.google.android.mms.pdu_alt.PduComposer; import com.google.android.mms.pdu_alt.PduHeaders; import com.google.android.mms.pdu_alt.PduParser; import com.google.android.mms.pdu_alt.PduPersister; import com.google.android.mms.pdu_alt.RetrieveConf; import com.klinker.android.send_message.BroadcastUtils; import timber.log.Timber; import java.io.IOException; import static com.android.mms.transaction.TransactionState.*; import static com.google.android.mms.pdu_alt.PduHeaders.*; import timber.log.Timber; import static com.android.mms.transaction.TransactionState.FAILED; import static com.android.mms.transaction.TransactionState.INITIALIZED; import static com.android.mms.transaction.TransactionState.SUCCESS; import static com.google.android.mms.pdu_alt.PduHeaders.MESSAGE_TYPE_RETRIEVE_CONF; import static com.google.android.mms.pdu_alt.PduHeaders.STATUS_DEFERRED; import static com.google.android.mms.pdu_alt.PduHeaders.STATUS_RETRIEVED; import static com.google.android.mms.pdu_alt.PduHeaders.STATUS_UNRECOGNIZED; /** * The NotificationTransaction is responsible for handling multimedia Loading Loading @@ -180,9 +188,15 @@ public class NotificationTransaction extends Transaction implements Runnable { Uri uri = p.persist(pdu, Inbox.CONTENT_URI, true, true, null); RetrieveConf retrieveConf = (RetrieveConf) pdu; // Use local time instead of PDU time ContentValues values = new ContentValues(1); ContentValues values = new ContentValues(2); values.put(Mms.DATE, System.currentTimeMillis() / 1000L); try { values.put(Mms.DATE_SENT, retrieveConf.getDate()); } catch (Exception ignored) { } SqliteWrapper.update(mContext, mContext.getContentResolver(), uri, values, null, null); Loading
android-smsmms/src/main/java/com/android/mms/transaction/RetrieveTransaction.java +8 −2 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.net.Uri; import android.provider.Telephony.Mms; import android.provider.Telephony.Mms.Inbox; import android.text.TextUtils; import com.android.mms.MmsConfig; import com.android.mms.util.DownloadManager; import com.google.android.mms.MmsException; Loading @@ -35,10 +36,11 @@ import com.google.android.mms.pdu_alt.PduParser; import com.google.android.mms.pdu_alt.PduPersister; import com.google.android.mms.pdu_alt.RetrieveConf; import com.klinker.android.send_message.Utils; import timber.log.Timber; import java.io.IOException; import timber.log.Timber; /** * The RetrieveTransaction is responsible for retrieving multimedia * messages (M-Retrieve.conf) from the MMSC server. It: Loading Loading @@ -155,8 +157,12 @@ public class RetrieveTransaction extends Transaction implements Runnable { true, null); // Use local time instead of PDU time ContentValues values = new ContentValues(2); ContentValues values = new ContentValues(3); values.put(Mms.DATE, System.currentTimeMillis() / 1000L); try { values.put(Mms.DATE_SENT, retrieveConf.getDate()); } catch (Exception ignored) { } values.put(Mms.MESSAGE_SIZE, resp.length); SqliteWrapper.update(mContext, mContext.getContentResolver(), msgUri, values, null, null); Loading