From 74f60c0de8a9bc436b4dd891e359d014a748e1de Mon Sep 17 00:00:00 2001 From: Pavlin Radoslavov Date: Wed, 21 Sep 2016 17:28:11 -0700 Subject: [PATCH] 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 --- .../core/java/com/android/server/BluetoothManagerService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/services/core/java/com/android/server/BluetoothManagerService.java b/services/core/java/com/android/server/BluetoothManagerService.java index 172025b383375..6575a2a86cb96 100644 --- a/services/core/java/com/android/server/BluetoothManagerService.java +++ b/services/core/java/com/android/server/BluetoothManagerService.java @@ -689,6 +689,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { if (mUnbinding) return; mUnbinding = true; mHandler.removeMessages(MESSAGE_BLUETOOTH_STATE_CHANGE); + mHandler.removeMessages(MESSAGE_BIND_PROFILE_SERVICE); if (mBluetooth != null) { //Unregister callback object try {