summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/bluetooth
diff options
context:
space:
mode:
authorMatthew Xie <mattx@google.com>2012-08-06 22:52:27 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-08-06 22:52:27 -0700
commitb0280b7dfc59c6d34dd14dbcdfa8e773d8cad113 (patch)
treef37813df98ef1b4007d5747874b1d88148513d6f /src/com/android/settings/bluetooth
parent2bea55eb2ece1b5416f11fca763155451e44805a (diff)
parent8756c500a1aa22b9b81eeeb7f25ec7246a1c1464 (diff)
downloadpackages_apps_settings-b0280b7dfc59c6d34dd14dbcdfa8e773d8cad113.zip
packages_apps_settings-b0280b7dfc59c6d34dd14dbcdfa8e773d8cad113.tar.gz
packages_apps_settings-b0280b7dfc59c6d34dd14dbcdfa8e773d8cad113.tar.bz2
am 8756c500: am 9effd146: Merge "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 i
* commit '8756c500a1aa22b9b81eeeb7f25ec7246a1c1464': 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.
Diffstat (limited to 'src/com/android/settings/bluetooth')
-rwxr-xr-xsrc/com/android/settings/bluetooth/CachedBluetoothDevice.java2
-rwxr-xr-xsrc/com/android/settings/bluetooth/LocalBluetoothProfileManager.java9
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);
}