mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
merge b2g-inbound to mozilla-central
This commit is contained in:
commit
998be23d7d
@ -86,4 +86,9 @@ contract @mozilla.org/helperapplauncherdialog;1 {710322af-e6ae-4b0c-b2c9-1474a87
|
||||
component {c83c02c0-5d43-4e3e-987f-9173b313e880} SimulatorScreen.js
|
||||
contract @mozilla.org/simulator-screen;1 {c83c02c0-5d43-4e3e-987f-9173b313e880}
|
||||
category profile-after-change SimulatorScreen @mozilla.org/simulator-screen;1
|
||||
|
||||
component {e30b0e13-2d12-4cb0-bc4c-4e617a1bf76e} OopCommandLine.js
|
||||
contract @mozilla.org/commandlinehandler/general-startup;1?type=b2goop {e30b0e13-2d12-4cb0-bc4c-4e617a1bf76e}
|
||||
category command-line-handler m-b2goop @mozilla.org/commandlinehandler/general-startup;1?type=b2goop
|
||||
#endif
|
||||
|
||||
|
47
b2g/components/OopCommandLine.js
Normal file
47
b2g/components/OopCommandLine.js
Normal file
@ -0,0 +1,47 @@
|
||||
/* 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/. */
|
||||
|
||||
const { classes: Cc, interfaces: Ci, utils: Cu } = Components;
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Services", "resource://gre/modules/Services.jsm");
|
||||
|
||||
function oopCommandlineHandler() {
|
||||
}
|
||||
|
||||
oopCommandlineHandler.prototype = {
|
||||
handle: function(cmdLine) {
|
||||
let oopFlag = cmdLine.handleFlag("oop", false);
|
||||
if (oopFlag) {
|
||||
/**
|
||||
* Manipulate preferences by adding to the *default* branch. Adding
|
||||
* to the default branch means the changes we make won"t get written
|
||||
* back to user preferences.
|
||||
*/
|
||||
let prefs = Services.prefs
|
||||
let branch = prefs.getDefaultBranch("");
|
||||
|
||||
try {
|
||||
// Turn on all OOP services, making desktop run similar to phone
|
||||
// environment
|
||||
branch.setBoolPref("dom.ipc.tabs.disabled", false);
|
||||
branch.setBoolPref("layers.acceleration.disabled", false);
|
||||
branch.setBoolPref("layers.offmainthreadcomposition.enabled", true);
|
||||
branch.setBoolPref("layers.offmainthreadcomposition.async-animations", true);
|
||||
branch.setBoolPref("layers.async-video.enabled", true);
|
||||
branch.setBoolPref("layers.async-pan-zoom.enabled", true);
|
||||
branch.setCharPref("gfx.content.azure.backends", "cairo");
|
||||
} catch (e) { }
|
||||
|
||||
}
|
||||
if (cmdLine.state == Ci.nsICommandLine.STATE_REMOTE_AUTO) {
|
||||
cmdLine.preventDefault = true;
|
||||
}
|
||||
},
|
||||
|
||||
helpInfo: " -oop Use out-of-process model in B2G\n",
|
||||
classID: Components.ID("{e30b0e13-2d12-4cb0-bc4c-4e617a1bf76e}"),
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]),
|
||||
};
|
||||
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([oopCommandlineHandler]);
|
@ -25,6 +25,7 @@ EXTRA_COMPONENTS += [
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':
|
||||
EXTRA_COMPONENTS += [
|
||||
'OopCommandLine.js',
|
||||
'SimulatorScreen.js'
|
||||
]
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="73b5d6a8773aa048054119bf5b3ca0d005b5494e"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="facd91d31db983a60c7f1035ca01b727c7a1de65"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="0292e64ef8451df104dcf9ac3b2c6749b81684dd"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="73b5d6a8773aa048054119bf5b3ca0d005b5494e"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="facd91d31db983a60c7f1035ca01b727c7a1de65"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="65fba428f8d76336b33ddd9e15900357953600ba">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="73b5d6a8773aa048054119bf5b3ca0d005b5494e"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="facd91d31db983a60c7f1035ca01b727c7a1de65"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="73b5d6a8773aa048054119bf5b3ca0d005b5494e"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="facd91d31db983a60c7f1035ca01b727c7a1de65"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="0292e64ef8451df104dcf9ac3b2c6749b81684dd"/>
|
||||
|
@ -18,7 +18,7 @@
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="73b5d6a8773aa048054119bf5b3ca0d005b5494e"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="facd91d31db983a60c7f1035ca01b727c7a1de65"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
|
||||
@ -120,7 +120,7 @@
|
||||
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="e8a318f7690092e639ba88891606f4183e846d3f"/>
|
||||
<project name="device/qcom/common" path="device/qcom/common" revision="234ed34543345f58c0d4dcb1aa012de68802b9dc"/>
|
||||
<project name="device-flame" path="device/t2m/flame" remote="b2g" revision="9729afa15ae3362db1852eee60422947db614dd6"/>
|
||||
<project name="kernel/msm" path="kernel" revision="b3092c54430df89636fb0670d32058bc63474017"/>
|
||||
<project name="kernel/msm" path="kernel" revision="3f7af9ae7ef30dc1c37972ed0ad957fc64219f31"/>
|
||||
<project name="platform/bootable/recovery" path="bootable/recovery" revision="f2914eacee9120680a41463708bb6ee8291749fc"/>
|
||||
<project name="platform/external/bluetooth/bluedroid" path="external/bluetooth/bluedroid" revision="fa892235a9bd8983f8b591129fc1a9398f64e514"/>
|
||||
<project name="platform/external/bluetooth/bluez" path="external/bluetooth/bluez" revision="f0689ac1914cdbc59e53bdc9edd9013dc157c299"/>
|
||||
|
@ -4,6 +4,6 @@
|
||||
"remote": "",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "d3ee2aca1f8e4d7e1c721f445d6956d73066126b",
|
||||
"revision": "2fccee502f455ba2ca7178efa5cf247d90df8afb",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="73b5d6a8773aa048054119bf5b3ca0d005b5494e"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="facd91d31db983a60c7f1035ca01b727c7a1de65"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="73b5d6a8773aa048054119bf5b3ca0d005b5494e"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="facd91d31db983a60c7f1035ca01b727c7a1de65"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="73b5d6a8773aa048054119bf5b3ca0d005b5494e"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="facd91d31db983a60c7f1035ca01b727c7a1de65"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="73b5d6a8773aa048054119bf5b3ca0d005b5494e"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="facd91d31db983a60c7f1035ca01b727c7a1de65"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="73b5d6a8773aa048054119bf5b3ca0d005b5494e"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="facd91d31db983a60c7f1035ca01b727c7a1de65"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="8d6c36d74ba9aefbc8c3618fc93dd4907a0dbf5e"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="73b5d6a8773aa048054119bf5b3ca0d005b5494e"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="facd91d31db983a60c7f1035ca01b727c7a1de65"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="266bca6e60dad43e395f38b66edabe8bdc882334"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
|
||||
|
@ -432,6 +432,7 @@
|
||||
@BINPATH@/components/amContentHandler.js
|
||||
@BINPATH@/components/amWebInstallListener.js
|
||||
@BINPATH@/components/nsBlocklistService.js
|
||||
@BINPATH@/components/OopCommandLine.js
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_UPDATER
|
||||
|
@ -1378,6 +1378,37 @@ BluetoothHfpManager::GetNumberOfCalls(uint16_t aState)
|
||||
return num;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
BluetoothHfpManager::GetNumberOfConCalls()
|
||||
{
|
||||
uint32_t num = 0;
|
||||
uint32_t callLength = mCurrentCallArray.Length();
|
||||
|
||||
for (uint32_t i = 1; i < callLength; ++i) {
|
||||
if (mCurrentCallArray[i].mIsConference) {
|
||||
++num;
|
||||
}
|
||||
}
|
||||
|
||||
return num;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
BluetoothHfpManager::GetNumberOfConCalls(uint16_t aState)
|
||||
{
|
||||
uint32_t num = 0;
|
||||
uint32_t callLength = mCurrentCallArray.Length();
|
||||
|
||||
for (uint32_t i = 1; i < callLength; ++i) {
|
||||
if (mCurrentCallArray[i].mIsConference
|
||||
&& mCurrentCallArray[i].mState == aState) {
|
||||
++num;
|
||||
}
|
||||
}
|
||||
|
||||
return num;
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothHfpManager::HandleCallStateChanged(uint32_t aCallIndex,
|
||||
uint16_t aCallState,
|
||||
@ -1422,15 +1453,59 @@ BluetoothHfpManager::HandleCallStateChanged(uint32_t aCallIndex,
|
||||
|
||||
switch (aCallState) {
|
||||
case nsITelephonyProvider::CALL_STATE_HELD:
|
||||
if (prevCallState == nsITelephonyProvider::CALL_STATE_CONNECTED) {
|
||||
if (mCurrentCallArray.Length() == 1) {
|
||||
// A single active call is put on hold (+CIEV, callheld=2)
|
||||
sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_NOACTIVE;
|
||||
} else {
|
||||
// Releases all active calls and accepts the other (+CIEV, callheld=1)
|
||||
sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_ACTIVE;
|
||||
switch (prevCallState) {
|
||||
case nsITelephonyProvider::CALL_STATE_CONNECTED: {
|
||||
uint32_t numActive = GetNumberOfCalls(nsITelephonyProvider::CALL_STATE_CONNECTED);
|
||||
uint32_t numHeld = GetNumberOfCalls(nsITelephonyProvider::CALL_STATE_HELD);
|
||||
uint32_t numConCalls = GetNumberOfConCalls();
|
||||
|
||||
/**
|
||||
* An active call becomes a held call.
|
||||
*
|
||||
* If this call is not a conference call,
|
||||
* - callheld state = ONHOLD_NOACTIVE if no active call remains;
|
||||
* - callheld state = ONHOLD_ACTIVE otherwise.
|
||||
* If this call belongs to a conference call and all other members of
|
||||
* the conference call have become held calls,
|
||||
* - callheld state = ONHOLD_NOACTIVE if no active call remains;
|
||||
* - callheld state = ONHOLD_ACTIVE otherwise.
|
||||
*
|
||||
* Note number of active calls may be 0 in-between state transition
|
||||
* (c1 has become held but c2 has not become active yet), so we regard
|
||||
* no active call remains if there is no other active/held call
|
||||
* besides this changed call/group of conference call.
|
||||
*/
|
||||
if (!aIsConference) {
|
||||
if (numActive + numHeld == 1) {
|
||||
// A single active call is put on hold.
|
||||
sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_NOACTIVE;
|
||||
} else {
|
||||
// An active call is placed on hold or active/held calls swapped.
|
||||
sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_ACTIVE;
|
||||
}
|
||||
SendCommand(RESPONSE_CIEV, CINDType::CALLHELD);
|
||||
} else if (GetNumberOfConCalls(nsITelephonyProvider::CALL_STATE_HELD)
|
||||
== numConCalls) {
|
||||
if (numActive + numHeld == numConCalls) {
|
||||
// An active conference call is put on hold.
|
||||
sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_NOACTIVE;
|
||||
} else {
|
||||
// Active calls are placed on hold or active/held calls swapped.
|
||||
sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_ACTIVE;
|
||||
}
|
||||
SendCommand(RESPONSE_CIEV, CINDType::CALLHELD);
|
||||
}
|
||||
break;
|
||||
}
|
||||
SendCommand(RESPONSE_CIEV, CINDType::CALLHELD);
|
||||
case nsITelephonyProvider::CALL_STATE_DISCONNECTED:
|
||||
// The call state changed from DISCONNECTED to HELD. It could happen
|
||||
// when user held a call before Bluetooth got connected.
|
||||
if (FindFirstCall(nsITelephonyProvider::CALL_STATE_CONNECTED)) {
|
||||
// callheld = ONHOLD_ACTIVE if an active call already exists.
|
||||
sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_ACTIVE;
|
||||
SendCommand(RESPONSE_CIEV, CINDType::CALLHELD);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case nsITelephonyProvider::CALL_STATE_INCOMING:
|
||||
@ -1476,6 +1551,12 @@ BluetoothHfpManager::HandleCallStateChanged(uint32_t aCallIndex,
|
||||
ConnectSco();
|
||||
break;
|
||||
case nsITelephonyProvider::CALL_STATE_CONNECTED:
|
||||
/**
|
||||
* A call becomes active because:
|
||||
* - user answers an incoming call,
|
||||
* - user dials a outgoing call and it is answered, or
|
||||
* - SLC is connected when a call is active.
|
||||
*/
|
||||
switch (prevCallState) {
|
||||
case nsITelephonyProvider::CALL_STATE_INCOMING:
|
||||
case nsITelephonyProvider::CALL_STATE_DISCONNECTED:
|
||||
@ -1488,10 +1569,15 @@ BluetoothHfpManager::HandleCallStateChanged(uint32_t aCallIndex,
|
||||
// Outgoing call
|
||||
UpdateCIND(CINDType::CALL, CallState::IN_PROGRESS, aSend);
|
||||
UpdateCIND(CINDType::CALLSETUP, CallSetupState::NO_CALLSETUP, aSend);
|
||||
|
||||
if (FindFirstCall(nsITelephonyProvider::CALL_STATE_HELD)) {
|
||||
// callheld state = ONHOLD_ACTIVE if a held call already exists.
|
||||
UpdateCIND(CINDType::CALLHELD, CallHeldState::ONHOLD_ACTIVE, aSend);
|
||||
}
|
||||
break;
|
||||
// User wants to add a held call to the conversation.
|
||||
// The original connected call become a conference call here.
|
||||
case nsITelephonyProvider::CALL_STATE_CONNECTED:
|
||||
// User wants to add a held call to the conversation.
|
||||
// The original connected call becomes a conference call here.
|
||||
if (aIsConference) {
|
||||
UpdateCIND(CINDType::CALLHELD, CallHeldState::NO_CALLHELD, aSend);
|
||||
}
|
||||
@ -1499,7 +1585,7 @@ BluetoothHfpManager::HandleCallStateChanged(uint32_t aCallIndex,
|
||||
case nsITelephonyProvider::CALL_STATE_HELD:
|
||||
if (!FindFirstCall(nsITelephonyProvider::CALL_STATE_HELD)) {
|
||||
if (aIsConference && !prevCallIsConference) {
|
||||
// The held call was merged and become a conference call.
|
||||
// The held call was merged and becomes a conference call.
|
||||
UpdateCIND(CINDType::CALLHELD, CallHeldState::NO_CALLHELD, aSend);
|
||||
} else if (sCINDItems[CINDType::CALLHELD].value ==
|
||||
CallHeldState::ONHOLD_NOACTIVE) {
|
||||
|
@ -157,6 +157,8 @@ private:
|
||||
void ResetCallArray();
|
||||
uint32_t FindFirstCall(uint16_t aState);
|
||||
uint32_t GetNumberOfCalls(uint16_t aState);
|
||||
uint32_t GetNumberOfConCalls();
|
||||
uint32_t GetNumberOfConCalls(uint16_t aState);
|
||||
PhoneType GetPhoneType(const nsAString& aType);
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user