Error messages for video playback reviewed
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / fragment / FileDetailFragment.java
index 5c8604c..a823595 100644 (file)
@@ -421,7 +421,7 @@ public class FileDetailFragment extends SherlockFragment implements
     \r
     @Override\r
     public boolean onTouch(View v, MotionEvent event) {\r
-        if (v == mPreview && event.getAction() == MotionEvent.ACTION_DOWN && mFile != null && mFile.isDown()) {\r
+        if (v == mPreview && event.getAction() == MotionEvent.ACTION_DOWN && mFile != null) {\r
             if (mFile.isAudio()) {\r
                 if (!mMediaServiceBinder.isPlaying(mFile)) {\r
                     Log.d(TAG, "starting playback of " + mFile.getStoragePath());\r
@@ -447,7 +447,8 @@ public class FileDetailFragment extends SherlockFragment implements
     \r
     private void startVideoActivity() {\r
         Intent i = new Intent(getActivity(), VideoActivity.class);\r
-        i.putExtra(VideoActivity.EXTRA_PATH, mFile.getStoragePath());\r
+        i.putExtra(VideoActivity.EXTRA_FILE, mFile);\r
+        i.putExtra(VideoActivity.EXTRA_ACCOUNT, mAccount);\r
         startActivity(i);\r
         \r
         // TODO THROW AN ACTIVTIY JUST FOR PREVIEW VIDEO\r
@@ -480,6 +481,7 @@ public class FileDetailFragment extends SherlockFragment implements
                                     MediaService.class),\r
                                     mMediaServiceConnection, \r
                                     Context.BIND_AUTO_CREATE);\r
+            // follow the flow in MediaServiceConnection#onServiceConnected(...)\r
     }\r
     \r
     /** Defines callbacks for service binding, passed to bindService() */\r