OSDN Git Service

Moving STATE_DISCONNECTED broadcast.
authorTyler Gunn <tgunn@google.com>
Wed, 8 Oct 2014 21:12:38 +0000 (14:12 -0700)
committerTyler Gunn <tgunn@google.com>
Wed, 8 Oct 2014 21:12:38 +0000 (14:12 -0700)
commitfbb1fe1efa8459f932aed161fbcc0b5e4d52c2d5
treee180848df2858d17e5cf95ae6413f4521a976562
parent4ebb0071df6adcbad54a3348bf04bdb071e1e6db
Moving STATE_DISCONNECTED broadcast.

In Telecom we were seeing a bug where we received an
ACTION_CONNECTION_STATE_CHANGEDSTATE intent indicating the disconnection
of a bluetooth headset.  The BluetoothManager in Telecom would then
query the Bluetooth service to see if there are any devices.  Despite
being informed that the device in use was disconnected, it still showed
up as connected.

To fix this, I moved the state broadcast AFTER the disconnected device is
removed from the headset state machine.  Looking through all other
disconnect broadcasts in that file, the disconnection happens AFTER in
all other cases as well.

Bug: 17899941
Change-Id: Ice4b2a5b1093e04ffe4c3241a3379aba56898792
src/com/android/bluetooth/hfp/HeadsetStateMachine.java