Unregister shared preferences properly
This commit is contained in:
parent
b67cbf72a4
commit
95394d6cb3
1 changed files with 6 additions and 0 deletions
|
@ -68,6 +68,12 @@ public class PreferencesActivity extends PreferenceActivity implements SharedPre
|
|||
PreferenceManager.getDefaultSharedPreferences(this).registerOnSharedPreferenceChangeListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
PreferenceManager.getDefaultSharedPreferences(this).unregisterOnSharedPreferenceChangeListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void attachBaseContext(Context newBase) {
|
||||
super.attachBaseContext(LocaleHelper.INSTANCE.wrap(newBase));
|
||||
|
|
Loading…
Reference in a new issue