X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/5ff0989eb47fbc9d5211cc294f17cf692f7eff50..bcc972d63d3ed1d76b51a8a03a27e809983dc756:/src/com/owncloud/android/files/InstantUploadBroadcastReceiver.java?ds=sidebyside diff --git a/src/com/owncloud/android/files/InstantUploadBroadcastReceiver.java b/src/com/owncloud/android/files/InstantUploadBroadcastReceiver.java index 6eb6ec7b..1943d320 100644 --- a/src/com/owncloud/android/files/InstantUploadBroadcastReceiver.java +++ b/src/com/owncloud/android/files/InstantUploadBroadcastReceiver.java @@ -20,10 +20,13 @@ package com.owncloud.android.files; import java.io.File; -import com.owncloud.android.authentication.AccountAuthenticator; +import com.owncloud.android.MainApp; import com.owncloud.android.authentication.AccountUtils; import com.owncloud.android.db.DbHandler; import com.owncloud.android.files.services.FileUploader; +import com.owncloud.android.utils.FileStorageUtils; +import com.owncloud.android.utils.Log_OC; + import android.accounts.Account; import android.content.BroadcastReceiver; @@ -37,8 +40,6 @@ import android.preference.PreferenceManager; import android.provider.MediaStore.Images.Media; import android.webkit.MimeTypeMap; -import com.owncloud.android.Log_OC; -import com.owncloud.android.utils.FileStorageUtils; public class InstantUploadBroadcastReceiver extends BroadcastReceiver { @@ -54,14 +55,13 @@ 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)) { handleNewPhotoAction(context, intent); Log_OC.d(TAG, "OFFICIAL processed: android.hardware.action.NEW_PICTURE"); - } else if (intent.getAction().equals(FileUploader.UPLOAD_FINISH_MESSAGE)) { + } else if (intent.getAction().equals(FileUploader.getUploadFinishMessage())) { handleUploadFinished(context, intent); } else { Log_OC.e(TAG, "Incorrect intent sent: " + intent.getAction()); @@ -158,7 +158,7 @@ public class InstantUploadBroadcastReceiver extends BroadcastReceiver { String file_path = c.getString(c.getColumnIndex("path")); File f = new File(file_path); if (f.exists()) { - Account account = new Account(account_name, AccountAuthenticator.ACCOUNT_TYPE); + Account account = new Account(account_name, MainApp.getAccountType()); String mimeType = null; try {