need persist adding bluetooth MAP profile to profile list in case the settings process being killed

bug:11303213
Change-Id: I1f227839931872ba6fdca0b5932a24e0b002ec44
This commit is contained in:
Zhihai Xu
2013-10-19 23:37:35 -07:00
parent 1083b4726b
commit 1b5bd091eb
2 changed files with 10 additions and 4 deletions

View File

@@ -149,7 +149,6 @@ final class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> {
}
if (profile instanceof MapProfile) {
profile.setPreferred(mDevice, true);
refresh();
}
} else if (profile instanceof MapProfile &&
newProfileState == BluetoothProfile.STATE_DISCONNECTED) {
@@ -158,7 +157,6 @@ final class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> {
mProfiles.remove(profile);
}
profile.setPreferred(mDevice, false);
refresh();
} else if (mLocalNapRoleConnected && profile instanceof PanProfile &&
((PanProfile) profile).isLocalRoleNap(mDevice) &&
newProfileState == BluetoothProfile.STATE_DISCONNECTED) {
@@ -489,7 +487,8 @@ final class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> {
ParcelUuid[] localUuids = mLocalAdapter.getUuids();
if (localUuids == null) return false;
mProfileManager.updateProfiles(uuids, localUuids, mProfiles, mRemovedProfiles, mLocalNapRoleConnected);
mProfileManager.updateProfiles(uuids, localUuids, mProfiles, mRemovedProfiles,
mLocalNapRoleConnected, mDevice);
if (DEBUG) {
Log.e(TAG, "updating profiles for " + mDevice.getAliasName());