зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1083843 - [MobileConnection] Deprecate CFStateChangeEvent.success. r=hsinyi,smaug,btian
This commit is contained in:
Родитель
d437aeb62f
Коммит
6c4b7b4e65
|
@ -115,8 +115,7 @@ MobileConnectionListener::NotifyDataError(const nsAString & message)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
MobileConnectionListener::NotifyCFStateChanged(bool success,
|
||||
uint16_t action,
|
||||
MobileConnectionListener::NotifyCFStateChanged(uint16_t action,
|
||||
uint16_t reason,
|
||||
const nsAString& number,
|
||||
uint16_t timeSeconds,
|
||||
|
|
|
@ -115,8 +115,7 @@ MobileConnectionListener::NotifyDataError(const nsAString & message)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
MobileConnectionListener::NotifyCFStateChanged(bool success,
|
||||
uint16_t action,
|
||||
MobileConnectionListener::NotifyCFStateChanged(uint16_t action,
|
||||
uint16_t reason,
|
||||
const nsAString& number,
|
||||
uint16_t timeSeconds,
|
||||
|
|
|
@ -1041,8 +1041,7 @@ MobileConnection::NotifyDataError(const nsAString& aMessage)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
MobileConnection::NotifyCFStateChanged(bool aSuccess,
|
||||
unsigned short aAction,
|
||||
MobileConnection::NotifyCFStateChanged(unsigned short aAction,
|
||||
unsigned short aReason,
|
||||
const nsAString& aNumber,
|
||||
unsigned short aSeconds,
|
||||
|
@ -1055,7 +1054,6 @@ MobileConnection::NotifyCFStateChanged(bool aSuccess,
|
|||
CFStateChangeEventInit init;
|
||||
init.mBubbles = false;
|
||||
init.mCancelable = false;
|
||||
init.mSuccess = aSuccess;
|
||||
init.mAction = aAction;
|
||||
init.mReason = aReason;
|
||||
init.mNumber = aNumber;
|
||||
|
|
|
@ -665,8 +665,8 @@ MobileConnectionProvider.prototype = {
|
|||
notifyCFStateChanged: function(aAction, aReason, aNumber, aTimeSeconds,
|
||||
aServiceClass) {
|
||||
this.deliverListenerEvent("notifyCFStateChanged",
|
||||
[true, aAction, aReason, aNumber, aTimeSeconds,
|
||||
aServiceClass]);
|
||||
[aAction, aReason, aNumber, aTimeSeconds,
|
||||
aServiceClass]);
|
||||
},
|
||||
|
||||
getSupportedNetworkTypes: function(aTypes) {
|
||||
|
|
|
@ -12,7 +12,7 @@ interface nsIMobileNetworkInfo;
|
|||
interface nsINeighboringCellIdsCallback;
|
||||
interface nsIVariant;
|
||||
|
||||
[scriptable, uuid(823d935e-8262-47ed-8429-8203096b2ff4)]
|
||||
[scriptable, uuid(c00abd30-5b2e-11e4-8ed6-0800200c9a66)]
|
||||
interface nsIMobileConnectionListener : nsISupports
|
||||
{
|
||||
/**
|
||||
|
@ -47,8 +47,6 @@ interface nsIMobileConnectionListener : nsISupports
|
|||
/**
|
||||
* Notify when call forwarding state is changed.
|
||||
*
|
||||
* @param success
|
||||
* Indicates whether the set call forwarding request is success.
|
||||
* @param action
|
||||
* One of the nsIMobileConnection.CALL_FORWARD_ACTION_* values.
|
||||
* @param reason
|
||||
|
@ -60,8 +58,7 @@ interface nsIMobileConnectionListener : nsISupports
|
|||
* @param serviceClass
|
||||
* One of the nsIMobileConnection.ICC_SERVICE_CLASS_* values.
|
||||
*/
|
||||
void notifyCFStateChanged(in boolean success,
|
||||
in unsigned short action,
|
||||
void notifyCFStateChanged(in unsigned short action,
|
||||
in unsigned short reason,
|
||||
in DOMString number,
|
||||
in unsigned short timeSeconds,
|
||||
|
|
|
@ -439,16 +439,15 @@ MobileConnectionChild::RecvNotifyDataError(const nsString& aMessage)
|
|||
}
|
||||
|
||||
bool
|
||||
MobileConnectionChild::RecvNotifyCFStateChanged(const bool& aSuccess,
|
||||
const uint16_t& aAction,
|
||||
MobileConnectionChild::RecvNotifyCFStateChanged(const uint16_t& aAction,
|
||||
const uint16_t& aReason,
|
||||
const nsString& aNumber,
|
||||
const uint16_t& aTimeSeconds,
|
||||
const uint16_t& aServiceClass)
|
||||
{
|
||||
for (int32_t i = 0; i < mListeners.Count(); i++) {
|
||||
mListeners[i]->NotifyCFStateChanged(aSuccess, aAction, aReason, aNumber,
|
||||
aTimeSeconds, aServiceClass);
|
||||
mListeners[i]->NotifyCFStateChanged(aAction, aReason, aNumber, aTimeSeconds,
|
||||
aServiceClass);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -77,9 +77,9 @@ protected:
|
|||
RecvNotifyDataError(const nsString& aMessage) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool
|
||||
RecvNotifyCFStateChanged(const bool& aSuccess, const uint16_t& aAction,
|
||||
const uint16_t& aReason, const nsString& aNumber,
|
||||
const uint16_t& aTimeSeconds, const uint16_t& aServiceClass) MOZ_OVERRIDE;
|
||||
RecvNotifyCFStateChanged(const uint16_t& aAction, const uint16_t& aReason,
|
||||
const nsString& aNumber, const uint16_t& aTimeSeconds,
|
||||
const uint16_t& aServiceClass) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool
|
||||
RecvNotifyEmergencyCbModeChanged(const bool& aActive,
|
||||
|
|
|
@ -212,8 +212,7 @@ MobileConnectionParent::NotifyDataError(const nsAString& aMessage)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
MobileConnectionParent::NotifyCFStateChanged(bool aSuccess,
|
||||
uint16_t aAction,
|
||||
MobileConnectionParent::NotifyCFStateChanged(uint16_t aAction,
|
||||
uint16_t aReason,
|
||||
const nsAString &aNumber,
|
||||
uint16_t aTimeSeconds,
|
||||
|
@ -221,9 +220,8 @@ MobileConnectionParent::NotifyCFStateChanged(bool aSuccess,
|
|||
{
|
||||
NS_ENSURE_TRUE(mLive, NS_ERROR_FAILURE);
|
||||
|
||||
return SendNotifyCFStateChanged(aSuccess, aAction, aReason,
|
||||
nsAutoString(aNumber), aTimeSeconds,
|
||||
aServiceClass) ? NS_OK : NS_ERROR_FAILURE;
|
||||
return SendNotifyCFStateChanged(aAction, aReason, nsAutoString(aNumber),
|
||||
aTimeSeconds, aServiceClass) ? NS_OK : NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -22,9 +22,8 @@ child:
|
|||
NotifyDataInfoChanged(nsMobileConnectionInfo aInfo);
|
||||
NotifyUssdReceived(nsString aMessage, bool aSessionEnd);
|
||||
NotifyDataError(nsString aMessage);
|
||||
NotifyCFStateChanged(bool aSuccess, uint16_t aAction, uint16_t aReason,
|
||||
nsString aNumber, uint16_t aTimeSeconds,
|
||||
uint16_t aServiceClass);
|
||||
NotifyCFStateChanged(uint16_t aAction, uint16_t aReason, nsString aNumber,
|
||||
uint16_t aTimeSeconds, uint16_t aServiceClass);
|
||||
NotifyEmergencyCbModeChanged(bool aActive, uint32_t aTimeoutMs);
|
||||
NotifyOtaStatusChanged(nsString aStatus);
|
||||
NotifyIccChanged(nsString aIccId);
|
||||
|
|
|
@ -29,7 +29,6 @@ function testSetCallForwardingOption(aOptions) {
|
|||
|
||||
// Check cfstatechange event.
|
||||
promises.push(waitForManagerEvent("cfstatechange").then(function(aEvent) {
|
||||
is(aEvent.success, true, "check success");
|
||||
is(aEvent.action, aOptions.action, "check action");
|
||||
is(aEvent.reason, aOptions.reason, "check reason");
|
||||
is(aEvent.number, aOptions.number, "check number");
|
||||
|
|
|
@ -60,7 +60,6 @@ function testSetCallForwarding(aData) {
|
|||
let promises = [];
|
||||
// Check cfstatechange event.
|
||||
promises.push(waitForManagerEvent("cfstatechange").then(function(aEvent) {
|
||||
is(aEvent.success, true, "check success");
|
||||
is(aEvent.action, MozMobileConnection.CALL_FORWARD_ACTION_REGISTRATION,
|
||||
"check action");
|
||||
is(aEvent.reason, aData.reason, "check reason");
|
||||
|
|
|
@ -105,7 +105,6 @@ function testSetCallForwarding(aData) {
|
|||
let promises = [];
|
||||
// Check cfstatechange event.
|
||||
promises.push(waitForManagerEvent("cfstatechange").then(function(aEvent) {
|
||||
is(aEvent.success, true, "check success");
|
||||
is(aEvent.action, MozMobileConnection.CALL_FORWARD_ACTION_REGISTRATION,
|
||||
"check action");
|
||||
is(aEvent.reason, aData.reason, "check reason");
|
||||
|
|
|
@ -8,11 +8,6 @@
|
|||
Constructor(DOMString type, optional CFStateChangeEventInit eventInitDict)]
|
||||
interface CFStateChangeEvent : Event
|
||||
{
|
||||
/**
|
||||
* Indicates about errors while setting up the Call forwarding rule.
|
||||
*/
|
||||
readonly attribute boolean success;
|
||||
|
||||
/**
|
||||
* Indicates what to do with the rule.
|
||||
*
|
||||
|
@ -56,7 +51,6 @@ interface CFStateChangeEvent : Event
|
|||
|
||||
dictionary CFStateChangeEventInit : EventInit
|
||||
{
|
||||
boolean success = false;
|
||||
unsigned short action = 0;
|
||||
unsigned short reason = 0;
|
||||
DOMString number = "";
|
||||
|
|
Загрузка…
Ссылка в новой задаче