Fix force L3 preference unit test

Bug: 385101776
Change-Id: I898b7855d3922636c09c99414cdaefee236fc71f
This commit is contained in:
Kyle Zhang
2024-12-19 16:02:18 -08:00
parent 51769c2ed4
commit 3d84ccf8a2

View File

@@ -69,7 +69,11 @@ public class ForceSwSecureCryptoFallbackPreferenceControllerTest {
@Test
@EnableFlags(Flags.FLAG_FORCE_L3_ENABLED)
public void updateState_flagEnabled_checkPreference() {
mController.updateState(mPreference);
try (MediaDrm drm = new MediaDrm(WIDEVINE_UUID)) {
mController.updateState(mPreference);
} catch (UnsupportedSchemeException ex) {
assumeNoException(ex);
}
assertThat(mPreference.isEnabled()).isTrue();
assertThat(mPreference.isChecked()).isFalse();
assertThat(WidevineProperties.forcel3_enabled().orElse(false)).isFalse();