Bug 968750 - B2G MMS: MmsDeliveryInfo.readStatus saved as "pending" read status when toggled. r=echen

This commit is contained in:
Bevis Tseng 2014-11-14 16:10:17 +08:00
Родитель 67df017f38
Коммит cfb2042e7d
1 изменённых файлов: 10 добавлений и 8 удалений

Просмотреть файл

@ -225,9 +225,11 @@ MmsConnection.prototype = {
mmsPort: -1,
setApnSetting: function(network) {
this.mmsc = network.mmsc;
// Workaround an xpconnect issue with undefined string objects. See bug 808220.
this.mmsProxy = (network === "undefined") ? undefined : network.mmsProxy;
this.mmsc =
(network.mmsc === "undefined") ? undefined : network.mmsc;
this.mmsProxy =
(network.mmsProxy === "undefined") ? undefined : network.mmsProxy;
this.mmsPort = network.mmsPort;
},
@ -1213,12 +1215,6 @@ function SendTransaction(mmsConnection, cancellableId, msg, requestDeliveryRepor
msg.headers["x-mms-message-class"] = "personal";
msg.headers["x-mms-expiry"] = 7 * 24 * 60 * 60;
msg.headers["x-mms-priority"] = 129;
try {
msg.headers["x-mms-read-report"] =
Services.prefs.getBoolPref("dom.mms.requestReadReport");
} catch (e) {
msg.headers["x-mms-read-report"] = true;
}
msg.headers["x-mms-delivery-report"] = requestDeliveryReport;
if (!gMmsTransactionHelper.checkMaxValuesParameters(msg)) {
@ -2186,6 +2182,12 @@ MmsService.prototype = {
} catch (e) {
aMessage["deliveryStatusRequested"] = false;
}
try {
headers["x-mms-read-report"] =
Services.prefs.getBoolPref("dom.mms.requestReadReport");
} catch (e) {
headers["x-mms-read-report"] = false;
}
if (DEBUG) debug("createSavableFromParams: aMessage: " +
JSON.stringify(aMessage));