#include "bt_common.h"
#include "port_api.h"
#include "utl.h"
+#include <cutils/properties.h>
/*****************************************************************************
UINT32 i, ind_id;
UINT32 bia_masked_out;
tBTA_AG_FEAT features;
+ char value[PROPERTY_VALUE_MAX];
#if (BTM_WBS_INCLUDED == TRUE )
tBTA_AG_PEER_CODEC codec_type, codec_sent;
#endif
/* if the devices does not support HFP 1.7, report DUT's HFP version as 1.6 */
if (p_scb->peer_version < HFP_VERSION_1_7)
{
- features = features & ~(BTA_AG_FEAT_HFIND | BTA_AG_FEAT_S4);
- }
+ /* For PTS keep flags as is */
+ if (property_get("bt.pts.certification", value, "false") &&
+ strcmp(value, "true") != 0)
+ {
+ features = features & ~(BTA_AG_FEAT_HFIND | BTA_AG_FEAT_S4);
+ }
+ }
/* send BRSF, send OK */
bta_ag_send_result(p_scb, BTA_AG_RES_BRSF, NULL,
(INT16) (p_scb->features & BTA_AG_BSRF_FEAT_SPEC));
{
UNUSED(p_data);
- if (p_scb->conn_service == BTA_AG_HFP && p_scb->callsetup_ind != BTA_AG_CALLSETUP_INCOMING)
+ if ((p_scb->conn_service == BTA_AG_HFP) &&
+ p_scb->callsetup_ind != BTA_AG_CALLSETUP_INCOMING)
{
APPL_TRACE_DEBUG("don't send the ring since there is no MT call setup");
return;
#include "sdp_api.h"
#include "sdpint.h"
-
+#include <cutils/properties.h>
#if SDP_SERVER_ENABLED == TRUE
BOOLEAN sdp_change_hfp_version (tSDP_ATTRIBUTE *p_attr, BD_ADDR remote_address)
{
bool is_blacklisted = FALSE;
+ char value[PROPERTY_VALUE_MAX];
if ((p_attr->id == ATTR_ID_BT_PROFILE_DESC_LIST) &&
(p_attr->len >= SDP_PROFILE_DESC_LENGTH))
{
is_blacklisted = is_device_present(IOT_HFP_1_7_BLACKLIST, remote_address);
SDP_TRACE_DEBUG("%s: HF version is 1.7 for BD addr: %x:%x:%x",\
__func__, remote_address[0], remote_address[1], remote_address[2]);
- if (is_blacklisted)
+ /* For PTS we should show AG's HFP version as 1.7 */
+ if (is_blacklisted ||
+ (property_get("bt.pts.certification", value, "false") &&
+ strcmp(value, "true") == 0))
{
p_attr->value_ptr[PROFILE_VERSION_POSITION] = 0x07; // Update HFP version as 1.7
SDP_TRACE_ERROR("SDP Change HFP Version = 0x%x",