Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9effd146 authored by Matthew Xie's avatar Matthew Xie Committed by Android (Google) Code Review
Browse files

Merge "Fix for correctly enabling PAN profile in Settings Update the connected...

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 inquiry. Now, the DeviceProfileSettings screens displays valid 'Internet connection sharing' option when connected as a NAP to remote PANU." into jb-mr1-dev
parents 2e80628f 6bce91bb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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());
+6 −3
Original line number Diff line number Diff line
@@ -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);
        }