Change-Id: Ic4efc21d41b328591f2146534b7edecd86cb83ac
Fix:
35855399
Test: manual
.build();
mMediaPlayer = MediaPlayer.create(mContext, mVideoPath);
if (mMediaPlayer != null && mMediaPlayer.getDuration() > 0) {
+ setVisible(true);
setLayoutResource(R.layout.video_preference);
mPreviewResource = attributes.getResourceId(
mMediaPlayer.setOnPreparedListener(mediaPlayer -> mediaPlayer.setLooping(true));
mAnimationAvailable = true;
+ } else {
+ setVisible(false);
}
} catch (Exception e) {
Log.w(TAG, "Animation resource not found. Will not show animation.");