diff options
author | Steve Kondik <steve@cyngn.com> | 2015-11-16 15:01:23 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-11-16 15:01:23 -0800 |
commit | 3ada4b5a85fa907989855065179c4661653cd9ad (patch) | |
tree | 6f461e770d8a22dfc0d26c8917086df4c31d5905 /packages/SettingsLib | |
parent | 5ceb8731615dbbd54e027e09e46e724037e3a809 (diff) | |
parent | 5ccaaff4818af8d48e072cbd2b8b784e5cd0c593 (diff) | |
download | frameworks_base-3ada4b5a85fa907989855065179c4661653cd9ad.zip frameworks_base-3ada4b5a85fa907989855065179c4661653cd9ad.tar.gz frameworks_base-3ada4b5a85fa907989855065179c4661653cd9ad.tar.bz2 |
Merge branch 'LA.BF64.1.2.2_rb4.7' of git://codeaurora.org/platform/frameworks/base into cm-13.0
Change-Id: I008f052e4e27b44457c8343d20f6e1ba943c8e1f
Diffstat (limited to 'packages/SettingsLib')
4 files changed, 18 insertions, 4 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java index 4bcbea7..8dc48b3 100755 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java @@ -196,6 +196,8 @@ public final class BluetoothEventManager { cachedDevice = mDeviceManager.addDevice(mLocalAdapter, mProfileManager, device); Log.d(TAG, "DeviceFoundHandler created new CachedBluetoothDevice: " + cachedDevice); + // callback to UI to create Preference for new device + dispatchDeviceAdded(cachedDevice); } cachedDevice.setRssi(rssi); cachedDevice.setBtClass(btClass); diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java index d5dc0a6..a6f873d 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java @@ -135,6 +135,8 @@ public final class CachedBluetoothDevice implements Comparable<CachedBluetoothDe if (newProfileState == BluetoothProfile.STATE_CONNECTED) { if (profile instanceof MapProfile) { profile.setPreferred(mDevice, true); + mRemovedProfiles.remove(profile); + mProfiles.add(profile); } else if (!mProfiles.contains(profile)) { mRemovedProfiles.remove(profile); mProfiles.add(profile); diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java index 6a7890f..3876468 100755..100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java @@ -24,6 +24,7 @@ import android.bluetooth.BluetoothMap; import android.bluetooth.BluetoothInputDevice; import android.bluetooth.BluetoothPan; import android.bluetooth.BluetoothDun; +import android.bluetooth.BluetoothPbap; import android.bluetooth.BluetoothProfile; import android.bluetooth.BluetoothUuid; import android.content.Context; @@ -126,15 +127,17 @@ public final class LocalBluetoothProfileManager { addProfile(mMapProfile, MapProfile.NAME, BluetoothMap.ACTION_CONNECTION_STATE_CHANGED); - // enable DUN only if the property is set + // enable DUN only if the property is set if (SystemProperties.getBoolean("ro.bluetooth.dun", false) == true) { mDunProfile = new DunServerProfile(context); addProfile(mDunProfile, DunServerProfile.NAME, BluetoothDun.ACTION_CONNECTION_STATE_CHANGED); } - //Create PBAP server profile, but do not add it to list of profiles - // as we do not need to monitor the profile as part of profile list + + //Create PBAP server profile mPbapProfile = new PbapServerProfile(context); + addProfile(mPbapProfile, PbapServerProfile.NAME, + BluetoothPbap.PBAP_STATE_CHANGED_ACTION); if (DEBUG) Log.d(TAG, "LocalBluetoothProfileManager construction complete"); } @@ -411,6 +414,13 @@ public final class LocalBluetoothProfileManager { removedProfiles.remove(mMapProfile); mMapProfile.setPreferred(device, true); } + + if ((mPbapProfile != null) && + (mPbapProfile.getConnectionStatus(device) == BluetoothProfile.STATE_CONNECTED)) { + profiles.add(mPbapProfile); + removedProfiles.remove(mPbapProfile); + mPbapProfile.setPreferred(device, true); + } } } diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java index c28288e..4f51137 100644 --- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java +++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java @@ -319,7 +319,7 @@ public class WifiTracker { if (config.selfAdded && config.numAssociation == 0) { continue; } - AccessPoint accessPoint = getCachedOrCreate(config, cachedAccessPoints); + AccessPoint accessPoint = new AccessPoint(mContext, config); if (mLastInfo != null && mLastNetworkInfo != null) { if (config.isPasspoint() == false) { accessPoint.update(connectionConfig, mLastInfo, mLastNetworkInfo); |