mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Backed out changeset 6bdd99eabb57 (bug 921918) Windows XP Debug Bustage on a CLOSED TREE
This commit is contained in:
parent
ae87dbcf4b
commit
f14424cb1e
@ -46,6 +46,7 @@ interface nsIRilMobileMessageDatabaseService : nsIMobileMessageDatabaseService
|
||||
* - |deliveryStatus| DOMString Array: the delivery status of received message
|
||||
* - |receivers| DOMString Array: the phone numbers of receivers
|
||||
* - |phoneNumber| DOMString: [optional] my own phone number.
|
||||
* - |transactionId| DOMString: the transaction ID from MMS PDU header.
|
||||
*
|
||||
* Note: |deliveryStatus| should only contain single string to specify
|
||||
* the delivery status of MMS message for the phone owner self.
|
||||
|
@ -1456,6 +1456,7 @@ MmsService.prototype = {
|
||||
}
|
||||
|
||||
intermediate.timestamp = Date.now();
|
||||
intermediate.transactionId = intermediate.headers["x-mms-transaction-id"];
|
||||
intermediate.receivers = [];
|
||||
intermediate.phoneNumber = mmsConnection.getPhoneNumber();
|
||||
intermediate.iccId = mmsConnection.getIccId();
|
||||
@ -1603,8 +1604,6 @@ MmsService.prototype = {
|
||||
retrievedMessage) {
|
||||
if (DEBUG) debug("retrievedMessage = " + JSON.stringify(retrievedMessage));
|
||||
|
||||
let transactionId = savableMessage.headers["x-mms-transaction-id"];
|
||||
|
||||
// The absence of the field does not indicate any default
|
||||
// value. So we go check the same field in the retrieved
|
||||
// message instead.
|
||||
@ -1644,6 +1643,8 @@ MmsService.prototype = {
|
||||
savableMessage = this.mergeRetrievalConfirmation(mmsConnection,
|
||||
retrievedMessage,
|
||||
savableMessage);
|
||||
let transactionId = savableMessage.headers["x-mms-transaction-id"];
|
||||
|
||||
gMobileMessageDatabaseService.saveReceivedMessage(savableMessage,
|
||||
(function (rv, domMessage) {
|
||||
let success = Components.isSuccessCode(rv);
|
||||
|
@ -28,7 +28,7 @@ const DISABLE_MMS_GROUPING_FOR_RECEIVING = true;
|
||||
|
||||
|
||||
const DB_NAME = "sms";
|
||||
const DB_VERSION = 20;
|
||||
const DB_VERSION = 19;
|
||||
const MESSAGE_STORE_NAME = "sms";
|
||||
const THREAD_STORE_NAME = "thread";
|
||||
const PARTICIPANT_STORE_NAME = "participant";
|
||||
@ -260,10 +260,6 @@ MobileMessageDatabaseService.prototype = {
|
||||
self.upgradeSchema18(event.target.transaction, next);
|
||||
break;
|
||||
case 19:
|
||||
if (DEBUG) debug("Upgrade to version 20. Add readStatus and readTimestamp.");
|
||||
self.upgradeSchema19(event.target.transaction, next);
|
||||
break;
|
||||
case 20:
|
||||
// This will need to be moved for each new version
|
||||
if (DEBUG) debug("Upgrade finished.");
|
||||
break;
|
||||
@ -1185,35 +1181,6 @@ MobileMessageDatabaseService.prototype = {
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Add readStatus and readTimestamp.
|
||||
*/
|
||||
upgradeSchema19: function upgradeSchema19(transaction, next) {
|
||||
let messageStore = transaction.objectStore(MESSAGE_STORE_NAME);
|
||||
messageStore.openCursor().onsuccess = function(event) {
|
||||
let cursor = event.target.result;
|
||||
if (!cursor) {
|
||||
next();
|
||||
return;
|
||||
}
|
||||
|
||||
let messageRecord = cursor.value;
|
||||
if (messageRecord.type == "sms") {
|
||||
cursor.continue();
|
||||
return;
|
||||
}
|
||||
|
||||
// We can always retrieve transaction id from
|
||||
// |messageRecord.headers["x-mms-transaction-id"]|.
|
||||
if (messageRecord.hasOwnProperty("transactionId")) {
|
||||
delete messageRecord.transactionId;
|
||||
}
|
||||
|
||||
cursor.update(messageRecord);
|
||||
cursor.continue();
|
||||
};
|
||||
},
|
||||
|
||||
matchParsedPhoneNumbers: function matchParsedPhoneNumbers(addr1, parsedAddr1,
|
||||
addr2, parsedAddr2) {
|
||||
if ((parsedAddr1.internationalNumber &&
|
||||
@ -1976,6 +1943,7 @@ MobileMessageDatabaseService.prototype = {
|
||||
(aMessage.type == "sms" && (aMessage.messageClass == undefined ||
|
||||
aMessage.sender == undefined)) ||
|
||||
(aMessage.type == "mms" && (aMessage.delivery == undefined ||
|
||||
aMessage.transactionId == undefined ||
|
||||
!Array.isArray(aMessage.deliveryInfo) ||
|
||||
!Array.isArray(aMessage.receivers))) ||
|
||||
aMessage.timestamp == undefined) {
|
||||
@ -2007,7 +1975,7 @@ MobileMessageDatabaseService.prototype = {
|
||||
aMessage.read = FILTER_READ_UNREAD;
|
||||
|
||||
if (aMessage.type == "mms") {
|
||||
aMessage.transactionIdIndex = aMessage.headers["x-mms-transaction-id"];
|
||||
aMessage.transactionIdIndex = aMessage.transactionId;
|
||||
aMessage.isReadReportSent = false;
|
||||
|
||||
// If |deliveryTimestamp| is not specified, use 0 as default.
|
||||
|
Loading…
Reference in New Issue
Block a user