OSDN Git Service

MAP MCE disconnecting automatically
authorJoseph Pirozzo <pirozzoj@google.com>
Tue, 11 Oct 2016 20:36:49 +0000 (13:36 -0700)
committerSanket Agarwal <sanketa@google.com>
Wed, 2 Nov 2016 04:41:27 +0000 (21:41 -0700)
commit7adf1f5877056e639044a0620355e87888fdc799
treee4b749650d8fd92865f2cc53a23968db9f1d9228
parent12ae7442e59511a9e9d85eb5f76bc3bc5f3bec4c
MAP MCE disconnecting automatically

Disconnect commands were getting queued even if bluetooth wasn't
connected.  This would cause the disconnect command to get processed
immediately after the connection succeeded.  Updated logic to defer all
commands while "Connecting" or "Disconnecting" throw out any disconnect
commands at the head of the queue while "Disconnected" and generate
implied disconnect commands when a connect command arived while already
Connected.

Bug: 32080718
Change-Id: Ib02c74c753e88cf4876835ee8e5e0c8f2a6ebc34
(cherry picked from commit 2e8805b2ad2e8b70fb82fde37498922c92d15cb6)
src/com/android/bluetooth/mapclient/MceStateMachine.java