X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/8e36e7cc3e6218ccb80ee2af3eb0a19df24e339f..52bd01bcedf1b8f13c49b67ee40a848bae1a9d40:/src/com/owncloud/android/Uploader.java?ds=inline diff --git a/src/com/owncloud/android/Uploader.java b/src/com/owncloud/android/Uploader.java index 43830890..2ee5b4b9 100644 --- a/src/com/owncloud/android/Uploader.java +++ b/src/com/owncloud/android/Uploader.java @@ -3,9 +3,8 @@ * Copyright (C) 2012-2013 ownCloud Inc. * * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. + * it under the terms of the GNU General Public License version 2, + * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -16,6 +15,7 @@ * along with this program. If not, see . * */ + package com.owncloud.android; import java.io.File; @@ -26,12 +26,11 @@ import java.util.List; import java.util.Stack; import java.util.Vector; -import com.owncloud.android.authenticator.AccountAuthenticator; +import com.owncloud.android.authentication.AccountAuthenticator; import com.owncloud.android.datamodel.DataStorageManager; import com.owncloud.android.datamodel.FileDataStorageManager; import com.owncloud.android.datamodel.OCFile; import com.owncloud.android.files.services.FileUploader; -import com.owncloud.android.network.OwnCloudClientUtils; import android.accounts.Account; import android.accounts.AccountManager; @@ -50,7 +49,6 @@ import android.net.Uri; import android.os.Bundle; import android.os.Parcelable; import android.provider.MediaStore.Images.Media; -import android.util.Log; import android.view.View; import android.view.Window; import android.widget.AdapterView; @@ -61,7 +59,6 @@ import android.widget.SimpleAdapter; import android.widget.Toast; import com.owncloud.android.R; -import eu.alefzero.webdav.WebdavClient; /** * This can be used to upload things to an ownCloud instance. @@ -141,8 +138,8 @@ public class Uploader extends ListActivity implements OnItemClickListener, andro // in API7 < this constatant is defined in // Settings.ADD_ACCOUNT_SETTINGS // and Settings.EXTRA_AUTHORITIES - Intent intent = new Intent("android.settings.ADD_ACCOUNT_SETTINGS"); - intent.putExtra("authorities", new String[] { AccountAuthenticator.AUTH_TOKEN_TYPE }); + Intent intent = new Intent(android.provider.Settings.ACTION_ADD_ACCOUNT); + intent.putExtra("authorities", new String[] { AccountAuthenticator.AUTHORITY }); startActivityForResult(intent, REQUEST_CODE_SETUP_ACCOUNT); } else { // since in API7 there is no direct call for @@ -358,12 +355,13 @@ public class Uploader extends ListActivity implements OnItemClickListener, andro public void uploadFiles() { try { + /* TODO - mCreateDir can never be true at this moment; we will replace wdc.createDirectory by CreateFolderOperation when that is fixed WebdavClient wdc = OwnCloudClientUtils.createOwnCloudClient(mAccount, getApplicationContext()); - // create last directory in path if necessary if (mCreateDir) { wdc.createDirectory(mUploadPath); } + */ String[] local = new String[mStreamsToUpload.size()], remote = new String[mStreamsToUpload.size()];