mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-10 16:39:35 +00:00
do some inits on app create instead of in the services
This commit is contained in:
parent
0899245ae7
commit
35083e6515
8 changed files with 21 additions and 50 deletions
|
@ -85,7 +85,6 @@ public final class AndroidSpellCheckerService extends SpellCheckerService
|
|||
onSharedPreferenceChanged(prefs, Settings.PREF_USE_CONTACTS);
|
||||
final boolean blockOffensive = prefs.getBoolean(Settings.PREF_BLOCK_POTENTIALLY_OFFENSIVE, Defaults.PREF_BLOCK_POTENTIALLY_OFFENSIVE);
|
||||
mSettingsValuesForSuggestion = new SettingsValuesForSuggestion(blockOffensive, false);
|
||||
SubtypeSettings.INSTANCE.init(this);
|
||||
}
|
||||
|
||||
public float getRecommendedThreshold() {
|
||||
|
@ -194,7 +193,6 @@ public final class AndroidSpellCheckerService extends SpellCheckerService
|
|||
// creating a keyboard reads SettingsValues from Settings instance
|
||||
// maybe it would be "more correct" to create an instance of SettingsValues and use that one instead
|
||||
// but creating a global one if not existing should be fine too
|
||||
Settings.init(this);
|
||||
final EditorInfo editorInfo = new EditorInfo();
|
||||
editorInfo.inputType = InputType.TYPE_CLASS_TEXT;
|
||||
Settings.getInstance().loadSettings(this, locale, new InputAttributes(editorInfo, false, getPackageName()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue