diff options
author | Syed Ibrahim M <syedibra@broadcom.com> | 2012-07-12 00:30:37 +0530 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2012-08-01 23:52:47 -0700 |
commit | 6bce91bb9b14f82089f6ac90ca06f63a3aa3045c (patch) | |
tree | 3fec13fe4a9e114c06f8d43383a43bfb2c54bfd2 /src/com/android/settings/bluetooth | |
parent | 6a20ce5e515141b0934bd4093dbad53c14a19a6e (diff) | |
download | packages_apps_Settings-6bce91bb9b14f82089f6ac90ca06f63a3aa3045c.zip packages_apps_Settings-6bce91bb9b14f82089f6ac90ca06f63a3aa3045c.tar.gz packages_apps_Settings-6bce91bb9b14f82089f6ac90ca06f63a3aa3045c.tar.bz2 |
Fix for correctly enabling PAN profile in Settings
Update the connected profile list in CachedBluetoothDevice correctly
if a PANU-NAP connection is already existing but the onUuidChanged()
callback doesnt contain the PANU UUID in SDP inquiry. Now, the
DeviceProfileSettings screens displays valid 'Internet connection
sharing' option when connected as a NAP to remote PANU.
Change-Id: I35821233e7776fb13f7fb1eb22af992b497202a9
Diffstat (limited to 'src/com/android/settings/bluetooth')
-rwxr-xr-x | src/com/android/settings/bluetooth/CachedBluetoothDevice.java | 2 | ||||
-rwxr-xr-x | src/com/android/settings/bluetooth/LocalBluetoothProfileManager.java | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/com/android/settings/bluetooth/CachedBluetoothDevice.java b/src/com/android/settings/bluetooth/CachedBluetoothDevice.java index 8480987..93288b8 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<CachedBluetoothDevice> { 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 12955a2..46e6159 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<LocalBluetoothProfile> profiles, - Collection<LocalBluetoothProfile> removedProfiles) { + Collection<LocalBluetoothProfile> 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); } |