Configure Bluetooth profiles displayed in settings
Two profiles were displayed on automotive targets at the wrong times, MAP was displayed for all devices, PBAP was displayed only when enabled. This updates those two profiles to appear in the profiles only when the service is enabled locally and the remote device supports the other half of the connection. Bug: 109783106 Test: pair with bluetooth devices that support (and don't support) MAP and PBAP, and verify settings slider appears when appropriate specifically when disabled. Change-Id: I62b8778517730076554ba996cee80862ce72539b
This commit is contained in:
@@ -543,12 +543,13 @@ public class LocalBluetoothProfileManager {
|
||||
mPbapProfile.setEnabled(device, true);
|
||||
}
|
||||
|
||||
if (mMapClientProfile != null) {
|
||||
if ((mMapClientProfile != null)
|
||||
&& BluetoothUuid.containsAnyUuid(uuids, MapClientProfile.UUIDS)) {
|
||||
profiles.add(mMapClientProfile);
|
||||
removedProfiles.remove(mMapClientProfile);
|
||||
}
|
||||
|
||||
if ((mPbapClientProfile != null) && ArrayUtils.contains(localUuids, BluetoothUuid.PBAP_PCE)
|
||||
if ((mPbapClientProfile != null)
|
||||
&& BluetoothUuid.containsAnyUuid(uuids, PbapClientProfile.SRC_UUIDS)) {
|
||||
profiles.add(mPbapClientProfile);
|
||||
removedProfiles.remove(mPbapClientProfile);
|
||||
|
||||
@@ -47,8 +47,6 @@ public final class MapClientProfile implements LocalBluetoothProfile {
|
||||
private final LocalBluetoothProfileManager mProfileManager;
|
||||
|
||||
static final ParcelUuid[] UUIDS = {
|
||||
BluetoothUuid.MAP,
|
||||
BluetoothUuid.MNS,
|
||||
BluetoothUuid.MAS,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user