Fix: Video is not previewed when tapping on it
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / activity / FileDisplayActivity.java
index d535802..04948b0 100644 (file)
@@ -1028,7 +1028,6 @@ OnSslUntrustedCertListener, EditNameDialogListener {
             }
             
             removeStickyBroadcast(intent);
             }
             
             removeStickyBroadcast(intent);
-            mWaitingToPreview = null;
         }
 
         private boolean isDescendant(String downloadedRemotePath) {
         }
 
         private boolean isDescendant(String downloadedRemotePath) {
@@ -1145,7 +1144,7 @@ OnSslUntrustedCertListener, EditNameDialogListener {
             if (component.equals(new ComponentName(FileDisplayActivity.this, FileDownloader.class))) {
                 Log_OC.d(TAG, "Download service connected");
                 mDownloaderBinder = (FileDownloaderBinder) service;
             if (component.equals(new ComponentName(FileDisplayActivity.this, FileDownloader.class))) {
                 Log_OC.d(TAG, "Download service connected");
                 mDownloaderBinder = (FileDownloaderBinder) service;
-                if (mWaitingToPreview != null) {
+                if (mWaitingToPreview != null && !mWaitingToPreview.isDown()) {
                     requestForDownload();
                 }
 
                     requestForDownload();
                 }