Search in sources :

Example 11 with SeekBarPreference

use of com.android.settings.widget.SeekBarPreference in project android_packages_apps_Settings by omnirom.

the class FloatingMenuTransparencyPreferenceControllerTest method onChange_a11yBtnModeChangeToNavigationBar_preferenceDisabled.

@Test
public void onChange_a11yBtnModeChangeToNavigationBar_preferenceDisabled() {
    mController.mPreference = new SeekBarPreference(mContext);
    Settings.Secure.putInt(mContentResolver, Settings.Secure.ACCESSIBILITY_BUTTON_MODE, ACCESSIBILITY_BUTTON_MODE_NAVIGATION_BAR);
    mController.mContentObserver.onChange(false);
    assertThat(mController.mPreference.isEnabled()).isFalse();
}
Also used : SeekBarPreference(com.android.settings.widget.SeekBarPreference) Test(org.junit.Test)

Example 12 with SeekBarPreference

use of com.android.settings.widget.SeekBarPreference in project android_packages_apps_Settings by omnirom.

the class RemoteVolumeGroupControllerTest method displayPreference_withActiveSession_checkSeekBarMaxVolume.

@Test
public void displayPreference_withActiveSession_checkSeekBarMaxVolume() {
    mController.displayPreference(mScreen);
    final SeekBarPreference preference = mPreferenceCategory.findPreference(TEST_SESSION_1_ID);
    assertThat(preference.getMax()).isEqualTo(MAX_VOLUME);
}
Also used : SeekBarPreference(com.android.settings.widget.SeekBarPreference) Test(org.junit.Test)

Aggregations

SeekBarPreference (com.android.settings.widget.SeekBarPreference)12 Test (org.junit.Test)3 SettingsEnums (android.app.settings.SettingsEnums)2 ActivityNotFoundException (android.content.ActivityNotFoundException)2 ContentResolver (android.content.ContentResolver)2 Context (android.content.Context)2 Intent (android.content.Intent)2 Bundle (android.os.Bundle)2 TTS_DEFAULT_PITCH (android.provider.Settings.Secure.TTS_DEFAULT_PITCH)2 TTS_DEFAULT_RATE (android.provider.Settings.Secure.TTS_DEFAULT_RATE)2 TTS_DEFAULT_SYNTH (android.provider.Settings.Secure.TTS_DEFAULT_SYNTH)2 TextToSpeech (android.speech.tts.TextToSpeech)2 EngineInfo (android.speech.tts.TextToSpeech.EngineInfo)2 TtsEngines (android.speech.tts.TtsEngines)2 UtteranceProgressListener (android.speech.tts.UtteranceProgressListener)2 TextUtils (android.text.TextUtils)2 Log (android.util.Log)2 Pair (android.util.Pair)2 AlertDialog (androidx.appcompat.app.AlertDialog)2 ListPreference (androidx.preference.ListPreference)2