Apply new duplication detection logic for M-Notification.ind
The X-Mms-Transaction-ID of the M-Notification.ind identifies each M-Notification.ind message. New duplication detection logic compares the new X-Mms-Transaction-ID with the stored value to identify the Network duplicate M-Notification.ind message when it receives a new M-Notification.ind message. Following SQL WHERE clause is used to query from the DB. ((m_type=NOTIFICATION_IND) OR (m_type=RETRIEVE_CONF)) AND (exp>NOW)) AND (t_id=xxxxxx) For this, when the M-Retrieve.conf is received, updates the t_id and the exp from the corresponding M-Notification.ind so that new logic would work even after the M-Notification.ind is deleted. Test: Manual Change-Id: I86e1eee62ea612d96ca16e5384b044cb6541ff6a Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
This commit is contained in:
@@ -78,6 +78,7 @@ public class ProcessDownloadedMmsAction extends Action {
|
||||
private static final String KEY_CONTENT_LOCATION = "content_location";
|
||||
private static final String KEY_AUTO_DOWNLOAD = "auto_download";
|
||||
private static final String KEY_RECEIVED_TIMESTAMP = "received_timestamp";
|
||||
private static final String KEY_EXPIRY = "expiry";
|
||||
|
||||
// Set when message downloaded by us (legacy)
|
||||
private static final String KEY_STATUS = "status";
|
||||
@@ -130,6 +131,7 @@ public class ProcessDownloadedMmsAction extends Action {
|
||||
params.putString(KEY_PARTICIPANT_ID, participantId);
|
||||
params.putInt(KEY_STATUS_IF_FAILED,
|
||||
extras.getInt(DownloadMmsAction.EXTRA_STATUS_IF_FAILED));
|
||||
params.putLong(KEY_EXPIRY, extras.getLong(DownloadMmsAction.EXTRA_EXPIRY));
|
||||
action.start();
|
||||
}
|
||||
|
||||
@@ -279,6 +281,7 @@ public class ProcessDownloadedMmsAction extends Action {
|
||||
KEY_AUTO_DOWNLOAD);
|
||||
final long receivedTimestampInSeconds =
|
||||
actionParameters.getLong(KEY_RECEIVED_TIMESTAMP);
|
||||
final long expiry = actionParameters.getLong(KEY_EXPIRY);
|
||||
|
||||
// Inform sync we're adding a message to telephony
|
||||
final SyncManager syncManager = DataModel.get().getSyncManager();
|
||||
@@ -288,7 +291,7 @@ public class ProcessDownloadedMmsAction extends Action {
|
||||
MmsUtils.insertDownloadedMessageAndSendResponse(context,
|
||||
notificationUri, subId, subPhoneNumber, transactionId,
|
||||
contentLocation, autoDownload, receivedTimestampInSeconds,
|
||||
retrieveConf);
|
||||
expiry, retrieveConf);
|
||||
status = result.status;
|
||||
rawStatus = result.rawStatus;
|
||||
mmsUri = result.uri;
|
||||
|
||||
Reference in New Issue
Block a user