@Override public void onSharedPreferenceChanged(SharedPreferences aSharedPreferences,String aKey){
  if (mIsUiUpdateSkipped) {
    Log.d(LOG_TAG,"## onSharedPreferenceChanged(): Skipped");
    return;
  }
  if (aKey.equals(PREF_KEY_ROOM_PHOTO_AVATAR)) {
    onRoomAvatarPreferenceChanged();
  }
 else   if (aKey.equals(PREF_KEY_ROOM_NAME)) {
    onRoomNamePreferenceChanged();
  }
 else   if (aKey.equals(PREF_KEY_ROOM_TOPIC)) {
    onRoomTopicPreferenceChanged();
  }
 else   if (aKey.equals(PREF_KEY_ROOM_MUTE_NOTIFICATIONS_SWITCH)) {
    onRoomMuteNotificationsPreferenceChanged();
  }
 else   if (aKey.equals(PREF_KEY_ROOM_DIRECTORY_VISIBILITY_SWITCH)) {
    onRoomDirectoryVisibilityPreferenceChanged();
  }
 else   if (aKey.equals(PREF_KEY_ROOM_TAG_LIST)) {
    onRoomTagPreferenceChanged();
  }
 else   if (aKey.equals(PREF_KEY_ROOM_ACCESS_RULES_LIST)) {
    onRoomAccessPreferenceChanged();
  }
 else   if (aKey.equals(PREF_KEY_ROOM_HISTORY_READABILITY_LIST)) {
    onRoomHistoryReadabilityPreferenceChanged();
  }
 else {
    Log.w(LOG_TAG,"## onSharedPreferenceChanged(): unknown aKey = " + aKey);
  }
}

@ Override public void onSharedPreferenceChanged ( SharedPreferences aSharedPreferences , String aKey ) { if ( mIsUiUpdateSkipped ) { Log . d ( LOG_TAG , "## onSharedPreferenceChanged(): Skipped" ) ; return ; } if ( aKey . equals ( PREF_KEY_ROOM_PHOTO_AVATAR ) ) { onRoomAvatarPreferenceChanged ( ) ; } else if ( aKey . equals ( PREF_KEY_ROOM_NAME ) ) { onRoomNamePreferenceChanged ( ) ; } else if ( aKey . equals ( PREF_KEY_ROOM_TOPIC ) ) { onRoomTopicPreferenceChanged ( ) ; } else if ( aKey . equals ( PREF_KEY_ROOM_MUTE_NOTIFICATIONS_SWITCH ) ) { onRoomMuteNotificationsPreferenceChanged ( ) ; } else if ( aKey . equals ( PREF_KEY_ROOM_DIRECTORY_VISIBILITY_SWITCH ) ) { onRoomDirectoryVisibilityPreferenceChanged ( ) ; } else if ( aKey . equals ( PREF_KEY_ROOM_TAG_LIST ) ) { onRoomTagPreferenceChanged ( ) ; } else if ( aKey . equals ( PREF_KEY_ROOM_ACCESS_RULES_LIST ) ) { onRoomAccessPreferenceChanged ( ) ; } else if ( aKey . equals ( PREF_KEY_ROOM_HISTORY_READABILITY_LIST ) ) { onRoomHistoryReadabilityPreferenceChanged ( ) ; } else { Log . w ( LOG_TAG , "## onSharedPreferenceChanged(): unknown aKey = " + aKey ) ; } }
main entry point handler for any preference changes . for each setting a dedicated handler is called to process the setting .
