Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b82e7838 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "HF_CLIENT: Upgrade version from 1.6 to 1.7" into rvc-dev

parents aa434295 dca4654b
Loading
Loading
Loading
Loading

TEST_MAPPING

100644 → 100755
+6 −0
Original line number Diff line number Diff line
@@ -96,6 +96,12 @@
    {
      "name" : "net_test_btif_config_cache",
      "host" : true
    },
    {
      "name" : "net_test_hf_client_add_record"
    },
    {
      "name" : "net_test_btif_hf_client_service"
    }
  ]
}

system/bta/Android.bp

100644 → 100755
+30 −0
Original line number Diff line number Diff line
@@ -142,3 +142,33 @@ cc_test {
        "libbt-common",
    ],
}

// bta hf client add record tests for target
// ========================================================
cc_test {
    name: "net_test_hf_client_add_record",
    defaults: ["fluoride_defaults"],
    test_suites: ["device-tests"],
    include_dirs: [
        "packages/modules/Bluetooth/system",
        "packages/modules/Bluetooth/system/bta/include",
        "packages/modules/Bluetooth/system/bta/sys",
        "packages/modules/Bluetooth/system/btif/include",
        "packages/modules/Bluetooth/system/internal_include",
        "packages/modules/Bluetooth/system/stack/include",
        "packages/modules/Bluetooth/system/utils/include",
    ],
    srcs: [
        "test/bta_hf_client_add_record_test.cc",
    ],
    header_libs: ["libbluetooth_headers"],
    shared_libs: [
        "libcutils",
        "liblog",
    ],
    static_libs: [
        "libbluetooth-types",
        "libosi",
    ],
    cflags: ["-DBUILDCFG"],
}
+1 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
#define HFP_VERSION_1_1 0x0101
#define HFP_VERSION_1_5 0x0105
#define HFP_VERSION_1_6 0x0106
#define HFP_VERSION_1_7 0x0107

/* RFCOMM MTU SIZE */
#define BTA_HF_CLIENT_MTU 256
+5 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@
#include "bta_hf_client_int.h"
#include "bta_sys.h"
#include "osi/include/osi.h"
#include "osi/include/properties.h"

using bluetooth::Uuid;

@@ -122,6 +123,10 @@ bool bta_hf_client_add_record(const char* p_service_name, uint8_t scn,
  profile_uuid = UUID_SERVCLASS_HF_HANDSFREE;
  version = HFP_VERSION_1_6;

  if (osi_property_get_bool("persist.bluetooth.hfpclient.sco_s4_supported",
                            false))
    version = HFP_VERSION_1_7;

  result &= SDP_AddProfileDescriptorList(sdp_handle, profile_uuid, version);

  /* add service name */
+2 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
#define BTA_HF_CLIENT_PEER_ECC 0x00000080 /* Enhanced Call Control */
#define BTA_HF_CLIENT_PEER_EXTERR 0x00000100 /* Extended error codes */
#define BTA_HF_CLIENT_PEER_CODEC 0x00000200  /* Codec Negotiation */
#define BTA_HF_CLIENT_PEER_S4 0x00000800     /* ESCO S4 link setting */

typedef uint16_t tBTA_HF_CLIENT_PEER_FEAT;

@@ -60,6 +61,7 @@ typedef uint16_t tBTA_HF_CLIENT_PEER_FEAT;
#define BTA_HF_CLIENT_FEAT_ECS 0x00000020   /* Enhanced Call Status */
#define BTA_HF_CLIENT_FEAT_ECC 0x00000040   /* Enhanced Call Control */
#define BTA_HF_CLIENT_FEAT_CODEC 0x00000080 /* Codec Negotiation */
#define BTA_HF_CLIENT_FEAT_S4 0x00000200    /* ESCO S4 link setting */

/* HFP HF extended call handling - masks not related to any spec */
#define BTA_HF_CLIENT_CHLD_REL \
Loading