mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 843452 - Part 4-5: MobileConnectionGonkService for gonk backend. r=hsinyi,khuey
This commit is contained in:
parent
ba42875f6c
commit
f6ab184f0b
@ -441,6 +441,8 @@
|
||||
@BINPATH@/components/RILContentHelper.js
|
||||
@BINPATH@/components/TelephonyService.js
|
||||
@BINPATH@/components/TelephonyService.manifest
|
||||
@BINPATH@/components/MobileConnectionGonkService.js
|
||||
@BINPATH@/components/MobileConnectionGonkService.manifest
|
||||
#endif // MOZ_WIDGET_GONK && MOZ_B2G_RIL
|
||||
|
||||
#ifndef MOZ_WIDGET_GONK
|
||||
|
1548
dom/mobileconnection/src/gonk/MobileConnectionGonkService.js
Normal file
1548
dom/mobileconnection/src/gonk/MobileConnectionGonkService.js
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,2 @@
|
||||
component {05e20430-fe65-4984-8df9-a6a504b24a91} MobileConnectionGonkService.js
|
||||
contract @mozilla.org/mobileconnection/mobileconnectiongonkservice;1 {05e20430-fe65-4984-8df9-a6a504b24a91}
|
@ -40,6 +40,12 @@ IPDL_SOURCES += [
|
||||
'ipc/PMobileConnectionTypes.ipdlh',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
||||
EXTRA_COMPONENTS += [
|
||||
'gonk/MobileConnectionGonkService.js',
|
||||
'gonk/MobileConnectionGonkService.manifest',
|
||||
]
|
||||
|
||||
FAIL_ON_WARNINGS = True
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -19,9 +19,9 @@ category profile-after-change RadioInterfaceLayer @mozilla.org/ril;1
|
||||
|
||||
# RILContentHelper.js
|
||||
component {5467f2eb-e214-43ea-9b89-67711241ec8e} RILContentHelper.js
|
||||
component {472816e1-1fd6-4405-996c-806f9ea68174} RILContentHelper.js
|
||||
component {41effd45-9246-4e66-b464-cfa272ed8b54} RILContentHelper.js
|
||||
component {08a71987-408c-44ff-93fd-177c0a85c3dd} RILContentHelper.js
|
||||
contract @mozilla.org/voicemailstatus;1 {5467f2eb-e214-43ea-9b89-67711241ec8e}
|
||||
contract @mozilla.org/ril/content-helper;1 {472816e1-1fd6-4405-996c-806f9ea68174}
|
||||
contract @mozilla.org/ril/content-helper;1 {41effd45-9246-4e66-b464-cfa272ed8b54}
|
||||
contract @mozilla.org/dom/icccardlock-error;1 {08a71987-408c-44ff-93fd-177c0a85c3dd}
|
||||
category profile-after-change RILContentHelper @mozilla.org/ril/content-helper;1
|
||||
|
@ -2478,15 +2478,11 @@ this.CALL_FAIL_IMEI_NOT_ACCEPTED = 243;
|
||||
this.CALL_FAIL_ERROR_UNSPECIFIED = 0xffff;
|
||||
|
||||
// Other Gecko-specific constants
|
||||
this.GECKO_RADIOSTATE_UNAVAILABLE = null;
|
||||
this.GECKO_RADIOSTATE_OFF = "off";
|
||||
this.GECKO_RADIOSTATE_READY = "ready";
|
||||
|
||||
this.GECKO_DETAILED_RADIOSTATE_UNKNOWN = null;
|
||||
this.GECKO_DETAILED_RADIOSTATE_ENABLING = "enabling";
|
||||
this.GECKO_DETAILED_RADIOSTATE_ENABLED = "enabled";
|
||||
this.GECKO_DETAILED_RADIOSTATE_DISABLING = "disabling";
|
||||
this.GECKO_DETAILED_RADIOSTATE_DISABLED = "disabled";
|
||||
this.GECKO_RADIOSTATE_UNKNOWN = null;
|
||||
this.GECKO_RADIOSTATE_ENABLING = "enabling";
|
||||
this.GECKO_RADIOSTATE_ENABLED = "enabled";
|
||||
this.GECKO_RADIOSTATE_DISABLING = "disabling";
|
||||
this.GECKO_RADIOSTATE_DISABLED = "disabled";
|
||||
|
||||
this.GECKO_CARDSTATE_UNINITIALIZED = "uninitialized";
|
||||
this.GECKO_CARDSTATE_UNDETECTED = null;
|
||||
@ -2723,14 +2719,14 @@ this.GECKO_RADIO_TECH = [
|
||||
|
||||
this.GECKO_VOICEMAIL_MESSAGE_COUNT_UNKNOWN = -1;
|
||||
|
||||
// Call forwarding action. Must be in sync with nsIMobileConnectionProvider interface
|
||||
// Call forwarding action. Must be in sync with nsIMobileConnectionService interface
|
||||
this.CALL_FORWARD_ACTION_DISABLE = 0;
|
||||
this.CALL_FORWARD_ACTION_ENABLE = 1;
|
||||
this.CALL_FORWARD_ACTION_QUERY_STATUS = 2;
|
||||
this.CALL_FORWARD_ACTION_REGISTRATION = 3;
|
||||
this.CALL_FORWARD_ACTION_ERASURE = 4;
|
||||
|
||||
// Call forwarding reason. Must be in sync with nsIMobileConnectionProvider interface
|
||||
// Call forwarding reason. Must be in sync with nsIMobileConnectionService interface
|
||||
this.CALL_FORWARD_REASON_UNCONDITIONAL = 0;
|
||||
this.CALL_FORWARD_REASON_MOBILE_BUSY = 1;
|
||||
this.CALL_FORWARD_REASON_NO_REPLY = 2;
|
||||
@ -2738,7 +2734,7 @@ this.CALL_FORWARD_REASON_NOT_REACHABLE = 3;
|
||||
this.CALL_FORWARD_REASON_ALL_CALL_FORWARDING = 4;
|
||||
this.CALL_FORWARD_REASON_ALL_CONDITIONAL_CALL_FORWARDING = 5;
|
||||
|
||||
// Call barring program. Must be in sync with nsIMobileConnectionProvider interface
|
||||
// Call barring program. Must be in sync with nsIMobileConnectionService interface
|
||||
this.CALL_BARRING_PROGRAM_ALL_OUTGOING = 0;
|
||||
this.CALL_BARRING_PROGRAM_OUTGOING_INTERNATIONAL = 1;
|
||||
this.CALL_BARRING_PROGRAM_OUTGOING_INTERNATIONAL_EXCEPT_HOME = 2;
|
||||
@ -2752,7 +2748,7 @@ CALL_BARRING_PROGRAM_TO_FACILITY[CALL_BARRING_PROGRAM_OUTGOING_INTERNATIONAL_EXC
|
||||
CALL_BARRING_PROGRAM_TO_FACILITY[CALL_BARRING_PROGRAM_ALL_INCOMING] = ICC_CB_FACILITY_BAIC;
|
||||
CALL_BARRING_PROGRAM_TO_FACILITY[CALL_BARRING_PROGRAM_INCOMING_ROAMING] = ICC_CB_FACILITY_BAICr;
|
||||
|
||||
// CLIR constants. Must be in sync with nsIMobileConnectionProvider interface
|
||||
// CLIR constants. Must be in sync with nsIMobileConnectionService interface
|
||||
this.CLIR_DEFAULT = 0;
|
||||
this.CLIR_INVOCATION = 1;
|
||||
this.CLIR_SUPPRESSION = 2;
|
||||
|
@ -426,7 +426,7 @@ RilObject.prototype = {
|
||||
/**
|
||||
* One of the RADIO_STATE_* constants.
|
||||
*/
|
||||
this.radioState = GECKO_RADIOSTATE_UNAVAILABLE;
|
||||
this.radioState = GECKO_RADIOSTATE_UNKNOWN;
|
||||
|
||||
/**
|
||||
* True if we are on a CDMA phone.
|
||||
@ -1655,7 +1655,7 @@ RilObject.prototype = {
|
||||
this.sendChromeMessage(options);
|
||||
}).bind(this, options);
|
||||
|
||||
let isRadioOff = (this.radioState === GECKO_RADIOSTATE_OFF);
|
||||
let isRadioOff = (this.radioState === GECKO_RADIOSTATE_DISABLED);
|
||||
|
||||
if (options.isEmergency) {
|
||||
if (isRadioOff) {
|
||||
@ -2648,7 +2648,7 @@ RilObject.prototype = {
|
||||
}
|
||||
|
||||
let _isRadioAvailable = (function() {
|
||||
if (this.radioState !== GECKO_RADIOSTATE_READY) {
|
||||
if (this.radioState !== GECKO_RADIOSTATE_ENABLED) {
|
||||
_sendMMIError(GECKO_ERROR_RADIO_NOT_AVAILABLE);
|
||||
return false;
|
||||
}
|
||||
@ -3460,7 +3460,7 @@ RilObject.prototype = {
|
||||
|
||||
if (RILQUIRKS_SUBSCRIPTION_CONTROL && index === -1) {
|
||||
// Should enable uicc scription if index is not valid.
|
||||
if (this.radioState !== GECKO_RADIOSTATE_READY) {
|
||||
if (this.radioState !== GECKO_RADIOSTATE_ENABLED) {
|
||||
// Note: setUiccSubscription works abnormally when RADIO is OFF,
|
||||
// which causes SMS function broken in Flame.
|
||||
// See bug 1008557 for detailed info.
|
||||
@ -6802,11 +6802,11 @@ RilObject.prototype[UNSOLICITED_RESPONSE_RADIO_STATE_CHANGED] = function UNSOLIC
|
||||
let radioState = this.context.Buf.readInt32();
|
||||
let newState;
|
||||
if (radioState == RADIO_STATE_UNAVAILABLE) {
|
||||
newState = GECKO_RADIOSTATE_UNAVAILABLE;
|
||||
newState = GECKO_RADIOSTATE_UNKNOWN;
|
||||
} else if (radioState == RADIO_STATE_OFF) {
|
||||
newState = GECKO_RADIOSTATE_OFF;
|
||||
newState = GECKO_RADIOSTATE_DISABLED;
|
||||
} else {
|
||||
newState = GECKO_RADIOSTATE_READY;
|
||||
newState = GECKO_RADIOSTATE_ENABLED;
|
||||
}
|
||||
|
||||
if (DEBUG) {
|
||||
@ -6841,9 +6841,9 @@ RilObject.prototype[UNSOLICITED_RESPONSE_RADIO_STATE_CHANGED] = function UNSOLIC
|
||||
break;
|
||||
}
|
||||
|
||||
if ((this.radioState == GECKO_RADIOSTATE_UNAVAILABLE ||
|
||||
this.radioState == GECKO_RADIOSTATE_OFF) &&
|
||||
newState == GECKO_RADIOSTATE_READY) {
|
||||
if ((this.radioState == GECKO_RADIOSTATE_UNKNOWN ||
|
||||
this.radioState == GECKO_RADIOSTATE_DISABLED) &&
|
||||
newState == GECKO_RADIOSTATE_ENABLED) {
|
||||
// The radio became available, let's get its info.
|
||||
if (!this._waitingRadioTech) {
|
||||
if (this._isCdma) {
|
||||
@ -7088,7 +7088,11 @@ RilObject.prototype[UNSOLICITED_CDMA_CALL_WAITING] = function UNSOLICITED_CDMA_C
|
||||
waitingCall: call});
|
||||
};
|
||||
RilObject.prototype[UNSOLICITED_CDMA_OTA_PROVISION_STATUS] = function UNSOLICITED_CDMA_OTA_PROVISION_STATUS() {
|
||||
let status = this.context.Buf.readInt32List()[0];
|
||||
let status =
|
||||
CDMA_OTA_PROVISION_STATUS_TO_GECKO[this.context.Buf.readInt32List()[0]];
|
||||
if (!status) {
|
||||
return;
|
||||
}
|
||||
this.sendChromeMessage({rilMessageType: "otastatuschange",
|
||||
status: status});
|
||||
};
|
||||
@ -14699,7 +14703,7 @@ ICCUtilsHelperObject.prototype = {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!iccInfoPriv.OPL) {
|
||||
if (!this.isICCServiceAvailable("OPL")) {
|
||||
// When OPL is not present:
|
||||
// According to 3GPP TS 31.102 Sec. 4.2.58 and 3GPP TS 51.011 Sec. 10.3.41,
|
||||
// If EF_OPL is not present, the first record in this EF is used for the
|
||||
|
@ -129,6 +129,9 @@ using mozilla::system::nsVolumeService;
|
||||
#include "nsIMobileConnectionService.h"
|
||||
#include "mozilla/dom/mobileconnection/MobileConnectionIPCService.h"
|
||||
using mozilla::dom::mobileconnection::MobileConnectionIPCService;
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
#include "nsIMobileConnectionGonkService.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "AudioChannelAgent.h"
|
||||
@ -945,6 +948,10 @@ nsIMobileConnectionServiceConstructor(nsISupports *aOuter, REFNSIID aIID,
|
||||
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
service = MobileConnectionIPCService::GetSingleton();
|
||||
} else {
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
service = do_CreateInstance(NS_MOBILECONNECTION_GONK_SERVICE_CONTRACTID);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!service) {
|
||||
|
Loading…
Reference in New Issue
Block a user