mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-20 22:29:10 +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
|
@ -115,15 +115,6 @@
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<activity android:name="org.dslul.openboard.inputmethod.dictionarypack.DictionarySettingsActivity"
|
|
||||||
android:theme="@style/platformSettingsTheme"
|
|
||||||
android:label="@string/dictionary_settings_title"
|
|
||||||
android:uiOptions="splitActionBarWhenNarrow">
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.MAIN"/>
|
|
||||||
</intent-filter>
|
|
||||||
</activity>
|
|
||||||
|
|
||||||
<!-- Unexported activity used for tests. -->
|
<!-- Unexported activity used for tests. -->
|
||||||
<activity android:name=".settings.TestFragmentActivity"
|
<activity android:name=".settings.TestFragmentActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
|
|
|
@ -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.preference.SwitchPreference;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import org.dslul.openboard.inputmethod.dictionarypack.DictionarySettingsActivity;
|
|
||||||
import org.dslul.openboard.inputmethod.latin.R;
|
import org.dslul.openboard.inputmethod.latin.R;
|
||||||
import org.dslul.openboard.inputmethod.latin.permissions.PermissionsManager;
|
import org.dslul.openboard.inputmethod.latin.permissions.PermissionsManager;
|
||||||
import org.dslul.openboard.inputmethod.latin.permissions.PermissionsUtil;
|
import org.dslul.openboard.inputmethod.latin.permissions.PermissionsUtil;
|
||||||
|
@ -68,14 +67,6 @@ public final class CorrectionSettingsFragment extends SubScreenFragment
|
||||||
final Context context = getActivity();
|
final Context context = getActivity();
|
||||||
final PackageManager pm = context.getPackageManager();
|
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 =
|
final Preference editPersonalDictionary =
|
||||||
findPreference(Settings.PREF_EDIT_PERSONAL_DICTIONARY);
|
findPreference(Settings.PREF_EDIT_PERSONAL_DICTIONARY);
|
||||||
final Intent editPersonalDictionaryIntent = editPersonalDictionary.getIntent();
|
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_MODE_OBSOLETE = "voice_mode";
|
||||||
public static final String PREF_VOICE_INPUT_KEY = "pref_voice_input_key";
|
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_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.
|
// PREF_AUTO_CORRECTION_THRESHOLD_OBSOLETE is obsolete. Use PREF_AUTO_CORRECTION instead.
|
||||||
public static final String PREF_AUTO_CORRECTION_THRESHOLD_OBSOLETE =
|
public static final String PREF_AUTO_CORRECTION_THRESHOLD_OBSOLETE =
|
||||||
"auto_correction_threshold";
|
"auto_correction_threshold";
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
package org.dslul.openboard.inputmethod.latin.utils;
|
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.about.AboutPreferences;
|
||||||
import org.dslul.openboard.inputmethod.latin.settings.AdvancedSettingsFragment;
|
import org.dslul.openboard.inputmethod.latin.settings.AdvancedSettingsFragment;
|
||||||
import org.dslul.openboard.inputmethod.latin.settings.AppearanceSettingsFragment;
|
import org.dslul.openboard.inputmethod.latin.settings.AppearanceSettingsFragment;
|
||||||
|
@ -38,7 +37,6 @@ import java.util.HashSet;
|
||||||
public class FragmentUtils {
|
public class FragmentUtils {
|
||||||
private static final HashSet<String> sLatinImeFragments = new HashSet<>();
|
private static final HashSet<String> sLatinImeFragments = new HashSet<>();
|
||||||
static {
|
static {
|
||||||
sLatinImeFragments.add(DictionarySettingsFragment.class.getName());
|
|
||||||
sLatinImeFragments.add(AboutPreferences.class.getName());
|
sLatinImeFragments.add(AboutPreferences.class.getName());
|
||||||
sLatinImeFragments.add(PreferencesSettingsFragment.class.getName());
|
sLatinImeFragments.add(PreferencesSettingsFragment.class.getName());
|
||||||
sLatinImeFragments.add(AppearanceSettingsFragment.class.getName());
|
sLatinImeFragments.add(AppearanceSettingsFragment.class.getName());
|
||||||
|
|
|
@ -22,17 +22,6 @@
|
||||||
android:title="@string/edit_personal_dictionary">
|
android:title="@string/edit_personal_dictionary">
|
||||||
<intent android:action="android.settings.USER_DICTIONARY_SETTINGS" />
|
<intent android:action="android.settings.USER_DICTIONARY_SETTINGS" />
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
<PreferenceScreen
|
|
||||||
android:key="configure_dictionaries_key"
|
|
||||||
android:title="@string/configure_dictionaries_title">
|
|
||||||
<intent
|
|
||||||
android:action="android.intent.action.MAIN"
|
|
||||||
android:targetClass="@string/dictionary_pack_settings_activity">
|
|
||||||
<extra
|
|
||||||
android:name="clientId"
|
|
||||||
android:value="@string/dictionary_pack_client_id" />
|
|
||||||
</intent>
|
|
||||||
</PreferenceScreen>
|
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:key="pref_key_block_potentially_offensive"
|
android:key="pref_key_block_potentially_offensive"
|
||||||
android:title="@string/prefs_block_potentially_offensive_title"
|
android:title="@string/prefs_block_potentially_offensive_title"
|
||||||
|
|
Loading…
Add table
Reference in a new issue