use of androidx.preference.SwitchPreference in project android_packages_apps_Settings by omnirom.
the class ZenModeAlarmsPreferenceControllerTest method updateState_AlarmsOnly.
@Test
public void updateState_AlarmsOnly() {
Settings.Global.putInt(mContentResolver, ZEN_MODE, ZEN_MODE_ALARMS);
final SwitchPreference mockPref = mock(SwitchPreference.class);
mController.updateState(mockPref);
verify(mockPref).setEnabled(false);
verify(mockPref).setChecked(true);
}
use of androidx.preference.SwitchPreference in project android_packages_apps_Settings by omnirom.
the class ZenModeAlarmsPreferenceControllerTest method updateState_TotalSilence.
@Test
public void updateState_TotalSilence() {
Settings.Global.putInt(mContentResolver, ZEN_MODE, ZEN_MODE_NO_INTERRUPTIONS);
final SwitchPreference mockPref = mock(SwitchPreference.class);
mController.updateState(mockPref);
verify(mockPref).setEnabled(false);
verify(mockPref).setChecked(false);
}
use of androidx.preference.SwitchPreference in project android_packages_apps_Settings by omnirom.
the class ZenModeEventsPreferenceControllerTest method updateState_AlarmsOnly.
@Test
public void updateState_AlarmsOnly() {
Settings.Global.putInt(mContentResolver, ZEN_MODE, ZEN_MODE_ALARMS);
final SwitchPreference mockPref = mock(SwitchPreference.class);
mController.updateState(mockPref);
verify(mockPref).setEnabled(false);
verify(mockPref).setChecked(false);
}
use of androidx.preference.SwitchPreference in project android_packages_apps_Settings by omnirom.
the class ZenModeMediaPreferenceControllerTest method updateState_TotalSilence.
@Test
public void updateState_TotalSilence() {
Settings.Global.putInt(mContentResolver, ZEN_MODE, ZEN_MODE_NO_INTERRUPTIONS);
final SwitchPreference mockPref = mock(SwitchPreference.class);
mController.updateState(mockPref);
verify(mockPref).setEnabled(false);
verify(mockPref).setChecked(false);
}
use of androidx.preference.SwitchPreference in project android_packages_apps_Settings by omnirom.
the class ZenModeRemindersPreferenceControllerTest method updateState_AlarmsOnly.
@Test
public void updateState_AlarmsOnly() {
Settings.Global.putInt(mContentResolver, ZEN_MODE, ZEN_MODE_ALARMS);
final SwitchPreference mockPref = mock(SwitchPreference.class);
mController.updateState(mockPref);
verify(mockPref).setEnabled(false);
verify(mockPref).setChecked(false);
}
Aggregations