+ Log_OC.e(TAG, "completed");
+ if (mp != null) {
+ mVideoPreview.seekTo(0);
+ // next lines are necessary to work around undesired video loops
+ if (Build.VERSION.SDK_INT == Build.VERSION_CODES.GINGERBREAD) {
+ mVideoPreview.pause();
+
+ } else if (Build.VERSION.SDK_INT == Build.VERSION_CODES.GINGERBREAD_MR1) {
+ // mVideePreview.pause() is not enough
+
+ mMediaController.setEnabled(false);
+ mVideoPreview.stopPlayback();
+ mAutoplay = false;
+ mSavedPlaybackPosition = 0;
+ mVideoPreview.setVideoPath(getFile().getStoragePath());
+ }
+ } // else : called from onError()
+ mMediaController.updatePausePlay();