system/bt/stack/btu/btu_hcif.cc:729:22: error: no member named ‘BLUETOOTH_CLASSIC_PAIRING_EVENT_REPORTED’ in namespace ‘android::util’

Several Bluetooth issues were really giving me the run around while trying to compile AOKP for the Xperia XA2 Ultra. Let’s take a look:

system/bt/stack/btu/btu_hcif.cc:729:22: error: no member named ‘BLUETOOTH_CLASSIC_PAIRING_EVENT_REPORTED’ in namespace ‘android::util’
android::util::BLUETOOTH_CLASSIC_PAIRING_EVENT_REPORTED, “”, handle,
~~~~~~~~~~~~~~~^
system/bt/stack/btu/btu_hcif.cc:1698:22: error: no member named ‘BLUETOOTH_CLASSIC_PAIRING_EVENT_REPORTED’ in namespace ‘android::util’
android::util::BLUETOOTH_CLASSIC_PAIRING_EVENT_REPORTED, “”, handle,
~~~~~~~~~~~~~~~^
2 errors generated.

I made several changes to the system/bt/stack/btu/btu_hcif.cc file:

Changed: Line 729
static void read_encryption_key_size_complete_after_encryption_change(
uint8_t status, uint16_t handle, uint8_t key_size) {
int ret = 0;
//WJH int ret = android::util::stats_write(
//WJH android::util::BLUETOOTH_CLASSIC_PAIRING_EVENT_REPORTED, “”, handle,
//WJH HCI_READ_ENCR_KEY_SIZE, HCI_COMMAND_COMPLETE_EVT, status, 0, key_size);
if (ret < 0) {
LOG(WARNING) << __func__ << “: failed to log encryption key size ”
<< std::to_string(key_size);
}

changed line 1698
static void read_encryption_key_size_complete_after_key_refresh(
uint8_t status, uint16_t handle, uint8_t key_size) {
int ret = 0;
//WJH int ret = android::util::stats_write(
//WJH android::util::BLUETOOTH_CLASSIC_PAIRING_EVENT_REPORTED, “”, handle,
//WJH HCI_READ_ENCR_KEY_SIZE, HCI_COMMAND_COMPLETE_EVT, status, 0, key_size);
if (ret < 0) {
LOG(WARNING) << __func__ << “: failed to log encryption key size ”
<< std::to_string(key_size);
}

At first I was really worried about the outcome of these changes, but the Bluetooth still seems to work properly in all my tests. So I’m not sure what it is that I “removed”. Hopefully it’s nothing important, but it does beg the question: when are we cutting something out that we actually need? How do we know when we get there?

This did “fix” the issue during compile, and since the Bluetooth works, I’m going to go with it is okay…..

Linux – keep it simple.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s