attempting to fix the LanguageCollection crashes
This commit is contained in:
parent
decebe1fbe
commit
f52550be1a
3 changed files with 2 additions and 10 deletions
|
|
@ -6,7 +6,6 @@ import io.github.sspanak.tt9.ime.helpers.Key;
|
|||
import io.github.sspanak.tt9.preferences.screens.debug.ItemInputHandlingMode;
|
||||
import io.github.sspanak.tt9.preferences.settings.SettingsStore;
|
||||
import io.github.sspanak.tt9.util.Timer;
|
||||
import io.github.sspanak.tt9.util.sys.SystemSettings;
|
||||
|
||||
|
||||
abstract class KeyPadHandler extends UiHandler {
|
||||
|
|
@ -29,10 +28,6 @@ abstract class KeyPadHandler extends UiHandler {
|
|||
*/
|
||||
@Override
|
||||
public void onCreate() {
|
||||
if (!SystemSettings.isTT9Selected(this)) {
|
||||
return;
|
||||
}
|
||||
|
||||
super.onCreate();
|
||||
settings = new SettingsStore(getApplicationContext());
|
||||
|
||||
|
|
|
|||
|
|
@ -37,11 +37,6 @@ public class LanguageCollection {
|
|||
}
|
||||
|
||||
|
||||
public static void destroy() {
|
||||
self = null;
|
||||
}
|
||||
|
||||
|
||||
@Nullable
|
||||
public static NaturalLanguage getLanguage(String langId) {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import android.view.MenuItem;
|
|||
import androidx.annotation.NonNull;
|
||||
import androidx.preference.PreferenceFragmentCompat;
|
||||
|
||||
import io.github.sspanak.tt9.languages.LanguageCollection;
|
||||
import io.github.sspanak.tt9.preferences.PreferencesActivity;
|
||||
import io.github.sspanak.tt9.preferences.custom.ScreenPreferencesList;
|
||||
import io.github.sspanak.tt9.preferences.settings.SettingsUI;
|
||||
|
|
@ -47,6 +48,7 @@ abstract public class BaseScreenFragment extends PreferenceFragmentCompat {
|
|||
|
||||
@Override
|
||||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
||||
LanguageCollection.init(getContext());
|
||||
setHasOptionsMenu(true); // enable "back" in "onOptionsItemSelected()"
|
||||
setPreferencesFromResource(getXml(), rootKey);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue