question: public void addListener ( final OnSettingChangedListener listener ) { synchronized ( mLock ) { if ( listener == null ) { throw new IllegalArgumentException ( "OnSettingChangedListener cannot be null." ) ; } if ( mListeners . contains ( listener ) ) { return ; } mListeners . add ( listener ) ; OnSharedPreferenceChangeListener sharedPreferenceListener = getSharedPreferenceListener ( listener ) ; mSharedPreferenceListeners . add ( sharedPreferenceListener ) ; mDefaultPreferences . registerOnSharedPreferenceChangeListener ( sharedPreferenceListener ) ; if ( mCustomPreferences != null ) { mCustomPreferences . registerOnSharedPreferenceChangeListener ( sharedPreferenceListener ) ; } Log . v ( TAG , "listeners: " + mListeners ) ; } }
target:  Add an OnSettingChangedListener to the SettingsManager, which will execute onSettingsChanged when any SharedPreference has been updated.