From cd34ad74f093c4867e616ba247fe3853b06afebc Mon Sep 17 00:00:00 2001 From: John Du Date: Thu, 15 Aug 2013 17:40:24 -0700 Subject: [PATCH] Stop scan when client binder dies bug 10213756 Change-Id: I01b397070f729df7c6000c2dc2613efbe8801681 (cherry picked from commit 45ba247afa1cb3c61a871b0c13f6546411afe68b) --- src/com/android/bluetooth/gatt/GattService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/bluetooth/gatt/GattService.java b/src/com/android/bluetooth/gatt/GattService.java index 3eb55622..1ab6d87a 100644 --- a/src/com/android/bluetooth/gatt/GattService.java +++ b/src/com/android/bluetooth/gatt/GattService.java @@ -196,6 +196,7 @@ public class GattService extends ProfileService { public void binderDied() { if (DBG) Log.d(TAG, "Binder is dead - unregistering client (" + mAppIf + ")!"); + stopScan(mAppIf, false); unregisterClient(mAppIf); } } @@ -948,7 +949,6 @@ public class GattService extends ProfileService { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); if (DBG) Log.d(TAG, "unregisterClient() - clientIf=" + clientIf); - removeScanClient(clientIf, false); mClientMap.remove(clientIf); gattClientUnregisterAppNative(clientIf); } -- 2.11.0