diff --git a/src/com/android/settings/bluetooth/CachedBluetoothDevice.java b/src/com/android/settings/bluetooth/CachedBluetoothDevice.java index 84809872ef7..93288b8e266 100755 --- a/src/com/android/settings/bluetooth/CachedBluetoothDevice.java +++ b/src/com/android/settings/bluetooth/CachedBluetoothDevice.java @@ -463,7 +463,7 @@ final class CachedBluetoothDevice implements Comparable { ParcelUuid[] localUuids = mLocalAdapter.getUuids(); if (localUuids == null) return false; - mProfileManager.updateProfiles(uuids, localUuids, mProfiles, mRemovedProfiles); + mProfileManager.updateProfiles(uuids, localUuids, mProfiles, mRemovedProfiles, mLocalNapRoleConnected); if (DEBUG) { Log.e(TAG, "updating profiles for " + mDevice.getAliasName()); diff --git a/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java b/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java index 12955a2c6a9..46e6159a5c3 100755 --- a/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java +++ b/src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java @@ -425,7 +425,8 @@ final class LocalBluetoothProfileManager { */ synchronized void updateProfiles(ParcelUuid[] uuids, ParcelUuid[] localUuids, Collection profiles, - Collection removedProfiles) { + Collection removedProfiles, + boolean isPanNapConnected) { // Copy previous profile list into removedProfiles removedProfiles.clear(); removedProfiles.addAll(profiles); @@ -463,8 +464,10 @@ final class LocalBluetoothProfileManager { removedProfiles.remove(mHidProfile); } - if (BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.NAP) && - mPanProfile != null) { + if(isPanNapConnected) + Log.d(TAG, "Valid PAN-NAP connection exists."); + if ((BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.NAP) && + mPanProfile != null) || isPanNapConnected) { profiles.add(mPanProfile); removedProfiles.remove(mPanProfile); }