question: public void removeAllListeners ( ) { synchronized ( mLock ) { for ( OnSharedPreferenceChangeListener listener : mSharedPreferenceListeners ) { mDefaultPreferences . unregisterOnSharedPreferenceChangeListener ( listener ) ; if ( mCustomPreferences != null ) { mCustomPreferences . unregisterOnSharedPreferenceChangeListener ( listener ) ; } } mSharedPreferenceListeners . clear ( ) ; mListeners . clear ( ) ; } }
target:  Remove all OnSharedPreferenceChangedListener's. This should be done in onDestroy.