X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/2a42651463f9d82509a75b92a49884bdd7880ba1..6496b9200d7574cde934b9b7ee0246efba3e8062:/src/com/owncloud/android/ui/preview/PreviewMediaFragment.java diff --git a/src/com/owncloud/android/ui/preview/PreviewMediaFragment.java b/src/com/owncloud/android/ui/preview/PreviewMediaFragment.java index 35afe152..9815e8be 100644 --- a/src/com/owncloud/android/ui/preview/PreviewMediaFragment.java +++ b/src/com/owncloud/android/ui/preview/PreviewMediaFragment.java @@ -2,9 +2,8 @@ * Copyright (C) 2012-2013 ownCloud Inc. * * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. + * it under the terms of the GNU General Public License version 2, + * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -121,12 +120,12 @@ public class PreviewMediaFragment extends SherlockFragment implements * @param fileToDetail An {@link OCFile} to preview in the fragment * @param ocAccount An ownCloud account; needed to start downloads */ - public PreviewMediaFragment(OCFile fileToDetail, Account ocAccount) { + public PreviewMediaFragment(OCFile fileToDetail, Account ocAccount, int startPlaybackPosition, boolean autoplay) { mFile = fileToDetail; mAccount = ocAccount; - mSavedPlaybackPosition = 0; + mSavedPlaybackPosition = startPlaybackPosition; mStorageManager = null; // we need a context to init this; the container activity is not available yet at this moment - mAutoplay = true; + mAutoplay = autoplay; } @@ -283,6 +282,7 @@ public class PreviewMediaFragment extends SherlockFragment implements toHide.add(R.id.action_cancel_download); toHide.add(R.id.action_cancel_upload); toHide.add(R.id.action_download_file); + toHide.add(R.id.action_sync_file); toHide.add(R.id.action_rename_file); // by now for (int i : toHide) { @@ -752,5 +752,16 @@ public class PreviewMediaFragment extends SherlockFragment implements container.finish(); } } + + + public int getPosition() { + mSavedPlaybackPosition = mVideoPreview.getCurrentPosition(); + return mSavedPlaybackPosition; + } + + public boolean isPlaying() { + mAutoplay = mVideoPreview.isPlaying(); + return mAutoplay; + } }