Преглед на файлове

Fixed crash in test of files downloading / uploading

David A. Velasco преди 12 години
родител
ревизия
35b25f04eb
променени са 2 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 1 0
      src/com/owncloud/android/files/services/FileDownloader.java
  2. 1 0
      src/com/owncloud/android/files/services/FileUploader.java

+ 1 - 0
src/com/owncloud/android/files/services/FileDownloader.java

@@ -198,6 +198,7 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis
          * @param file          A file that could be in the queue of downloads.
          */
         public boolean isDownloading(Account account, OCFile file) {
+            if (account == null || file == null) return false;
             String targetKey = buildRemoteName(account, file);
             synchronized (mPendingDownloads) {
                 if (file.isDirectory()) {

+ 1 - 0
src/com/owncloud/android/files/services/FileUploader.java

@@ -324,6 +324,7 @@ public class FileUploader extends Service implements OnDatatransferProgressListe
          * @param file          A file that could be in the queue of pending uploads
          */
         public boolean isUploading(Account account, OCFile file) {
+            if (account == null || file == null) return false;
             String targetKey = buildRemoteName(account, file);
             synchronized (mPendingUploads) {
                 if (file.isDirectory()) {