From 86418bac9b6f772f8998b78e1dad07cede88097b Mon Sep 17 00:00:00 2001 From: Matthew Xie Date: Thu, 10 Oct 2013 11:21:40 -0700 Subject: Check callback null condition for register/unregsiter state change callback Fix BluetoothPan closing sequence for unregsiter state change callback bug 11160007 Change-Id: I405ec91a938289fe9541de2ebd9abc1fb938f44a --- framework/java/android/bluetooth/BluetoothMap.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'framework/java/android/bluetooth/BluetoothMap.java') diff --git a/framework/java/android/bluetooth/BluetoothMap.java b/framework/java/android/bluetooth/BluetoothMap.java index fac8fd5184..92a2f1e425 100644 --- a/framework/java/android/bluetooth/BluetoothMap.java +++ b/framework/java/android/bluetooth/BluetoothMap.java @@ -142,7 +142,6 @@ public final class BluetoothMap implements BluetoothProfile { try { mService = null; mContext.unbindService(mConnection); - mConnection = null; } catch (Exception re) { Log.e(TAG,"",re); } @@ -370,7 +369,7 @@ public final class BluetoothMap implements BluetoothProfile { return PRIORITY_OFF; } - private ServiceConnection mConnection = new ServiceConnection() { + private final ServiceConnection mConnection = new ServiceConnection() { public void onServiceConnected(ComponentName className, IBinder service) { if (DBG) log("Proxy object connected"); mService = IBluetoothMap.Stub.asInterface(service); -- cgit v1.2.3