OSDN Git Service

Added code to cleanup connection state when bt off
authorzzy <zhenye@broadcom.com>
Fri, 25 May 2012 23:40:27 +0000 (16:40 -0700)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Tue, 17 Jul 2012 05:09:46 +0000 (22:09 -0700)
src/com/android/bluetooth/pan/PanService.java

index 7f1cc7c..5ead7aa 100755 (executable)
@@ -99,6 +99,11 @@ public class PanService extends ProfileService {
             mNativeAvailable=false;
         }
         if(mPanDevices != null) {
+            List<BluetoothDevice> DevList = getConnectedDevices();
+            for(BluetoothDevice dev : DevList) {
+               handlePanDeviceStateChange(dev, mPanIfName, BluetoothProfile.STATE_DISCONNECTED,
+                                                   BluetoothPan.LOCAL_PANU_ROLE, BluetoothPan.REMOTE_NAP_ROLE);
+            }
             mPanDevices.clear();
             mPanDevices = null;
         }