mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 869306 - Add call.isOutgoing for BT Cert. r=allstars.chh
This commit is contained in:
parent
cd8098c117
commit
f573249777
@ -30,7 +30,8 @@ NS_IMETHODIMP
|
||||
TelephonyListener::CallStateChanged(uint32_t aCallIndex,
|
||||
uint16_t aCallState,
|
||||
const nsAString& aNumber,
|
||||
bool aIsActive)
|
||||
bool aIsActive,
|
||||
bool aIsOutgoing)
|
||||
{
|
||||
BluetoothHfpManager* hfp = BluetoothHfpManager::Get();
|
||||
hfp->HandleCallStateChanged(aCallIndex, aCallState, aNumber, true);
|
||||
@ -43,6 +44,7 @@ TelephonyListener::EnumerateCallState(uint32_t aCallIndex,
|
||||
uint16_t aCallState,
|
||||
const nsAString_internal& aNumber,
|
||||
bool aIsActive,
|
||||
bool aIsOutgoing,
|
||||
bool* aResult)
|
||||
{
|
||||
BluetoothHfpManager* hfp = BluetoothHfpManager::Get();
|
||||
|
@ -1089,7 +1089,8 @@ RILContentHelper.prototype = {
|
||||
this._deliverEvent("_telephonyListeners",
|
||||
"callStateChanged",
|
||||
[msg.json.callIndex, msg.json.state,
|
||||
msg.json.number, msg.json.isActive]);
|
||||
msg.json.number, msg.json.isActive,
|
||||
msg.json.isOutgoing]);
|
||||
break;
|
||||
case "RIL:CallError":
|
||||
this._deliverEvent("_telephonyListeners",
|
||||
@ -1198,7 +1199,7 @@ RILContentHelper.prototype = {
|
||||
try {
|
||||
keepGoing =
|
||||
callback.enumerateCallState(call.callIndex, call.state, call.number,
|
||||
call.isActive);
|
||||
call.isActive, call.isOutgoing);
|
||||
} catch (e) {
|
||||
debug("callback handler for 'enumerateCallState' threw an " +
|
||||
" exception: " + e);
|
||||
|
@ -1362,7 +1362,7 @@ RadioInterfaceLayer.prototype = {
|
||||
let data = {
|
||||
number: call.number,
|
||||
duration: duration,
|
||||
direction: call.direction
|
||||
direction: call.isOutgoing ? "outgoing" : "incoming"
|
||||
};
|
||||
gSystemMessenger.broadcastMessage("telephony-call-ended", data);
|
||||
this.updateCallAudioState(call);
|
||||
|
@ -3259,9 +3259,9 @@ let RIL = {
|
||||
newCall.number = "+" + newCall.number;
|
||||
}
|
||||
if (newCall.state == CALL_STATE_INCOMING) {
|
||||
newCall.direction = 'incoming';
|
||||
newCall.isOutgoing = false;
|
||||
} else if (newCall.state == CALL_STATE_DIALING) {
|
||||
newCall.direction = 'outgoing';
|
||||
newCall.isOutgoing = true;
|
||||
}
|
||||
// Add to our map.
|
||||
this.currentCalls[newCall.callIndex] = newCall;
|
||||
|
@ -366,7 +366,8 @@ NS_IMPL_EVENT_HANDLER(Telephony, callschanged)
|
||||
|
||||
NS_IMETHODIMP
|
||||
Telephony::CallStateChanged(uint32_t aCallIndex, uint16_t aCallState,
|
||||
const nsAString& aNumber, bool aIsActive)
|
||||
const nsAString& aNumber, bool aIsActive,
|
||||
bool aIsOutgoing)
|
||||
{
|
||||
NS_ASSERTION(aCallIndex != kOutgoingPlaceholderCallIndex,
|
||||
"This should never happen!");
|
||||
@ -441,7 +442,7 @@ Telephony::CallStateChanged(uint32_t aCallIndex, uint16_t aCallState,
|
||||
NS_IMETHODIMP
|
||||
Telephony::EnumerateCallState(uint32_t aCallIndex, uint16_t aCallState,
|
||||
const nsAString& aNumber, bool aIsActive,
|
||||
bool* aContinue)
|
||||
bool aIsOutgoing, bool* aContinue)
|
||||
{
|
||||
// Make sure we don't somehow add duplicates.
|
||||
for (uint32_t index = 0; index < mCalls.Length(); index++) {
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(2ab9abfe-09fb-4fea-985f-acf29fc7376a)]
|
||||
[scriptable, uuid(45c5a67b-3780-4c41-a670-8abacffb4851)]
|
||||
interface nsITelephonyListener : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -18,11 +18,14 @@ interface nsITelephonyListener : nsISupports
|
||||
* Number of the other party.
|
||||
* @param isActive
|
||||
* Indicates whether this call is the currently active one.
|
||||
* @param isOutgoing
|
||||
* Indicates whether this call is outgoing or incoming.
|
||||
*/
|
||||
void callStateChanged(in unsigned long callIndex,
|
||||
in unsigned short callState,
|
||||
in AString number,
|
||||
in boolean isActive);
|
||||
in boolean isActive,
|
||||
in boolean isOutgoing);
|
||||
|
||||
/**
|
||||
* Called when nsITelephonyProvider is asked to enumerate the current
|
||||
@ -37,13 +40,16 @@ interface nsITelephonyListener : nsISupports
|
||||
* Number of the other party.
|
||||
* @param isActive
|
||||
* Indicates whether this call is the active one.
|
||||
* @param isOutgoing
|
||||
* Indicates whether this call is outgoing or incoming.
|
||||
*
|
||||
* @return true to continue enumeration or false to cancel.
|
||||
*/
|
||||
boolean enumerateCallState(in unsigned long callIndex,
|
||||
in unsigned short callState,
|
||||
in AString number,
|
||||
in boolean isActive);
|
||||
in boolean isActive,
|
||||
in boolean isOutgoing);
|
||||
|
||||
/**
|
||||
* Called when RIL error occurs.
|
||||
|
Loading…
Reference in New Issue
Block a user