Fix again: Download is started over and over when rotating the device

This commit is contained in:
masensio 2014-05-16 10:59:01 +02:00
parent 176f02fb04
commit d700cde6c5

View file

@ -1144,8 +1144,12 @@ OnSslUntrustedCertListener, EditNameDialogListener {
if (component.equals(new ComponentName(FileDisplayActivity.this, FileDownloader.class))) {
Log_OC.d(TAG, "Download service connected");
mDownloaderBinder = (FileDownloaderBinder) service;
if (mWaitingToPreview != null && !mWaitingToPreview.isDown()) {
requestForDownload();
if (mWaitingToPreview != null)
if (getStorageManager() != null) {
mWaitingToPreview = getStorageManager().getFileById(mWaitingToPreview.getFileId()); // update the file
if (!mWaitingToPreview.isDown()) {
requestForDownload();
}
}
} else if (component.equals(new ComponentName(FileDisplayActivity.this, FileUploader.class))) {