Bluetooth Codec Settings: Assure flag enabled
Assure flag a2dpOffloadCodecExtensibilitySettings is enabled before calling BluetoothA2dp API. Bug: 331612641 Tag: #feature Test: atest SettingsRoboTests:com.android.settings.development.bluetooth.AbstractBluetoothListPreferenceController Test: atest SettingsRoboTests:com.android.settings.development.bluetooth.BluetoothCodecListPreferenceControllerTest Merged-In: Iac33a6c95a544230e034807b320c80a727ade307 Change-Id: I2b0ed6c7ac91401b958b206817aca55e0aa47170
This commit is contained in:
@@ -78,6 +78,10 @@ public class BluetoothCodecListPreferenceController
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceChange(@Nullable Preference preference, @NonNull Object newValue) {
|
||||
if (!Flags.a2dpOffloadCodecExtensibilitySettings()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "onPreferenceChange: newValue=" + (String) newValue);
|
||||
}
|
||||
@@ -120,6 +124,10 @@ public class BluetoothCodecListPreferenceController
|
||||
@Override
|
||||
public void updateState(@Nullable Preference preference) {
|
||||
super.updateState(preference);
|
||||
if (!Flags.a2dpOffloadCodecExtensibilitySettings()) {
|
||||
return;
|
||||
}
|
||||
|
||||
final List<String> codecIds = new ArrayList<>();
|
||||
final List<String> labels = new ArrayList<>();
|
||||
String selectedCodecId = mDefaultValue;
|
||||
|
Reference in New Issue
Block a user