Bug 921917 - B2G MMS: Provide a flag to let user be able to request read report or not when sending MMS. r=gene

This commit is contained in:
Chia-hung Tai 2013-10-30 11:48:47 +08:00
parent fa7a5574f9
commit 6e7856cb9d
3 changed files with 14 additions and 1 deletions

View File

@ -138,6 +138,11 @@ SettingsListener.observe('language.current', 'en-US', function(value) {
Services.prefs.setBoolPref('dom.mms.requestStatusReport', value); Services.prefs.setBoolPref('dom.mms.requestStatusReport', value);
}); });
SettingsListener.observe('ril.mms.requestReadReport.enabled', true,
function(value) {
Services.prefs.setBoolPref('dom.mms.requestReadReport', value);
});
SettingsListener.observe('ril.cellbroadcast.disabled', false, SettingsListener.observe('ril.cellbroadcast.disabled', false,
function(value) { function(value) {
Services.prefs.setBoolPref('ril.cellbroadcast.disabled', value); Services.prefs.setBoolPref('ril.cellbroadcast.disabled', value);

View File

@ -952,7 +952,12 @@ function SendTransaction(cancellableId, msg, requestDeliveryReport) {
msg.headers["x-mms-message-class"] = "personal"; msg.headers["x-mms-message-class"] = "personal";
msg.headers["x-mms-expiry"] = 7 * 24 * 60 * 60; msg.headers["x-mms-expiry"] = 7 * 24 * 60 * 60;
msg.headers["x-mms-priority"] = 129; msg.headers["x-mms-priority"] = 129;
msg.headers["x-mms-read-report"] = true; 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; msg.headers["x-mms-delivery-report"] = requestDeliveryReport;
if (!gMmsTransactionHelper.checkMaxValuesParameters(msg)) { if (!gMmsTransactionHelper.checkMaxValuesParameters(msg)) {

View File

@ -4476,6 +4476,9 @@ pref("dom.mms.defaultServiceId", 0);
// Debug enabler for MMS. // Debug enabler for MMS.
pref("mms.debugging.enabled", false); pref("mms.debugging.enabled", false);
// Request read report while sending MMS.
pref("dom.mms.requestReadReport", true);
// Number of RadioInterface instances to create. // Number of RadioInterface instances to create.
pref("ril.numRadioInterfaces", 0); pref("ril.numRadioInterfaces", 0);