public void notifyOnChange(String key) {
   Set<OnSharedPreferenceChangeListener> listeners = getReference().listeners;
   if (listeners == null) {
     return;
   }
   synchronized (listeners) {
     for (OnSharedPreferenceChangeListener listener : listeners) {
       listener.onSharedPreferenceChanged(this, key);
     }
   }
 }
 @Override
 public void onSharedPreferenceChanged(
     android.content.SharedPreferences sharedPreferences, String key) {
   listener.onSharedPreferenceChanged(prefs, key);
 }