question: public void removeListener ( OnSettingChangedListener listener ) { synchronized ( mLock ) { if ( listener == null ) { throw new IllegalArgumentException ( ) ; } if ( ! mListeners . contains ( listener ) ) { return ; } int index = mListeners . indexOf ( listener ) ; mListeners . remove ( listener ) ; OnSharedPreferenceChangeListener sharedPreferenceListener = mSharedPreferenceListeners . get ( index ) ; mSharedPreferenceListeners . remove ( index ) ; mDefaultPreferences . unregisterOnSharedPreferenceChangeListener ( sharedPreferenceListener ) ; if ( mCustomPreferences != null ) { mCustomPreferences . unregisterOnSharedPreferenceChangeListener ( sharedPreferenceListener ) ; } } }
target:  Remove a specific SettingsListener. This should be done in onPause if a listener has been set.