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

@@ -321,7 +321,7 @@ final class LocalBluetoothProfileManager {
synchronized void updateProfiles(ParcelUuid[] uuids, ParcelUuid[] localUuids,
Collection<LocalBluetoothProfile> profiles,
Collection<LocalBluetoothProfile> removedProfiles,
boolean isPanNapConnected) {
boolean isPanNapConnected, BluetoothDevice device) {
// Copy previous profile list into removedProfiles
removedProfiles.clear();
removedProfiles.addAll(profiles);
@@ -367,6 +367,13 @@ final class LocalBluetoothProfileManager {
profiles.add(mPanProfile);
removedProfiles.remove(mPanProfile);
}
if ((mMapProfile != null) &&
(mMapProfile.getConnectionStatus(device) == BluetoothProfile.STATE_CONNECTED)) {
profiles.add(mMapProfile);
removedProfiles.remove(mMapProfile);
mMapProfile.setPreferred(device, true);
}
}
}