Search in sources :

Example 1 with ActionButtonsPreference

use of com.android.settingslib.widget.ActionButtonsPreference in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class AppStorageSettingsTest method createMock.

private ActionButtonsPreference createMock() {
    final ActionButtonsPreference pref = mock(ActionButtonsPreference.class);
    when(pref.setButton1Text(anyInt())).thenReturn(pref);
    when(pref.setButton1Icon(anyInt())).thenReturn(pref);
    when(pref.setButton1Enabled(anyBoolean())).thenReturn(pref);
    when(pref.setButton1Visible(anyBoolean())).thenReturn(pref);
    when(pref.setButton1OnClickListener(any(View.OnClickListener.class))).thenReturn(pref);
    when(pref.setButton2Text(anyInt())).thenReturn(pref);
    when(pref.setButton2Icon(anyInt())).thenReturn(pref);
    when(pref.setButton2Enabled(anyBoolean())).thenReturn(pref);
    when(pref.setButton2Visible(anyBoolean())).thenReturn(pref);
    when(pref.setButton2OnClickListener(any(View.OnClickListener.class))).thenReturn(pref);
    return pref;
}
Also used : ActionButtonsPreference(com.android.settingslib.widget.ActionButtonsPreference)

Example 2 with ActionButtonsPreference

use of com.android.settingslib.widget.ActionButtonsPreference in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class BluetoothDetailsButtonsControllerTest method createMock.

private ActionButtonsPreference createMock() {
    final ActionButtonsPreference pref = mock(ActionButtonsPreference.class);
    when(pref.setButton1Text(anyInt())).thenReturn(pref);
    when(pref.setButton1Icon(anyInt())).thenReturn(pref);
    when(pref.setButton1Enabled(anyBoolean())).thenReturn(pref);
    when(pref.setButton1Visible(anyBoolean())).thenReturn(pref);
    when(pref.setButton1OnClickListener(any(View.OnClickListener.class))).thenReturn(pref);
    when(pref.setButton2Text(anyInt())).thenReturn(pref);
    when(pref.setButton2Icon(anyInt())).thenReturn(pref);
    when(pref.setButton2Enabled(anyBoolean())).thenReturn(pref);
    when(pref.setButton2Visible(anyBoolean())).thenReturn(pref);
    when(pref.setButton2OnClickListener(any(View.OnClickListener.class))).thenReturn(pref);
    return pref;
}
Also used : ActionButtonsPreference(com.android.settingslib.widget.ActionButtonsPreference)

Example 3 with ActionButtonsPreference

use of com.android.settingslib.widget.ActionButtonsPreference in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class AppButtonsPreferenceControllerTest method createMock.

private ActionButtonsPreference createMock() {
    final ActionButtonsPreference pref = mock(ActionButtonsPreference.class);
    when(pref.setButton2Text(anyInt())).thenReturn(pref);
    when(pref.setButton2Icon(anyInt())).thenReturn(pref);
    when(pref.setButton2Enabled(anyBoolean())).thenReturn(pref);
    when(pref.setButton2Visible(anyBoolean())).thenReturn(pref);
    when(pref.setButton2OnClickListener(any(View.OnClickListener.class))).thenReturn(pref);
    return pref;
}
Also used : ActionButtonsPreference(com.android.settingslib.widget.ActionButtonsPreference)

Example 4 with ActionButtonsPreference

use of com.android.settingslib.widget.ActionButtonsPreference in project android_packages_apps_Settings by omnirom.

the class AppButtonsPreferenceControllerTest method createMock.

private ActionButtonsPreference createMock() {
    final ActionButtonsPreference pref = mock(ActionButtonsPreference.class);
    when(pref.setButton1Text(anyInt())).thenReturn(pref);
    when(pref.setButton1Icon(anyInt())).thenReturn(pref);
    when(pref.setButton1Enabled(anyBoolean())).thenReturn(pref);
    when(pref.setButton1OnClickListener(any(View.OnClickListener.class))).thenReturn(pref);
    when(pref.setButton2Text(anyInt())).thenReturn(pref);
    when(pref.setButton2Icon(anyInt())).thenReturn(pref);
    when(pref.setButton2Enabled(anyBoolean())).thenReturn(pref);
    when(pref.setButton2Visible(anyBoolean())).thenReturn(pref);
    when(pref.setButton2OnClickListener(any(View.OnClickListener.class))).thenReturn(pref);
    when(pref.setButton3Text(anyInt())).thenReturn(pref);
    when(pref.setButton3Icon(anyInt())).thenReturn(pref);
    when(pref.setButton3Enabled(anyBoolean())).thenReturn(pref);
    when(pref.setButton3OnClickListener(any(View.OnClickListener.class))).thenReturn(pref);
    return pref;
}
Also used : ActionButtonsPreference(com.android.settingslib.widget.ActionButtonsPreference)

Example 5 with ActionButtonsPreference

use of com.android.settingslib.widget.ActionButtonsPreference in project android_packages_apps_Settings by omnirom.

the class AppStorageSettingsTest method createMock.

private ActionButtonsPreference createMock() {
    final ActionButtonsPreference pref = mock(ActionButtonsPreference.class);
    when(pref.setButton1Text(anyInt())).thenReturn(pref);
    when(pref.setButton1Icon(anyInt())).thenReturn(pref);
    when(pref.setButton1Enabled(anyBoolean())).thenReturn(pref);
    when(pref.setButton1Visible(anyBoolean())).thenReturn(pref);
    when(pref.setButton1OnClickListener(any(View.OnClickListener.class))).thenReturn(pref);
    when(pref.setButton2Text(anyInt())).thenReturn(pref);
    when(pref.setButton2Icon(anyInt())).thenReturn(pref);
    when(pref.setButton2Enabled(anyBoolean())).thenReturn(pref);
    when(pref.setButton2Visible(anyBoolean())).thenReturn(pref);
    when(pref.setButton2OnClickListener(any(View.OnClickListener.class))).thenReturn(pref);
    return pref;
}
Also used : ActionButtonsPreference(com.android.settingslib.widget.ActionButtonsPreference)

Aggregations

ActionButtonsPreference (com.android.settingslib.widget.ActionButtonsPreference)10 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 OnClickListener (android.view.View.OnClickListener)2 AlertDialog (androidx.appcompat.app.AlertDialog)2 ListPreference (androidx.preference.ListPreference)2