Removed MESSAGE_BIND_PROFILE_SERVICE messages on unbind

Add a missing call to remove all MESSAGE_BIND_PROFILE_SERVICE
message when unbinding and finishing.

Bug: 31442739
Test: manual, and "frameworks/base/core/tests/bluetoothtests" unit tests
Change-Id: I7e9a8f79a38d4eb8ab8b53be04650226fc72732e
(cherry picked from commit 2bbe13ebccb163c03fd6e74c4450dfd3a43b3984)
This commit is contained in:
Pavlin Radoslavov
2016-09-21 17:28:11 -07:00
committed by Andre Eisenbach
parent 3e2f3c2e31
commit c7dda10ee9

View File

@@ -707,6 +707,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
if (mUnbinding) return; if (mUnbinding) return;
mUnbinding = true; mUnbinding = true;
mHandler.removeMessages(MESSAGE_BLUETOOTH_STATE_CHANGE); mHandler.removeMessages(MESSAGE_BLUETOOTH_STATE_CHANGE);
mHandler.removeMessages(MESSAGE_BIND_PROFILE_SERVICE);
if (mBluetooth != null) { if (mBluetooth != null) {
//Unregister callback object //Unregister callback object
try { try {