OSDN Git Service

Preload timeout and retry mechanism (2/3)
authorYK Jeffrey Chao <jechao@broadcom.com>
Wed, 24 Apr 2013 18:55:23 +0000 (11:55 -0700)
committerMatthew Xie <mattx@google.com>
Fri, 10 May 2013 07:29:11 +0000 (00:29 -0700)
commitad9fff218081d2f49471487d37387c764d69ed29
tree29dee09eb7136238ac7dddcb87b25c3b8b6167ce
parentbad4995703f97fab3c7c84b297a8ca6df65191fa
Preload timeout and retry mechanism (2/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 the processing logic in AdapterState to handle the case when an explicit
STATE_OFF notification from BTIF was received in the TurningOn Pending state.

bug  7566317

Change-Id: I29c379cd453d05297ed382a5e8f862fa7d0f8881
jni/com_android_bluetooth_btservice_AdapterService.cpp
src/com/android/bluetooth/btservice/AdapterState.java