From c3279521be7a6a777dbae1c85f2329341d9a429d Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Fri, 7 Sep 2012 16:51:41 -0400 Subject: [PATCH] Backout 1566e8499cb8 and fcc61274ec43 (bug 744700) due to mochitest orange. --- content/base/src/nsGkAtomList.h | 1 - dom/base/nsDOMClassInfo.cpp | 9 --- dom/base/nsDOMClassInfoClasses.h | 2 - dom/network/interfaces/Makefile.in | 1 - .../interfaces/nsIDOMDataErrorEvent.idl | 11 ---- .../interfaces/nsIDOMMobileConnection.idl | 8 +-- dom/network/src/DataErrorEvent.cpp | 43 ------------- dom/network/src/DataErrorEvent.h | 63 ------------------- dom/network/src/Makefile.in | 1 - dom/network/src/MobileConnection.cpp | 17 ----- dom/system/gonk/RILContentHelper.js | 10 +-- dom/system/gonk/RadioInterfaceLayer.js | 19 ++---- dom/system/gonk/ril_consts.js | 47 -------------- dom/system/gonk/ril_worker.js | 23 +------ 14 files changed, 9 insertions(+), 246 deletions(-) delete mode 100644 dom/network/interfaces/nsIDOMDataErrorEvent.idl delete mode 100644 dom/network/src/DataErrorEvent.cpp delete mode 100644 dom/network/src/DataErrorEvent.h diff --git a/content/base/src/nsGkAtomList.h b/content/base/src/nsGkAtomList.h index 691e7b8b2ed..83c08414297 100644 --- a/content/base/src/nsGkAtomList.h +++ b/content/base/src/nsGkAtomList.h @@ -658,7 +658,6 @@ GK_ATOM(oncontextmenu, "oncontextmenu") GK_ATOM(oncopy, "oncopy") GK_ATOM(oncut, "oncut") GK_ATOM(ondatachange, "ondatachange") -GK_ATOM(ondataerror, "ondataerror") GK_ATOM(ondblclick, "ondblclick") GK_ATOM(ondelivered, "ondelivered") GK_ATOM(ondevicedisappeared, "ondevicedisappeared") diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index 1823786798a..55244755f1b 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -505,7 +505,6 @@ using mozilla::dom::indexedDB::IDBWrapperCache; #include "nsIDOMMobileConnection.h" #endif #include "USSDReceivedEvent.h" -#include "DataErrorEvent.h" #include "mozilla/dom/network/Utils.h" #ifdef MOZ_B2G_RIL @@ -1505,9 +1504,6 @@ static nsDOMClassInfoData sClassInfoData[] = { NS_DEFINE_CLASSINFO_DATA(USSDReceivedEvent, nsDOMGenericSH, DOM_DEFAULT_SCRIPTABLE_FLAGS) - NS_DEFINE_CLASSINFO_DATA(DataErrorEvent, nsDOMGenericSH, - DOM_DEFAULT_SCRIPTABLE_FLAGS) - NS_DEFINE_CLASSINFO_DATA(CSSFontFaceRule, nsDOMGenericSH, DOM_DEFAULT_SCRIPTABLE_FLAGS) NS_DEFINE_CLASSINFO_DATA(CSSFontFaceStyleDecl, nsCSSStyleDeclSH, @@ -4160,11 +4156,6 @@ nsDOMClassInfo::Init() DOM_CLASSINFO_MAP_ENTRY(nsIDOMEvent) DOM_CLASSINFO_MAP_END - DOM_CLASSINFO_MAP_BEGIN(DataErrorEvent, nsIDOMDataErrorEvent) - DOM_CLASSINFO_MAP_ENTRY(nsIDOMDataErrorEvent) - DOM_CLASSINFO_MAP_ENTRY(nsIDOMEvent) - DOM_CLASSINFO_MAP_END - DOM_CLASSINFO_MAP_BEGIN(CSSFontFaceRule, nsIDOMCSSFontFaceRule) DOM_CLASSINFO_MAP_ENTRY(nsIDOMCSSFontFaceRule) DOM_CLASSINFO_MAP_END diff --git a/dom/base/nsDOMClassInfoClasses.h b/dom/base/nsDOMClassInfoClasses.h index f95a07c98f6..53687a2b274 100644 --- a/dom/base/nsDOMClassInfoClasses.h +++ b/dom/base/nsDOMClassInfoClasses.h @@ -414,8 +414,6 @@ DOMCI_CLASS(MozMobileConnection) DOMCI_CLASS(USSDReceivedEvent) -DOMCI_CLASS(DataErrorEvent) - // @font-face in CSS DOMCI_CLASS(CSSFontFaceRule) DOMCI_CLASS(CSSFontFaceStyleDecl) diff --git a/dom/network/interfaces/Makefile.in b/dom/network/interfaces/Makefile.in index 24ffeb72fa7..fea6a7166dc 100644 --- a/dom/network/interfaces/Makefile.in +++ b/dom/network/interfaces/Makefile.in @@ -18,7 +18,6 @@ XPIDLSRCS = \ nsIDOMConnection.idl \ nsIDOMUSSDReceivedEvent.idl \ nsIDOMTCPSocket.idl \ - nsIDOMDataErrorEvent.idl \ $(NULL) ifdef MOZ_B2G_RIL diff --git a/dom/network/interfaces/nsIDOMDataErrorEvent.idl b/dom/network/interfaces/nsIDOMDataErrorEvent.idl deleted file mode 100644 index a203f31b737..00000000000 --- a/dom/network/interfaces/nsIDOMDataErrorEvent.idl +++ /dev/null @@ -1,11 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "nsIDOMEvent.idl" - -[scriptable, builtinclass, uuid(1cfc45ba-c5d4-11e1-b4c3-00265511db39)] -interface nsIDOMDataErrorEvent : nsIDOMEvent -{ - readonly attribute DOMString message; -}; diff --git a/dom/network/interfaces/nsIDOMMobileConnection.idl b/dom/network/interfaces/nsIDOMMobileConnection.idl index 2895435aada..1eedb5f9a13 100644 --- a/dom/network/interfaces/nsIDOMMobileConnection.idl +++ b/dom/network/interfaces/nsIDOMMobileConnection.idl @@ -12,7 +12,7 @@ interface nsIDOMMozMobileNetworkInfo; interface nsIDOMMozMobileCellInfo; interface nsIDOMMozIccManager; -[scriptable, builtinclass, uuid(c07309ee-a424-11e1-a75c-00265511db39)] +[scriptable, builtinclass, uuid(d9009d90-a4b3-44fd-a592-42b09f330fe5)] interface nsIDOMMozMobileConnection : nsIDOMEventTarget { /** @@ -239,12 +239,6 @@ interface nsIDOMMozMobileConnection : nsIDOMEventTarget * received. */ [implicit_jscontext] attribute jsval onussdreceived; - - /** - * The 'dataerror' event is notified whenever the data connection object - * receives an error from the RIL - */ - [implicit_jscontext] attribute jsval ondataerror; }; [scriptable, uuid(5ea0e4a9-4684-40da-9930-8ebb61d187f3)] diff --git a/dom/network/src/DataErrorEvent.cpp b/dom/network/src/DataErrorEvent.cpp deleted file mode 100644 index 798dc23c22b..00000000000 --- a/dom/network/src/DataErrorEvent.cpp +++ /dev/null @@ -1,43 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "DataErrorEvent.h" -#include "nsIDOMClassInfo.h" - -DOMCI_DATA(DataErrorEvent, mozilla::dom::network::DataErrorEvent) - -namespace mozilla { -namespace dom { -namespace network { - -already_AddRefed -DataErrorEvent::Create(nsAString& aMessage) -{ - NS_ASSERTION(!aMessage.IsEmpty(), "Empty message!"); - - nsRefPtr event = new DataErrorEvent(); - - event->mMessage = aMessage; - - return event.forget(); -} - -NS_IMPL_ADDREF_INHERITED(DataErrorEvent, nsDOMEvent) -NS_IMPL_RELEASE_INHERITED(DataErrorEvent, nsDOMEvent) - -NS_INTERFACE_MAP_BEGIN(DataErrorEvent) - NS_INTERFACE_MAP_ENTRY(nsIDOMDataErrorEvent) - NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(DataErrorEvent) -NS_INTERFACE_MAP_END_INHERITING(nsDOMEvent) - -NS_IMETHODIMP -DataErrorEvent::GetMessage(nsAString& aMessage) -{ - aMessage.Assign(mMessage); - return NS_OK; -} - -} -} -} diff --git a/dom/network/src/DataErrorEvent.h b/dom/network/src/DataErrorEvent.h deleted file mode 100644 index e412e9b6b7e..00000000000 --- a/dom/network/src/DataErrorEvent.h +++ /dev/null @@ -1,63 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#ifndef mozilla_dom_network_dataerrorevent_h -#define mozilla_dom_network_dataerrorevent_h - -#include "nsIDOMDataErrorEvent.h" -#include "nsDOMEvent.h" - -namespace mozilla { -namespace dom { -namespace network { - -class DataErrorEvent : public nsDOMEvent, - public nsIDOMDataErrorEvent -{ - nsString mMessage; - -public: - NS_DECL_ISUPPORTS_INHERITED - NS_FORWARD_TO_NSDOMEVENT - NS_DECL_NSIDOMDATAERROREVENT - - static already_AddRefed - Create(nsAString& aMessage); - - nsresult - Dispatch(nsIDOMEventTarget* aTarget, const nsAString& aEventType) - { - NS_ASSERTION(aTarget, "Null pointer!"); - NS_ASSERTION(!aEventType.IsEmpty(), "Empty event type!"); - - nsresult rv = InitEvent(aEventType, false, false); - NS_ENSURE_SUCCESS(rv, rv); - - rv = SetTrusted(true); - NS_ENSURE_SUCCESS(rv, rv); - - nsIDOMEvent* thisEvent = - static_cast(const_cast(this)); - - bool dummy; - rv = aTarget->DispatchEvent(thisEvent, &dummy); - NS_ENSURE_SUCCESS(rv, rv); - - return NS_OK; - } - -private: - DataErrorEvent() - : nsDOMEvent(nullptr, nullptr) - { } - - ~DataErrorEvent() - { } -}; - -} -} -} - -#endif // mozilla_dom_network_dataerrorevent_h diff --git a/dom/network/src/Makefile.in b/dom/network/src/Makefile.in index 9469b2c8ce4..72e960fb3c7 100644 --- a/dom/network/src/Makefile.in +++ b/dom/network/src/Makefile.in @@ -32,7 +32,6 @@ CPPSRCS = \ Connection.cpp \ Utils.cpp \ USSDReceivedEvent.cpp \ - DataErrorEvent.cpp \ $(NULL) ifdef MOZ_B2G_RIL diff --git a/dom/network/src/MobileConnection.cpp b/dom/network/src/MobileConnection.cpp index 3c009b230a2..a1ae23a28cf 100644 --- a/dom/network/src/MobileConnection.cpp +++ b/dom/network/src/MobileConnection.cpp @@ -8,7 +8,6 @@ #include "nsDOMEvent.h" #include "nsIObserverService.h" #include "USSDReceivedEvent.h" -#include "DataErrorEvent.h" #include "mozilla/Services.h" #include "IccManager.h" @@ -19,7 +18,6 @@ #define CARDSTATECHANGE_EVENTNAME NS_LITERAL_STRING("cardstatechange") #define ICCINFOCHANGE_EVENTNAME NS_LITERAL_STRING("iccinfochange") #define USSDRECEIVED_EVENTNAME NS_LITERAL_STRING("ussdreceived") -#define DATAERROR_EVENTNAME NS_LITERAL_STRING("dataerror") DOMCI_DATA(MozMobileConnection, mozilla::dom::network::MobileConnection) @@ -32,7 +30,6 @@ const char* kDataChangedTopic = "mobile-connection-data-changed"; const char* kCardStateChangedTopic = "mobile-connection-cardstate-changed"; const char* kIccInfoChangedTopic = "mobile-connection-iccinfo-changed"; const char* kUssdReceivedTopic = "mobile-connection-ussd-received"; -const char* kDataErrorTopic = "mobile-connection-data-error"; NS_IMPL_CYCLE_COLLECTION_CLASS(MobileConnection) @@ -60,7 +57,6 @@ NS_IMPL_EVENT_HANDLER(MobileConnection, iccinfochange) NS_IMPL_EVENT_HANDLER(MobileConnection, voicechange) NS_IMPL_EVENT_HANDLER(MobileConnection, datachange) NS_IMPL_EVENT_HANDLER(MobileConnection, ussdreceived) -NS_IMPL_EVENT_HANDLER(MobileConnection, dataerror) MobileConnection::MobileConnection() { @@ -89,7 +85,6 @@ MobileConnection::Init(nsPIDOMWindow* aWindow) obs->AddObserver(this, kCardStateChangedTopic, false); obs->AddObserver(this, kIccInfoChangedTopic, false); obs->AddObserver(this, kUssdReceivedTopic, false); - obs->AddObserver(this, kDataErrorTopic, false); mIccManager = new icc::IccManager(); mIccManager->Init(aWindow); @@ -109,7 +104,6 @@ MobileConnection::Shutdown() obs->RemoveObserver(this, kCardStateChangedTopic); obs->RemoveObserver(this, kIccInfoChangedTopic); obs->RemoveObserver(this, kUssdReceivedTopic); - obs->RemoveObserver(this, kDataErrorTopic); if (mIccManager) { mIccManager->Shutdown(); @@ -153,18 +147,7 @@ MobileConnection::Observe(nsISupports* aSubject, nsresult rv = event->Dispatch(ToIDOMEventTarget(), USSDRECEIVED_EVENTNAME); NS_ENSURE_SUCCESS(rv, rv); - return NS_OK; - } - if (!strcmp(aTopic, kDataErrorTopic)) { - nsString dataerror; - dataerror.Assign(aData); - nsRefPtr event = DataErrorEvent::Create(dataerror); - NS_ASSERTION(event, "This should never fail!"); - - nsresult rv = - event->Dispatch(ToIDOMEventTarget(), DATAERROR_EVENTNAME); - NS_ENSURE_SUCCESS(rv, rv); return NS_OK; } diff --git a/dom/system/gonk/RILContentHelper.js b/dom/system/gonk/RILContentHelper.js index b33b3f07bdb..262e9d598bc 100644 --- a/dom/system/gonk/RILContentHelper.js +++ b/dom/system/gonk/RILContentHelper.js @@ -61,8 +61,7 @@ const RIL_IPC_MSG_NAMES = [ "RIL:CancelUssd:Return:OK", "RIL:CancelUssd:Return:KO", "RIL:StkCommand", - "RIL:StkSessionEnd", - "RIL:DataError" + "RIL:StkSessionEnd" ]; const kVoiceChangedTopic = "mobile-connection-voice-changed"; @@ -72,7 +71,6 @@ const kIccInfoChangedTopic = "mobile-connection-iccinfo-changed"; const kUssdReceivedTopic = "mobile-connection-ussd-received"; const kStkCommandTopic = "icc-manager-stk-command"; const kStkSessionEndTopic = "icc-manager-stk-session-end"; -const kDataErrorTopic = "mobile-connection-data-error"; XPCOMUtils.defineLazyServiceGetter(this, "cpmm", "@mozilla.org/childprocessmessagemanager;1", @@ -694,11 +692,7 @@ RILContentHelper.prototype = { break; case "RIL:StkSessionEnd": Services.obs.notifyObservers(null, kStkSessionEndTopic, null); - break; - case "RIL:DataError": - this.updateConnectionInfo(msg.json, this.dataConnectionInfo); - Services.obs.notifyObservers(null, kDataErrorTopic, msg.json.error); - break; + break; } }, diff --git a/dom/system/gonk/RadioInterfaceLayer.js b/dom/system/gonk/RadioInterfaceLayer.js index b02d5e94a92..fa87d771cdf 100644 --- a/dom/system/gonk/RadioInterfaceLayer.js +++ b/dom/system/gonk/RadioInterfaceLayer.js @@ -380,7 +380,10 @@ RadioInterfaceLayer.prototype = { this.updateDataConnection(message); break; case "datacallerror": - this.handleDataCallError(message); + // 3G Network revoked the data connection, possible unavailable APN + debug("Received data registration error message. Failed APN " + + this.dataCallSettings["apn"]); + RILNetworkInterface.reset(); break; case "signalstrengthchange": this.handleSignalStrengthChange(message); @@ -610,20 +613,6 @@ RadioInterfaceLayer.prototype = { this.updateRILNetworkInterface(); }, - /** - * Handle data errors - */ - handleDataCallError: function handleDataCallError(message) { - if (message.apn != this.dataCallSettings["apn"]) { - return; - } - - // 3G Network revoked the data connection, possible unavailable APN - RILNetworkInterface.reset(); - // Notify datacall error - ppmm.broadcastAsyncMessage("RIL:DataError", message); - }, - handleSignalStrengthChange: function handleSignalStrengthChange(message) { let voiceInfo = this.rilContext.voice; // TODO CDMA, EVDO, LTE, etc. (see bug 726098) diff --git a/dom/system/gonk/ril_consts.js b/dom/system/gonk/ril_consts.js index 0204eea3bea..f611151cf16 100644 --- a/dom/system/gonk/ril_consts.js +++ b/dom/system/gonk/ril_consts.js @@ -1680,53 +1680,6 @@ RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_IMSI_UNKNOWN_IN_VLR] = GECKO_CA RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_IMEI_NOT_ACCEPTED] = GECKO_CALL_ERROR_DEVICE_NOT_ACCEPTED; RIL_CALL_FAILCAUSE_TO_GECKO_CALL_ERROR[CALL_FAIL_ERROR_UNSPECIFIED] = GECKO_CALL_ERROR_UNSPECIFIED; -const GECKO_DATACALL_ERROR_OPERATOR_BARRED = "OperatorBarredError"; -const GECKO_DATACALL_ERROR_INSUFFICIENT_RESOURCES = "InsufficientResourcesError"; -const GECKO_DATACALL_ERROR_MISSING_UKNOWN_APN = "MissingUnknownAPNError"; -const GECKO_DATACALL_ERROR_UNKNOWN_PDP_ADDRESS_TYPE = "UnknownPDPAddressTypeError"; -const GECKO_DATACALL_ERROR_USER_AUTHENTICATION = "UserAuthenticationError"; -const GECKO_DATACALL_ERROR_ACTIVATION_REJECT_GGSN = "ActivationRejectGGSNError"; -const GECKO_DATACALL_ERROR_ACTIVATION_REJECT_UNSPECIFIED = "ActivationRejectUnspecifiedError"; -const GECKO_DATACALL_ERROR_SERVICE_OPTION_NOT_SUPPORTED = "ServiceOptionNotSupportedError"; -const GECKO_DATACALL_ERROR_SERVICE_OPTION_NOT_SUBSCRIBED = "ServiceOptionNotSubscribedError"; -const GECKO_DATACALL_ERROR_SERVICE_OPTION_OUT_OF_ORDER = "ServiceOptionOutOfOrderError"; -const GECKO_DATACALL_ERROR_NSAPI_IN_USE = "NSAPIInUseError"; -const GECKO_DATACALL_ERROR_ONLY_IPV4_ALLOWED = "OnlyIPv4Error"; -const GECKO_DATACALL_ERROR_ONLY_IPV6_ALLOWED = "OnlyIPv6Error"; -const GECKO_DATACALL_ERROR_ONLY_SINGLE_BEARER_ALLOWED = "OnlySingleBearerAllowedError"; -const GECKO_DATACALL_ERROR_PROTOCOL_ERRORS = "ProtocolErrorsError"; -const GECKO_DATACALL_ERROR_VOICE_REGISTRATION_FAIL = "VoiceRegistrationFailError"; -const GECKO_DATACALL_ERROR_DATA_REGISTRATION_FAIL = "DataRegistrationFailError"; -const GECKO_DATACALL_ERROR_SIGNAL_LOST = "SignalLostError"; -const GECKO_DATACALL_ERROR_PREF_RADIO_TECH_CHANGED = "PrefRadioTechChangedError"; -const GECKO_DATACALL_ERROR_RADIO_POWER_OFF = "RadioPowerOffError"; -const GECKO_DATACALL_ERROR_TETHERED_CALL_ACTIVE = "TetheredCallActiveError"; -const GECKO_DATACALL_ERROR_UNSPECIFIED = "UnspecifiedError"; - -const RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR = {}; -RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_OPERATOR_BARRED] = GECKO_DATACALL_ERROR_OPERATOR_BARRED; -RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_INSUFFICIENT_RESOURCES] = GECKO_DATACALL_ERROR_INSUFFICIENT_RESOURCES; -RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_MISSING_UKNOWN_APN] = GECKO_DATACALL_ERROR_MISSING_UKNOWN_APN; -RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_UNKNOWN_PDP_ADDRESS_TYPE] = GECKO_DATACALL_ERROR_UNKNOWN_PDP_ADDRESS_TYPE; -RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_USER_AUTHENTICATION] = GECKO_DATACALL_ERROR_USER_AUTHENTICATION; -RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_ACTIVATION_REJECT_GGSN] = GECKO_DATACALL_ERROR_ACTIVATION_REJECT_GGSN; -RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_ACTIVATION_REJECT_UNSPECIFIED] = GECKO_DATACALL_ERROR_ACTIVATION_REJECT_UNSPECIFIED; -RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_SERVICE_OPTION_NOT_SUPPORTED] = GECKO_DATACALL_ERROR_SERVICE_OPTION_NOT_SUPPORTED; -RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_SERVICE_OPTION_NOT_SUBSCRIBED] = GECKO_DATACALL_ERROR_SERVICE_OPTION_NOT_SUBSCRIBED; -RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_SERVICE_OPTION_OUT_OF_ORDER] = GECKO_DATACALL_ERROR_SERVICE_OPTION_OUT_OF_ORDER; -RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_NSAPI_IN_USE] = GECKO_DATACALL_ERROR_NSAPI_IN_USE; -RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_ONLY_IPV4_ALLOWED] = GECKO_DATACALL_ERROR_ONLY_IPV4_ALLOWED; -RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_ONLY_IPV6_ALLOWED] = GECKO_DATACALL_ERROR_ONLY_IPV6_ALLOWED; -RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_ONLY_SINGLE_BEARER_ALLOWED] = GECKO_DATACALL_ERROR_ONLY_SINGLE_BEARER_ALLOWED; -RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_PROTOCOL_ERRORS] = GECKO_DATACALL_ERROR_PROTOCOL_ERRORS; -RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_VOICE_REGISTRATION_FAIL] = GECKO_DATACALL_ERROR_VOICE_REGISTRATION_FAIL; -RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_DATA_REGISTRATION_FAIL] = GECKO_DATACALL_ERROR_DATA_REGISTRATION_FAIL; -RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_SIGNAL_LOST] = GECKO_DATACALL_ERROR_SIGNAL_LOST; -RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_PREF_RADIO_TECH_CHANGED] = GECKO_DATACALL_ERROR_PREF_RADIO_TECH_CHANGED; -RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_RADIO_POWER_OFF] = GECKO_DATACALL_ERROR_RADIO_POWER_OFF; -RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_TETHERED_CALL_ACTIVE] = GECKO_DATACALL_ERROR_TETHERED_CALL_ACTIVE; -RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[DATACALL_FAIL_ERROR_UNSPECIFIED] = GECKO_DATACALL_ERROR_UNSPECIFIED; - const GECKO_RADIO_TECH = [ null, "gprs", diff --git a/dom/system/gonk/ril_worker.js b/dom/system/gonk/ril_worker.js index b8d4fcc122d..6c6c6bf961f 100644 --- a/dom/system/gonk/ril_worker.js +++ b/dom/system/gonk/ril_worker.js @@ -2762,26 +2762,7 @@ let RIL = { } }, - _sendDataCallError: function _sendDataCallError(message, errorCode) { - message.rilMessageType = "datacallerror"; - if (errorCode == ERROR_GENERIC_FAILURE) { - message.error = RIL_ERROR_TO_GECKO_ERROR[errorCode]; - } else { - message.error = RIL_DATACALL_FAILCAUSE_TO_GECKO_DATACALL_ERROR[errorCode]; - } - this.sendDOMMessage(message); - }, - _processDataCallList: function _processDataCallList(datacalls, newDataCallOptions) { - // Check for possible PDP errors: We check earlier because the datacall - // can be removed if is the same as the current one. - for each (let newDataCall in datacalls) { - if (newDataCall.status != DATACALL_FAIL_NONE) { - newDataCall.apn = newDataCallOptions.apn; - this._sendDataCallError(newDataCall, newDataCall.status); - } - } - for each (let currentDataCall in this.currentDataCalls) { let updatedDataCall; if (datacalls) { @@ -3581,8 +3562,8 @@ RIL.readSetupDataCall_v5 = function readSetupDataCall_v5(options) { RIL[REQUEST_SETUP_DATA_CALL] = function REQUEST_SETUP_DATA_CALL(length, options) { if (options.rilRequestError) { - // On Data Call generic errors, we shall notify caller - this._sendDataCallError(options, options.rilRequestError); + options.rilMessageType = "datacallerror"; + this.sendDOMMessage(options); return; }