Merge branch 'develop' into fix_instant_uploads_in_Samsung_4.x_devices
authorDavid A. Velasco <dvelasco@solidgear.es>
Mon, 30 Sep 2013 11:49:50 +0000 (13:49 +0200)
committerDavid A. Velasco <dvelasco@solidgear.es>
Mon, 30 Sep 2013 11:49:50 +0000 (13:49 +0200)
src/com/owncloud/android/files/InstantUploadBroadcastReceiver.java
src/com/owncloud/android/files/services/FileUploader.java

index 6eb6ec7..fa8662f 100644 (file)
@@ -54,8 +54,7 @@ public class InstantUploadBroadcastReceiver extends BroadcastReceiver {
         Log_OC.d(TAG, "Received: " + intent.getAction());
         if (intent.getAction().equals(android.net.ConnectivityManager.CONNECTIVITY_ACTION)) {
             handleConnectivityAction(context, intent);
-        } else if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH && 
-                intent.getAction().equals(NEW_PHOTO_ACTION_UNOFFICIAL)) {
+        }else if (intent.getAction().equals(NEW_PHOTO_ACTION_UNOFFICIAL)) {
             handleNewPhotoAction(context, intent);
             Log_OC.d(TAG, "UNOFFICIAL processed: com.android.camera.NEW_PICTURE");
         } else if (intent.getAction().equals(NEW_PHOTO_ACTION)) {
index 0f1e9cd..05e2ffb 100644 (file)
@@ -272,7 +272,8 @@ public class FileUploader extends Service implements OnDatatransferProgressListe
                 if (isInstant) {
                     newUpload.setRemoteFolderToBeCreated();
                 }
-                mPendingUploads.putIfAbsent(uploadKey, newUpload);
+                mPendingUploads.putIfAbsent(uploadKey, newUpload); // Grants that the file only upload once time
+                Log_OC.d(TAG, "Trying to update "+ uploadKey);
                 newUpload.addDatatransferProgressListener(this);
                 newUpload.addDatatransferProgressListener((FileUploaderBinder)mBinder);
                 requestedUploads.add(uploadKey);