summaryrefslogtreecommitdiffstats
path: root/hci
diff options
context:
space:
mode:
authorwang ping <brucewong.wang@huawei.com>2015-09-05 10:48:09 -0700
committerAndre Eisenbach <eisenbach@google.com>2015-09-07 12:43:54 -0700
commit72abbbeaa9220cf30c1d9f21aadd52ba3dd6ea4e (patch)
treefa7964f219da1cb220c66e5a99a9f022f4f3a6ff /hci
parent65d1c84f5b4c2d452b4927ab7f8670a4951db3ce (diff)
downloadandroid_system_bt-72abbbeaa9220cf30c1d9f21aadd52ba3dd6ea4e.tar.gz
android_system_bt-72abbbeaa9220cf30c1d9f21aadd52ba3dd6ea4e.tar.bz2
android_system_bt-72abbbeaa9220cf30c1d9f21aadd52ba3dd6ea4e.zip
Fix issue where bluesleep idle timer is not started
Sometimes allow_device_sleep() is called before wake_assert, this result in transmit_done does not start idle timer. This is because the "wake_state" does not match while allow_device_sleep() is called before wake_assert() is called. So start idle timer anyway when transmit_done is called. Bug: 23754156 Change-Id: I5437aea0abc4b7f5cf847701e2d0a889c6823fcb
Diffstat (limited to 'hci')
-rw-r--r--hci/src/low_power_manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hci/src/low_power_manager.c b/hci/src/low_power_manager.c
index f5345ef4e..00d0fae53 100644
--- a/hci/src/low_power_manager.c
+++ b/hci/src/low_power_manager.c
@@ -120,7 +120,7 @@ static void wake_assert() {
static void transmit_done() {
transmit_is_done = true;
- if (wake_state == LPM_WAKE_W4_TX_DONE) {
+ if (wake_state == LPM_WAKE_W4_TX_DONE || wake_state == LPM_WAKE_ASSERTED) {
wake_state = LPM_WAKE_W4_TIMEOUT;
start_idle_timer();
}