Merge changes from topic "LeAudioBeta" into udc-dev am: 2605ccbcfa
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22994939 Change-Id: If404c06085d34c9f87b164c4b396da782e4e64fe Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -77,6 +77,7 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll
|
||||
private Map<String, List<CachedBluetoothDevice>> mProfileDeviceMap =
|
||||
new HashMap<String, List<CachedBluetoothDevice>>();
|
||||
private boolean mIsLeContactSharingEnabled = false;
|
||||
private boolean mIsLeAudioToggleEnabled = false;
|
||||
|
||||
@VisibleForTesting
|
||||
PreferenceCategory mProfilesContainer;
|
||||
@@ -97,6 +98,8 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll
|
||||
mProfilesContainer.setLayoutResource(R.layout.preference_bluetooth_profile_category);
|
||||
mIsLeContactSharingEnabled = DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SETTINGS_UI,
|
||||
SettingsUIDeviceConfig.BT_LE_AUDIO_CONTACT_SHARING_ENABLED, true);
|
||||
mIsLeAudioToggleEnabled = DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SETTINGS_UI,
|
||||
SettingsUIDeviceConfig.BT_LE_AUDIO_DEVICE_DETAIL_ENABLED, false);
|
||||
// Call refresh here even though it will get called later in onResume, to avoid the
|
||||
// list of switches appearing to "pop" into the page.
|
||||
refresh();
|
||||
@@ -142,6 +145,10 @@ public class BluetoothDetailsProfilesController extends BluetoothDetailsControll
|
||||
profilePref.setEnabled(!mCachedDevice.isBusy());
|
||||
}
|
||||
|
||||
if (profile instanceof LeAudioProfile && !mIsLeAudioToggleEnabled) {
|
||||
profilePref.setVisible(false);
|
||||
}
|
||||
|
||||
if (profile instanceof MapProfile) {
|
||||
profilePref.setChecked(device.getMessageAccessPermission()
|
||||
== BluetoothDevice.ACCESS_ALLOWED);
|
||||
|
Reference in New Issue
Block a user