private static DialogFeature getFeature( Class<? extends ShareContent> contentType) { if (ShareLinkContent.class.isAssignableFrom(contentType)) { return MessageDialogFeature.MESSAGE_DIALOG; } else if (SharePhotoContent.class.isAssignableFrom(contentType)) { return MessageDialogFeature.PHOTOS; } else if (ShareVideoContent.class.isAssignableFrom(contentType)) { return MessageDialogFeature.VIDEO; } else if (ShareOpenGraphContent.class.isAssignableFrom(contentType)) { return OpenGraphMessageDialogFeature.OG_MESSAGE_DIALOG; } return null; }