bluetooth CTS test failure.

The bluetooth statemachine task may be delayed to run
 which cause the CTS bluetooth test failed, also
 the bluetooth CTS test check not consistently
 because adapter.getState can be changed at any time,
 you can't suppose the two continuous call
 will return the same result. The first transition from
 ON to TURNING_OFF when disable or from OFF to TURNING_ON
 when enable can be delayed at undetermined time due to
 bluetooth statemachine task may be blocked. Change the CTS
 test code to make it not depend on undetermined time delay.

bug 6948773
Change-Id: I07bc6fb4da64197609a3915faa62005755b46ce2
1 file changed