Fix ContentProtectionTogglePreferenceController

The OnMainSwitchChangeListener is replaced with OnCheckedChangeListener

Bug: 306658427
Test: m Settings
Change-Id: I24021cb9acb308c3f85e51e9f79ad2bf564c789a
This commit is contained in:
Chaohui Wang
2023-11-07 20:41:11 +08:00
parent 8979681a8d
commit bf70edddd0
2 changed files with 6 additions and 6 deletions

View File

@@ -125,7 +125,7 @@ public class ContentProtectionTogglePreferenceControllerTest {
mController.displayPreference(mScreen);
mController.setChecked(false);
mController.onSwitchChanged(/* switchView= */ null, /* isChecked= */ true);
mController.onCheckedChanged(/* switchView= */ null, /* isChecked= */ true);
assertThat(getContentProtectionGlobalSetting()).isEqualTo(1);
}
@@ -134,7 +134,7 @@ public class ContentProtectionTogglePreferenceControllerTest {
public void onSwitchChanged_switchUnchecked_manuallyDisabled() {
mController.displayPreference(mScreen);
mController.onSwitchChanged(/* switchView= */ null, /* isChecked= */ false);
mController.onCheckedChanged(/* switchView= */ null, /* isChecked= */ false);
assertThat(getContentProtectionGlobalSetting()).isEqualTo(-1);
}