Revert "Migrate to CompoundButton.OnCheckedChangeListener"

Revert submission 25147565-onSwitchChanged-CompoundButton

Reason for revert: breaking builds 

Bug:309601476

Reverted changes: /q/submissionid:25147565-onSwitchChanged-CompoundButton

Change-Id: Ie746db87d9c642599593aa3d5e5baf6b7ba89c0e
This commit is contained in:
Sebastian Pickl
2023-11-07 13:26:36 +00:00
committed by Android (Google) Code Review
parent 71d1f021af
commit 8979681a8d
49 changed files with 188 additions and 174 deletions

View File

@@ -116,7 +116,7 @@ public class PreventRingingSwitchPreferenceControllerTest {
Settings.Secure.putInt(mContext.getContentResolver(), Settings.Secure.VOLUME_HUSH_GESTURE,
VOLUME_HUSH_OFF);
mController.onCheckedChanged(null, true);
mController.onSwitchChanged(null, true);
assertThat(Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.VOLUME_HUSH_GESTURE, UNKNOWN)).isEqualTo(VOLUME_HUSH_VIBRATE);
@@ -127,7 +127,7 @@ public class PreventRingingSwitchPreferenceControllerTest {
Settings.Secure.putInt(mContext.getContentResolver(), Settings.Secure.VOLUME_HUSH_GESTURE,
VOLUME_HUSH_MUTE);
mController.onCheckedChanged(null, false);
mController.onSwitchChanged(null, false);
assertThat(Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.VOLUME_HUSH_GESTURE, UNKNOWN)).isEqualTo(VOLUME_HUSH_OFF);
@@ -139,7 +139,7 @@ public class PreventRingingSwitchPreferenceControllerTest {
Settings.Secure.putInt(mContext.getContentResolver(), Settings.Secure.VOLUME_HUSH_GESTURE,
VOLUME_HUSH_MUTE);
mController.onCheckedChanged(null, true);
mController.onSwitchChanged(null, true);
assertThat(Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.VOLUME_HUSH_GESTURE, UNKNOWN)).isEqualTo(VOLUME_HUSH_MUTE);
@@ -151,7 +151,7 @@ public class PreventRingingSwitchPreferenceControllerTest {
Settings.Secure.putInt(mContext.getContentResolver(), Settings.Secure.VOLUME_HUSH_GESTURE,
VOLUME_HUSH_VIBRATE);
mController.onCheckedChanged(null, true);
mController.onSwitchChanged(null, true);
assertThat(Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.VOLUME_HUSH_GESTURE, UNKNOWN)).isEqualTo(VOLUME_HUSH_VIBRATE);