Fixed initialization of database tracking pending instant uploads
[pub/Android/ownCloud.git] / src / com / owncloud / android / files / services / FileDownloader.java
index 64d5d3e..2e479f4 100644 (file)
@@ -93,12 +93,12 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis
     private int mLastPercent;
     
     
-    public String getDownloadAddedMessage() {
-        return getClass().getName().toString() + DOWNLOAD_ADDED_MESSAGE;
+    public static String getDownloadAddedMessage() {
+        return FileDownloader.class.getName().toString() + DOWNLOAD_ADDED_MESSAGE;
     }
     
-    public String getDownloadFinishMessage() {
-        return getClass().getName().toString() + DOWNLOAD_FINISH_MESSAGE;
+    public static String getDownloadFinishMessage() {
+        return FileDownloader.class.getName().toString() + DOWNLOAD_FINISH_MESSAGE;
     }
     
     /**
@@ -240,7 +240,7 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis
             if (account == null || file == null) return false;
             String targetKey = buildRemoteName(account, file);
             synchronized (mPendingDownloads) {
-                if (file.isDirectory()) {
+                if (file.isFolder()) {
                     // this can be slow if there are many downloads :(
                     Iterator<String> it = mPendingDownloads.keySet().iterator();
                     boolean found = false;