mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Merge "Stop listening on shared preferences change."
This commit is contained in:
commit
1ed20371c1
@ -81,8 +81,7 @@ import java.util.Locale;
|
|||||||
/**
|
/**
|
||||||
* Input method implementation for Qwerty'ish keyboard.
|
* Input method implementation for Qwerty'ish keyboard.
|
||||||
*/
|
*/
|
||||||
public class LatinIME extends InputMethodService implements KeyboardActionListener,
|
public class LatinIME extends InputMethodService implements KeyboardActionListener {
|
||||||
SharedPreferences.OnSharedPreferenceChangeListener {
|
|
||||||
private static final String TAG = "LatinIME";
|
private static final String TAG = "LatinIME";
|
||||||
private static final boolean PERF_DEBUG = false;
|
private static final boolean PERF_DEBUG = false;
|
||||||
private static final boolean TRACE = false;
|
private static final boolean TRACE = false;
|
||||||
@ -395,7 +394,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||||||
filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
|
filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
|
||||||
registerReceiver(mReceiver, filter);
|
registerReceiver(mReceiver, filter);
|
||||||
mVoiceConnector = VoiceIMEConnector.init(this, prefs, mHandler);
|
mVoiceConnector = VoiceIMEConnector.init(this, prefs, mHandler);
|
||||||
prefs.registerOnSharedPreferenceChangeListener(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1941,19 +1939,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||||||
switcher.updateShiftState();
|
switcher.updateShiftState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences,
|
|
||||||
String key) {
|
|
||||||
mSubtypeSwitcher.onSharedPreferenceChanged(sharedPreferences, key);
|
|
||||||
if (Settings.PREF_SELECTED_LANGUAGES.equals(key)) {
|
|
||||||
mRefreshKeyboardRequired = true;
|
|
||||||
} else if (Settings.PREF_RECORRECTION_ENABLED.equals(key)) {
|
|
||||||
mReCorrectionEnabled = sharedPreferences.getBoolean(
|
|
||||||
Settings.PREF_RECORRECTION_ENABLED,
|
|
||||||
mResources.getBoolean(R.bool.config_default_recorrection_enabled));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSwipeDown() {
|
public void onSwipeDown() {
|
||||||
if (mConfigSwipeDownDismissKeyboardEnabled)
|
if (mConfigSwipeDownDismissKeyboardEnabled)
|
||||||
|
@ -472,14 +472,6 @@ public class SubtypeSwitcher {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
|
|
||||||
if (mConfigUseSpacebarLanguageSwitcher) {
|
|
||||||
if (Settings.PREF_SELECTED_LANGUAGES.equals(key)) {
|
|
||||||
mLanguageSwitcher.loadLocales(sharedPreferences);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Change system locale for this application
|
* Change system locale for this application
|
||||||
* @param newLocale
|
* @param newLocale
|
||||||
|
Loading…
x
Reference in New Issue
Block a user