Sone remoteSone = profile.getSone();
if (remoteSone.isLocal()) {
/* always show your own avatars. */
return avatarId;
}
ShowCustomAvatars showCustomAvatars = currentSone.getOptions().<ShowCustomAvatars> getEnumOption("ShowCustomAvatars").get();
if (showCustomAvatars == ShowCustomAvatars.NEVER) {
return null;
}
if (showCustomAvatars == ShowCustomAvatars.ALWAYS) {
return avatarId;