зеркало из https://github.com/mozilla/gecko-dev.git
Bug 852460 - B2G MMS: provide nsIDOMMobileMessageManager.onreceived event (follow-up fix). r=vicamo,gene.lian
This commit is contained in:
Родитель
cdaa20a0dd
Коммит
8be12f2ab4
|
@ -1058,6 +1058,7 @@ MmsService.prototype = {
|
|||
mmsStatus,
|
||||
reportAllowed);
|
||||
transaction.run();
|
||||
return;
|
||||
}
|
||||
|
||||
this.retrieveMessage(url, (function responseNotify(mmsStatus,
|
||||
|
@ -1082,6 +1083,7 @@ MmsService.prototype = {
|
|||
mmsStatus,
|
||||
reportAllowed);
|
||||
transaction.run();
|
||||
return;
|
||||
}
|
||||
|
||||
savableMessage = this.mergeRetrievalConfirmation(retrievedMessage,
|
||||
|
@ -1110,7 +1112,6 @@ MmsService.prototype = {
|
|||
}).bind(this)
|
||||
);
|
||||
}).bind(this));
|
||||
return;
|
||||
}).bind(this)
|
||||
);
|
||||
},
|
||||
|
|
|
@ -2292,8 +2292,19 @@ this.PduHelper = {
|
|||
let octetArray = Octet.decodeMultiple(data, contentEnd);
|
||||
let content = null;
|
||||
if (octetArray) {
|
||||
content = new Blob([octetArray],
|
||||
{type : headers["content-type"].media});
|
||||
// If the content is a SMIL type, convert it to a string.
|
||||
// We hope to save and expose the SMIL content as a string way.
|
||||
if (headers["content-type"].media == "application/smil") {
|
||||
let charset = headers["content-type"].params &&
|
||||
headers["content-type"].params.charset
|
||||
? headers["content-type"].params.charset["charset"]
|
||||
: null;
|
||||
content = this.decodeStringContent(octetArray, charset);
|
||||
}
|
||||
if (!content) {
|
||||
content = new Blob([octetArray],
|
||||
{type : headers["content-type"].media});
|
||||
}
|
||||
}
|
||||
|
||||
parts[i] = {
|
||||
|
|
Загрузка…
Ссылка в новой задаче