mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-14 05:52:47 +00:00
Remove dictionary add-ons settings
This is not needed anymore, dictionaries are directly embedded in the resources and cannot be downloaded
This commit is contained in:
parent
ca808ef0bd
commit
dcd46f9326
6 changed files with 0 additions and 64 deletions
|
@ -1,32 +0,0 @@
|
|||
package org.dslul.openboard.inputmethod.dictionarypack
|
||||
|
||||
import android.annotation.TargetApi
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.preference.PreferenceActivity
|
||||
import org.dslul.openboard.inputmethod.latin.utils.FragmentUtils
|
||||
|
||||
/**
|
||||
* Preference screen.
|
||||
*/
|
||||
class DictionarySettingsActivity : PreferenceActivity() {
|
||||
|
||||
override fun getIntent(): Intent {
|
||||
val modIntent = Intent(super.getIntent())
|
||||
modIntent.putExtra(EXTRA_SHOW_FRAGMENT, DEFAULT_FRAGMENT)
|
||||
modIntent.putExtra(EXTRA_NO_HEADERS, true)
|
||||
// Important note : the original intent should contain a String extra with the key
|
||||
// DictionarySettingsFragment.DICT_SETTINGS_FRAGMENT_CLIENT_ID_ARGUMENT so that the
|
||||
// fragment can know who the client is.
|
||||
return modIntent
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.KITKAT)
|
||||
public override fun isValidFragment(fragmentName: String): Boolean {
|
||||
return FragmentUtils.isValidFragment(fragmentName)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val DEFAULT_FRAGMENT = DictionarySettingsFragment::class.java.name
|
||||
}
|
||||
}
|
|
@ -28,7 +28,6 @@ import android.preference.Preference;
|
|||
import android.preference.SwitchPreference;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import org.dslul.openboard.inputmethod.dictionarypack.DictionarySettingsActivity;
|
||||
import org.dslul.openboard.inputmethod.latin.R;
|
||||
import org.dslul.openboard.inputmethod.latin.permissions.PermissionsManager;
|
||||
import org.dslul.openboard.inputmethod.latin.permissions.PermissionsUtil;
|
||||
|
@ -68,14 +67,6 @@ public final class CorrectionSettingsFragment extends SubScreenFragment
|
|||
final Context context = getActivity();
|
||||
final PackageManager pm = context.getPackageManager();
|
||||
|
||||
final Preference dictionaryLink = findPreference(Settings.PREF_CONFIGURE_DICTIONARIES_KEY);
|
||||
final Intent intent = dictionaryLink.getIntent();
|
||||
intent.setClassName(context.getPackageName(), DictionarySettingsActivity.class.getName());
|
||||
final int number = pm.queryIntentActivities(intent, 0).size();
|
||||
if (0 >= number) {
|
||||
removePreference(Settings.PREF_CONFIGURE_DICTIONARIES_KEY);
|
||||
}
|
||||
|
||||
final Preference editPersonalDictionary =
|
||||
findPreference(Settings.PREF_EDIT_PERSONAL_DICTIONARY);
|
||||
final Intent editPersonalDictionaryIntent = editPersonalDictionary.getIntent();
|
||||
|
|
|
@ -57,7 +57,6 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
|
|||
public static final String PREF_VOICE_MODE_OBSOLETE = "voice_mode";
|
||||
public static final String PREF_VOICE_INPUT_KEY = "pref_voice_input_key";
|
||||
public static final String PREF_EDIT_PERSONAL_DICTIONARY = "edit_personal_dictionary";
|
||||
public static final String PREF_CONFIGURE_DICTIONARIES_KEY = "configure_dictionaries_key";
|
||||
// PREF_AUTO_CORRECTION_THRESHOLD_OBSOLETE is obsolete. Use PREF_AUTO_CORRECTION instead.
|
||||
public static final String PREF_AUTO_CORRECTION_THRESHOLD_OBSOLETE =
|
||||
"auto_correction_threshold";
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
package org.dslul.openboard.inputmethod.latin.utils;
|
||||
|
||||
import org.dslul.openboard.inputmethod.dictionarypack.DictionarySettingsFragment;
|
||||
import org.dslul.openboard.inputmethod.latin.about.AboutPreferences;
|
||||
import org.dslul.openboard.inputmethod.latin.settings.AdvancedSettingsFragment;
|
||||
import org.dslul.openboard.inputmethod.latin.settings.AppearanceSettingsFragment;
|
||||
|
@ -38,7 +37,6 @@ import java.util.HashSet;
|
|||
public class FragmentUtils {
|
||||
private static final HashSet<String> sLatinImeFragments = new HashSet<>();
|
||||
static {
|
||||
sLatinImeFragments.add(DictionarySettingsFragment.class.getName());
|
||||
sLatinImeFragments.add(AboutPreferences.class.getName());
|
||||
sLatinImeFragments.add(PreferencesSettingsFragment.class.getName());
|
||||
sLatinImeFragments.add(AppearanceSettingsFragment.class.getName());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue