Merge "Do not disable LE audio offload as the developer option being disabled" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
8efba3fee5
@@ -20,6 +20,8 @@ import static android.bluetooth.BluetoothStatusCodes.FEATURE_SUPPORTED;
|
||||
|
||||
import static com.android.settings.development.BluetoothA2dpHwOffloadPreferenceController
|
||||
.A2DP_OFFLOAD_DISABLED_PROPERTY;
|
||||
import static com.android.settings.development.BluetoothA2dpHwOffloadPreferenceController
|
||||
.A2DP_OFFLOAD_SUPPORTED_PROPERTY;
|
||||
import static com.android.settings.development.BluetoothLeAudioHwOffloadPreferenceController
|
||||
.LE_AUDIO_OFFLOAD_DISABLED_PROPERTY;
|
||||
import static com.android.settings.development.BluetoothLeAudioHwOffloadPreferenceController
|
||||
@@ -120,4 +122,17 @@ public class BluetoothLeAudioHwOffloadPreferenceControllerTest {
|
||||
leAueioDisabled = SystemProperties.getBoolean(LE_AUDIO_OFFLOAD_DISABLED_PROPERTY, false);
|
||||
assertThat(leAueioDisabled).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void asDisableDeveloperOption_ResetLEOffloadBasedOnA2dpLeAudioOffloadSupported() {
|
||||
SystemProperties.set(LE_AUDIO_OFFLOAD_SUPPORTED_PROPERTY, Boolean.toString(true));
|
||||
SystemProperties.set(A2DP_OFFLOAD_SUPPORTED_PROPERTY, Boolean.toString(true));
|
||||
|
||||
SystemProperties.set(
|
||||
LE_AUDIO_OFFLOAD_DISABLED_PROPERTY, Boolean.toString(true));
|
||||
mController.onDeveloperOptionsSwitchDisabled();
|
||||
boolean leAueioDisabled =
|
||||
SystemProperties.getBoolean(LE_AUDIO_OFFLOAD_DISABLED_PROPERTY, false);
|
||||
assertThat(leAueioDisabled).isFalse();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user