зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1154186 - Deprecate nsISmsMessenger_new.idl. r=echen
--HG-- extra : histedit_source : a5046c08a45adba7bd69867f1cf3a0379394f7f6
This commit is contained in:
Родитель
931df00596
Коммит
9429e1e24b
|
@ -310,7 +310,7 @@ SmsService.prototype = {
|
|||
(aRv, aDomMessage) => {
|
||||
// TODO bug 832140 handle !Components.isSuccessCode(aRv)
|
||||
this._broadcastSmsSystemMessage(
|
||||
Ci.nsISmsMessenger_new.NOTIFICATION_TYPE_SENT_FAILED, aDomMessage);
|
||||
Ci.nsISmsMessenger.NOTIFICATION_TYPE_SENT_FAILED, aDomMessage);
|
||||
aRequest.notifySendMessageFailed(error, aDomMessage);
|
||||
Services.obs.notifyObservers(aDomMessage, kSmsFailedObserverTopic, null);
|
||||
});
|
||||
|
@ -381,7 +381,7 @@ SmsService.prototype = {
|
|||
? [kSmsDeliverySuccessObserverTopic,
|
||||
Ci.nsISmsMessenger.NOTIFICATION_TYPE_DELIVERY_SUCCESS]
|
||||
: [kSmsDeliveryErrorObserverTopic,
|
||||
Ci.nsISmsMessenger_new.NOTIFICATION_TYPE_DELIVERY_ERROR];
|
||||
Ci.nsISmsMessenger.NOTIFICATION_TYPE_DELIVERY_ERROR];
|
||||
|
||||
// Broadcasting a "sms-delivery-success/sms-delivery-error" system
|
||||
// message to open apps.
|
||||
|
@ -865,7 +865,7 @@ SmsService.prototype = {
|
|||
if (!Components.isSuccessCode(aRv)) {
|
||||
if (DEBUG) debug("Error! Fail to save sending message! aRv = " + aRv);
|
||||
this._broadcastSmsSystemMessage(
|
||||
Ci.nsISmsMessenger_new.NOTIFICATION_TYPE_SENT_FAILED, aSendingMessage);
|
||||
Ci.nsISmsMessenger.NOTIFICATION_TYPE_SENT_FAILED, aSendingMessage);
|
||||
aRequest.notifySendMessageFailed(
|
||||
gMobileMessageDatabaseService.translateCrErrorToMessageCallbackError(aRv),
|
||||
aSendingMessage);
|
||||
|
@ -910,7 +910,7 @@ SmsService.prototype = {
|
|||
(aRv, aDomMessage) => {
|
||||
// TODO bug 832140 handle !Components.isSuccessCode(aRv)
|
||||
this._broadcastSmsSystemMessage(
|
||||
Ci.nsISmsMessenger_new.NOTIFICATION_TYPE_SENT_FAILED, aDomMessage);
|
||||
Ci.nsISmsMessenger.NOTIFICATION_TYPE_SENT_FAILED, aDomMessage);
|
||||
aRequest.notifySendMessageFailed(errorCode, aDomMessage);
|
||||
Services.obs.notifyObservers(aDomMessage, kSmsFailedObserverTopic, null);
|
||||
});
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "domstubs.idl"
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(f77ad4d4-68a9-11e4-920f-0b26b7a5e713)]
|
||||
[scriptable, uuid(3be7c6ac-e27d-11e4-b6da-7bbe0e4cd4ec)]
|
||||
interface nsISmsMessenger : nsISupports
|
||||
{
|
||||
/* 'sms-received' system message */
|
||||
|
@ -14,6 +14,10 @@ interface nsISmsMessenger : nsISupports
|
|||
const unsigned short NOTIFICATION_TYPE_SENT = 1;
|
||||
/* 'sms-delivery-success' system message */
|
||||
const unsigned short NOTIFICATION_TYPE_DELIVERY_SUCCESS = 2;
|
||||
/* 'sms-failed' system message */
|
||||
const unsigned short NOTIFICATION_TYPE_SENT_FAILED = 3;
|
||||
/* 'sms-delivery-error' system message */
|
||||
const unsigned short NOTIFICATION_TYPE_DELIVERY_ERROR = 4;
|
||||
|
||||
/**
|
||||
* To broadcast system messages of 'sms-received', 'sms-delivery-success',
|
||||
|
@ -68,12 +72,3 @@ interface nsISmsMessenger : nsISupports
|
|||
in DOMTimeStamp aDeliveryTimestamp,
|
||||
in boolean aRead);
|
||||
};
|
||||
|
||||
[scriptable, uuid(1e293188-d845-11e4-bc92-af2bf0a70344)]
|
||||
interface nsISmsMessenger_new : nsISmsMessenger
|
||||
{
|
||||
/* 'sms-failed' system message */
|
||||
const unsigned short NOTIFICATION_TYPE_SENT_FAILED = 3;
|
||||
/* 'sms-delivery-error' system message */
|
||||
const unsigned short NOTIFICATION_TYPE_DELIVERY_ERROR = 4;
|
||||
};
|
||||
|
|
|
@ -51,7 +51,6 @@ RILSystemMessengerHelper.prototype = {
|
|||
classID: RILSYSTEMMESSENGERHELPER_CID,
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsITelephonyMessenger,
|
||||
Ci.nsISmsMessenger,
|
||||
Ci.nsISmsMessenger_new,
|
||||
Ci.nsICellbroadcastMessenger,
|
||||
Ci.nsIMobileConnectionMessenger,
|
||||
Ci.nsIIccMessenger]),
|
||||
|
|
|
@ -60,9 +60,6 @@ function run_test() {
|
|||
let smsMessenger = Cc["@mozilla.org/ril/system-messenger-helper;1"]
|
||||
.getService(Ci.nsISmsMessenger);
|
||||
|
||||
let smsMessenger_new = Cc["@mozilla.org/ril/system-messenger-helper;1"]
|
||||
.getService(Ci.nsISmsMessenger_new);
|
||||
|
||||
let cellbroadcastMessenger = Cc["@mozilla.org/ril/system-messenger-helper;1"]
|
||||
.getService(Ci.nsICellbroadcastMessenger);
|
||||
|
||||
|
@ -74,7 +71,6 @@ function run_test() {
|
|||
|
||||
ok(telephonyMessenger !== null, "Get TelephonyMessenger.");
|
||||
ok(smsMessenger != null, "Get SmsMessenger.");
|
||||
ok(smsMessenger_new != null, "Get SmsMessenger_new.");
|
||||
ok(cellbroadcastMessenger != null, "Get CellbroadcastMessenger.");
|
||||
ok(mobileConnectionMessenger != null, "Get MobileConnectionMessenger.");
|
||||
ok(iccMessenger != null, "Get IccMessenger.");
|
||||
|
@ -248,7 +244,7 @@ add_test(function test_sms_messenger_notify_sms() {
|
|||
});
|
||||
|
||||
// Verify 'sms-failed' system message.
|
||||
messenger.notifySms(Ci.nsISmsMessenger_new.NOTIFICATION_TYPE_SENT_FAILED,
|
||||
messenger.notifySms(Ci.nsISmsMessenger.NOTIFICATION_TYPE_SENT_FAILED,
|
||||
7,
|
||||
8,
|
||||
"99887766554433221100",
|
||||
|
@ -281,7 +277,7 @@ add_test(function test_sms_messenger_notify_sms() {
|
|||
});
|
||||
|
||||
// Verify 'sms-delivery-error' system message.
|
||||
messenger.notifySms(Ci.nsISmsMessenger_new.NOTIFICATION_TYPE_DELIVERY_ERROR,
|
||||
messenger.notifySms(Ci.nsISmsMessenger.NOTIFICATION_TYPE_DELIVERY_ERROR,
|
||||
9,
|
||||
10,
|
||||
"99887766554433221100",
|
||||
|
|
Загрузка…
Ссылка в новой задаче