From ae24e3511378fee24182a94ce95cdc269f4afcad Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 9 May 2020 11:04:03 -0400 Subject: [PATCH] Add contents of PreferenceStub --- .../main/java/android/content/Context.java | 7 +++ .../v7/preference/CheckBoxPreference.java | 9 ++++ .../v7/preference/DialogPreference.java | 21 ++++++++ .../v7/preference/EditTextPreference.java | 19 +++++++ .../support/v7/preference/ListPreference.java | 43 +++++++++++++++ .../support/v7/preference/Preference.java | 53 +++++++++++++++++++ .../v7/preference/PreferenceScreen.java | 15 ++++++ .../v7/preference/TwoStatePreference.java | 25 +++++++++ .../preference/CheckBoxPreference.java | 11 ++++ .../androidx/preference/DialogPreference.java | 21 ++++++++ .../preference/EditTextPreference.java | 19 +++++++ .../androidx/preference/ListPreference.java | 43 +++++++++++++++ .../java/androidx/preference/Preference.java | 53 +++++++++++++++++++ .../androidx/preference/PreferenceScreen.java | 15 ++++++ .../preference/TwoStatePreference.java | 25 +++++++++ .../tachiyomi/source/ConfigurableSource.kt | 9 ++++ 16 files changed, 388 insertions(+) create mode 100644 library/src/main/java/android/content/Context.java create mode 100644 library/src/main/java/android/support/v7/preference/CheckBoxPreference.java create mode 100644 library/src/main/java/android/support/v7/preference/DialogPreference.java create mode 100644 library/src/main/java/android/support/v7/preference/EditTextPreference.java create mode 100644 library/src/main/java/android/support/v7/preference/ListPreference.java create mode 100644 library/src/main/java/android/support/v7/preference/Preference.java create mode 100644 library/src/main/java/android/support/v7/preference/PreferenceScreen.java create mode 100644 library/src/main/java/android/support/v7/preference/TwoStatePreference.java create mode 100644 library/src/main/java/androidx/preference/CheckBoxPreference.java create mode 100644 library/src/main/java/androidx/preference/DialogPreference.java create mode 100644 library/src/main/java/androidx/preference/EditTextPreference.java create mode 100644 library/src/main/java/androidx/preference/ListPreference.java create mode 100644 library/src/main/java/androidx/preference/Preference.java create mode 100644 library/src/main/java/androidx/preference/PreferenceScreen.java create mode 100644 library/src/main/java/androidx/preference/TwoStatePreference.java create mode 100644 library/src/main/java/eu/kanade/tachiyomi/source/ConfigurableSource.kt diff --git a/library/src/main/java/android/content/Context.java b/library/src/main/java/android/content/Context.java new file mode 100644 index 0000000..f27638c --- /dev/null +++ b/library/src/main/java/android/content/Context.java @@ -0,0 +1,7 @@ +package android.content; + +/** + * Created by Carlos on 5/9/2018. + */ + +public class Context {} diff --git a/library/src/main/java/android/support/v7/preference/CheckBoxPreference.java b/library/src/main/java/android/support/v7/preference/CheckBoxPreference.java new file mode 100644 index 0000000..7d503ec --- /dev/null +++ b/library/src/main/java/android/support/v7/preference/CheckBoxPreference.java @@ -0,0 +1,9 @@ +package android.support.v7.preference; + +import android.content.Context; + +public class CheckBoxPreference extends Preference { + + public CheckBoxPreference(Context context) { throw new RuntimeException("Stub!"); } + +} diff --git a/library/src/main/java/android/support/v7/preference/DialogPreference.java b/library/src/main/java/android/support/v7/preference/DialogPreference.java new file mode 100644 index 0000000..a4cc7cc --- /dev/null +++ b/library/src/main/java/android/support/v7/preference/DialogPreference.java @@ -0,0 +1,21 @@ +package android.support.v7.preference; + +public abstract class DialogPreference extends Preference { + + public CharSequence getDialogTitle() { + throw new RuntimeException("Stub!"); + } + + public void setDialogTitle(CharSequence dialogTitle) { + throw new RuntimeException("Stub!"); + } + + public CharSequence getDialogMessage() { + throw new RuntimeException("Stub!"); + } + + public void setDialogMessage(CharSequence dialogMessage) { + throw new RuntimeException("Stub!"); + } + +} diff --git a/library/src/main/java/android/support/v7/preference/EditTextPreference.java b/library/src/main/java/android/support/v7/preference/EditTextPreference.java new file mode 100644 index 0000000..f5eb9d6 --- /dev/null +++ b/library/src/main/java/android/support/v7/preference/EditTextPreference.java @@ -0,0 +1,19 @@ +package android.support.v7.preference; + +import android.content.Context; + +public class EditTextPreference extends DialogPreference { + + public EditTextPreference(Context context) { + throw new RuntimeException("Stub!"); + } + + public String getText() { + throw new RuntimeException("Stub!"); + } + + public void setText(String text) { + throw new RuntimeException("Stub!"); + } + +} diff --git a/library/src/main/java/android/support/v7/preference/ListPreference.java b/library/src/main/java/android/support/v7/preference/ListPreference.java new file mode 100644 index 0000000..3ca948d --- /dev/null +++ b/library/src/main/java/android/support/v7/preference/ListPreference.java @@ -0,0 +1,43 @@ +package android.support.v7.preference; + +import android.content.Context; + +public class ListPreference extends Preference { + + public ListPreference(Context context) { + throw new RuntimeException("Stub!"); + } + + public CharSequence[] getEntries() { + throw new RuntimeException("Stub!"); + } + + public void setEntries(CharSequence[] entries) { + throw new RuntimeException("Stub!"); + } + + public int findIndexOfValue(String value) { + throw new RuntimeException("Stub!"); + } + + public CharSequence[] getEntryValues() { + throw new RuntimeException("Stub!"); + } + + public void setEntryValues(CharSequence[] entryValues) { + throw new RuntimeException("Stub!"); + } + + public void setValueIndex(int index) { + throw new RuntimeException("Stub!"); + } + + public String getValue() { + throw new RuntimeException("Stub!"); + } + + public void setValue(String value) { + throw new RuntimeException("Stub!"); + } + +} diff --git a/library/src/main/java/android/support/v7/preference/Preference.java b/library/src/main/java/android/support/v7/preference/Preference.java new file mode 100644 index 0000000..1884e02 --- /dev/null +++ b/library/src/main/java/android/support/v7/preference/Preference.java @@ -0,0 +1,53 @@ +package android.support.v7.preference; + +public class Preference { + + public void setOnPreferenceChangeListener(OnPreferenceChangeListener onPreferenceChangeListener) { + throw new RuntimeException("Stub!"); + } + + public void setOnPreferenceClickListener(OnPreferenceClickListener onPreferenceClickListener) { + throw new RuntimeException("Stub!"); + } + + public CharSequence getTitle() { + throw new RuntimeException("Stub!"); + } + + public void setTitle(CharSequence title) { + throw new RuntimeException("Stub!"); + } + + public CharSequence getSummary() { + throw new RuntimeException("Stub!"); + } + + public void setSummary(CharSequence summary) { + throw new RuntimeException("Stub!"); + } + + public void setEnabled(boolean enabled) { + throw new RuntimeException("Stub!"); + } + + public String getKey() { + throw new RuntimeException("Stub!"); + } + + public void setKey(String key) { + throw new RuntimeException("Stub!"); + } + + public void setDefaultValue(Object defaultValue) { + throw new RuntimeException("Stub!"); + } + + public interface OnPreferenceChangeListener { + boolean onPreferenceChange(Preference preference, Object newValue); + } + + public interface OnPreferenceClickListener { + boolean onPreferenceClick(Preference preference); + } + +} diff --git a/library/src/main/java/android/support/v7/preference/PreferenceScreen.java b/library/src/main/java/android/support/v7/preference/PreferenceScreen.java new file mode 100644 index 0000000..cfb9da4 --- /dev/null +++ b/library/src/main/java/android/support/v7/preference/PreferenceScreen.java @@ -0,0 +1,15 @@ +package android.support.v7.preference; + +import android.content.Context; + +public class PreferenceScreen { + + public boolean addPreference(Preference preference) { + throw new RuntimeException("Stub!"); + } + + public Context getContext() { + throw new RuntimeException("Stub!"); + } + +} diff --git a/library/src/main/java/android/support/v7/preference/TwoStatePreference.java b/library/src/main/java/android/support/v7/preference/TwoStatePreference.java new file mode 100644 index 0000000..ef21669 --- /dev/null +++ b/library/src/main/java/android/support/v7/preference/TwoStatePreference.java @@ -0,0 +1,25 @@ +package android.support.v7.preference; + +import android.content.Context; + +public class TwoStatePreference extends Preference { + + public TwoStatePreference(Context context) { throw new RuntimeException("Stub!"); } + + public boolean isChecked() { throw new RuntimeException("Stub!"); } + + public void setChecked(boolean checked) { throw new RuntimeException("Stub!"); } + + public CharSequence getSummaryOn() { throw new RuntimeException("Stub!"); } + + public void setSummaryOn(CharSequence summary) { throw new RuntimeException("Stub!"); } + + public CharSequence getSummaryOff() { throw new RuntimeException("Stub!"); } + + public void setSummaryOff(CharSequence summary) { throw new RuntimeException("Stub!"); } + + public boolean getDisableDependentsState() { throw new RuntimeException("Stub!"); } + + public void setDisableDependentsState(boolean disableDependentsState) { throw new RuntimeException("Stub!"); } + +} diff --git a/library/src/main/java/androidx/preference/CheckBoxPreference.java b/library/src/main/java/androidx/preference/CheckBoxPreference.java new file mode 100644 index 0000000..6c986ab --- /dev/null +++ b/library/src/main/java/androidx/preference/CheckBoxPreference.java @@ -0,0 +1,11 @@ +package androidx.preference; + +import android.content.Context; + +public class CheckBoxPreference extends Preference { + + public CheckBoxPreference(Context context) { + throw new RuntimeException("Stub!"); + } + +} diff --git a/library/src/main/java/androidx/preference/DialogPreference.java b/library/src/main/java/androidx/preference/DialogPreference.java new file mode 100644 index 0000000..5a884ef --- /dev/null +++ b/library/src/main/java/androidx/preference/DialogPreference.java @@ -0,0 +1,21 @@ +package androidx.preference; + +public abstract class DialogPreference extends Preference { + + public CharSequence getDialogTitle() { + throw new RuntimeException("Stub!"); + } + + public void setDialogTitle(CharSequence dialogTitle) { + throw new RuntimeException("Stub!"); + } + + public CharSequence getDialogMessage() { + throw new RuntimeException("Stub!"); + } + + public void setDialogMessage(CharSequence dialogMessage) { + throw new RuntimeException("Stub!"); + } + +} diff --git a/library/src/main/java/androidx/preference/EditTextPreference.java b/library/src/main/java/androidx/preference/EditTextPreference.java new file mode 100644 index 0000000..2d9814e --- /dev/null +++ b/library/src/main/java/androidx/preference/EditTextPreference.java @@ -0,0 +1,19 @@ +package androidx.preference; + +import android.content.Context; + +public class EditTextPreference extends DialogPreference { + + public EditTextPreference(Context context) { + throw new RuntimeException("Stub!"); + } + + public String getText() { + throw new RuntimeException("Stub!"); + } + + public void setText(String text) { + throw new RuntimeException("Stub!"); + } + +} diff --git a/library/src/main/java/androidx/preference/ListPreference.java b/library/src/main/java/androidx/preference/ListPreference.java new file mode 100644 index 0000000..51ba95f --- /dev/null +++ b/library/src/main/java/androidx/preference/ListPreference.java @@ -0,0 +1,43 @@ +package androidx.preference; + +import android.content.Context; + +public class ListPreference extends Preference { + + public ListPreference(Context context) { + throw new RuntimeException("Stub!"); + } + + public CharSequence[] getEntries() { + throw new RuntimeException("Stub!"); + } + + public void setEntries(CharSequence[] entries) { + throw new RuntimeException("Stub!"); + } + + public int findIndexOfValue(String value) { + throw new RuntimeException("Stub!"); + } + + public CharSequence[] getEntryValues() { + throw new RuntimeException("Stub!"); + } + + public void setEntryValues(CharSequence[] entryValues) { + throw new RuntimeException("Stub!"); + } + + public void setValueIndex(int index) { + throw new RuntimeException("Stub!"); + } + + public String getValue() { + throw new RuntimeException("Stub!"); + } + + public void setValue(String value) { + throw new RuntimeException("Stub!"); + } + +} diff --git a/library/src/main/java/androidx/preference/Preference.java b/library/src/main/java/androidx/preference/Preference.java new file mode 100644 index 0000000..502c39f --- /dev/null +++ b/library/src/main/java/androidx/preference/Preference.java @@ -0,0 +1,53 @@ +package androidx.preference; + +public class Preference { + + public void setOnPreferenceChangeListener(OnPreferenceChangeListener onPreferenceChangeListener) { + throw new RuntimeException("Stub!"); + } + + public void setOnPreferenceClickListener(OnPreferenceClickListener onPreferenceClickListener) { + throw new RuntimeException("Stub!"); + } + + public CharSequence getTitle() { + throw new RuntimeException("Stub!"); + } + + public void setTitle(CharSequence title) { + throw new RuntimeException("Stub!"); + } + + public CharSequence getSummary() { + throw new RuntimeException("Stub!"); + } + + public void setSummary(CharSequence summary) { + throw new RuntimeException("Stub!"); + } + + public void setEnabled(boolean enabled) { + throw new RuntimeException("Stub!"); + } + + public String getKey() { + throw new RuntimeException("Stub!"); + } + + public void setKey(String key) { + throw new RuntimeException("Stub!"); + } + + public void setDefaultValue(Object defaultValue) { + throw new RuntimeException("Stub!"); + } + + public interface OnPreferenceChangeListener { + boolean onPreferenceChange(Preference preference, Object newValue); + } + + public interface OnPreferenceClickListener { + boolean onPreferenceClick(Preference preference); + } + +} diff --git a/library/src/main/java/androidx/preference/PreferenceScreen.java b/library/src/main/java/androidx/preference/PreferenceScreen.java new file mode 100644 index 0000000..38e31e6 --- /dev/null +++ b/library/src/main/java/androidx/preference/PreferenceScreen.java @@ -0,0 +1,15 @@ +package androidx.preference; + +import android.content.Context; + +public class PreferenceScreen { + + public boolean addPreference(Preference preference) { + throw new RuntimeException("Stub!"); + } + + public Context getContext() { + throw new RuntimeException("Stub!"); + } + +} diff --git a/library/src/main/java/androidx/preference/TwoStatePreference.java b/library/src/main/java/androidx/preference/TwoStatePreference.java new file mode 100644 index 0000000..6d05656 --- /dev/null +++ b/library/src/main/java/androidx/preference/TwoStatePreference.java @@ -0,0 +1,25 @@ +package androidx.preference; + +import android.content.Context; + +public class TwoStatePreference extends Preference { + + public TwoStatePreference(Context context) { throw new RuntimeException("Stub!"); } + + public boolean isChecked() { throw new RuntimeException("Stub!"); } + + public void setChecked(boolean checked) { throw new RuntimeException("Stub!"); } + + public CharSequence getSummaryOn() { throw new RuntimeException("Stub!"); } + + public void setSummaryOn(CharSequence summary) { throw new RuntimeException("Stub!"); } + + public CharSequence getSummaryOff() { throw new RuntimeException("Stub!"); } + + public void setSummaryOff(CharSequence summary) { throw new RuntimeException("Stub!"); } + + public boolean getDisableDependentsState() { throw new RuntimeException("Stub!"); } + + public void setDisableDependentsState(boolean disableDependentsState) { throw new RuntimeException("Stub!"); } + +} diff --git a/library/src/main/java/eu/kanade/tachiyomi/source/ConfigurableSource.kt b/library/src/main/java/eu/kanade/tachiyomi/source/ConfigurableSource.kt new file mode 100644 index 0000000..fb8ed4e --- /dev/null +++ b/library/src/main/java/eu/kanade/tachiyomi/source/ConfigurableSource.kt @@ -0,0 +1,9 @@ +package eu.kanade.tachiyomi.source + +interface ConfigurableSource { + + fun setupPreferenceScreen(screen: android.support.v7.preference.PreferenceScreen) + + fun setupPreferenceScreen(screen: androidx.preference.PreferenceScreen ) + +}