am 424a976e: Merge "Ensure Preference listener is unregistered"
* commit '424a976e58ea40e44f28ac4b6aacc4656a4c1377': Ensure Preference listener is unregisteredmain
commit
d9ca1a3f2c
|
@ -561,6 +561,9 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
|
||||||
}
|
}
|
||||||
mSettings.onDestroy();
|
mSettings.onDestroy();
|
||||||
unregisterReceiver(mReceiver);
|
unregisterReceiver(mReceiver);
|
||||||
|
if (ProductionFlag.IS_EXPERIMENTAL) {
|
||||||
|
ResearchLogger.getInstance().onDestroy();
|
||||||
|
}
|
||||||
// TODO: The experimental version is not supported by the Dictionary Pack Service yet.
|
// TODO: The experimental version is not supported by the Dictionary Pack Service yet.
|
||||||
if (!ProductionFlag.IS_EXPERIMENTAL) {
|
if (!ProductionFlag.IS_EXPERIMENTAL) {
|
||||||
unregisterReceiver(mDictionaryPackInstallReceiver);
|
unregisterReceiver(mDictionaryPackInstallReceiver);
|
||||||
|
|
|
@ -322,6 +322,12 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
||||||
mMainKeyboardView = null;
|
mMainKeyboardView = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onDestroy() {
|
||||||
|
if (mPrefs != null) {
|
||||||
|
mPrefs.unregisterOnSharedPreferenceChangeListener(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private boolean hasSeenSplash() {
|
private boolean hasSeenSplash() {
|
||||||
return mPrefs.getBoolean(PREF_RESEARCH_HAS_SEEN_SPLASH, false);
|
return mPrefs.getBoolean(PREF_RESEARCH_HAS_SEEN_SPLASH, false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue