*/\r
public class FileDetailFragment extends SherlockFragment implements\r
OnClickListener, OnTouchListener, \r
- ConfirmationDialogFragment.ConfirmationDialogFragmentListener, OnRemoteOperationListener, EditNameDialogListener {\r
+ ConfirmationDialogFragment.ConfirmationDialogFragmentListener, OnRemoteOperationListener, EditNameDialogListener,\r
+ FileFragment {\r
\r
public static final String EXTRA_FILE = "FILE";\r
public static final String EXTRA_ACCOUNT = "ACCOUNT";\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 (mFile.isAudio()) {\r
- if (!mMediaServiceBinder.isPlaying(mFile)) {\r
- Log.d(TAG, "starting playback of " + mFile.getStoragePath());\r
- mMediaServiceBinder.start(mAccount, mFile);\r
- // this is a patch; need to synchronize this with the onPrepared() coming from MediaPlayer in the MediaService\r
- /*\r
- mMediaController.postDelayed(new Runnable() {\r
- @Override\r
- public void run() {\r
- mMediaController.show(0);\r
- }\r
- } , 300);\r
- */\r
- } else {\r
- if (mMediaController.isShowing()) {\r
- mMediaController.hide();\r
- } else {\r
- mMediaController.show(MediaService.MEDIA_CONTROL_LIFE);\r
- }\r
- }\r
- \r
- } else if (mFile.isVideo()) {\r
+ if (mFile.isVideo()) {\r
startVideoActivity();\r
}\r
}\r
\r
\r
/**\r
- * Can be used to get the file that is currently being displayed.\r
- * @return The file on the screen.\r
+ * {@inheritDoc}\r
*/\r
- public OCFile getDisplayedFile(){\r
+ public OCFile getFile(){\r
return mFile;\r
}\r
\r