OSDN Git Service

Preload timeout and retry mechanism (1/3)
authorYK Jeffrey Chao <jechao@broadcom.com>
Wed, 24 Apr 2013 18:38:06 +0000 (11:38 -0700)
committerMatthew Xie <mattx@google.com>
Tue, 14 May 2013 22:50:58 +0000 (15:50 -0700)
commit48ebe2c6928d8fd4dc97c8adb138c3440714dc89
tree215a75d9812f46a92c6ac1e85bc09269562f10ef
parentebef4763b36b05370d13dfd27c4fcaa9095dbeff
Preload timeout and retry mechanism (1/3)

If the Preload process was stuck due to unknown hardware init failure,
a 8-second ENABLE_TIMEOUT timeout would be eventually expired in Java layer
at AdapterState and attempted to set BT state back to STATE_OFF.
However BluetoothManagerService did not handle this case accordingly and led
to state mis-matching between Java layer and BTIF at the end.

Add a timeout and retry mechanism to manage Preload process.
Clean up native space resource and explicitly report STATE_OFF back to Java
space when Preload did not go through.

bug  7566317

Change-Id: I99a225e524f2b951249618990a2d0a8a39b43ff3
btif/src/btif_core.c
hci/src/bt_hci_bdroid.c
hci/src/bt_hw.c
main/bte_main.c
stack/btu/btu_task.c
stack/include/bt_types.h