Bug 993288 - Separate BTHF_CALL_STATE_INCOMING and BTHF_CALL_STATE_WAITING for CLCC response only, for other cases, use BTHF_CALL_STATE_INCOMING for both states. r=echou

This commit is contained in:
Jocelyn Liu 2014-04-17 16:55:45 +08:00
parent 4cab710e6a
commit 326e43c775

View File

@ -964,6 +964,11 @@ BluetoothHfpManager::SendCLCC(Call& aCall, int aIndex)
BTHF_CALL_STATE_ACTIVE;
}
if (callState == BTHF_CALL_STATE_INCOMING &&
FindFirstCall(nsITelephonyProvider::CALL_STATE_CONNECTED)) {
callState = BTHF_CALL_STATE_WAITING;
}
bt_status_t status = sBluetoothHfpInterface->clcc_response(
aIndex,
aCall.mDirection,
@ -1067,9 +1072,7 @@ BluetoothHfpManager::ConvertToBthfCallState(int aCallState)
// Refer to AOSP BluetoothPhoneService.convertCallState
if (aCallState == nsITelephonyProvider::CALL_STATE_INCOMING) {
state = (FindFirstCall(nsITelephonyProvider::CALL_STATE_CONNECTED)) ?
BTHF_CALL_STATE_WAITING :
BTHF_CALL_STATE_INCOMING;
state = BTHF_CALL_STATE_INCOMING;
} else if (aCallState == nsITelephonyProvider::CALL_STATE_DIALING) {
state = BTHF_CALL_STATE_DIALING;
} else if (aCallState == nsITelephonyProvider::CALL_STATE_ALERTING) {