Merge "Bluetooth-Wipower: Wipower handoff code."
diff --git a/libbt-vendor/src/bt_vendor_qcom.c b/libbt-vendor/src/bt_vendor_qcom.c
index 1c3f40a..91da9fa 100644
--- a/libbt-vendor/src/bt_vendor_qcom.c
+++ b/libbt-vendor/src/bt_vendor_qcom.c
@@ -699,14 +699,10 @@
ALOGE("userial_vendor_open returns err");
retval = -1;
} else {
- /* Uncomment later
property_get("ro.bluetooth.wipower", wipower_status, false);
- The below property is added for test purpose will be later
- disabled and above property will be used */
- property_get("persist.bluetooth.wipower", wipower_status, false);
if(strcmp(wipower_status, "true") == 0) {
/* wait for embedded mode startup */
- usleep(WAIT_TIMEOUT - (WAIT_TIMEOUT/4));
+ usleep(WAIT_TIMEOUT);
check_embedded_mode(fd);
} else {
ALOGI("Wipower not enabled");
diff --git a/libbt-vendor/src/hw_rome.c b/libbt-vendor/src/hw_rome.c
index a84c42e..162fa10 100644
--- a/libbt-vendor/src/hw_rome.c
+++ b/libbt-vendor/src/hw_rome.c
@@ -1425,6 +1425,15 @@
goto error;
}
+ /* Read Command Complete Event - This is extra routine for ROME 1.0. From ROM 2.0, it should be removed. */
+ if (rsp[4] >= NON_WIPOWER_MODE) {
+ err = read_hci_event(fd, rsp, HCI_MAX_EVENT_SIZE);
+ if (err < 0) {
+ ALOGE("%s: Failed to get charging status", __FUNCTION__);
+ goto error;
+ }
+ }
+
error:
return err;
}