Update jackrabbit library, with dependencies now in separate files.
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<manifest package="com.owncloud.android"
- android:versionCode="105001"
- android:versionName="1.5.1" xmlns:android="http://schemas.android.com/apk/res/android">
+ android:versionCode="105002"
+ android:versionName="1.5.2" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
<uses-permission android:name="android.permission.INTERNET"/>
- <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
-
- <uses-sdk
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+ <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
+
+ <uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
+/* ownCloud Android client application
+ * 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 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
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
package com.owncloud.android.oc_framework_test_project.test;
import java.text.SimpleDateFormat;
+/* ownCloud Android client application
+ * 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 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
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
package com.owncloud.android.oc_framework_test_project.test;
import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
import android.test.ActivityInstrumentationTestCase2;
+/**
+ * Class to test Delete a File Operation
+ * @author masensio
+ *
+ */
+
public class DeleteFileTest extends ActivityInstrumentationTestCase2<TestActivity> {
/* Folder data to delete. */
--- /dev/null
+/* ownCloud Android client application
+ * 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 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
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+package com.owncloud.android.oc_framework_test_project.test;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import com.owncloud.android.oc_framework.operations.RemoteFile;
+import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
+import com.owncloud.android.oc_framework_test_project.TestActivity;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+/**
+ * Class to test Download File Operation
+ * @author masensio
+ *
+ */
+
+public class DownloadFileTest extends ActivityInstrumentationTestCase2<TestActivity> {
+
+
+ /* Files to download. These files must exist on the account */
+ private final String mRemoteFilePng = "/fileToDownload.png";
+ private final String mRemoteFileChunks = "/fileToDownload.mp4";
+ private final String mRemoteFileSpecialChars = "/@file@download.png";
+ private final String mRemoteFileSpecialCharsChunks = "/@file@download.mp4";
+ private final String mRemoteFileNotFound = "/fileNotFound.png"; /* This file mustn't exist on the account */
+
+ private String mCurrentDate;
+
+
+ private TestActivity mActivity;
+
+ public DownloadFileTest() {
+ super(TestActivity.class);
+
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HHmmss");
+ mCurrentDate = sdf.format(new Date());
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ setActivityInitialTouchMode(false);
+ mActivity = getActivity();
+ }
+
+ /**
+ * Test Download a File
+ */
+ public void testDownloadFile() {
+ String temporalFolder = "/download" + mCurrentDate;
+
+ RemoteFile remoteFile= new RemoteFile(mRemoteFilePng);
+
+ RemoteOperationResult result = mActivity.downloadFile(remoteFile, temporalFolder);
+ assertTrue(result.isSuccess());
+ }
+
+ /**
+ * Test Download a File with chunks
+ */
+ public void testDownloadFileChunks() {
+ String temporalFolder = "/download" + mCurrentDate;
+
+ RemoteFile remoteFile= new RemoteFile(mRemoteFileChunks);
+
+ RemoteOperationResult result = mActivity.downloadFile(remoteFile, temporalFolder);
+ assertTrue(result.isSuccess());
+ }
+
+ /**
+ * Test Download a File with special chars
+ */
+ public void testDownloadFileSpecialChars() {
+ String temporalFolder = "/download" + mCurrentDate;
+
+ RemoteFile remoteFile= new RemoteFile(mRemoteFileSpecialChars);
+
+ RemoteOperationResult result = mActivity.downloadFile(remoteFile, temporalFolder);
+ assertTrue(result.isSuccess());
+ }
+
+ /**
+ * Test Download a File with special chars and chunks
+ */
+ public void testDownloadFileSpecialCharsChunks() {
+ String temporalFolder = "/download" + mCurrentDate;
+
+ RemoteFile remoteFile= new RemoteFile(mRemoteFileSpecialCharsChunks);
+
+ RemoteOperationResult result = mActivity.downloadFile(remoteFile, temporalFolder);
+ assertTrue(result.isSuccess());
+ }
+
+ /**
+ * Test Download a Not Found File
+ */
+ public void testDownloadFileNotFound() {
+ String temporalFolder = "/download" + mCurrentDate;
+
+ RemoteFile remoteFile = new RemoteFile(mRemoteFileNotFound);
+
+ RemoteOperationResult result = mActivity.downloadFile(remoteFile, temporalFolder);
+ assertFalse(result.isSuccess());
+ }
+}
--- /dev/null
+/* ownCloud Android client application
+ * 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 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
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+package com.owncloud.android.oc_framework_test_project.test;
+
+import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
+import com.owncloud.android.oc_framework_test_project.TestActivity;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+/**
+ * Class to test Read File Operation
+ * @author masensio
+ *
+ */
+
+public class ReadFileTest extends ActivityInstrumentationTestCase2<TestActivity> {
+
+ /* File data to read. This file must exist on the account */
+ private final String mRemoteFolderPath = "/fileToRead.txt";
+
+
+ private TestActivity mActivity;
+
+ public ReadFileTest() {
+ super(TestActivity.class);
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ setActivityInitialTouchMode(false);
+ mActivity = getActivity();
+ }
+
+ /**
+ * Test Read File
+ */
+ public void testReadFile() {
+
+ RemoteOperationResult result = mActivity.readFile(mRemoteFolderPath);
+ assertTrue(result.getData().size() == 1);
+ assertTrue(result.isSuccess());
+ }
+
+
+}
-package com.owncloud.android.oc_framework_test_project.test;
+/* ownCloud Android client application
+ * 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 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
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package com.owncloud.android.oc_framework_test_project.test;
import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
import com.owncloud.android.oc_framework_test_project.TestActivity;
+/* ownCloud Android client application
+ * 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 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
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
package com.owncloud.android.oc_framework_test_project.test;
import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
--- /dev/null
+/* ownCloud Android client application
+ * 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 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
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+package com.owncloud.android.oc_framework_test_project.test;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import android.content.res.AssetManager;
+import android.os.Environment;
+import android.test.ActivityInstrumentationTestCase2;
+import android.util.Log;
+
+import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
+import com.owncloud.android.oc_framework_test_project.TestActivity;
+
+/**
+ * Class to test Update File Operation
+ * @author masensio
+ *
+ */
+
+public class UploadFileTest extends ActivityInstrumentationTestCase2<TestActivity> {
+
+ /* Files to upload. These files must exists on the device */
+ private final String mFileToUpload = "fileToUpload.png";
+ private final String mMimeType = "image/png";
+
+ private final String mFileToUploadWithChunks = "fileToUploadChunks.MP4";
+ private final String mMimeTypeWithChunks = "video/mp4";
+
+ private final String mFileNotFound = "fileNotFound.png";
+
+ private final String mStoragePath = "/owncloud/tmp/uploadTest";
+ private String mPath;
+
+ private String mCurrentDate;
+
+ private TestActivity mActivity;
+
+ public UploadFileTest() {
+ super(TestActivity.class);
+
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ setActivityInitialTouchMode(false);
+ mActivity = getActivity();
+
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HHmmss");
+ mCurrentDate = sdf.format(new Date());
+
+ File sdCard = Environment.getExternalStorageDirectory();
+ mPath = sdCard.getAbsolutePath() + "/" + mStoragePath + mCurrentDate;
+
+ //mActivity.createFolder(mPath, true);
+
+ copyAssets();
+ }
+
+ /**
+ * Copy Files to ulpload to SdCard
+ */
+ private void copyAssets() {
+ AssetManager assetManager = getActivity().getAssets();
+ String[] files = { mFileToUpload, mFileToUploadWithChunks };
+
+ // Folder with contents
+ File folder = new File(mPath);
+ folder.mkdirs();
+
+
+ for(String filename : files) {
+ InputStream in = null;
+ OutputStream out = null;
+ try {
+ in = assetManager.open(filename);
+ File outFile = new File(folder, filename);
+ out = new FileOutputStream(outFile);
+ copyFile(in, out);
+ in.close();
+ in = null;
+ out.flush();
+ out.close();
+ out = null;
+ } catch(IOException e) {
+ Log.e("tag", "Failed to copy asset file: " + filename, e);
+ }
+ }
+ }
+
+ private void copyFile(InputStream in, OutputStream out) throws IOException {
+ byte[] buffer = new byte[1024];
+ int read;
+ while((read = in.read(buffer)) != -1){
+ out.write(buffer, 0, read);
+ }
+ }
+
+
+ /**
+ * Test Upload File without chunks
+ */
+ public void testUploadFile() {
+
+ String storagePath = mPath + "/" + mFileToUpload;
+ //String remotePath = "/uploadTest" + mCurrentDate + "/" + mFileToUpload;
+ String remotePath = "/" + mFileToUpload;
+
+ RemoteOperationResult result = mActivity.uploadFile(storagePath, remotePath, mMimeType);
+ assertTrue(result.isSuccess());
+ }
+
+ /**
+ * Test Upload File with chunks
+ */
+ public void testUploadFileWithChunks() {
+
+ String storagePath = mPath + "/" + mFileToUploadWithChunks;
+ //String remotePath = "/uploadTest" + mCurrentDate + "/" +mFileToUploadWithChunks;
+ String remotePath = "/" + mFileToUploadWithChunks;
+
+ RemoteOperationResult result = mActivity.uploadFile(storagePath, remotePath, mMimeTypeWithChunks);
+ assertTrue(result.isSuccess());
+ }
+
+ /**
+ * Test Upload Not Found File
+ */
+ public void testUploadFileNotFound() {
+
+ String storagePath = mPath + "/" + mFileNotFound;
+ //String remotePath = "/uploadTest" + mCurrentDate + "/" + mFileToUpload;
+ String remotePath = "/" + mFileNotFound;
+
+ RemoteOperationResult result = mActivity.uploadFile(storagePath, remotePath, mMimeType);
+ assertFalse(result.isSuccess());
+ }
+
+}
+/* ownCloud Android client application
+ * 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 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
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
package com.owncloud.android.oc_framework_test_project;
+import java.io.File;
+
import com.owncloud.android.oc_framework.network.webdav.OwnCloudClientFactory;
import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
+import com.owncloud.android.oc_framework.operations.RemoteFile;
import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
+import com.owncloud.android.oc_framework.operations.remote.ChunkedUploadRemoteFileOperation;
import com.owncloud.android.oc_framework.operations.remote.CreateRemoteFolderOperation;
+import com.owncloud.android.oc_framework.operations.remote.DownloadRemoteFileOperation;
import com.owncloud.android.oc_framework.operations.remote.ReadRemoteFolderOperation;
import com.owncloud.android.oc_framework.operations.remote.RemoveRemoteFileOperation;
import com.owncloud.android.oc_framework.operations.remote.RenameRemoteFileOperation;
+import com.owncloud.android.oc_framework.operations.remote.UploadRemoteFileOperation;
import android.net.Uri;
import android.os.Bundle;
+import android.os.Environment;
import android.app.Activity;
import android.view.Menu;
* @author masensio
* @author David A. Velasco
*/
+
public class TestActivity extends Activity {
// This account must exists on the simulator / device
private static final String mServerUri = "https://beta.owncloud.com/owncloud/remote.php/webdav";
private static final String mUser = "testandroid";
private static final String mPass = "testandroid";
+ private static final boolean mChunked = true;
//private Account mAccount = null;
private WebdavClient mClient;
return result;
}
+ /**
+ * Access to the library method to Download a File
+ * @param remotePath
+ *
+ * @return
+ */
+ public RemoteOperationResult downloadFile(RemoteFile remoteFile, String temporalFolder) {
+ // Create folder
+ String path = "/owncloud/tmp/" + temporalFolder;
+ File sdCard = Environment.getExternalStorageDirectory();
+ File folder = new File(sdCard.getAbsolutePath() + "/" + path);
+ folder.mkdirs();
+
+ DownloadRemoteFileOperation downloadOperation = new DownloadRemoteFileOperation(remoteFile, folder.getAbsolutePath());
+ RemoteOperationResult result = downloadOperation.execute(mClient);
+
+ return result;
+ }
+
+ /** Access to the library method to Upload a File
+ * @param storagePath
+ * @param remotePath
+ * @param mimeType
+ *
+ * @return
+ */
+ public RemoteOperationResult uploadFile(String storagePath, String remotePath, String mimeType) {
+
+ UploadRemoteFileOperation uploadOperation;
+ if ( mChunked && (new File(storagePath)).length() > ChunkedUploadRemoteFileOperation.CHUNK_SIZE ) {
+ uploadOperation = new ChunkedUploadRemoteFileOperation(storagePath, remotePath, mimeType);
+ } else {
+ uploadOperation = new UploadRemoteFileOperation(storagePath, remotePath, mimeType);
+ }
+
+ RemoteOperationResult result = uploadOperation.execute(mClient);
+
+ return result;
+ }
}
import android.os.Parcel;
import android.os.Parcelable;
+import com.owncloud.android.oc_framework.network.webdav.WebdavEntry;
import com.owncloud.android.oc_framework.utils.FileUtils;
/**
public class RemoteFile implements Parcelable, Serializable {
/** Generated - should be refreshed every time the class changes!! */
- private static final long serialVersionUID = 7256606476031992757L;
+ private static final long serialVersionUID = 532139091191390616L;
private String mRemotePath;
private String mMimeType;
}
mRemotePath = path;
}
+
+ public RemoteFile(WebdavEntry we) {
+ this(we.decodedPath());
+ this.setCreationTimestamp(we.createTimestamp());
+ this.setLength(we.contentLength());
+ this.setMimeType(we.contentType());
+ this.setModifiedTimestamp(we.modifiedTimestamp());
+ this.setEtag(we.etag());
+ }
/**
* Used internally. Reset all file properties
private String mRedirectedLocation;
private ArrayList<RemoteFile> mFiles;
-
+
public RemoteOperationResult(ResultCode code) {
mCode = code;
mSuccess = (code == ResultCode.OK || code == ResultCode.OK_SSL || code == ResultCode.OK_NO_SSL);
} else if (mCode == ResultCode.ACCOUNT_NOT_THE_SAME) {
return "Authenticated with a different account than the one updating";
} else if (mCode == ResultCode.INVALID_CHARACTER_IN_NAME) {
- return "The file name contains an forbidden character";
+ return "The file name contains an forbidden character";
}
return "Operation finished with HTTP status code " + mHttpCode + " (" + (isSuccess() ? "success" : "fail") + ")";
--- /dev/null
+/* ownCloud Android client application
+ * Copyright (C) 2012 Bartek Przybylski
+ * 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 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
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+package com.owncloud.android.oc_framework.operations.remote;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import java.nio.channels.FileChannel;
+import java.util.Random;
+
+import org.apache.commons.httpclient.HttpException;
+import org.apache.commons.httpclient.methods.PutMethod;
+
+import com.owncloud.android.oc_framework.network.ProgressiveDataTransferer;
+import com.owncloud.android.oc_framework.network.webdav.ChunkFromFileChannelRequestEntity;
+import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
+import com.owncloud.android.oc_framework.network.webdav.WebdavUtils;
+
+
+import android.util.Log;
+
+
+public class ChunkedUploadRemoteFileOperation extends UploadRemoteFileOperation {
+
+ public static final long CHUNK_SIZE = 1024000;
+ private static final String OC_CHUNKED_HEADER = "OC-Chunked";
+ private static final String TAG = ChunkedUploadRemoteFileOperation.class.getSimpleName();
+
+ public ChunkedUploadRemoteFileOperation(String storagePath, String remotePath, String mimeType) {
+ super(storagePath, remotePath, mimeType);
+ }
+
+ @Override
+ protected int uploadFile(WebdavClient client) throws HttpException, IOException {
+ int status = -1;
+
+ FileChannel channel = null;
+ RandomAccessFile raf = null;
+ try {
+ File file = new File(mStoragePath);
+ raf = new RandomAccessFile(file, "r");
+ channel = raf.getChannel();
+ mEntity = new ChunkFromFileChannelRequestEntity(channel, mMimeType, CHUNK_SIZE, file);
+ //((ProgressiveDataTransferer)mEntity).addDatatransferProgressListeners(getDataTransferListeners());
+ synchronized (mDataTransferListeners) {
+ ((ProgressiveDataTransferer)mEntity).addDatatransferProgressListeners(mDataTransferListeners);
+ }
+
+ long offset = 0;
+ String uriPrefix = client.getBaseUri() + WebdavUtils.encodePath(mRemotePath) + "-chunking-" + Math.abs((new Random()).nextInt(9000)+1000) + "-" ;
+ long chunkCount = (long) Math.ceil((double)file.length() / CHUNK_SIZE);
+ for (int chunkIndex = 0; chunkIndex < chunkCount ; chunkIndex++, offset += CHUNK_SIZE) {
+ if (mPutMethod != null) {
+ mPutMethod.releaseConnection(); // let the connection available for other methods
+ }
+ mPutMethod = new PutMethod(uriPrefix + chunkCount + "-" + chunkIndex);
+ mPutMethod.addRequestHeader(OC_CHUNKED_HEADER, OC_CHUNKED_HEADER);
+ ((ChunkFromFileChannelRequestEntity)mEntity).setOffset(offset);
+ mPutMethod.setRequestEntity(mEntity);
+ status = client.executeMethod(mPutMethod);
+ client.exhaustResponse(mPutMethod.getResponseBodyAsStream());
+ Log.d(TAG, "Upload of " + mStoragePath + " to " + mRemotePath + ", chunk index " + chunkIndex + ", count " + chunkCount + ", HTTP result status " + status);
+ if (!isSuccess(status))
+ break;
+ }
+
+ } finally {
+ if (channel != null)
+ channel.close();
+ if (raf != null)
+ raf.close();
+ if (mPutMethod != null)
+ mPutMethod.releaseConnection(); // let the connection available for other methods
+ }
+ return status;
+ }
+
+}
--- /dev/null
+/* ownCloud Android client application
+ * 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 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
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+package com.owncloud.android.oc_framework.operations.remote;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.apache.commons.httpclient.Header;
+import org.apache.commons.httpclient.HttpException;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.http.HttpStatus;
+
+import android.util.Log;
+
+import com.owncloud.android.oc_framework.network.webdav.OnDatatransferProgressListener;
+import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
+import com.owncloud.android.oc_framework.network.webdav.WebdavUtils;
+import com.owncloud.android.oc_framework.operations.OperationCancelledException;
+import com.owncloud.android.oc_framework.operations.RemoteFile;
+import com.owncloud.android.oc_framework.operations.RemoteOperation;
+import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
+
+/**
+ * Remote operation performing the download of a remote file in the ownCloud server.
+ *
+ * @author David A. Velasco
+ * @author masensio
+ */
+
+public class DownloadRemoteFileOperation extends RemoteOperation {
+
+ private static final String TAG = DownloadRemoteFileOperation.class.getSimpleName();
+
+ private Set<OnDatatransferProgressListener> mDataTransferListeners = new HashSet<OnDatatransferProgressListener>();
+ private final AtomicBoolean mCancellationRequested = new AtomicBoolean(false);
+ private long mModificationTimestamp = 0;
+ private GetMethod mGet;
+
+ private RemoteFile mRemoteFile;
+ private String mTemporalFolder;
+
+ public DownloadRemoteFileOperation(RemoteFile remoteFile, String temporalFolder) {
+ mRemoteFile = remoteFile;
+ mTemporalFolder = temporalFolder;
+ }
+
+ @Override
+ protected RemoteOperationResult run(WebdavClient client) {
+ RemoteOperationResult result = null;
+
+ /// download will be performed to a temporal file, then moved to the final location
+ File tmpFile = new File(getTmpPath());
+
+ /// perform the download
+ try {
+ tmpFile.getParentFile().mkdirs();
+ int status = downloadFile(client, tmpFile);
+ result = new RemoteOperationResult(isSuccess(status), status, (mGet != null ? mGet.getResponseHeaders() : null));
+ Log.i(TAG, "Download of " + mRemoteFile.getRemotePath() + " to " + getTmpPath() + ": " + result.getLogMessage());
+
+ } catch (Exception e) {
+ result = new RemoteOperationResult(e);
+ Log.e(TAG, "Download of " + mRemoteFile.getRemotePath() + " to " + getTmpPath() + ": " + result.getLogMessage(), e);
+ }
+
+ return result;
+ }
+
+
+ protected int downloadFile(WebdavClient client, File targetFile) throws HttpException, IOException, OperationCancelledException {
+ int status = -1;
+ boolean savedFile = false;
+ mGet = new GetMethod(client.getBaseUri() + WebdavUtils.encodePath(mRemoteFile.getRemotePath()));
+ Iterator<OnDatatransferProgressListener> it = null;
+
+ FileOutputStream fos = null;
+ try {
+ status = client.executeMethod(mGet);
+ if (isSuccess(status)) {
+ targetFile.createNewFile();
+ BufferedInputStream bis = new BufferedInputStream(mGet.getResponseBodyAsStream());
+ fos = new FileOutputStream(targetFile);
+ long transferred = 0;
+
+ byte[] bytes = new byte[4096];
+ int readResult = 0;
+ while ((readResult = bis.read(bytes)) != -1) {
+ synchronized(mCancellationRequested) {
+ if (mCancellationRequested.get()) {
+ mGet.abort();
+ throw new OperationCancelledException();
+ }
+ }
+ fos.write(bytes, 0, readResult);
+ transferred += readResult;
+ synchronized (mDataTransferListeners) {
+ it = mDataTransferListeners.iterator();
+ while (it.hasNext()) {
+ it.next().onTransferProgress(readResult, transferred, mRemoteFile.getLength(), targetFile.getName());
+ }
+ }
+ }
+ savedFile = true;
+ Header modificationTime = mGet.getResponseHeader("Last-Modified");
+ if (modificationTime != null) {
+ Date d = WebdavUtils.parseResponseDate((String) modificationTime.getValue());
+ mModificationTimestamp = (d != null) ? d.getTime() : 0;
+ }
+
+ } else {
+ client.exhaustResponse(mGet.getResponseBodyAsStream());
+ }
+
+ } finally {
+ if (fos != null) fos.close();
+ if (!savedFile && targetFile.exists()) {
+ targetFile.delete();
+ }
+ mGet.releaseConnection(); // let the connection available for other methods
+ }
+ return status;
+ }
+
+ private boolean isSuccess(int status) {
+ return (status == HttpStatus.SC_OK);
+ }
+
+ private String getTmpPath() {
+ return mTemporalFolder + mRemoteFile.getRemotePath();
+ }
+
+ public void addDatatransferProgressListener (OnDatatransferProgressListener listener) {
+ synchronized (mDataTransferListeners) {
+ mDataTransferListeners.add(listener);
+ }
+ }
+
+ public void removeDatatransferProgressListener(OnDatatransferProgressListener listener) {
+ synchronized (mDataTransferListeners) {
+ mDataTransferListeners.remove(listener);
+ }
+ }
+
+ public void cancel() {
+ mCancellationRequested.set(true); // atomic set; there is no need of synchronizing it
+ }
+}
--- /dev/null
+/* ownCloud Android client application
+ * Copyright (C) 2012 ownCloud Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * 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
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+package com.owncloud.android.oc_framework.operations.remote;
+
+import org.apache.commons.httpclient.HttpStatus;
+import org.apache.commons.httpclient.methods.HeadMethod;
+
+import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
+import com.owncloud.android.oc_framework.operations.RemoteOperation;
+import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
+import com.owncloud.android.oc_framework.network.webdav.WebdavUtils;
+
+import android.content.Context;
+import android.net.ConnectivityManager;
+import android.util.Log;
+
+/**
+ * Operation to check the existence or absence of a path in a remote server.
+ *
+ * @author David A. Velasco
+ */
+public class ExistenceCheckRemoteOperation extends RemoteOperation {
+
+ /** Maximum time to wait for a response from the server in MILLISECONDs. */
+ public static final int TIMEOUT = 10000;
+
+ private static final String TAG = ExistenceCheckRemoteOperation.class.getSimpleName();
+
+ private String mPath;
+ private Context mContext;
+ private boolean mSuccessIfAbsent;
+
+
+ /**
+ * Full constructor. Success of the operation will depend upon the value of successIfAbsent.
+ *
+ * @param path Path to append to the URL owned by the client instance.
+ * @param context Android application context.
+ * @param successIfAbsent When 'true', the operation finishes in success if the path does NOT exist in the remote server (HTTP 404).
+ */
+ public ExistenceCheckRemoteOperation(String path, Context context, boolean successIfAbsent) {
+ mPath = (path != null) ? path : "";
+ mContext = context;
+ mSuccessIfAbsent = successIfAbsent;
+ }
+
+
+ @Override
+ protected RemoteOperationResult run(WebdavClient client) {
+ if (!isOnline()) {
+ return new RemoteOperationResult(RemoteOperationResult.ResultCode.NO_NETWORK_CONNECTION);
+ }
+ RemoteOperationResult result = null;
+ HeadMethod head = null;
+ try {
+ head = new HeadMethod(client.getBaseUri() + WebdavUtils.encodePath(mPath));
+ int status = client.executeMethod(head, TIMEOUT, TIMEOUT);
+ client.exhaustResponse(head.getResponseBodyAsStream());
+ boolean success = (status == HttpStatus.SC_OK && !mSuccessIfAbsent) || (status == HttpStatus.SC_NOT_FOUND && mSuccessIfAbsent);
+ result = new RemoteOperationResult(success, status, head.getResponseHeaders());
+ Log.d(TAG, "Existence check for " + client.getBaseUri() + WebdavUtils.encodePath(mPath) + " targeting for " + (mSuccessIfAbsent ? " absence " : " existence ") + "finished with HTTP status " + status + (!success?"(FAIL)":""));
+
+ } catch (Exception e) {
+ result = new RemoteOperationResult(e);
+ Log.e(TAG, "Existence check for " + client.getBaseUri() + WebdavUtils.encodePath(mPath) + " targeting for " + (mSuccessIfAbsent ? " absence " : " existence ") + ": " + result.getLogMessage(), result.getException());
+
+ } finally {
+ if (head != null)
+ head.releaseConnection();
+ }
+ return result;
+ }
+
+ private boolean isOnline() {
+ ConnectivityManager cm = (ConnectivityManager) mContext
+ .getSystemService(Context.CONNECTIVITY_SERVICE);
+ return cm != null && cm.getActiveNetworkInfo() != null
+ && cm.getActiveNetworkInfo().isConnectedOrConnecting();
+ }
+
+
+}
--- /dev/null
+/* ownCloud Android client application
+ * 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 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
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package com.owncloud.android.oc_framework.operations.remote;
+
+import java.util.ArrayList;
+
+import org.apache.http.HttpStatus;
+import org.apache.jackrabbit.webdav.DavConstants;
+import org.apache.jackrabbit.webdav.MultiStatus;
+import org.apache.jackrabbit.webdav.client.methods.PropFindMethod;
+
+import android.util.Log;
+
+import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
+import com.owncloud.android.oc_framework.network.webdav.WebdavEntry;
+import com.owncloud.android.oc_framework.network.webdav.WebdavUtils;
+import com.owncloud.android.oc_framework.operations.RemoteFile;
+import com.owncloud.android.oc_framework.operations.RemoteOperation;
+import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
+
+
+/**
+ * Remote operation performing the read a file from the ownCloud server.
+ *
+ * @author David A. Velasco
+ * @author masensio
+ */
+
+public class ReadRemoteFileOperation extends RemoteOperation {
+
+ private static final String TAG = ReadRemoteFileOperation.class.getSimpleName();
+ private static final int SYNC_READ_TIMEOUT = 10000;
+ private static final int SYNC_CONNECTION_TIMEOUT = 5000;
+
+ private String mRemotePath;
+
+
+ /**
+ * Constructor
+ *
+ * @param remotePath Remote path of the file.
+ */
+ public ReadRemoteFileOperation(String remotePath) {
+ mRemotePath = remotePath;
+ }
+
+ /**
+ * Performs the read operation.
+ *
+ * @param client Client object to communicate with the remote ownCloud server.
+ */
+ @Override
+ protected RemoteOperationResult run(WebdavClient client) {
+ PropFindMethod propfind = null;
+ RemoteOperationResult result = null;
+
+ /// take the duty of check the server for the current state of the file there
+ try {
+ propfind = new PropFindMethod(client.getBaseUri() + WebdavUtils.encodePath(mRemotePath),
+ DavConstants.PROPFIND_ALL_PROP,
+ DavConstants.DEPTH_0);
+ int status;
+ status = client.executeMethod(propfind, SYNC_READ_TIMEOUT, SYNC_CONNECTION_TIMEOUT);
+
+ boolean isMultiStatus = status == HttpStatus.SC_MULTI_STATUS;
+ if (isMultiStatus) {
+ // Parse response
+ MultiStatus resp = propfind.getResponseBodyAsMultiStatus();
+ WebdavEntry we = new WebdavEntry(resp.getResponses()[0], client.getBaseUri().getPath());
+ RemoteFile remoteFile = new RemoteFile(we);
+ ArrayList<RemoteFile> files = new ArrayList<RemoteFile>();
+ files.add(remoteFile);
+
+ // Result of the operation
+ result = new RemoteOperationResult(true, status, propfind.getResponseHeaders());
+ result.setData(files);
+
+ } else {
+ client.exhaustResponse(propfind.getResponseBodyAsStream());
+ result = new RemoteOperationResult(false, status, propfind.getResponseHeaders());
+ }
+
+ } catch (Exception e) {
+ result = new RemoteOperationResult(e);
+ e.printStackTrace();
+ Log.e(TAG, "Synchronizing file " + mRemotePath + ": " + result.getLogMessage(), result.getException());
+ } finally {
+ if (propfind != null)
+ propfind.releaseConnection();
+ }
+ return result;
+ }
+
+}
--- /dev/null
+/* ownCloud Android client application
+ * 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 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
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+package com.owncloud.android.oc_framework.operations.remote;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.apache.commons.httpclient.HttpException;
+import org.apache.commons.httpclient.methods.PutMethod;
+import org.apache.commons.httpclient.methods.RequestEntity;
+import org.apache.http.HttpStatus;
+
+import com.owncloud.android.oc_framework.network.ProgressiveDataTransferer;
+import com.owncloud.android.oc_framework.network.webdav.FileRequestEntity;
+import com.owncloud.android.oc_framework.network.webdav.OnDatatransferProgressListener;
+import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
+import com.owncloud.android.oc_framework.network.webdav.WebdavUtils;
+import com.owncloud.android.oc_framework.operations.OperationCancelledException;
+import com.owncloud.android.oc_framework.operations.RemoteOperation;
+import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
+
+/**
+ * Remote operation performing the upload of a remote file to the ownCloud server.
+ *
+ * @author David A. Velasco
+ * @author masensio
+ */
+
+public class UploadRemoteFileOperation extends RemoteOperation {
+
+
+ protected String mStoragePath;
+ protected String mRemotePath;
+ protected String mMimeType;
+ protected PutMethod mPutMethod = null;
+
+ private final AtomicBoolean mCancellationRequested = new AtomicBoolean(false);
+ protected Set<OnDatatransferProgressListener> mDataTransferListeners = new HashSet<OnDatatransferProgressListener>();
+
+ protected RequestEntity mEntity = null;
+
+ public UploadRemoteFileOperation(String storagePath, String remotePath, String mimeType) {
+ mStoragePath = storagePath;
+ mRemotePath = remotePath;
+ mMimeType = mimeType;
+ }
+
+ @Override
+ protected RemoteOperationResult run(WebdavClient client) {
+ RemoteOperationResult result = null;
+
+ try {
+ // / perform the upload
+ synchronized (mCancellationRequested) {
+ if (mCancellationRequested.get()) {
+ throw new OperationCancelledException();
+ } else {
+ mPutMethod = new PutMethod(client.getBaseUri() + WebdavUtils.encodePath(mRemotePath));
+ }
+ }
+
+ int status = uploadFile(client);
+
+ result = new RemoteOperationResult(isSuccess(status), status, (mPutMethod != null ? mPutMethod.getResponseHeaders() : null));
+
+ } catch (Exception e) {
+ // TODO something cleaner with cancellations
+ if (mCancellationRequested.get()) {
+ result = new RemoteOperationResult(new OperationCancelledException());
+ } else {
+ result = new RemoteOperationResult(e);
+ }
+ }
+ return result;
+ }
+
+ public boolean isSuccess(int status) {
+ return ((status == HttpStatus.SC_OK || status == HttpStatus.SC_CREATED || status == HttpStatus.SC_NO_CONTENT));
+ }
+
+ protected int uploadFile(WebdavClient client) throws HttpException, IOException, OperationCancelledException {
+ int status = -1;
+ try {
+ File f = new File(mStoragePath);
+ mEntity = new FileRequestEntity(f, mMimeType);
+ synchronized (mDataTransferListeners) {
+ ((ProgressiveDataTransferer)mEntity).addDatatransferProgressListeners(mDataTransferListeners);
+ }
+ mPutMethod.setRequestEntity(mEntity);
+ status = client.executeMethod(mPutMethod);
+ client.exhaustResponse(mPutMethod.getResponseBodyAsStream());
+
+ } finally {
+ mPutMethod.releaseConnection(); // let the connection available for other methods
+ }
+ return status;
+ }
+
+ public Set<OnDatatransferProgressListener> getDataTransferListeners() {
+ return mDataTransferListeners;
+ }
+
+ public void addDatatransferProgressListener (OnDatatransferProgressListener listener) {
+ synchronized (mDataTransferListeners) {
+ mDataTransferListeners.add(listener);
+ }
+ if (mEntity != null) {
+ ((ProgressiveDataTransferer)mEntity).addDatatransferProgressListener(listener);
+ }
+ }
+
+ public void removeDatatransferProgressListener(OnDatatransferProgressListener listener) {
+ synchronized (mDataTransferListeners) {
+ mDataTransferListeners.remove(listener);
+ }
+ if (mEntity != null) {
+ ((ProgressiveDataTransferer)mEntity).removeDatatransferProgressListener(listener);
+ }
+ }
+
+ public void cancel() {
+ synchronized (mCancellationRequested) {
+ mCancellationRequested.set(true);
+ if (mPutMethod != null)
+ mPutMethod.abort();
+ }
+ }
+
+}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.owncloud.android.workaround.accounts"
- android:versionCode="0100010"
- android:versionName="1.0.10" >
+ android:versionCode="0100011"
+ android:versionName="1.0.11" >
<uses-sdk
android:minSdkVersion="16"
--- /dev/null
+<?xml version='1.0' encoding='UTF-8'?>
+<resources/>
<string name="actionbar_upload_files">الملفات</string>
<string name="actionbar_mkdir">إنشاء دليل</string>
<string name="actionbar_settings">تعديلات</string>
+ <string name="actionbar_see_details">تفاصيل</string>
<string name="prefs_category_general">عام</string>
<string name="prefs_category_more">المزيد</string>
<string name="prefs_accounts">حسابات</string>
<string name="prefs_help">المساعدة</string>
<string name="prefs_imprint">الدمغة.</string>
- <string name="auth_host_url">عنوان الخادم</string>
<string name="auth_username">إسم المستخدم</string>
<string name="auth_password">كلمات السر</string>
<string name="auth_register">جديد لـ %1$s ؟</string>
<string name="filedetails_type">النوع</string>
<string name="filedetails_modified">عُدل</string>
<string name="filedetails_download">انزال</string>
+ <string name="filedetails_sync_file">تحديث ملف</string>
<string name="filedetails_renamed_in_upload_msg">تم تغيير اسم الملف إلى %1$s أثناء الرفع</string>
<string name="common_yes">نعم</string>
<string name="common_no">لا</string>
<string name="common_ok">تم</string>
+ <string name="common_cancel_download">إلغاء تحميل</string>
<string name="common_cancel_upload">إلغاء رفع الملفات</string>
<string name="common_cancel">الغاء</string>
<string name="common_error">خطأ</string>
+ <string name="common_loading">تحميل ...</string>
<string name="common_error_unknown">حدث خطأ غير معروف. </string>
<string name="about_title">حول</string>
<string name="change_password">عدل كلمة السر</string>
<string name="delete_account">حذف الحساب</string>
<string name="create_account">حساب جديد</string>
<string name="upload_chooser_title">رفع من</string>
+ <string name="uploader_info_dirname">اسم المسار</string>
<string name="uploader_upload_in_progress_ticker">يتم الرفع</string>
<string name="uploader_upload_in_progress_content">%1$d%% رفع %2$s</string>
<string name="uploader_upload_succeeded_ticker">تم الرفع بنجاح</string>
<string name="downloader_download_succeeded_content">تم تحميل %1$s بنجاح </string>
<string name="downloader_download_failed_ticker">فشل التحميل</string>
<string name="downloader_download_failed_content"> تحميل %1$s قد لا يكون كاملاَ</string>
+ <string name="downloader_not_downloaded_yet">لم يتم تحميلها بعد</string>
<string name="common_choose_account">اختر حساب</string>
<string name="sync_fail_content">تعذر إكمال التزامن لـ %1$s </string>
<string name="sync_fail_content_unauthorized">كلمة السر غير صالحة لـ %1$s</string>
<string name="common_remove">الغى</string>
<string name="confirmation_remove_alert">هل تود حقاَ إزالة %1$s ؟ </string>
<string name="confirmation_remove_folder_alert">هل ترغب في إزالة %1$s و جهات الاتصال التابعة له؟ </string>
+ <string name="confirmation_remove_folder_local">المحتويات المحلية فقط</string>
<string name="confirmation_remove_remote">حذف من الخادم</string>
<string name="remove_success_msg">يتم الحذف بنجاح</string>
<string name="remove_fail_msg">لقد فشل الحذف</string>
+ <string name="rename_dialog_title">أدخل اسما جديدا</string>
<string name="wait_a_moment">فضلاً, انتظر</string>
<string name="filedisplay_no_file_selected">لم يتم اختيار أي ملف</string>
+ <string name="ssl_validator_btn_details_see">تفاصيل</string>
+ <string name="ssl_validator_btn_details_hide">إخفاء</string>
+ <string name="ssl_validator_label_CN">الاسم الشائع:</string>
+ <string name="ssl_validator_label_O">منظمة:</string>
+ <string name="ssl_validator_label_OU">الوحدة التنظيمية:</string>
+ <string name="ssl_validator_label_C">البلد:</string>
+ <string name="ssl_validator_label_L">المكان:</string>
+ <string name="ssl_validator_label_validity_from">من:</string>
+ <string name="ssl_validator_label_validity_to">إلى:</string>
+ <string name="ssl_validator_label_signature">التوقيع:</string>
+ <string name="ssl_validator_label_signature_algorithm">الخوارزمية:</string>
+ <string name="placeholder_filesize">389 KB</string>
+ <string name="placeholder_media_time">12:23:45</string>
+ <string name="preview_image_description">معاينة الصورة</string>
+ <string name="preview_image_error_unknown_format">هذه الصورة لا يمكن أن تظهر</string>
+ <string name="failed_upload_all_cb">تحديد الكل</string>
</resources>
--- /dev/null
+<?xml version='1.0' encoding='UTF-8'?>
+<resources/>
<?xml version='1.0' encoding='UTF-8'?>
-<resources/>
+<resources>
+ <string name="actionbar_settings">Налады</string>
+ <string name="common_yes">Так</string>
+ <string name="common_no">Не</string>
+ <string name="common_error">Памылка</string>
+</resources>
<string name="prefs_accounts">Профили</string>
<string name="prefs_instant_upload_summary">Своевременно качване на снимки направени с камерата</string>
<string name="prefs_help">Помощ</string>
- <string name="auth_host_url">Адрес на сървъра</string>
<string name="auth_username">Потребител</string>
<string name="auth_password">Парола</string>
<string name="sync_string_files">Файлове</string>
<string name="prefs_category_more">বেশী</string>
<string name="prefs_accounts">একাউন্ট</string>
<string name="prefs_help">সহায়িকা</string>
- <string name="auth_host_url">সার্ভার ঠিকানা</string>
<string name="auth_username">ব্যবহারকারি</string>
<string name="auth_password">কূটশব্দ</string>
<string name="sync_string_files">ফাইল</string>
<string name="recommend_subject">Proveu %1$s a un telèfon avançat!</string>
<string name="recommend_text">Vull convidar-te a usar l\'aplicació %1$s al teu telèfon avançat!\nBaixa\'l aquí: %2$s</string>
<string name="auth_check_server">Comprova el servidor</string>
- <string name="auth_host_url">Adreça del servidor</string>
+ <string name="auth_host_url">Adreça del servidor https://…</string>
<string name="auth_username">Nom d\'usuari</string>
<string name="auth_password">Contrasenya</string>
<string name="auth_register">Nou a %1$s?</string>
<string name="recommend_subject">Zkuste %1$s na vašem smartphonu!</string>
<string name="recommend_text">Chtěl bych vás pozvat k používání %1$s na vašem smartphonu.\nKe stažení zde: %2$s</string>
<string name="auth_check_server">Zkontrolovat server</string>
- <string name="auth_host_url">Adresa serveru</string>
+ <string name="auth_host_url">Adresa serveru https://...</string>
<string name="auth_username">Uživatelské jméno</string>
<string name="auth_password">Heslo</string>
<string name="auth_register">Nováček s %1$s?</string>
<string name="prefs_log_summary_history">Dette viser de optagne logger</string>
<string name="prefs_log_delete_history_button">Slet Historik</string>
<string name="prefs_help">Hjælp</string>
+ <string name="prefs_recommend">Anbefal til en ven</string>
+ <string name="prefs_feedback">Feedback</string>
<string name="prefs_imprint">Imprint</string>
+ <string name="recommend_subject">Prøv %1$s på din smartphone!</string>
+ <string name="recommend_text">Jeg ønsker at invitere dig til at bruge %1$s på din smartphone!\nHent den her: %2$s</string>
<string name="auth_check_server">Check Server</string>
- <string name="auth_host_url">Serveradresse</string>
+ <string name="auth_host_url">Server addresse https://…</string>
<string name="auth_username">Brugernavn</string>
<string name="auth_password">Kodeord</string>
<string name="auth_register">Uvant med %1$s</string>
<string name="sync_foreign_files_forgotten_ticker">Visse lokale filer blev glemt</string>
<string name="sync_foreign_files_forgotten_content">%1$d filer ud af %2$s mappe kunne ikke kopieres ind i</string>
<string name="sync_foreign_files_forgotten_explanation">Fra version 1.3.16 bliver filer uploadet fra denne enhed kopieret til mappen %1$s for at forhindre datatab når en enkelt fil synkroniseres med flere konti.\n\nPå grund af denne ændring blev alle filer uploadet i tidligere versioner af denne app kopieret til mappen %2$s. Imidlertid forhindrede en fejl færdiggørelsen af denne operation under konto-synkronisering. Du kan enten lade filerne være som de er og fjerne linket til %3$s eller flytte filerne til mappen %1$s og beholde linket til %4$s.\n\nHerunder er en liste med de lokale filer og de eksterne filer i %5$s, som de var knyttet til.</string>
+ <string name="sync_current_folder_was_removed">Mappen %1$s eksistere ikke længere</string>
<string name="foreign_files_move">Flyt alle</string>
<string name="foreign_files_success">Alle filer blev flyttet</string>
<string name="foreign_files_fail">Visse filer kunne ikke flyttes</string>
<string name="auth_connection_established">Forbindelse oprettet</string>
<string name="auth_testing_connection">Afprøver forbindelse ...</string>
<string name="auth_not_configured_title">Misdannet server konfiguration</string>
+ <string name="auth_account_not_new">En konto for den samme bruger og server eksisterer allerede på enheden</string>
<string name="auth_unknown_error_title">Ukendt fejl opstod!</string>
<string name="auth_unknown_host_title">Kunne ikke finde host</string>
<string name="auth_incorrect_path_title">Server instans blev ikke fundet</string>
<string name="auth_timeout_title">Serveren var for længe om at svare</string>
<string name="auth_incorrect_address_title">Deform URL</string>
<string name="auth_ssl_general_error_title">SSL initialisering fejlede</string>
+ <string name="auth_ssl_unverified_server_title">Kunne ikke bekræfte SSl-serverens identitet</string>
<string name="auth_bad_oc_version_title">Ikke genkendt server version</string>
<string name="auth_wrong_connection_title">Ikke ikke oprette forbindelse</string>
<string name="auth_secure_connection">Sikker forbindelse oprettet</string>
<string name="auth_oauth_error">Mislykket godkendelse</string>
<string name="auth_oauth_error_access_denied">Adgang afvist af autorisationsserver</string>
<string name="auth_wtf_reenter_URL">Uventet tilstand; angiv server-URL\'en igen</string>
+ <string name="auth_expired_oauth_token_toast">Din godkendelse udløb. Gentag godkendelse</string>
<string name="auth_expired_basic_auth_toast">Indtast venligst dit nuværende kodeord</string>
+ <string name="auth_expired_saml_sso_token_toast">Din session udløb. Forbind venligst igen</string>
+ <string name="auth_connecting_auth_server">Forbinder til godkendelsesserver ...</string>
+ <string name="auth_unsupported_auth_method">Serveren understøtter ikke denne godkendelsesmetode</string>
+ <string name="auth_unsupported_multiaccount">%1$s understøtter ikke multiple konti</string>
<string name="fd_keep_in_sync">Hold fil opdateret</string>
<string name="common_rename">Omdøb</string>
<string name="common_remove">Fjern</string>
<string name="sync_file_fail_msg">Ekstern fil kunne ikke kontrolleres</string>
<string name="sync_file_nothing_to_do_msg">Filindholdet allerede synkroniseret</string>
<string name="create_dir_fail_msg">Mappe kunne ikke oprettes</string>
+ <string name="filename_forbidden_characters">Ugyldige tegn: / \\ < > : \" | ? *</string>
<string name="wait_a_moment">Vent et øjeblik</string>
<string name="filedisplay_unexpected_bad_get_content">Uforventet problem; prøv venligst anden applikation til at vælge filen</string>
<string name="filedisplay_no_file_selected">Ingen fil blev valgt</string>
+ <string name="oauth_check_onoff">Log på med oAuth2</string>
<string name="oauth_login_connection">Forbinder til oAuth2 server...</string>
<string name="ssl_validator_header">Sidens identitet kunne ikke verificeres</string>
<string name="ssl_validator_reason_cert_not_trusted">- Serverens certifikat er ikke troværdigt</string>
<string name="prefs_feedback">Rückmeldungen</string>
<string name="prefs_imprint">Impressum</string>
<string name="auth_check_server">Server überprüfen</string>
- <string name="auth_host_url">Adresse des Servers</string>
<string name="auth_username">Benutzername</string>
<string name="auth_password">Passwort</string>
<string name="auth_register">Ist %1$s neu für Sie?</string>
<string name="recommend_subject">Probieren Sie %1$s auf Ihrem Smartphone!</string>
<string name="recommend_text">Ich möchte Sie zum Benutzen von %1$s auf Ihrem Smartphone einladen!\nLaden Sie es hier herunter: %2$s</string>
<string name="auth_check_server">Server überprüfen</string>
- <string name="auth_host_url">Adresse des Servers</string>
+ <string name="auth_host_url">Server-Adresse https://…</string>
<string name="auth_username">Benutzername</string>
<string name="auth_password">Passwort</string>
<string name="auth_register">Ist %1$s neu für Sie?</string>
<string name="recommend_subject">Probiere %1$s auf Deinem Smartphone!</string>
<string name="recommend_text">Ich möchte Dich zu %1$s für Dein Smartphone einladen!\nLade es hier herunter: %2$s</string>
<string name="auth_check_server">Überprüfe den Server</string>
- <string name="auth_host_url">Adresse des Servers</string>
+ <string name="auth_host_url">Server-Adresse https://…</string>
<string name="auth_username">Benutzername</string>
<string name="auth_password">Passwort</string>
<string name="auth_register">Ist %1$s neu für dich?</string>
<string name="recommend_subject">Δοκιμάστε %1$s στο κινητό σας!</string>
<string name="recommend_text">Θέλω να σας προσκαλέσω να χρησιμοποιήσετε το %1$s στο κινητό σας!\nΚατεβάστε το εδώ: %2$s</string>
<string name="auth_check_server">Έλεγχος Διακομιστή</string>
- <string name="auth_host_url">Διεύθυνση εξυπηρέτη</string>
+ <string name="auth_host_url">Διεύθυνση εξυπηρέτη https://…</string>
<string name="auth_username">Όνομα χρήστη</string>
<string name="auth_password">Συνθηματικό</string>
+ <string name="auth_register">Νέος στο %1$s;</string>
<string name="sync_string_files">Αρχεία</string>
<string name="setup_btn_connect">Σύνδεση</string>
<string name="uploader_btn_upload_text">Μεταφόρτωση</string>
<string name="pincode_wrong">Εσφαλμένο PIN της εφαρμογής</string>
<string name="pincode_removed">Αφαιρέθηκε το PIN της εφαρμογής</string>
<string name="pincode_stored">Το PIN της εφαρμογής αποθηκεύτηκε</string>
+ <string name="media_notif_ticker">%1$s αναπαραγωγή μουσικής</string>
+ <string name="media_state_playing">%1$s (αναπαραγωγή)</string>
+ <string name="media_state_loading">%1$s (φόρτωση)</string>
+ <string name="media_event_done">%1$s αναπαραγωγή τελείωσε</string>
<string name="media_err_nothing_to_play">Δεν βρέθηκε αρχείο πολυμέσων</string>
<string name="media_err_no_account">Δεν δόθηκε λογαριασμός</string>
<string name="media_err_not_in_owncloud">Το αρχείο δεν βρίσκεται σε έγκυρο λογαριασμό</string>
<string name="media_err_timeout">Λήξη χρόνου κατά την προσπάθεια αναπαραγωγής</string>
<string name="media_err_invalid_progressive_playback">Το αρχείο πολυμέσων δεν μπορεί να μεταδοθεί</string>
<string name="media_err_unknown">Το αρχείο πολυμέσων δεν μπορεί να αναπαραχθεί με την παρεχόμενη εφαρμογή αναπαραγωγής πολυμέσων</string>
+ <string name="media_err_security_ex">Σφάλμα ασφαλείας κατά την προσπάθεια αναπαραγωγής του %1$s</string>
+ <string name="media_err_io_ex">Σφάλμα εισόδου κατά την προσπάθεια αναπαραγωγής του %1$s</string>
+ <string name="media_err_unexpected">Απροσδόκτο σφάλμα κατά την προσπάθεια αναπαραγωγής του %1$s</string>
+ <string name="media_rewind_description">Κουμπί επαναφοράς</string>
<string name="media_play_pause_description">Κουμπί αναπαραγωγής ή παύσης</string>
+ <string name="media_forward_description">Κουμπί προώθησης</string>
<string name="auth_trying_to_login">Προσπάθεια σύνδεσης...</string>
<string name="auth_no_net_conn_title">Δεν υπάρχει σύνδεση στο δίκτυο</string>
<string name="auth_nossl_plain_ok_title">Μη διαθέσιμη ασφαλής σύνδεση.</string>
<string name="preview_image_description">Προεπισκόπηση εικόνας</string>
<string name="preview_image_error_unknown_format">Αυτή η εικόνε δεν μπόρεσε να προβληθεί</string>
<string name="error__upload__local_file_not_copied">%1$s δεν μπορεσε να αντιγραφθεί στον %2$s τοπικο καταλόγο </string>
+ <string name="actionbar_failed_instant_upload">Αποτυχημένη στιγμιαία φόρτωση</string>
+ <string name="failed_upload_headline_text">Αποτυχημένες στιγμιαίες φορτώσεις</string>
+ <string name="failed_upload_headline_hint">Σύνοψη όλων των αποτυχημένων φορτώσεων</string>
<string name="failed_upload_all_cb">επιλογή όλων</string>
<string name="failed_upload_headline_retryall_btn">επανάληψη για όλα τα επιλεγμένα</string>
<string name="failed_upload_headline_delete_all_btn">διαγραφή όλων των επιλεγμένων από τη λίστα προς μεταφόρτωση</string>
<string name="recommend_subject">Try %1$s on your smartphone!</string>
<string name="recommend_text">I want to invite you to use %1$s on your smartphone!\nDownload here: %2$s</string>
<string name="auth_check_server">Check Server</string>
- <string name="auth_host_url">Server address</string>
+ <string name="auth_host_url">Server address https://…</string>
<string name="auth_username">Username</string>
<string name="auth_password">Password</string>
<string name="auth_register">New to %1$s?</string>
<string name="prefs_instant_upload">Kapabligi tujan alŝuton</string>
<string name="prefs_instant_upload_summary">Tuje alŝuti fotojn faritajn per fotilo</string>
<string name="prefs_help">Helpo</string>
- <string name="auth_host_url">Servila adreso</string>
<string name="auth_username">Uzantonomo</string>
<string name="auth_password">Pasvorto</string>
<string name="sync_string_files">Dosieroj</string>
<string name="prefs_feedback">Sugerencias</string>
<string name="prefs_imprint">Imprint</string>
<string name="auth_check_server">Verificar Servidor</string>
- <string name="auth_host_url">Dirección del servidor</string>
<string name="auth_username">Nombre de usuario</string>
<string name="auth_password">Contraseña</string>
<string name="auth_register">¿Sos nuevo para %1$s?</string>
--- /dev/null
+<?xml version='1.0' encoding='UTF-8'?>
+<resources>
+ <string name="actionbar_upload">Subir</string>
+ <string name="actionbar_upload_files">Archivos</string>
+ <string name="actionbar_mkdir">Crear directorio</string>
+ <string name="actionbar_settings">Configuración</string>
+ <string name="prefs_category_general">General</string>
+ <string name="prefs_accounts">Cuentas</string>
+ <string name="auth_username">Usuario</string>
+ <string name="auth_password">Clave</string>
+ <string name="sync_string_files">Archivos</string>
+ <string name="setup_btn_connect">Conectar</string>
+ <string name="uploader_btn_upload_text">Subir</string>
+ <string name="uploader_wrn_no_account_title">No se encuentra la cuenta</string>
+</resources>
<?xml version='1.0' encoding='UTF-8'?>
-<resources/>
+<resources>
+ <string name="about_android">App Android %1$s</string>
+ <string name="about_version">versión %1$s</string>
+ <string name="actionbar_sync">Actualizar cuenta</string>
+ <string name="actionbar_upload">Subir archivo</string>
+ <string name="actionbar_upload_from_apps">Contenido de otras aplicaciones</string>
+ <string name="actionbar_upload_files">Archivos</string>
+ <string name="actionbar_open_with">Abrir con</string>
+ <string name="actionbar_mkdir">Crear directorio</string>
+ <string name="actionbar_settings">Ajustes</string>
+ <string name="actionbar_see_details">Detalles</string>
+ <string name="prefs_category_general">General</string>
+ <string name="prefs_category_more">Más</string>
+ <string name="prefs_accounts">Cuentas</string>
+ <string name="prefs_manage_accounts">Gestionar cuentas</string>
+ <string name="prefs_pincode">PIN de aplicación </string>
+ <string name="prefs_pincode_summary">Proteja su cliente</string>
+ <string name="prefs_instant_upload">Habilita la subida instantánea</string>
+ <string name="prefs_instant_upload_summary">Subir instantáneamente las fotos tomadas por la cámara</string>
+ <string name="prefs_log_title">Habilitar registro</string>
+ <string name="prefs_log_summary">Esto es usado para registrar problemas</string>
+ <string name="prefs_log_title_history">Historia del Registro</string>
+ <string name="prefs_log_summary_history">Esto muestra los registros grabados</string>
+ <string name="prefs_log_delete_history_button">Eliminar Historial</string>
+ <string name="prefs_help">Ayuda</string>
+ <string name="prefs_recommend">Recomendar a un amigo</string>
+ <string name="prefs_feedback">Mensajes de retroalimentación</string>
+ <string name="prefs_imprint">Imprint</string>
+ <string name="recommend_subject">Prueba %1$s en tu smarthphone!</string>
+ <string name="recommend_text">Quiero invitarte a usar %1$s en tu smarthphone!⏎\nDescargalo aquí: %2$s</string>
+ <string name="auth_check_server">Compruebe el servidor.</string>
+ <string name="auth_host_url">Dirección del servidor https://…</string>
+ <string name="auth_username">Nombre de usuario</string>
+ <string name="auth_password">Contraseña</string>
+ <string name="auth_register">New to %1$s?</string>
+ <string name="sync_string_files">Archivos</string>
+ <string name="setup_btn_connect">Conectar</string>
+ <string name="uploader_btn_upload_text">Subir</string>
+ <string name="uploader_top_message">Escoja el directorio de carga:</string>
+ <string name="uploader_wrn_no_account_title">No se encontraron cuentas</string>
+ <string name="uploader_wrn_no_account_text">No hay cuentas de %1$s en tu dispositivo. Por favor configura una cuenta primero.</string>
+ <string name="uploader_wrn_no_account_setup_btn_text">Configuración</string>
+ <string name="uploader_wrn_no_account_quit_btn_text">Salir</string>
+ <string name="uploader_wrn_no_content_title">No hay contenido para subir</string>
+ <string name="uploader_wrn_no_content_text">Ningún contenido ha sido recibido. No hay nada que subir.</string>
+ <string name="uploader_error_forbidden_content">%1$s no está autorizado para acceder al contenido compartido</string>
+ <string name="uploader_info_uploading">Enviando</string>
+ <string name="file_list_empty">No hay archivos en esta carpeta.\nPuedes añadir nuevos archivos con la opción \"Subir\" del menú.</string>
+ <string name="filedetails_select_file">Pulsa sobre un archivo para mostrar información adicional.</string>
+ <string name="filedetails_size">Tamaño:</string>
+ <string name="filedetails_type">Tipo:</string>
+ <string name="filedetails_created">Creado:</string>
+ <string name="filedetails_modified">Modificado:</string>
+ <string name="filedetails_download">Descargar</string>
+ <string name="filedetails_sync_file">Actualizar archivo</string>
+ <string name="filedetails_renamed_in_upload_msg">El archivo fue renombrado como %1$s durante la subida</string>
+ <string name="common_yes">Sí</string>
+ <string name="common_no">No</string>
+ <string name="common_ok">Aceptar</string>
+ <string name="common_cancel_download">Cancelar descarga</string>
+ <string name="common_cancel_upload">Cancelar subida</string>
+ <string name="common_cancel">Cancelar</string>
+ <string name="common_save_exit">Guardar & Salir</string>
+ <string name="common_error">Error</string>
+ <string name="common_loading">Cargando ...</string>
+ <string name="common_error_unknown">Error desconocido</string>
+ <string name="about_title">Acerca de</string>
+ <string name="change_password">Cambiar contraseña</string>
+ <string name="delete_account">Eliminar cuenta</string>
+ <string name="create_account">Crear cuenta</string>
+ <string name="upload_chooser_title">Subir</string>
+ <string name="uploader_info_dirname">Nombre de directorio</string>
+ <string name="uploader_upload_in_progress_ticker">Subiendo...</string>
+ <string name="uploader_upload_in_progress_content">%1$d%% Subiendo %2$s</string>
+ <string name="uploader_upload_succeeded_ticker">Subido con éxito</string>
+ <string name="uploader_upload_succeeded_content_single">%1$s se ha subido con éxito</string>
+ <string name="uploader_upload_failed_ticker">Error en la subida</string>
+ <string name="uploader_upload_failed_content_single">La subida de %1$s no se pudo completar</string>
+ <string name="downloader_download_in_progress_ticker">Descargando ...</string>
+ <string name="downloader_download_in_progress_content">%1$s Descargada de %2$s</string>
+ <string name="downloader_download_succeeded_ticker">Descarga completa</string>
+ <string name="downloader_download_succeeded_content">%1$s se ha descargado con éxito</string>
+ <string name="downloader_download_failed_ticker">Falló la descarga</string>
+ <string name="downloader_download_failed_content">La descarga de %1$s no se pudo completar</string>
+ <string name="downloader_not_downloaded_yet">No descargado</string>
+ <string name="common_choose_account">Elige una cuenta</string>
+ <string name="sync_fail_ticker">Falló la sincronización</string>
+ <string name="sync_fail_content">La sincronización de %1$s s no se pudo completar</string>
+ <string name="sync_fail_content_unauthorized">Contraseña no válida para %1$s</string>
+ <string name="sync_conflicts_in_favourites_ticker">Se encontraron conflictos</string>
+ <string name="sync_conflicts_in_favourites_content">Falló la sincronización de contenidos de %1$d archivos</string>
+ <string name="sync_fail_in_favourites_ticker">Fallos en la sincronización de contenidos</string>
+ <string name="sync_fail_in_favourites_content">Los contenidos de %1$d archivos no fueron sincronizados (%2$d conflictos)</string>
+ <string name="sync_foreign_files_forgotten_ticker">Algunos archivos locales se han perdido</string>
+ <string name="sync_foreign_files_forgotten_content">%1$d archivos de %2$s no han podido ser copiados</string>
+ <string name="sync_foreign_files_forgotten_explanation">Como versión 1.3.16, los archivos subidos desde este dispositivo son copiados a un archivo %1$s local para prevenir perdida de datos cuando un simple archivo es sincronizado con multiples cuentas.\n\nDebido a este cambio, todos los archivos subidos en versiones previas de esta aplicación han sido copiados a la carpeta %2$s. No obtante, un error previno el completado de esta operación durante la sincronización de cuenta. Debería dejar el o los archivos así y eliminar el enlace a %3$s o mover el o los archivos al %1$s directorio y conservar el enlace a %4$s.\n\nListado abajo tiene los enlaces a los archivos locales y archivos remotos en %5$s </string>
+ <string name="sync_current_folder_was_removed">La carpeta local %1$s no existe.</string>
+ <string name="foreign_files_move">Mover todo</string>
+ <string name="foreign_files_success">Todos los archivos fueron movidos</string>
+ <string name="foreign_files_fail">Algunos archivos no han podido ser movidos</string>
+ <string name="foreign_files_local_text">Local: %1$s</string>
+ <string name="foreign_files_remote_text">Remoto: %1$s</string>
+ <string name="upload_query_move_foreign_files">No hay suficiente espacio para copiar los archivos seleccionados en la carpeta %1$s. ¿Quiere moverlos en lugar de copiarlos?</string>
+ <string name="pincode_enter_pin_code">Por favor, inserta tu PIN de aplicación</string>
+ <string name="pincode_configure_your_pin">Introduzca un PIN para la aplicación</string>
+ <string name="pincode_configure_your_pin_explanation">Se solicitará el PIN cada vez que se inicie la aplicación</string>
+ <string name="pincode_reenter_your_pincode">Repita el PIN para la aplicación, por favor</string>
+ <string name="pincode_remove_your_pincode">Borre su PIN de aplicación</string>
+ <string name="pincode_mismatch">Los PIN introducidos no son iguales</string>
+ <string name="pincode_wrong">PIN de aplicación incorrecto</string>
+ <string name="pincode_removed">PIN de aplicación borrado</string>
+ <string name="pincode_stored">PIN de aplicación guardado</string>
+ <string name="media_notif_ticker">Reproductor de música %1$s</string>
+ <string name="media_state_playing">%1$s (reproduciendo)</string>
+ <string name="media_state_loading">%1$s (cargando)</string>
+ <string name="media_event_done">%1$s reproducción finalizada</string>
+ <string name="media_err_nothing_to_play">No se encuentra archivo de medio</string>
+ <string name="media_err_no_account">No se ha proporcionado cuenta</string>
+ <string name="media_err_not_in_owncloud">El archivo no esta en una cuenta valida </string>
+ <string name="media_err_unsupported">Codec No Soportado</string>
+ <string name="media_err_io">El archivo de medios no pudo ser leído </string>
+ <string name="media_err_malformed">Archivo no codificado correctamente</string>
+ <string name="media_err_timeout">Tiempo de espera agotado en el intento de reproducción</string>
+ <string name="media_err_invalid_progressive_playback">Archivo de medio no puede ser transmitido</string>
+ <string name="media_err_unknown">El archivo de medios no se puede reproducir con el reproductor de medios por defecto </string>
+ <string name="media_err_security_ex">Error de seguridad al intentar reproducir %1$s</string>
+ <string name="media_err_io_ex">Error de entrada al intentar reproducir %1$s</string>
+ <string name="media_err_unexpected">Error inesperado intentando reproducir %1$s</string>
+ <string name="media_rewind_description">Botón Rebobinado</string>
+ <string name="media_play_pause_description">Botón de reproducción o pausa </string>
+ <string name="media_forward_description">Botón avance rápido</string>
+ <string name="auth_trying_to_login">Intentado iniciar sesión...</string>
+ <string name="auth_no_net_conn_title">Sin conexión de red</string>
+ <string name="auth_nossl_plain_ok_title">Conexión segura no disponible.</string>
+ <string name="auth_connection_established">Conexión establecida</string>
+ <string name="auth_testing_connection">Probando conexión...</string>
+ <string name="auth_not_configured_title">Configuración de servidor en formato incorrecto</string>
+ <string name="auth_account_not_new">Una cuenta para el mismo usuario y servidor ya existen en el dispositivo</string>
+ <string name="auth_account_not_the_same">El usuario introducido no concuerda con el usuario de esta cuenta</string>
+ <string name="auth_unknown_error_title">Ocurrió un error desconocido</string>
+ <string name="auth_unknown_host_title">No se pudo encontrar la dirección</string>
+ <string name="auth_incorrect_path_title">Instancia de servidor no encontrada</string>
+ <string name="auth_timeout_title">El servidor ha tardado demasiado en responder</string>
+ <string name="auth_incorrect_address_title">URL no válida</string>
+ <string name="auth_ssl_general_error_title">Falló la inicialización SSL</string>
+ <string name="auth_ssl_unverified_server_title">No fue posible verificar la identidad del servidor SLL</string>
+ <string name="auth_bad_oc_version_title">No se reconoce la versión del servidor </string>
+ <string name="auth_wrong_connection_title">No se ha podido establecer la conexión</string>
+ <string name="auth_secure_connection">Conexión segura establecida</string>
+ <string name="auth_unauthorized">Nombre de usuario o contraseña incorrecta</string>
+ <string name="auth_oauth_error">Autorización no satisfactoria</string>
+ <string name="auth_oauth_error_access_denied">Acceso denegado por servidor de autorización</string>
+ <string name="auth_wtf_reenter_URL">Estado inesperado; por favor, introduzca la URL del servidor de nuevo</string>
+ <string name="auth_expired_oauth_token_toast">Su autorización ha expirado. Por favor, autorice de nuevo</string>
+ <string name="auth_expired_basic_auth_toast">Por favor, introduzca la contraseña actual.</string>
+ <string name="auth_expired_saml_sso_token_toast">Su sesión ha expirado. Favor de conectarse de nuevo</string>
+ <string name="auth_connecting_auth_server">Conectando al servidor de autenticación...</string>
+ <string name="auth_unsupported_auth_method">El servidor no soporta este método de autenticación</string>
+ <string name="auth_unsupported_multiaccount">%1$s no soporta cuentas múltiples</string>
+ <string name="fd_keep_in_sync">Mantener el archivo actualizado</string>
+ <string name="common_rename">Renombrar</string>
+ <string name="common_remove">Borrar</string>
+ <string name="confirmation_remove_alert">¿Está seguro que desea borrar %1$s ?</string>
+ <string name="confirmation_remove_folder_alert">¿Desea elimiar %1$s y sus descendientes?</string>
+ <string name="confirmation_remove_local">Sólo local</string>
+ <string name="confirmation_remove_folder_local">Sólo archivos locales</string>
+ <string name="confirmation_remove_remote">Eliminar del servidor</string>
+ <string name="confirmation_remove_remote_and_local">Tanto remoto como local</string>
+ <string name="remove_success_msg">Borrado correctamente</string>
+ <string name="remove_fail_msg">El borrado no pudo ser completado</string>
+ <string name="rename_dialog_title">Introduzca un nombre nuevo</string>
+ <string name="rename_local_fail_msg">No se pudo cambiar el nombre de la copia local, trata con un nombre differente</string>
+ <string name="rename_server_fail_msg">No se pudo cambiar el nombre</string>
+ <string name="sync_file_fail_msg">No pudo comprobarse el archivo remoto</string>
+ <string name="sync_file_nothing_to_do_msg">Ya está sincronizado</string>
+ <string name="create_dir_fail_msg">El directorio no pudo ser creado</string>
+ <string name="filename_forbidden_characters">Carácteres ilegales: / \\ < > : \" | ? *</string>
+ <string name="wait_a_moment">Espere un momento</string>
+ <string name="filedisplay_unexpected_bad_get_content">Problema inesperado; por favor, prueba otra app para seleccionar el archivo</string>
+ <string name="filedisplay_no_file_selected">No fué seleccionado ningún archivo</string>
+ <string name="oauth_check_onoff">Ingresar con oAuth2</string>
+ <string name="oauth_login_connection">Conectando al servidor oAuth2...</string>
+ <string name="ssl_validator_header">La identidad del sitio no puede ser verificada</string>
+ <string name="ssl_validator_reason_cert_not_trusted">- El certificado del servidor no es de confianza</string>
+ <string name="ssl_validator_reason_cert_expired">- El certificado del servidor expiró</string>
+ <string name="ssl_validator_reason_cert_not_yet_valid">- El certificado del servidor es demasiado reciente</string>
+ <string name="ssl_validator_reason_hostname_not_verified">- La URL no coincide con el nombre de dominio del certificado</string>
+ <string name="ssl_validator_question">¿Confías de todas formas en este certificado?</string>
+ <string name="ssl_validator_not_saved">El certificado no pudo ser guardado</string>
+ <string name="ssl_validator_btn_details_see">Detalles</string>
+ <string name="ssl_validator_btn_details_hide">Ocultar</string>
+ <string name="ssl_validator_label_subject">Emitido para:</string>
+ <string name="ssl_validator_label_issuer">Emitido por:</string>
+ <string name="ssl_validator_label_CN">Nombre común:</string>
+ <string name="ssl_validator_label_O">Organización:</string>
+ <string name="ssl_validator_label_OU">Unidad organizativa</string>
+ <string name="ssl_validator_label_C">Pais:</string>
+ <string name="ssl_validator_label_ST">Estado:</string>
+ <string name="ssl_validator_label_L">Ubicación:</string>
+ <string name="ssl_validator_label_validity">Validez:</string>
+ <string name="ssl_validator_label_validity_from">De:</string>
+ <string name="ssl_validator_label_validity_to">A:</string>
+ <string name="ssl_validator_label_signature">Firma:</string>
+ <string name="ssl_validator_label_signature_algorithm">Algoritmo:</string>
+ <string name="placeholder_sentence">Esto es un marcador de posición</string>
+ <string name="placeholder_filename">marcadordeposición.txt</string>
+ <string name="placeholder_filetype">Imagen PNG</string>
+ <string name="placeholder_filesize">389 KB</string>
+ <string name="placeholder_timestamp">2012/05/18 12:23 PM</string>
+ <string name="placeholder_media_time">12:23:45</string>
+ <string name="instant_upload_on_wifi">Subir imágenes sólo via WiFi</string>
+ <string name="instant_upload_path">/SubidasInstantáneas</string>
+ <string name="conflict_title">Conflicto en la actualización</string>
+ <string name="conflict_message">El archivo remoto %s no está sincronizado con el archivo local. Si continúa, se reemplazará el contenido del archivo en el servidor.</string>
+ <string name="conflict_keep_both">Mantener ambas</string>
+ <string name="conflict_overwrite">Sobrescribir</string>
+ <string name="conflict_dont_upload">No subir</string>
+ <string name="preview_image_description">Previsualización de imagen</string>
+ <string name="preview_image_error_unknown_format">No se puede mostrar la imagen</string>
+ <string name="error__upload__local_file_not_copied">%1$s no puede ser copiado al %2$s directorio local </string>
+ <string name="actionbar_failed_instant_upload">Carga instantánea fallida</string>
+ <string name="failed_upload_headline_text">Cargas instantáneas fallidas</string>
+ <string name="failed_upload_headline_hint">Resumen de todas las cargas instantáneas fallidas</string>
+ <string name="failed_upload_all_cb">Seleccionar todos</string>
+ <string name="failed_upload_headline_retryall_btn">Reintentar todos los seleccionados</string>
+ <string name="failed_upload_headline_delete_all_btn">Eliminar todo de la cola de subida</string>
+ <string name="failed_upload_retry_text">Reintentar subida de imagen:</string>
+ <string name="failed_upload_load_more_images">Cargar mas imágenes</string>
+ <string name="failed_upload_retry_do_nothing_text">No hacer nada no está conectado para subida instantánea</string>
+ <string name="failed_upload_failure_text">Mensaje de error:</string>
+ <string name="failed_upload_quota_exceeded_text">Por favor revise su configuración de servidor, posiblemente su cuota se haya excedido.</string>
+</resources>
<string name="about_android">App Android %1$s</string>
<string name="about_version">versión %1$s</string>
<string name="actionbar_sync">Actualizar cuenta</string>
- <string name="actionbar_upload">Subir archivo</string>
+ <string name="actionbar_upload">Subir</string>
<string name="actionbar_upload_from_apps">Contenido de otras aplicaciones</string>
<string name="actionbar_upload_files">Archivos</string>
<string name="actionbar_open_with">Abrir con</string>
<string name="actionbar_mkdir">Crear directorio</string>
- <string name="actionbar_settings">Ajustes</string>
+ <string name="actionbar_settings">Configuración</string>
<string name="actionbar_see_details">Detalles</string>
<string name="prefs_category_general">General</string>
<string name="prefs_category_more">Más</string>
<string name="prefs_manage_accounts">Gestionar cuentas</string>
<string name="prefs_pincode">PIN de aplicación </string>
<string name="prefs_pincode_summary">Proteja su cliente</string>
- <string name="prefs_instant_upload">Habilita la subida instantánea</string>
+ <string name="prefs_instant_upload">Habilitar la subida instantánea</string>
<string name="prefs_instant_upload_summary">Subir instantáneamente las fotos tomadas por la cámara</string>
<string name="prefs_log_title">Habilitar registro</string>
<string name="prefs_log_summary">Esto es usado para registrar problemas</string>
<string name="recommend_subject">Prueba %1$s en tu smarthphone!</string>
<string name="recommend_text">Quiero invitarte a usar %1$s en tu smarthphone!⏎\nDescargalo aquí: %2$s</string>
<string name="auth_check_server">Compruebe el servidor.</string>
- <string name="auth_host_url">Dirección del servidor</string>
+ <string name="auth_host_url">Dirección del servidor https://…</string>
<string name="auth_username">Nombre de usuario</string>
<string name="auth_password">Contraseña</string>
<string name="auth_register">New to %1$s?</string>
<string name="setup_btn_connect">Conectar</string>
<string name="uploader_btn_upload_text">Subir</string>
<string name="uploader_top_message">Escoja el directorio de carga:</string>
- <string name="uploader_wrn_no_account_title">No se encontraron cuentas</string>
+ <string name="uploader_wrn_no_account_title">No se encontró la cuenta</string>
<string name="uploader_wrn_no_account_text">No hay cuentas de %1$s en tu dispositivo. Por favor configura una cuenta primero.</string>
<string name="uploader_wrn_no_account_setup_btn_text">Configuración</string>
<string name="uploader_wrn_no_account_quit_btn_text">Salir</string>
<string name="uploader_wrn_no_content_title">No hay contenido para subir</string>
<string name="uploader_wrn_no_content_text">Ningún contenido ha sido recibido. No hay nada que subir.</string>
<string name="uploader_error_forbidden_content">%1$s no está autorizado para acceder al contenido compartido</string>
- <string name="uploader_info_uploading">Enviando</string>
+ <string name="uploader_info_uploading">Subiendo...</string>
<string name="file_list_empty">No hay archivos en esta carpeta.\nPuedes añadir nuevos archivos con la opción \"Subir\" del menú.</string>
<string name="filedetails_select_file">Pulsa sobre un archivo para mostrar información adicional.</string>
<string name="filedetails_size">Tamaño:</string>
<string name="recommend_subject">Proovi oma nutitelefonil rakendust %1$s!</string>
<string name="recommend_text">Soovin sind kutsuda kasutama oma nutitelefonil rakendust %1$s!\nLae alla siit: %2$s</string>
<string name="auth_check_server">Kontrolli serverit</string>
- <string name="auth_host_url">Serveri aadress</string>
+ <string name="auth_host_url">Serveri aadress https://...</string>
<string name="auth_username">Kasutajanimi</string>
<string name="auth_password">Parool</string>
<string name="auth_register">Uus %1$s kasutaja?</string>
<string name="prefs_log_delete_history_button">Ezabatu historia</string>
<string name="prefs_help">Laguntza</string>
<string name="prefs_recommend">Lagun bati aholkatu</string>
+ <string name="prefs_feedback">Oharrak</string>
<string name="prefs_imprint">Imprint</string>
<string name="recommend_subject">Probatu %1$s zure telefono adimentsuan!</string>
<string name="recommend_text">Nik %1$s zure telefono adimentsuan erabitzera gonbidatu nahi zaitut!\nDeskargatu hemen: %2$s</string>
<string name="auth_check_server">Egiaztatu zerbitzaria</string>
- <string name="auth_host_url">Zerbitzariaren helbidea</string>
<string name="auth_username">Erabiltzaile izena</string>
<string name="auth_password">Pasahitza</string>
<string name="auth_register">Berria %1$s-n?</string>
<string name="prefs_help">راهنما</string>
<string name="prefs_feedback">باز خورد</string>
<string name="prefs_imprint">مهر زدن</string>
- <string name="auth_host_url">آدرس سرور</string>
<string name="auth_username">نام کاربری</string>
<string name="auth_password">رمز عبور</string>
<string name="sync_string_files">پروندهها</string>
<string name="recommend_subject">Kokeile %1$sia älypuhelimellasi!</string>
<string name="recommend_text">Ota %1$s käyttöösi älypuhelimessa!\nLataa tästä: %2$s</string>
<string name="auth_check_server">Tarkista palvelin</string>
- <string name="auth_host_url">Palvelimen osoite</string>
+ <string name="auth_host_url">Palvelinosoite https://…</string>
<string name="auth_username">Käyttäjätunnus</string>
<string name="auth_password">Salasana</string>
<string name="auth_register">Onko %1$s uusi tuttavuus sinulle?</string>
<string name="about_android">%1$s Android App</string>
<string name="about_version">version %1$s</string>
<string name="actionbar_sync">Actualiser le compte</string>
- <string name="actionbar_upload">Téléverser</string>
+ <string name="actionbar_upload">Charger</string>
<string name="actionbar_upload_from_apps">Contenu d\'une autre application</string>
<string name="actionbar_upload_files">Fichiers</string>
<string name="actionbar_open_with">Ouvrir avec</string>
<string name="recommend_subject">Essayez %1$s sur votre smartphone !</string>
<string name="recommend_text">J\'aimerais vous inviter à utiliser %1$s sur votre smartphone !\nTéléchargez-le ici : %2$s</string>
<string name="auth_check_server">Vérifier le serveur</string>
- <string name="auth_host_url">Adresse du serveur</string>
+ <string name="auth_host_url">Adresse du serveur https://...</string>
<string name="auth_username">Nom d\'utilisateur</string>
<string name="auth_password">Mot de passe</string>
<string name="auth_register">Nouveau dans %1$s ?</string>
<string name="recommend_subject">Tente %1$s no seu teléfono intelixente!</string>
<string name="recommend_text">Quero convidalo a empregar %1$s no seu teléfono intelixente!⏎\nDescárgueo de aquí:%2$s</string>
<string name="auth_check_server">Comprobar o servidor</string>
- <string name="auth_host_url">Enderezo do servidor</string>
+ <string name="auth_host_url">Enderezo do servidor https://…</string>
<string name="auth_username">Nome de usuario</string>
<string name="auth_password">Contrasinal</string>
<string name="auth_register">Novo en %1$s?</string>
<string name="prefs_instant_upload">הפעלת העלאות מהירות</string>
<string name="prefs_instant_upload_summary">העלאה מהירה של תמונות שמצולמות במצלמה שלך</string>
<string name="prefs_help">עזרה</string>
- <string name="auth_host_url">כתובת שרת</string>
<string name="auth_username">שם משתמש</string>
<string name="auth_password">ססמה</string>
<string name="sync_string_files">קבצים</string>
<string name="recommend_subject">Próbálja ki %1$s-t az okostelefonján!</string>
<string name="recommend_text">Kérem próbálja ki %1$s-t az okostelefonján!\nInnen tölthető le: %2$s</string>
<string name="auth_check_server">Szerver állapot ellenörzés</string>
- <string name="auth_host_url">A kiszolgáló címe</string>
+ <string name="auth_host_url">Kiszolgáló címe https://...</string>
<string name="auth_username">Felhasználói név</string>
<string name="auth_password">Jelszó</string>
<string name="auth_register">Új vagy a %1$s területen?</string>
<string name="sync_file_fail_msg">A távoli fájl nem volt ellenőrizhető</string>
<string name="sync_file_nothing_to_do_msg">Az állományok már szinkonizálva vannak</string>
<string name="create_dir_fail_msg">A mappa nem hozható létre</string>
+ <string name="filename_forbidden_characters">Nem megendedett karakterek: / \\ < > : \" | ? *</string>
<string name="wait_a_moment">Egy pillanat...</string>
<string name="filedisplay_unexpected_bad_get_content">Váratlan hiba; válassza ki a fájlt más programból</string>
<string name="filedisplay_no_file_selected">Egy fájl sincs kiválasztva</string>
<string name="preview_image_description">Előnézeti kép</string>
<string name="preview_image_error_unknown_format">Ez a kép nem jelenik meg</string>
<string name="error__upload__local_file_not_copied">%1$s-t nem sikerült átmásolni ide: %2$s </string>
+ <string name="actionbar_failed_instant_upload">Sikertelen azonnali feltöltés\"</string>
<string name="failed_upload_headline_text">Sikertelen Azonnali feltöltés</string>
<string name="failed_upload_headline_hint">Összefoglaló az összes sikertelen instant feltöltésről</string>
<string name="failed_upload_all_cb">Összes kijelölése</string>
<string name="actionbar_upload">Incargar</string>
<string name="actionbar_upload_files">Files</string>
<string name="actionbar_settings">Configurationes</string>
+ <string name="prefs_category_general">General</string>
<string name="prefs_category_more">Plus</string>
<string name="prefs_help">Adjuta</string>
<string name="auth_username">Nomine de usator</string>
<?xml version='1.0' encoding='UTF-8'?>
<resources>
+ <string name="about_android">%1$s Apl Android</string>
+ <string name="about_version">versi %1$s</string>
+ <string name="actionbar_sync">Segarkan akun</string>
<string name="actionbar_upload">Unggah</string>
+ <string name="actionbar_upload_from_apps">Konten dari apl lain</string>
<string name="actionbar_upload_files">Berkas</string>
+ <string name="actionbar_open_with">Bukan dengan</string>
+ <string name="actionbar_mkdir">Buat folder</string>
<string name="actionbar_settings">pengaturan</string>
+ <string name="actionbar_see_details">Rincian</string>
<string name="prefs_category_general">umum</string>
<string name="prefs_category_more">Lainnya</string>
+ <string name="prefs_accounts">Akun</string>
+ <string name="prefs_manage_accounts">Kelola Akun</string>
+ <string name="prefs_pincode">PIN Apl</string>
+ <string name="prefs_pincode_summary">Lindungi klien Anda</string>
+ <string name="prefs_instant_upload">Aktifkan unggah instan</string>
+ <string name="prefs_instant_upload_summary">Unggah langsung foto yang diambil oleh kamera</string>
+ <string name="prefs_log_title">Aktifkan Pencatatan</string>
+ <string name="prefs_log_summary">Ini digunakan untuk mencatat masalah</string>
+ <string name="prefs_log_title_history">Riwayat Catatan</string>
+ <string name="prefs_log_summary_history">Ini menampilkan catatan yang disimpan</string>
+ <string name="prefs_log_delete_history_button">Riwayat Hapus</string>
<string name="prefs_help">Bantuan</string>
+ <string name="prefs_recommend">Rekomendasikan ke teman</string>
+ <string name="prefs_feedback">Umpan balik</string>
<string name="prefs_imprint">Imprint</string>
- <string name="auth_host_url">alamat server</string>
- <string name="auth_username">nama pengguna</string>
- <string name="auth_password">kata kunci</string>
+ <string name="recommend_subject">Coba %1$s pada smartphone Anda!</string>
+ <string name="recommend_text">Saya mengundang Anda untuk menggunakan %1$s pada smartphone Anda!\nUnduh di sini: %2$s</string>
+ <string name="auth_check_server">Periksa Server</string>
+ <string name="auth_host_url">Alamat server https://…</string>
+ <string name="auth_username">Nama Pengguna</string>
+ <string name="auth_password">Sandi</string>
+ <string name="auth_register">Baru di %1$s?</string>
<string name="sync_string_files">Berkas</string>
+ <string name="setup_btn_connect">Sambungkan</string>
<string name="uploader_btn_upload_text">Unggah</string>
+ <string name="uploader_top_message">Pilih folder unggah</string>
+ <string name="uploader_wrn_no_account_title">Tidak ada akun yang ditemukan</string>
+ <string name="uploader_wrn_no_account_text">Belum ada akun %1$s pada perangkat Anda. Silahkan buat akun terlebih dahulu.</string>
+ <string name="uploader_wrn_no_account_setup_btn_text">Pengaturan</string>
<string name="uploader_wrn_no_account_quit_btn_text">Keluar</string>
- <string name="filedetails_download">unduh</string>
+ <string name="uploader_wrn_no_content_title">Tidak ada konten untuk diunggah</string>
+ <string name="uploader_wrn_no_content_text">Tidak ada konten yang diterima. Tidak ada yang diunggah</string>
+ <string name="uploader_error_forbidden_content">%1$s tidak diizinkan mengakses konten berbagi</string>
+ <string name="uploader_info_uploading">Mengunggah</string>
+ <string name="file_list_empty">Tidak ada berkas dalam folder ini.\nBerkas baru dapat ditambahkan dengan opsi menu \"Unggah\".</string>
+ <string name="filedetails_select_file">Sentuh pada berkas untuk menampilkan informasi tambahan</string>
+ <string name="filedetails_size">Ukuran:</string>
+ <string name="filedetails_type">Tipe:</string>
+ <string name="filedetails_created">Dibuat:</string>
+ <string name="filedetails_modified">Diubah:</string>
+ <string name="filedetails_download">Unduh</string>
+ <string name="filedetails_sync_file">Segarkan berkas</string>
+ <string name="filedetails_renamed_in_upload_msg">Berkas diubah namanya menjadi %1$s saat pengunggahan</string>
<string name="common_yes">Ya</string>
<string name="common_no">Tidak</string>
<string name="common_ok">Oke</string>
+ <string name="common_cancel_download">Batal mengunduh</string>
<string name="common_cancel_upload">Batal mengunggah</string>
- <string name="common_cancel">batal</string>
- <string name="common_error">kesalahan</string>
+ <string name="common_cancel">Batal</string>
+ <string name="common_save_exit">Simpan & Keluar</string>
+ <string name="common_error">Kesalahan</string>
+ <string name="common_loading">Memuat ...</string>
+ <string name="common_error_unknown">Galat tidak diketahui</string>
+ <string name="about_title">Tentang</string>
<string name="change_password">Ubah sandi</string>
+ <string name="delete_account">Hapus akun</string>
+ <string name="create_account">Buat akun</string>
+ <string name="upload_chooser_title">Unggah dari...</string>
+ <string name="uploader_info_dirname">Nama folder</string>
+ <string name="uploader_upload_in_progress_ticker">Mengungggah...</string>
+ <string name="uploader_upload_in_progress_content">%1$d%% Mengunggah %2$s</string>
+ <string name="uploader_upload_succeeded_ticker">Berhasil mengunggah</string>
+ <string name="uploader_upload_succeeded_content_single">%1$s berhasil diunggah</string>
+ <string name="uploader_upload_failed_ticker">Gagal mengunggah</string>
+ <string name="uploader_upload_failed_content_single">Unggah %1$s tidak selesai</string>
+ <string name="downloader_download_in_progress_ticker">Mengunduh...</string>
+ <string name="downloader_download_in_progress_content">%1$d%% Mengunduh %2$s</string>
+ <string name="downloader_download_succeeded_ticker">Berhasil mengunduh</string>
+ <string name="downloader_download_succeeded_content">%1$s berhasil diunduh</string>
+ <string name="downloader_download_failed_ticker">Gagal Mengunduh</string>
+ <string name="downloader_download_failed_content">Mengunduh %1$s tidak selesai</string>
+ <string name="downloader_not_downloaded_yet">Belum diunduh</string>
+ <string name="common_choose_account">Pilih akun</string>
+ <string name="sync_fail_ticker">Sinkronisasi gagal</string>
+ <string name="sync_fail_content">Sinkronisasi %1$s tidak selesai</string>
+ <string name="sync_fail_content_unauthorized">Sandi salah untuk %1$s</string>
+ <string name="sync_conflicts_in_favourites_ticker">Konflik ditemukan</string>
+ <string name="sync_fail_in_favourites_content">Konten berkas %1$d tidak dapat disinkronasikan (%2$d konflik)</string>
+ <string name="sync_foreign_files_forgotten_ticker">Beberapa berkas lokal terlupakan</string>
+ <string name="sync_foreign_files_forgotten_content">%1$d berkas dari direktori %2$s tidak dapat disalin ke</string>
+ <string name="sync_current_folder_was_removed">Folder %1$s tidak ada lagi</string>
+ <string name="foreign_files_move">Pindahkan semua</string>
+ <string name="foreign_files_success">Semua berkas sudah dipindahkan</string>
+ <string name="foreign_files_fail">Beberapa berkas tidak dapat dipindahkan</string>
+ <string name="foreign_files_local_text">Lokal: %1$s</string>
+ <string name="foreign_files_remote_text">Jauh: %1$s</string>
+ <string name="pincode_enter_pin_code">Silakan masukkan PIN Apl</string>
+ <string name="pincode_configure_your_pin">Masukkan PIN Apl</string>
+ <string name="pincode_configure_your_pin_explanation">PIN akan selalu diminta setiap kali apl dijalankan</string>
+ <string name="pincode_reenter_your_pincode">Silakan masukkan ulang PIN Apl</string>
+ <string name="pincode_remove_your_pincode">Hapus PIN Apl</string>
+ <string name="pincode_mismatch">PIN Apl tidak sama</string>
+ <string name="pincode_wrong">PIN Apl salah</string>
+ <string name="pincode_removed">PIN Apl dihapus</string>
+ <string name="pincode_stored">PIN Apl disimpan</string>
+ <string name="media_notif_ticker">Pemutar musik %1$s</string>
+ <string name="media_state_playing">%1$s (dimainkan)</string>
+ <string name="media_state_loading">%1$s (sedang dimuat)</string>
+ <string name="media_err_nothing_to_play">Tidak ditemukan berkas media</string>
+ <string name="media_err_no_account">Tidak ada akun yang diberikan</string>
+ <string name="media_err_not_in_owncloud">Brkas tidak didalam akun yang sah</string>
+ <string name="media_err_unsupported">Kodek media tidak didukung</string>
+ <string name="media_err_io">Berkas media tidak dapat dibaca</string>
+ <string name="media_err_malformed">Berkas media tidak di enkode dengan benar</string>
+ <string name="media_err_timeout">Waktu habis saat mencoba untuk main</string>
+ <string name="media_err_invalid_progressive_playback">Berkas media tidak bisa dialirkan</string>
+ <string name="media_err_unknown">Berkas media tidak dapat dimainkan dengan pemutar media</string>
+ <string name="media_err_security_ex">Kesalahan keamanan saat mencoba memutar %1$s</string>
+ <string name="media_err_io_ex">Kesalahan masukkan saat mencoba memutar %1$s</string>
+ <string name="media_err_unexpected">Kesalahan tak terduga saat mencoba memutar %1$s</string>
+ <string name="media_rewind_description">Tombol mundur</string>
+ <string name="media_play_pause_description">Tombol main dan jeda</string>
+ <string name="media_forward_description">Tombol maju</string>
+ <string name="auth_trying_to_login">Mencoba untuk masuk...</string>
+ <string name="auth_no_net_conn_title">Tidak ada koneksi internet</string>
+ <string name="auth_nossl_plain_ok_title">Sambungan aman tidak tersedia</string>
+ <string name="auth_connection_established">Sambungan dibuat</string>
+ <string name="auth_testing_connection">Pengetesan koneksi ...</string>
+ <string name="auth_not_configured_title">Konfigurasi server cacat</string>
+ <string name="auth_account_not_new">Akun untuk pengguna dan server yang sama sudah ada dalam perangkat</string>
+ <string name="auth_account_not_the_same">Pengguna yang dimasukkan tidak cocok dengan pengguna akun ini</string>
+ <string name="auth_unknown_error_title">Terjadi kesalahan yang tidak diketahui!</string>
+ <string name="auth_unknown_host_title">Tidak menemukan host</string>
+ <string name="auth_incorrect_path_title">Instansi server tidak ditemukan</string>
+ <string name="auth_timeout_title">Server terlalu lama merespon</string>
+ <string name="auth_incorrect_address_title">Format URL salah</string>
+ <string name="auth_ssl_general_error_title">Menginisiasi SSL gagal</string>
+ <string name="auth_ssl_unverified_server_title">Tidak dapat memverifikasi identitas server SSL</string>
+ <string name="auth_bad_oc_version_title">Versi server tidak dikenal</string>
+ <string name="auth_wrong_connection_title">Tidak dapat membuat koneksi</string>
+ <string name="auth_secure_connection">Sambungan aman dibuat</string>
+ <string name="auth_unauthorized">Nama pengguna dan sandi salah</string>
+ <string name="auth_oauth_error">Otorisasi tidak berhasil</string>
+ <string name="auth_oauth_error_access_denied">Akses ditolak oleh server otorisasi</string>
+ <string name="auth_wtf_reenter_URL">Keadaan tak terduga, silahkan masukkan URL server yang lagi</string>
+ <string name="auth_expired_oauth_token_toast">Otorisasi Anda telah berakhir. Silakan mengotorisasi lagi</string>
+ <string name="auth_expired_basic_auth_toast">Silakan mesukkan sandi saat ini</string>
+ <string name="auth_expired_saml_sso_token_toast">Sesi Anda telah berakhir. Silakan masuk kembali</string>
+ <string name="auth_connecting_auth_server">Menyambungkan ke server otentikasi...</string>
+ <string name="auth_unsupported_auth_method">Server tidak mendukung medote otentikasi ini</string>
+ <string name="auth_unsupported_multiaccount">%1$s tidak mendukung banyak akun </string>
+ <string name="fd_keep_in_sync">Biarkan berkas tetap terbaru</string>
<string name="common_rename">Ubah nama</string>
- <string name="common_remove">hilangkan</string>
- <string name="ssl_validator_btn_details_hide">sembunyikan</string>
+ <string name="common_remove">Hapus</string>
+ <string name="confirmation_remove_alert">Apakah Anda yakin ingin menghapus %1$s ?</string>
+ <string name="confirmation_remove_folder_alert">Apakah Anda benar-benar ingin menghapus %1$s beserta isinya?</string>
+ <string name="confirmation_remove_local">Lokal saja</string>
+ <string name="confirmation_remove_folder_local">Konten lokal saja</string>
+ <string name="confirmation_remove_remote">Hapus dari server</string>
+ <string name="confirmation_remove_remote_and_local">Jarak jauh dan lokal</string>
+ <string name="remove_success_msg">Penghapusan berhasil</string>
+ <string name="remove_fail_msg">Penghapusan gagal</string>
+ <string name="rename_dialog_title">Masukkan nama baru</string>
+ <string name="rename_local_fail_msg">Salinan lokal tidak dapat diubah nama, coba dengan nama yang berbeda</string>
+ <string name="rename_server_fail_msg">Mengubah nama tidak selesai</string>
+ <string name="sync_file_fail_msg">Berkas jauh tidak dapat diperiksa</string>
+ <string name="sync_file_nothing_to_do_msg">Isi berkas sudah diselaraskan</string>
+ <string name="create_dir_fail_msg">Folder tidak dapat dibuat</string>
+ <string name="filename_forbidden_characters">Karakter yang dilarang: / \\ < > : \" | ? *</string>
+ <string name="wait_a_moment">Tunggu sejenak</string>
+ <string name="filedisplay_unexpected_bad_get_content">Masalah tidak terduga, silahkan pilih berkas dari apl yang berbeda</string>
+ <string name="filedisplay_no_file_selected">Tidak ada berkas yang terpilih</string>
+ <string name="oauth_check_onoff">Masuk dengan oAuth2</string>
+ <string name="oauth_login_connection">Menyambungkan ke server oAuth2...</string>
+ <string name="ssl_validator_header">Identitas situs tidak dapat diverfikasi</string>
+ <string name="ssl_validator_reason_cert_not_trusted">- Sertifikat server tidak terpercaya</string>
+ <string name="ssl_validator_reason_cert_expired">- Sertifikat server kadaluarsa</string>
+ <string name="ssl_validator_reason_cert_not_yet_valid">- Tanggal sertifikat server yang valid adalah di masa depan</string>
+ <string name="ssl_validator_reason_hostname_not_verified">- URL tidak cocok dengan nama host dalam sertifikat</string>
+ <string name="ssl_validator_question">Apakah Anda percaya dengan sertifikat ini?</string>
+ <string name="ssl_validator_not_saved">Sertifikat tidak dapat disimpan</string>
+ <string name="ssl_validator_btn_details_see">Rincian</string>
+ <string name="ssl_validator_btn_details_hide">Sembunyikan</string>
+ <string name="ssl_validator_label_subject">Diterbitkan untuk:</string>
+ <string name="ssl_validator_label_issuer">Diterbitkan oleh:</string>
+ <string name="ssl_validator_label_CN">Nama panggilan:</string>
+ <string name="ssl_validator_label_O">Organisasi:</string>
+ <string name="ssl_validator_label_OU">Unit Organisasi:</string>
+ <string name="ssl_validator_label_C">Negara:</string>
+ <string name="ssl_validator_label_ST">Negara bagian:</string>
+ <string name="ssl_validator_label_L">Lokasi:</string>
+ <string name="ssl_validator_label_validity">Masa berlaku:</string>
+ <string name="ssl_validator_label_validity_from">Dari:</string>
+ <string name="ssl_validator_label_validity_to">Untuk:</string>
+ <string name="ssl_validator_label_signature">Tanda tangan:</string>
+ <string name="ssl_validator_label_signature_algorithm">Algoritma:</string>
+ <string name="placeholder_sentence">Ini adalah placeholder</string>
+ <string name="placeholder_filename">placeholder.txt</string>
+ <string name="placeholder_filetype">Gambar PNG</string>
+ <string name="placeholder_filesize">389 KB</string>
+ <string name="placeholder_timestamp">18/05/2012 12:23 PM</string>
+ <string name="placeholder_media_time">12:23:45</string>
+ <string name="instant_upload_on_wifi">Hanya unggah gambar via WiFi</string>
+ <string name="instant_upload_path">/UnggahInstan</string>
+ <string name="conflict_title">Perbarui benturan</string>
+ <string name="conflict_message">Berkas jauh %s tidak sinkron dengan berkas lokal. Melanjutkan akan menggantikan konten berkas di server.</string>
+ <string name="conflict_keep_both">Biarkan keduannya</string>
+ <string name="conflict_overwrite">Timpa</string>
+ <string name="conflict_dont_upload">Jangan mengunggah</string>
+ <string name="preview_image_description">Pratilik gambar</string>
+ <string name="preview_image_error_unknown_format">Gambar ini tidak dapat ditampilkan</string>
+ <string name="error__upload__local_file_not_copied">%1$s tidak dapat disalin ke direktori lokal %2$s</string>
+ <string name="actionbar_failed_instant_upload">UnggahInsatan Gagal</string>
+ <string name="failed_upload_headline_text">Unggahan instan gagal</string>
+ <string name="failed_upload_headline_hint">Ringkasan dari semua unggahan instan yang gagal</string>
+ <string name="failed_upload_all_cb">pilih semua</string>
+ <string name="failed_upload_headline_retryall_btn">Ulangi semua yang terpilih</string>
+ <string name="failed_upload_headline_delete_all_btn">hapus semua yang terpilih dari antrian unggahan</string>
+ <string name="failed_upload_retry_text">ulangi unggah gambar:</string>
+ <string name="failed_upload_load_more_images">Muat Gambar selengkapnya</string>
+ <string name="failed_upload_retry_do_nothing_text">Tidak melakukan apapun, Anda tidak sedang online</string>
+ <string name="failed_upload_failure_text">Pesan Kegagalan:</string>
+ <string name="failed_upload_quota_exceeded_text">Silakan periksa konfigurasi server Anda, kemungkinan kuota terlampaui.</string>
</resources>
<string name="actionbar_settings">Stillingar</string>
<string name="prefs_category_more">Meira</string>
<string name="prefs_help">Hjálp</string>
- <string name="auth_host_url">Host nafn netþjóns</string>
<string name="auth_username">Notendanafn</string>
<string name="auth_password">Lykilorð</string>
<string name="sync_string_files">Skrár</string>
<string name="recommend_subject">Prova %1$s sul tuo smartphone!</string>
<string name="recommend_text">Vorrei invitarti ad usare %1$s sul tuo smartphone!⏎\nScarica qui: %2$s</string>
<string name="auth_check_server">Verifica server</string>
- <string name="auth_host_url">Indirizzo del server</string>
+ <string name="auth_host_url">Indirizzo server https://...</string>
<string name="auth_username">Nome utente</string>
<string name="auth_password">Password</string>
<string name="auth_register">Prima volta su %1$s?</string>
<string name="recommend_subject">スマートフォンで %1$s を試してください!</string>
<string name="recommend_text">スマートフォンで %1$s を利用してみませんか!\nここからダウンロードしてください: %2$s</string>
<string name="auth_check_server">サーバーを確認する</string>
- <string name="auth_host_url">ã\82µã\83¼ã\83\90ã\82¢ã\83\89ã\83¬ã\82¹</string>
+ <string name="auth_host_url">ã\82µã\83¼ã\83\90ã\83¼ã\82¢ã\83\89ã\83¬ã\82¹ https://â\80¦</string>
<string name="auth_username">ユーザー名</string>
<string name="auth_password">パスワード</string>
<string name="auth_register">%1$sは初めてですか?</string>
<string name="prefs_help">დახმარება</string>
<string name="prefs_feedback">უკუკავშირი</string>
<string name="prefs_imprint">ბეჭედი</string>
- <string name="auth_host_url">სერვერის მისამართი</string>
<string name="auth_username">მომხმარებლის სახელი</string>
<string name="auth_password">პაროლი</string>
<string name="sync_string_files">ფაილები</string>
<string name="prefs_feedback">피드백</string>
<string name="prefs_imprint">임프린트</string>
<string name="recommend_subject">%1$s 을 스마트폰에서 사용해보세요!</string>
+ <string name="recommend_text">당신을 %1$s 로 초대합니다!\n여기서 받으세요: %2$s</string>
<string name="auth_check_server">서버 확인</string>
- <string name="auth_host_url">서버 주소</string>
+ <string name="auth_host_url">서버 주소 https://…</string>
<string name="auth_username">사용자 이름</string>
<string name="auth_password">암호</string>
<string name="auth_register">%1$s의 새로운 사용자입니까?</string>
<string name="media_err_unsupported">지원하지 않는 미디어 코덱</string>
<string name="media_err_io">미디어 파일을 읽을수 </string>
<string name="media_err_malformed">미디어 파일이 제대로 인코드 되지 않았습니다</string>
+ <string name="media_err_timeout">재생 시도 중 시간이 초과됨</string>
<string name="media_err_invalid_progressive_playback">미디어 파일을 스트리밍 할수 없습니다</string>
<string name="media_err_unknown">내장된 미디어 플레이어에서는 이 미디어 파일을 재생할수 없습니다</string>
<string name="media_err_security_ex">%1$s 를 재생하는 중에 보안오류가 발생함</string>
<string name="auth_connection_established">연결됨</string>
<string name="auth_testing_connection">연결 테스트 중...</string>
<string name="auth_not_configured_title">서버 설정이 잘못됨</string>
+ <string name="auth_account_not_new">같은 사용자와 서버에 대한 계정이 이미 존재합니다</string>
+ <string name="auth_account_not_the_same">입력된 사용자가 이 계정의 사용자와 일치하지 않음</string>
<string name="auth_unknown_error_title">알 수 없는 오류가 발생하였습니다!</string>
<string name="auth_unknown_host_title">호스트를 찾을 수 없음</string>
<string name="auth_incorrect_path_title">서버 인스턴스를 찾을 수 없음</string>
<string name="sync_file_fail_msg">원격 파일을 확인할 수 없었습니다</string>
<string name="sync_file_nothing_to_do_msg">파일 내용이 이미 동기화되었습니다</string>
<string name="create_dir_fail_msg">디렉터리를 만들 수 없었습니다</string>
+ <string name="filename_forbidden_characters">사용할수 없는 문자들: / \\ < > : \" | ? *</string>
<string name="wait_a_moment">잠시 기다려 주십시오</string>
<string name="filedisplay_unexpected_bad_get_content">예상하지 못한 오류입니다. 다른 앱에서 파일을 선택하십시오</string>
<string name="filedisplay_no_file_selected">선택한 파일 없음</string>
<string name="ssl_validator_label_signature_algorithm">알고리즘:</string>
<string name="placeholder_sentence">이것은 플레이스홀더입니다</string>
<string name="placeholder_filename">placeholder.txt</string>
- <string name="placeholder_filetype">PNG í\8c\8cì\9d¼</string>
+ <string name="placeholder_filetype">PNG 그림</string>
<string name="placeholder_filesize">389 KB</string>
<string name="placeholder_timestamp">2012/05/18 12:23 PM</string>
<string name="placeholder_media_time">12:23:45</string>
<string name="preview_image_description">그림 미리보기</string>
<string name="preview_image_error_unknown_format">이 그림을 볼수 없습니다</string>
<string name="error__upload__local_file_not_copied">%1$s를 %2$s 로컬 디렉토리로 복사하지 못했습니다.</string>
+ <string name="actionbar_failed_instant_upload">자동 업로드가 실패했습니다</string>
<string name="failed_upload_headline_text">자동 업로드 실패함</string>
<string name="failed_upload_headline_hint">실패된 자동 업로드 전체 요약</string>
<string name="failed_upload_all_cb">전체 선택</string>
<string name="failed_upload_headline_delete_all_btn">선택된 업로드 큐 전체 삭제</string>
<string name="failed_upload_retry_text">이미지 업로드 재시도:</string>
<string name="failed_upload_load_more_images">더 많은 사진 불러오기</string>
+ <string name="failed_upload_retry_do_nothing_text">현재 온라인이 아니셔서 자동 업로드를 할수 없습니다</string>
<string name="failed_upload_failure_text">실패 메시지:</string>
<string name="failed_upload_quota_exceeded_text">서버 설정을 확인해주세요, 아마 업로드 제한을 초과하셨을겁니다.</string>
</resources>
<string name="actionbar_upload">بارکردن</string>
<string name="actionbar_settings">دهستكاری</string>
<string name="prefs_help">یارمەتی</string>
- <string name="auth_host_url">ناونیشانی ڕاژه</string>
<string name="auth_username">ناوی بهکارهێنهر</string>
<string name="auth_password">وشەی تێپەربو</string>
<string name="uploader_btn_upload_text">بارکردن</string>
<string name="prefs_pincode">App PIN</string>
<string name="prefs_help">Hëllef</string>
<string name="prefs_feedback">Feedback</string>
- <string name="auth_host_url">Server Adress</string>
<string name="auth_username">Benotzernumm</string>
<string name="auth_password">Passwuert</string>
<string name="sync_string_files">Dateien</string>
<string name="recommend_subject">Išbandykite %1$s savo išmaniajame telefone!</string>
<string name="recommend_text">Siūlau pabandyti %1$s savo išmaniajame telefone!\nParsisiųskite štai čia: %2$s</string>
<string name="auth_check_server">Patikrinti Serverį</string>
- <string name="auth_host_url">Serverio adresas</string>
<string name="auth_username">Prisijungimo vardas</string>
<string name="auth_password">Slaptažodis</string>
<string name="sync_string_files">Failai</string>
<string name="prefs_instant_upload">Aktivēt tūlītējo augšupielādēšanu</string>
<string name="prefs_instant_upload_summary">Nekavējoties augšupielādēt kameras uzņemtos attēlus</string>
<string name="prefs_help">Palīdzība</string>
- <string name="auth_host_url">Servera adrese</string>
<string name="auth_username">Lietotājvārds</string>
<string name="auth_password">Parole</string>
<string name="sync_string_files">Datnes</string>
<string name="prefs_help">Помош</string>
<string name="prefs_recommend">Препорачај на пријател</string>
<string name="prefs_feedback">Повратен одговор</string>
- <string name="auth_host_url">Адреса на сервер</string>
<string name="auth_username">Корисничко име</string>
<string name="auth_password">Лозинка</string>
<string name="sync_string_files">Датотеки</string>
<string name="prefs_accounts">Akaun</string>
<string name="prefs_pincode">PIN App</string>
<string name="prefs_help">Bantuan</string>
- <string name="auth_host_url">Alamat pelayan</string>
<string name="auth_username">Nama pengguna</string>
<string name="auth_password">Kata laluan</string>
<string name="sync_string_files">Fail-fail</string>
<string name="prefs_accounts">Kontoer</string>
<string name="prefs_instant_upload_summary">Last opp bilder tatt med kamera øyeblikkelig</string>
<string name="prefs_help">Hjelp</string>
- <string name="auth_host_url">Server-adresse</string>
<string name="auth_username">Brukernavn</string>
<string name="auth_password">Passord</string>
<string name="sync_string_files">Filer</string>
<string name="recommend_subject">Probeer %1$s op uw smartphone!</string>
<string name="recommend_text">Uitnodiging om %1$s op uw smartphone uit te proberen!\nDownload hier: %2$s</string>
<string name="auth_check_server">Controleer server</string>
- <string name="auth_host_url">Server adres</string>
+ <string name="auth_host_url">Serveradres https://…</string>
<string name="auth_username">Gebruikersnaam</string>
<string name="auth_password">Wachtwoord</string>
<string name="auth_register">Nieuw bij %1$s?</string>
<string name="prefs_instant_upload_summary">Last opp kamerabilete med ein gong du tek dei</string>
<string name="prefs_help">Hjelp</string>
<string name="prefs_imprint">Impressum</string>
- <string name="auth_host_url">Tenaradresse</string>
<string name="auth_username">Brukarnamn</string>
<string name="auth_password">Passord</string>
<string name="sync_string_files">Filer</string>
<string name="prefs_log_title">ਲਾਗ ਰੱਖਣਾ ਚਾਲੂ</string>
<string name="prefs_log_title_history">ਲਾਗ ਰੱਖਣ ਅਤੀਤ</string>
<string name="prefs_log_delete_history_button">ਅਤੀਤ ਹਟਆਓ</string>
- <string name="auth_host_url">ਸਰਵਰ ਐਡਰੈਸ</string>
<string name="auth_username">ਯੂਜ਼ਰ-ਨਾਂ</string>
<string name="auth_password">ਪਾਸਵਰ</string>
<string name="auth_register">%1$s ਲਈ ਨਵੇਂ ਹੋ?</string>
<string name="recommend_subject">Wypróbuj %1$s na swoim smartphonie!</string>
<string name="recommend_text">Chcę was zaprosić do korzystania z %1$ s na twoim smartfonie!\nPobierz tutaj: %2$s</string>
<string name="auth_check_server">Sprawdź serwer</string>
- <string name="auth_host_url">Adres Serwera</string>
+ <string name="auth_host_url">Adres serwera https://...</string>
<string name="auth_username">Nazwa użytkownika</string>
<string name="auth_password">Hasło</string>
<string name="auth_register">Nowe %1$s?</string>
<string name="sync_file_fail_msg">Nie można sprawdzić zdalnego pliku</string>
<string name="sync_file_nothing_to_do_msg">Zawartość pliku została już synchronizowana</string>
<string name="create_dir_fail_msg">Nie można utworzyć katalogu</string>
+ <string name="filename_forbidden_characters">Znaki zabronione: / \\ < > : \" | ? *</string>
<string name="wait_a_moment">Poczekaj chwilę</string>
<string name="filedisplay_unexpected_bad_get_content">Nieoczekiwany problem; spróbuj wybrać plik z innej aplikacji</string>
<string name="filedisplay_no_file_selected">Nie wybrano żadnych plików</string>
<string name="preview_image_description">Podgląd</string>
<string name="preview_image_error_unknown_format">Obraz nie może zostać wyświetlony</string>
<string name="error__upload__local_file_not_copied">%1$s nie może zostać skopiowany do lokalnego %2$s katalogu</string>
+ <string name="actionbar_failed_instant_upload">InstantUpload nie powiódł się</string>
<string name="failed_upload_headline_text">Błąd automatycznego przesyłania</string>
<string name="failed_upload_headline_hint">Podsumowanie wszystkich nieudanych transferów</string>
<string name="failed_upload_all_cb">zaznacz wszystkie</string>
<string name="recommend_subject">Tentar %1$s em seu smartfone!</string>
<string name="recommend_text">Gostaria de lhe convidar para usar %1$s em seu smartfone!\nBaixe aqui: %2$s</string>
<string name="auth_check_server">Verificar Servidor</string>
- <string name="auth_host_url">Endereço do servidor</string>
+ <string name="auth_host_url">Endereço do servidor https://...</string>
<string name="auth_username">Nome de usuário</string>
<string name="auth_password">Senha</string>
<string name="auth_register">Novo para %1$s?</string>
<string name="recommend_subject">Experimente %1$s no seu smartphone!</string>
<string name="recommend_text">Quero convidá-lo para experimentar %1$s no seu smartphone!\nDescarregue aqui: %2$s</string>
<string name="auth_check_server">Verificar Servidor</string>
- <string name="auth_host_url">Endereço do servidor</string>
+ <string name="auth_host_url">Endereço do servidor https://..</string>
<string name="auth_username">Nome de Utilizador</string>
<string name="auth_password">Palavra-passe</string>
<string name="auth_register">Novo em %1$s?</string>
<string name="prefs_manage_accounts">Administrare conturi</string>
<string name="prefs_instant_upload">Activează încărcarea instant</string>
<string name="prefs_help">Ajutor</string>
- <string name="auth_host_url">Adresa server-ului</string>
<string name="auth_username">Nume utilizator</string>
<string name="auth_password">Parolă</string>
<string name="sync_string_files">Fișiere</string>
<string name="prefs_instant_upload">Включить немедленную загрузку</string>
<string name="prefs_instant_upload_summary">Мгновенно загрузить фотографии, сделанные камерой</string>
<string name="prefs_help">Помощь</string>
- <string name="auth_host_url">URL</string>
<string name="auth_username">Имя пользователя</string>
<string name="auth_password">Пароль</string>
<string name="auth_register">Я новичок в %1$s</string>
<string name="recommend_subject">Попробуйте %1$s на вашем смартфоне!</string>
<string name="recommend_text">Хочу предложить вам пользоваться %1$s на вашем смартфоне!\nДля загрузки: %2$s</string>
<string name="auth_check_server">Проверить сервер</string>
- <string name="auth_host_url">Адрес сервера</string>
+ <string name="auth_host_url">Адрес сервера https://...</string>
<string name="auth_username">Пользователь</string>
<string name="auth_password">Пароль</string>
<string name="auth_register">Впервые с %1$s?</string>
<string name="prefs_instant_upload">ක්ෂණික උඩුගත කිරීම් සක්රිය කරන්න</string>
<string name="prefs_instant_upload_summary">කැමරාවෙන් ගත් රූප ක්ෂණිකව උඩුගත කරන්න</string>
<string name="prefs_help">උදව්</string>
- <string name="auth_host_url">සේවාදායකයේ ලිපිනය</string>
<string name="auth_username">පරිශීලක නම</string>
<string name="auth_password">මුර පදය</string>
<string name="sync_string_files">ගොනු</string>
<string name="recommend_subject">Skúste %1$s na vašom telefóne!</string>
<string name="recommend_text">Chcem vás pozvať na používanie %1$s na vašom smartphone!\nNa stiahnutie tu: %2$s</string>
<string name="auth_check_server">Skontrolovať Server</string>
- <string name="auth_host_url">Adresa servera</string>
+ <string name="auth_host_url">Adresa servera https://...</string>
<string name="auth_username">Používateľské meno</string>
<string name="auth_password">Heslo</string>
<string name="auth_register">Ste nový v %1$s?</string>
<?xml version='1.0' encoding='UTF-8'?>
-<resources/>
+<resources>
+ <string name="actionbar_settings">Nastavenia</string>
+ <string name="prefs_category_general">Všeobecné</string>
+ <string name="filedetails_download">Stiahnuť</string>
+ <string name="common_cancel">Zrušiť</string>
+</resources>
<string name="recommend_subject">Preizkusi %1$s na pametnem telefonu!</string>
<string name="recommend_text">Želim ti predstaviti program %1$s za pametni telefon!\nPrejmeš ga lahko na: %2$s</string>
<string name="auth_check_server">Preveri strežnik</string>
- <string name="auth_host_url">Naslov strežnika</string>
+ <string name="auth_host_url">Naslov strežnika https://…</string>
<string name="auth_username">Uporabniško ime</string>
<string name="auth_password">Geslo</string>
<string name="auth_register">Ali ste novi uporabnik sistema %1$s?</string>
<resources>
<string name="actionbar_upload">Pošalji</string>
<string name="actionbar_upload_files">Fajlovi</string>
+ <string name="actionbar_mkdir">Novi folder</string>
<string name="actionbar_settings">Podešavanja</string>
+ <string name="actionbar_see_details">Detaljnije</string>
+ <string name="prefs_category_general">Opšte</string>
+ <string name="prefs_accounts">Nalozi</string>
+ <string name="prefs_manage_accounts">Upravljaj nalozima</string>
<string name="prefs_help">Pomoć</string>
<string name="auth_username">Korisničko ime</string>
<string name="auth_password">Lozinka</string>
<string name="sync_string_files">Fajlovi</string>
<string name="uploader_btn_upload_text">Pošalji</string>
+ <string name="uploader_wrn_no_account_title">Nalog nije nađen</string>
+ <string name="uploader_info_uploading">Šalje se</string>
+ <string name="filedetails_size">Veličina:</string>
+ <string name="filedetails_type">Tip:</string>
<string name="filedetails_download">Preuzmi</string>
<string name="common_yes">Da</string>
<string name="common_no">Ne</string>
<string name="common_cancel">Otkaži</string>
<string name="common_error">Greška</string>
<string name="change_password">Izmeni lozinku</string>
+ <string name="delete_account">Ukloni nalog</string>
+ <string name="create_account">Novi nalog</string>
+ <string name="uploader_upload_in_progress_ticker">Otpremanje...</string>
+ <string name="uploader_upload_succeeded_ticker">Uspešno otpremljeno</string>
+ <string name="uploader_upload_failed_ticker">Otpremanje nije uspelo</string>
+ <string name="downloader_download_in_progress_ticker">Preuzimanje...</string>
+ <string name="downloader_download_succeeded_ticker">Uspešno preuzeto</string>
+ <string name="downloader_download_failed_ticker">Preuzimanje nije uspelo</string>
+ <string name="common_choose_account">Odaberite nalog</string>
+ <string name="auth_no_net_conn_title">Nema konekcije</string>
+ <string name="auth_nossl_plain_ok_title">Sigurna konekcija nije dostupna.</string>
+ <string name="auth_connection_established">Konekcija uspostavljena</string>
+ <string name="common_rename">Preimenij</string>
+ <string name="common_remove">Ukloni</string>
+ <string name="confirmation_remove_alert">Da li želite da uklonite %1$s ?</string>
+ <string name="remove_success_msg">Uklanjanje je uspelo</string>
+ <string name="remove_fail_msg">Uklanjanje nije uspelo</string>
+ <string name="wait_a_moment">Molim pričekajte</string>
+ <string name="ssl_validator_btn_details_see">Detaljnije</string>
+ <string name="ssl_validator_btn_details_hide">Sakrij</string>
+ <string name="ssl_validator_label_O">Organizacija:</string>
+ <string name="ssl_validator_label_C">Država:</string>
+ <string name="ssl_validator_label_L">Lokacija:</string>
+ <string name="ssl_validator_label_validity_from">Od:</string>
+ <string name="ssl_validator_label_validity_to">Za:</string>
+ <string name="ssl_validator_label_signature">Potpis:</string>
+ <string name="conflict_keep_both">Zadrži oboje</string>
</resources>
<string name="prefs_accounts">Налози</string>
<string name="prefs_instant_upload_summary">Тренутно отпремај фотографије сликане камером</string>
<string name="prefs_help">Помоћ</string>
- <string name="auth_host_url">Адреса сервера</string>
<string name="auth_username">Корисничко име</string>
<string name="auth_password">Лозинка</string>
<string name="sync_string_files">Фајлови</string>
<string name="recommend_subject">Försök %1$s på din smarttelefon!</string>
<string name="recommend_text">Jag vill bjuda in dig till att anända %1$s på din smarttelefon!\nLadda ner här: %2$s</string>
<string name="auth_check_server">Kontrollera Server</string>
- <string name="auth_host_url">Serveradress</string>
<string name="auth_username">Användarnamn</string>
<string name="auth_password">Lösenord</string>
<string name="auth_register">Ny på %1$s?</string>
<string name="prefs_instant_upload">உடனடி பதிவேற்றலை இயலுமைப்படுத்துக</string>
<string name="prefs_instant_upload_summary">கமராவினால் எடுக்கப்பட்ட படங்கள் உடனடியாக பதிவேற்றப்பட்டன</string>
<string name="prefs_help">உதவி</string>
- <string name="auth_host_url">சேவையக முகவரி</string>
<string name="auth_username">பயனாளர் பெயர்</string>
<string name="auth_password">கடவுச்சொல்</string>
<string name="sync_string_files">கோப்புகள்</string>
<string name="actionbar_settings">అమరికలు</string>
<string name="prefs_category_more">మరిన్ని</string>
<string name="prefs_help">సహాయం</string>
- <string name="auth_host_url">సేవకి చిరునామా</string>
<string name="auth_username">వాడుకరి పేరు</string>
<string name="auth_password">సంకేతపదం</string>
<string name="common_yes">అవును</string>
<string name="prefs_instant_upload">เปิดใช้งานระบบอัพโหลดได้ทันที</string>
<string name="prefs_instant_upload_summary">อัพโหลดรูปภาพจากกล้องขึ้นไปทันที</string>
<string name="prefs_help">ช่วยเหลือ</string>
- <string name="auth_host_url">ที่อยู่เซิร์ฟเวอร์</string>
<string name="auth_username">ชื่อผู้ใช้</string>
<string name="auth_password">รหัสผ่าน</string>
<string name="sync_string_files">ไฟล์</string>
<string name="about_android">%1$s Android Uygulaması</string>
<string name="about_version">sürüm %1$s</string>
<string name="actionbar_sync">Hesabı yenile</string>
- <string name="actionbar_upload">Dosya yükle</string>
+ <string name="actionbar_upload">Yükle</string>
<string name="actionbar_upload_from_apps">Diğer uygulamalardan içerik</string>
<string name="actionbar_upload_files">Dosyalar</string>
<string name="actionbar_open_with">ile aç</string>
- <string name="actionbar_mkdir">Klasör oluştur</string>
+ <string name="actionbar_mkdir">Dizin oluştur</string>
<string name="actionbar_settings">Ayarlar</string>
<string name="actionbar_see_details">Detaylar</string>
<string name="prefs_category_general">Genel</string>
<string name="recommend_subject">%1$s uygulamasını akıllı telefonunda dene!</string>
<string name="recommend_text">Sana, akıllı telefonunda kullanmak üzere %1$s daveti yapıyorum!\nBuradan indirebilirsin: %2$s</string>
<string name="auth_check_server">Sunucuyu kontrol et</string>
- <string name="auth_host_url">Sunucu Adresi</string>
+ <string name="auth_host_url">Sunucu Adresi https://…</string>
<string name="auth_username">Kullanıcı Adi:</string>
<string name="auth_password">Şifre:</string>
<string name="auth_register">%1$s senin için yeni mi?</string>
<string name="setup_btn_connect">Bağlan</string>
<string name="uploader_btn_upload_text">Yükle</string>
<string name="uploader_top_message">Yükleme dizinini seçiniz:</string>
- <string name="uploader_wrn_no_account_title">Hesap bulunamadi</string>
- <string name="uploader_wrn_no_account_text">Cihazınızda %1$s hesabı bulunmamaktadır. Lütfen öncelikle bir hesap ayarı giriniz.</string>
+ <string name="uploader_wrn_no_account_title">Hesap bulunamadı</string>
+ <string name="uploader_wrn_no_account_text">Cihazınızda %1$s hesabı bulunmamaktadır. Lütfen öncelikle bir hesap ayarlayın.</string>
<string name="uploader_wrn_no_account_setup_btn_text">Kurulum</string>
<string name="uploader_wrn_no_account_quit_btn_text">Çıkış</string>
<string name="uploader_wrn_no_content_title">Yüklenecek içerik yok</string>
<string name="uploader_error_forbidden_content">%1$s, paylaşılan içeriğe erişim izni vermiyor</string>
<string name="uploader_info_uploading">Yükleniyor</string>
<string name="file_list_empty">Klasörde dosya yok. Yeni dosyalar yükle\'ye tıklayarak eklenebilir.</string>
- <string name="filedetails_select_file">Ek bilgileri görmek için dosyaya tıklayınız.</string>
+ <string name="filedetails_select_file">Ek bilgileri görmek için dosyaya dokunun.</string>
<string name="filedetails_size">Boyut:</string>
<string name="filedetails_type">Tür:</string>
<string name="filedetails_created">Oluşturulma:</string>
<string name="downloader_not_downloaded_yet">Henüz indirilemedi</string>
<string name="common_choose_account">Hesap seçiniz</string>
<string name="sync_fail_ticker">Eşitleme başarısız</string>
- <string name="sync_fail_content">%1$s Senkronizasyonu tamamlanamadı</string>
+ <string name="sync_fail_content">%1$s eşitlemesi tamamlanamadı</string>
<string name="sync_fail_content_unauthorized">%1$s için geçersiz parola</string>
<string name="sync_conflicts_in_favourites_ticker">Çakışma bulundu</string>
- <string name="sync_conflicts_in_favourites_content">%1$d korumalı senkronizasyon dosyası, senkronize edilemedi</string>
- <string name="sync_fail_in_favourites_ticker">Korunan dosya senkronizasyonu başarısız</string>
- <string name="sync_fail_in_favourites_content">%1$d dosya senkronize edilemedi (%2$d hata)</string>
+ <string name="sync_conflicts_in_favourites_content">%1$d korumalı eşitleme dosyası, eşitlenemedi</string>
+ <string name="sync_fail_in_favourites_ticker">Korunan dosya eşitlemesi başarısız</string>
+ <string name="sync_fail_in_favourites_content">%1$d dosya eşitlenemedi (%2$d çakışma)</string>
<string name="sync_foreign_files_forgotten_ticker">Bazı yerel dosyalar unutuldu</string>
<string name="sync_foreign_files_forgotten_content">%1$d dosya %2$s dizinine kopyalanamadı</string>
<string name="sync_foreign_files_forgotten_explanation">1.3.16 sürümünden sonra, bu aygıttan yüklenen dosyalar bir dosya birden fazla hesapla eşitlendiğinde veri kaybının önlenebilmesi için %1$s yerel klasörüne kopyalanır.\n\nBu değişiklikten dolayı, bu uygulamanın yüklenmiş tüm önceki sürümündeki dosyalar %2$s klasörüne kopyalandı. Ancak hesap eşitlenmesi sırasında bu işlemin tamamlanmasını engelleyen bir hata oluştu. Dosyayı/dosyaları olduğu gibi bırakabilir ve %3$s bağlantısını kaldırabilirsiniz veya dosyayı/dosyaları %1$s dizinine taşıyıp %4$s bağlantılarını koruyabilirsiniz.\n\nAşağıda listelenenler yerel dosyalar ve bağlı oldukları %5$s içerisindeki uzak dosyalardır.</string>
<string name="media_err_security_ex">%1$s oynatılmaya çalışılırken güvenlik hatası oluştu</string>
<string name="media_err_io_ex">%1$s oynatılmaya çalışılırken girdi hatası oluştu</string>
<string name="media_err_unexpected">%1$s oynatılmaya çalışılırken beklenmeyen bir hata oluştu</string>
- <string name="media_rewind_description">Başa sar butonu</string>
- <string name="media_play_pause_description">Oynat veya duraklat butonu</string>
- <string name="media_forward_description">Hızlı ileri butonu</string>
+ <string name="media_rewind_description">Başa sar düğmesi</string>
+ <string name="media_play_pause_description">Oynat veya duraklat düğmesi</string>
+ <string name="media_forward_description">Hızlı ileri düğmesi</string>
<string name="auth_trying_to_login">Giriş için deneniyor</string>
<string name="auth_no_net_conn_title">Ağ bağlantısı yok</string>
<string name="auth_nossl_plain_ok_title">Günvenli bağlantı mevcut değil.</string>
<string name="auth_account_not_the_same">Girilen kullanıcı bu hesabın kullanıcısı ile eşleşmiyor</string>
<string name="auth_unknown_error_title">Bilinmeyen hata oluştu.</string>
<string name="auth_unknown_host_title">Anabilgisayar bulunamadı</string>
- <string name="auth_incorrect_path_title">sunucu servisi bulunamadı.</string>
+ <string name="auth_incorrect_path_title">Sunucu örneği bulunamadı.</string>
<string name="auth_timeout_title">Sunucu çok geç cevap veriyor</string>
<string name="auth_incorrect_address_title">Hatalı biçimlendirilmiş URL</string>
<string name="auth_ssl_general_error_title">SSL başlatılmasında hata</string>
<string name="rename_local_fail_msg">Yerel kopya adlandırılamaz; farklı bir ad deneyin</string>
<string name="rename_server_fail_msg">Yeniden adlandırılma tamamlanmadı</string>
<string name="sync_file_fail_msg">Dosya teslim edilemedi</string>
- <string name="sync_file_nothing_to_do_msg">Dosyalar başarıyla senkronize edildi</string>
+ <string name="sync_file_nothing_to_do_msg">Dosya içerikleri zaten eşitlenmiş</string>
<string name="create_dir_fail_msg">Dizin oluşturulamadı</string>
<string name="filename_forbidden_characters">Yasaklı karakterler: / \\ < > : \" | ? *</string>
<string name="wait_a_moment">Bir süre bekleyin</string>
<string name="instant_upload_on_wifi">Resimleri sadece WiFi bağlantısında yükle</string>
<string name="instant_upload_path">/AnındaYükle</string>
<string name="conflict_title">Çakışmayı güncelle</string>
- <string name="conflict_message">Uzaktaki %s dosyası, yerel dosya ile senkronize edilemedi. işleme devam etmek sunucudaki dosyanın içeriğini değiştirecektir.</string>
+ <string name="conflict_message">Uzaktaki %s dosyası, yerel dosya ile eşitlenemedi. İşleme devam etmek sunucudaki dosyanın içeriğini değiştirecektir.</string>
<string name="conflict_keep_both">İkisini de koru</string>
<string name="conflict_overwrite">Üzerine yaz</string>
<string name="conflict_dont_upload">Yükleme</string>
<string name="prefs_accounts">ھېساباتلار</string>
<string name="prefs_help">ياردەم</string>
<string name="prefs_feedback">قايتۇرما ئىنكاس</string>
- <string name="auth_host_url">مۇلازىمېتىر ئادرىسى</string>
<string name="auth_username">ئىشلەتكۈچى ئاتى</string>
<string name="auth_password">ئىم</string>
<string name="sync_string_files">ھۆججەتلەر</string>
<string name="prefs_help">Допомога</string>
<string name="prefs_feedback">Зворотній зв\'язок</string>
<string name="prefs_imprint">Відбиток</string>
- <string name="auth_host_url">Адреса сервера</string>
<string name="auth_username">Ім\'я користувача</string>
<string name="auth_password">Пароль</string>
<string name="sync_string_files">Файли</string>
--- /dev/null
+<?xml version='1.0' encoding='UTF-8'?>
+<resources/>
<string name="prefs_log_delete_history_button">Xóa lịch sử</string>
<string name="prefs_help">Giúp đỡ</string>
<string name="auth_check_server">Kiểm tra máy chủ</string>
- <string name="auth_host_url">Địa chỉ máy chủ</string>
<string name="auth_username">Tên người dùng</string>
<string name="auth_password">Mật khẩu</string>
<string name="auth_register">Lần đầu mới đến %1$s?</string>
<string name="prefs_feedback">反馈</string>
<string name="prefs_imprint">版本说明</string>
<string name="auth_check_server">检查服务器</string>
- <string name="auth_host_url">服务器地址</string>
<string name="auth_username">用户名</string>
<string name="auth_password">密码</string>
<string name="sync_string_files">文件</string>
<string name="prefs_feedback">反饋</string>
<string name="prefs_imprint">法律聲明</string>
<string name="auth_check_server">檢查伺服器</string>
- <string name="auth_host_url">伺服器位址</string>
<string name="auth_username">使用者名稱</string>
<string name="auth_password">密碼</string>
<string name="auth_register">新增到 %1$s?</string>
<string name="recommend_text">"I want to invite you to use %1$s on your smartphone!\nDownload here: %2$s"</string>
<string name="auth_check_server">Check Server</string>
- <string name="auth_host_url">Server address</string>
+ <string name="auth_host_url">Server address https://…</string>
<string name="auth_username">Username</string>
<string name="auth_password">Password</string>
<string name="auth_register">New to %1$s?</string>
import com.owncloud.android.oc_framework.accounts.OwnCloudAccount;\r
import com.owncloud.android.oc_framework.network.webdav.OwnCloudClientFactory;\r
import com.owncloud.android.oc_framework.network.webdav.WebdavClient;\r
-import com.owncloud.android.operations.ExistenceCheckOperation;\r
import com.owncloud.android.operations.OAuth2GetAccessToken;\r
import com.owncloud.android.oc_framework.operations.OnRemoteOperationListener;\r
import com.owncloud.android.operations.OwnCloudServerCheckOperation;\r
import com.owncloud.android.oc_framework.operations.RemoteOperation;\r
import com.owncloud.android.oc_framework.operations.RemoteOperationResult;\r
import com.owncloud.android.oc_framework.operations.RemoteOperationResult.ResultCode;\r
+import com.owncloud.android.oc_framework.operations.remote.ExistenceCheckRemoteOperation;\r
import com.owncloud.android.ui.dialog.SamlWebViewDialog;\r
import com.owncloud.android.ui.dialog.SslValidatorDialog;\r
import com.owncloud.android.ui.dialog.SslValidatorDialog.OnSslValidatorListener;\r
private final Handler mHandler = new Handler();\r
private Thread mOperationThread;\r
private OwnCloudServerCheckOperation mOcServerChkOperation;\r
- private ExistenceCheckOperation mAuthCheckOperation;\r
+ private ExistenceCheckRemoteOperation mAuthCheckOperation;\r
private RemoteOperationResult mLastSslUntrustedServerResult;\r
\r
private Uri mNewCapturedUriFromOAuth2Redirection;\r
showDialog(DIALOG_LOGIN_PROGRESS);\r
\r
/// test credentials accessing the root folder\r
- mAuthCheckOperation = new ExistenceCheckOperation("", this, false);\r
+ mAuthCheckOperation = new ExistenceCheckRemoteOperation("", this, false);\r
WebdavClient client = OwnCloudClientFactory.createOwnCloudClient(Uri.parse(mHostBaseUrl + webdav_path), this, true);\r
client.setBasicCredentials(username, password);\r
mOperationThread = mAuthCheckOperation.execute(client, this, mHandler);\r
String webdav_path = AccountUtils.getWebdavPath(mDiscoveredVersion, mAuthTokenType);\r
\r
/// test credentials accessing the root folder\r
- mAuthCheckOperation = new ExistenceCheckOperation("", this, false);\r
+ mAuthCheckOperation = new ExistenceCheckRemoteOperation("", this, false);\r
WebdavClient client = OwnCloudClientFactory.createOwnCloudClient(Uri.parse(mHostBaseUrl + webdav_path), this, false);\r
mOperationThread = mAuthCheckOperation.execute(client, this, mHandler);\r
\r
} else if (operation instanceof OAuth2GetAccessToken) {\r
onGetOAuthAccessTokenFinish((OAuth2GetAccessToken)operation, result);\r
\r
- } else if (operation instanceof ExistenceCheckOperation) {\r
+ } else if (operation instanceof ExistenceCheckRemoteOperation) {\r
if (AccountTypeUtils.getAuthTokenTypeSamlSessionCookie(MainApp.getAccountType()).equals(mAuthTokenType)) {\r
onSamlBasedFederatedSingleSignOnAuthorizationStart(operation, result);\r
\r
} else {\r
- onAuthorizationCheckFinish((ExistenceCheckOperation)operation, result);\r
+ onAuthorizationCheckFinish((ExistenceCheckRemoteOperation)operation, result);\r
}\r
}\r
}\r
/// time to test the retrieved access token on the ownCloud server\r
mAuthToken = ((OAuth2GetAccessToken)operation).getResultTokenMap().get(OAuth2Constants.KEY_ACCESS_TOKEN);\r
Log_OC.d(TAG, "Got ACCESS TOKEN: " + mAuthToken);\r
- mAuthCheckOperation = new ExistenceCheckOperation("", this, false);\r
+ mAuthCheckOperation = new ExistenceCheckRemoteOperation("", this, false);\r
WebdavClient client = OwnCloudClientFactory.createOwnCloudClient(Uri.parse(mHostBaseUrl + webdav_path), this, true);\r
client.setBearerCredentials(mAuthToken);\r
mAuthCheckOperation.execute(client, this, mHandler);\r
* @param operation Access check performed.\r
* @param result Result of the operation.\r
*/\r
- private void onAuthorizationCheckFinish(ExistenceCheckOperation operation, RemoteOperationResult result) {\r
+ private void onAuthorizationCheckFinish(ExistenceCheckRemoteOperation operation, RemoteOperationResult result) {\r
try {\r
dismissDialog(DIALOG_LOGIN_PROGRESS);\r
} catch (IllegalArgumentException e) {\r
import java.util.Map;
import com.owncloud.android.R;
+import com.owncloud.android.utils.DisplayUtils;
import android.app.Notification;
import android.app.NotificationManager;
switch (type) {
case NOTIFICATION_SIMPLE:
- notification = new Notification(R.drawable.icon, data.getText(), System.currentTimeMillis());
+ notification = new Notification(DisplayUtils.getSeasonalIconId(), data.getText(), System.currentTimeMillis());
break;
case NOTIFICATION_PROGRESS:
notification = new Notification();
false);
return true;
case NOTIFICATION_SIMPLE:
- pair.mNotificaiton = new Notification(R.drawable.icon,
+ pair.mNotificaiton = new Notification(DisplayUtils.getSeasonalIconId(),
data.getText(), System.currentTimeMillis());
mNM.notify(notification_id, pair.mNotificaiton);
return true;
import com.owncloud.android.ui.activity.FileDisplayActivity;
import com.owncloud.android.ui.preview.PreviewImageActivity;
import com.owncloud.android.ui.preview.PreviewImageFragment;
+import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.Log_OC;
import android.accounts.Account;
private void notifyDownloadStart(DownloadFileOperation download) {
/// create status notification with a progress bar
mLastPercent = 0;
- mNotification = new Notification(R.drawable.icon, getString(R.string.downloader_download_in_progress_ticker), System.currentTimeMillis());
+ mNotification = new Notification(DisplayUtils.getSeasonalIconId(), getString(R.string.downloader_download_in_progress_ticker), System.currentTimeMillis());
mNotification.flags |= Notification.FLAG_ONGOING_EVENT;
mNotification.contentView = new RemoteViews(getApplicationContext().getPackageName(), R.layout.progressbar_layout);
mNotification.contentView.setProgressBar(R.id.status_progress, 100, 0, download.getSize() < 0);
mNotification.contentView.setTextViewText(R.id.status_text, String.format(getString(R.string.downloader_download_in_progress_content), 0, new File(download.getSavePath()).getName()));
- mNotification.contentView.setImageViewResource(R.id.status_icon, R.drawable.icon);
+ mNotification.contentView.setImageViewResource(R.id.status_icon, DisplayUtils.getSeasonalIconId());
/// includes a pending intent in the notification showing the details view of the file
Intent showDetailsIntent = null;
public void onTransferProgress(long progressRate, long totalTransferredSoFar, long totalToTransfer, String fileName) {
int percent = (int)(100.0*((double)totalTransferredSoFar)/((double)totalToTransfer));
if (percent != mLastPercent) {
- mNotification.contentView.setProgressBar(R.id.status_progress, 100, percent, totalToTransfer < 0);
- String text = String.format(getString(R.string.downloader_download_in_progress_content), percent, fileName);
- mNotification.contentView.setTextViewText(R.id.status_text, text);
- mNotificationManager.notify(R.string.downloader_download_in_progress_ticker, mNotification);
+ mNotification.contentView.setProgressBar(R.id.status_progress, 100, percent, totalToTransfer < 0);
+ String text = String.format(getString(R.string.downloader_download_in_progress_content), percent, fileName);
+ mNotification.contentView.setTextViewText(R.id.status_text, text);
+ mNotificationManager.notify(R.string.downloader_download_in_progress_ticker, mNotification);
}
mLastPercent = percent;
}
if (!downloadResult.isCancelled()) {
int tickerId = (downloadResult.isSuccess()) ? R.string.downloader_download_succeeded_ticker : R.string.downloader_download_failed_ticker;
int contentId = (downloadResult.isSuccess()) ? R.string.downloader_download_succeeded_content : R.string.downloader_download_failed_content;
- Notification finalNotification = new Notification(R.drawable.icon, getString(tickerId), System.currentTimeMillis());
+ Notification finalNotification = new Notification(DisplayUtils.getSeasonalIconId(), getString(tickerId), System.currentTimeMillis());
finalNotification.flags |= Notification.FLAG_AUTO_CANCEL;
boolean needsToUpdateCredentials = (downloadResult.getCode() == ResultCode.UNAUTHORIZED ||
// (downloadResult.isTemporalRedirection() && downloadResult.isIdPRedirection()
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
-import org.apache.http.HttpStatus;
-import org.apache.jackrabbit.webdav.DavConstants;
-import org.apache.jackrabbit.webdav.MultiStatus;
-import org.apache.jackrabbit.webdav.client.methods.PropFindMethod;
-
import com.owncloud.android.R;
import com.owncloud.android.authentication.AuthenticatorActivity;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.db.DbHandler;
-import com.owncloud.android.operations.ChunkedUploadFileOperation;
import com.owncloud.android.operations.CreateFolderOperation;
-import com.owncloud.android.operations.ExistenceCheckOperation;
+import com.owncloud.android.oc_framework.operations.RemoteFile;
import com.owncloud.android.oc_framework.operations.RemoteOperation;
import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
import com.owncloud.android.operations.UploadFileOperation;
import com.owncloud.android.oc_framework.operations.RemoteOperationResult.ResultCode;
+import com.owncloud.android.oc_framework.operations.remote.ExistenceCheckRemoteOperation;
+import com.owncloud.android.oc_framework.operations.remote.ReadRemoteFileOperation;
import com.owncloud.android.oc_framework.utils.OwnCloudVersion;
import com.owncloud.android.oc_framework.network.webdav.OnDatatransferProgressListener;
import com.owncloud.android.oc_framework.accounts.OwnCloudAccount;
import com.owncloud.android.oc_framework.network.webdav.OwnCloudClientFactory;
import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
-import com.owncloud.android.oc_framework.network.webdav.WebdavEntry;
-import com.owncloud.android.oc_framework.network.webdav.WebdavUtils;
import com.owncloud.android.ui.activity.FailedUploadActivity;
import com.owncloud.android.ui.activity.FileActivity;
import com.owncloud.android.ui.activity.FileDisplayActivity;
import com.owncloud.android.ui.activity.InstantUploadActivity;
import com.owncloud.android.ui.preview.PreviewImageActivity;
import com.owncloud.android.ui.preview.PreviewImageFragment;
+import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.Log_OC;
import android.accounts.Account;
files[i] = obtainNewOCFileToUpload(remotePaths[i], localPaths[i], ((mimeTypes != null) ? mimeTypes[i]
: (String) null), storageManager);
if (files[i] == null) {
- // TODO @andomaex add failure Notiification
+ // TODO @andomaex add failure Notification
return Service.START_NOT_STICKY;
}
}
try {
for (int i = 0; i < files.length; i++) {
uploadKey = buildRemoteName(account, files[i].getRemotePath());
- if (chunked) {
- newUpload = new ChunkedUploadFileOperation(account, files[i], isInstant, forceOverwrite,
- localAction);
- } else {
- newUpload = new UploadFileOperation(account, files[i], isInstant, forceOverwrite, localAction);
- }
+ newUpload = new UploadFileOperation(account, files[i], chunked, isInstant, forceOverwrite, localAction,
+ getApplicationContext());
if (isInstant) {
newUpload.setRemoteFolderToBeCreated();
}
* @return An {@link OCFile} instance corresponding to the folder where the file will be uploaded.
*/
private RemoteOperationResult grantFolderExistence(String pathToGrant) {
- RemoteOperation operation = new ExistenceCheckOperation(pathToGrant, this, false);
+ RemoteOperation operation = new ExistenceCheckRemoteOperation(pathToGrant, this, false);
RemoteOperationResult result = operation.execute(mUploadClient);
if (!result.isSuccess() && result.getCode() == ResultCode.FILE_NOT_FOUND && mCurrentUpload.isRemoteFolderToBeCreated()) {
operation = new CreateFolderOperation( pathToGrant,
long syncDate = System.currentTimeMillis();
file.setLastSyncDateForData(syncDate);
- // / new PROPFIND to keep data consistent with server in theory, should
- // return the same we already have
- PropFindMethod propfind = null;
- RemoteOperationResult result = null;
- try {
- propfind = new PropFindMethod(mUploadClient.getBaseUri() + WebdavUtils.encodePath(mCurrentUpload.getRemotePath()),
- DavConstants.PROPFIND_ALL_PROP,
- DavConstants.DEPTH_0);
- int status = mUploadClient.executeMethod(propfind);
- boolean isMultiStatus = (status == HttpStatus.SC_MULTI_STATUS);
- if (isMultiStatus) {
- MultiStatus resp = propfind.getResponseBodyAsMultiStatus();
- WebdavEntry we = new WebdavEntry(resp.getResponses()[0], mUploadClient.getBaseUri().getPath());
- updateOCFile(file, we);
- file.setLastSyncDateForProperties(syncDate);
-
- } else {
- mUploadClient.exhaustResponse(propfind.getResponseBodyAsStream());
- }
-
- result = new RemoteOperationResult(isMultiStatus, status, propfind.getResponseHeaders());
- Log_OC.i(TAG, "Update: synchronizing properties for uploaded " + mCurrentUpload.getRemotePath() + ": "
- + result.getLogMessage());
-
- } catch (Exception e) {
- result = new RemoteOperationResult(e);
- Log_OC.e(TAG, "Update: synchronizing properties for uploaded " + mCurrentUpload.getRemotePath() + ": "
- + result.getLogMessage(), e);
-
- } finally {
- if (propfind != null)
- propfind.releaseConnection();
+ // new PROPFIND to keep data consistent with server
+ // in theory, should return the same we already have
+ ReadRemoteFileOperation operation = new ReadRemoteFileOperation(mCurrentUpload.getRemotePath());
+ RemoteOperationResult result = operation.execute(mUploadClient);
+ if (result.isSuccess()) {
+ updateOCFile(file, result.getData().get(0));
+ file.setLastSyncDateForProperties(syncDate);
}
-
+
// / maybe this would be better as part of UploadFileOperation... or
// maybe all this method
if (mCurrentUpload.wasRenamed()) {
mStorageManager.saveFile(file);
}
- private void updateOCFile(OCFile file, WebdavEntry we) {
- file.setCreationTimestamp(we.createTimestamp());
- file.setFileLength(we.contentLength());
- file.setMimetype(we.contentType());
- file.setModificationTimestamp(we.modifiedTimestamp());
- file.setModificationTimestampAtLastSyncForData(we.modifiedTimestamp());
- // file.setEtag(mCurrentUpload.getEtag()); // TODO Etag, where available
+ private void updateOCFile(OCFile file, RemoteFile remoteFile) {
+ file.setCreationTimestamp(remoteFile.getCreationTimestamp());
+ file.setFileLength(remoteFile.getLength());
+ file.setMimetype(remoteFile.getMimeType());
+ file.setModificationTimestamp(remoteFile.getModifiedTimestamp());
+ file.setModificationTimestampAtLastSyncForData(remoteFile.getModifiedTimestamp());
+ // file.setEtag(remoteFile.getEtag()); // TODO Etag, where available
}
private OCFile obtainNewOCFileToUpload(String remotePath, String localPath, String mimeType,
private void notifyUploadStart(UploadFileOperation upload) {
// / create status notification with a progress bar
mLastPercent = 0;
- mNotification = new Notification(R.drawable.icon, getString(R.string.uploader_upload_in_progress_ticker),
+ mNotification = new Notification(DisplayUtils.getSeasonalIconId(), getString(R.string.uploader_upload_in_progress_ticker),
System.currentTimeMillis());
mNotification.flags |= Notification.FLAG_ONGOING_EVENT;
mDefaultNotificationContentView = mNotification.contentView;
mNotification.contentView.setProgressBar(R.id.status_progress, 100, 0, false);
mNotification.contentView.setTextViewText(R.id.status_text,
String.format(getString(R.string.uploader_upload_in_progress_content), 0, upload.getFileName()));
- mNotification.contentView.setImageViewResource(R.id.status_icon, R.drawable.icon);
+ mNotification.contentView.setImageViewResource(R.id.status_icon, DisplayUtils.getSeasonalIconId());
/// includes a pending intent in the notification showing the details view of the file
Intent showDetailsIntent = new Intent(this, FileDisplayActivity.class);
}
showDetailsIntent.putExtra(FileActivity.EXTRA_FILE, upload.getFile());
showDetailsIntent.putExtra(FileActivity.EXTRA_ACCOUNT, upload.getAccount());
+ showDetailsIntent.putExtra(FileActivity.EXTRA_FROM_NOTIFICATION, true);
showDetailsIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
mNotification.contentIntent = PendingIntent.getActivity(getApplicationContext(),
(int) System.currentTimeMillis(), showDetailsIntent, 0);
// / fail -> explicit failure notification
mNotificationManager.cancel(R.string.uploader_upload_in_progress_ticker);
- Notification finalNotification = new Notification(R.drawable.icon,
+ Notification finalNotification = new Notification(DisplayUtils.getSeasonalIconId(),
getString(R.string.uploader_upload_failed_ticker), System.currentTimeMillis());
finalNotification.flags |= Notification.FLAG_AUTO_CANCEL;
String content = null;
+++ /dev/null
-/* ownCloud Android client application
- * Copyright (C) 2012 Bartek Przybylski
- * 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 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
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-package com.owncloud.android.operations;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.nio.channels.FileChannel;
-import java.util.Random;
-
-import org.apache.commons.httpclient.HttpException;
-import org.apache.commons.httpclient.methods.PutMethod;
-
-import com.owncloud.android.datamodel.OCFile;
-import com.owncloud.android.oc_framework.network.ProgressiveDataTransferer;
-import com.owncloud.android.oc_framework.network.webdav.ChunkFromFileChannelRequestEntity;
-import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
-import com.owncloud.android.oc_framework.network.webdav.WebdavUtils;
-import com.owncloud.android.utils.Log_OC;
-
-
-import android.accounts.Account;
-
-
-public class ChunkedUploadFileOperation extends UploadFileOperation {
-
- private static final long CHUNK_SIZE = 1024000;
- private static final String OC_CHUNKED_HEADER = "OC-Chunked";
- private static final String TAG = ChunkedUploadFileOperation.class.getSimpleName();
-
- public ChunkedUploadFileOperation( Account account,
- OCFile file,
- boolean isInstant,
- boolean forceOverwrite,
- int localBehaviour) {
-
- super(account, file, isInstant, forceOverwrite, localBehaviour);
- }
-
- @Override
- protected int uploadFile(WebdavClient client) throws HttpException, IOException {
- int status = -1;
-
- FileChannel channel = null;
- RandomAccessFile raf = null;
- try {
- File file = new File(getStoragePath());
- raf = new RandomAccessFile(file, "r");
- channel = raf.getChannel();
- mEntity = new ChunkFromFileChannelRequestEntity(channel, getMimeType(), CHUNK_SIZE, file);
- ((ProgressiveDataTransferer)mEntity).addDatatransferProgressListeners(getDataTransferListeners());
- long offset = 0;
- String uriPrefix = client.getBaseUri() + WebdavUtils.encodePath(getRemotePath()) + "-chunking-" + Math.abs((new Random()).nextInt(9000)+1000) + "-" ;
- long chunkCount = (long) Math.ceil((double)file.length() / CHUNK_SIZE);
- for (int chunkIndex = 0; chunkIndex < chunkCount ; chunkIndex++, offset += CHUNK_SIZE) {
- if (mPutMethod != null) {
- mPutMethod.releaseConnection(); // let the connection available for other methods
- }
- mPutMethod = new PutMethod(uriPrefix + chunkCount + "-" + chunkIndex);
- mPutMethod.addRequestHeader(OC_CHUNKED_HEADER, OC_CHUNKED_HEADER);
- ((ChunkFromFileChannelRequestEntity)mEntity).setOffset(offset);
- mPutMethod.setRequestEntity(mEntity);
- status = client.executeMethod(mPutMethod);
- client.exhaustResponse(mPutMethod.getResponseBodyAsStream());
- Log_OC.d(TAG, "Upload of " + getStoragePath() + " to " + getRemotePath() + ", chunk index " + chunkIndex + ", count " + chunkCount + ", HTTP result status " + status);
- if (!isSuccess(status))
- break;
- }
-
- } finally {
- if (channel != null)
- channel.close();
- if (raf != null)
- raf.close();
- if (mPutMethod != null)
- mPutMethod.releaseConnection(); // let the connection available for other methods
- }
- return status;
- }
-
-}
package com.owncloud.android.operations;
-import java.io.BufferedInputStream;
import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.Date;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.commons.httpclient.Header;
-import org.apache.commons.httpclient.HttpException;
-import org.apache.commons.httpclient.methods.GetMethod;
-import org.apache.http.HttpStatus;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.oc_framework.network.webdav.OnDatatransferProgressListener;
import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
-import com.owncloud.android.oc_framework.network.webdav.WebdavUtils;
-import com.owncloud.android.oc_framework.operations.OperationCancelledException;
+import com.owncloud.android.oc_framework.operations.RemoteFile;
import com.owncloud.android.oc_framework.operations.RemoteOperation;
import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
+import com.owncloud.android.oc_framework.operations.remote.DownloadRemoteFileOperation;
import com.owncloud.android.utils.FileStorageUtils;
import com.owncloud.android.utils.Log_OC;
import android.webkit.MimeTypeMap;
/**
- * Remote operation performing the download of a file to an ownCloud server
+ * Remote mDownloadOperation performing the download of a file to an ownCloud server
*
* @author David A. Velasco
+ * @author masensio
*/
public class DownloadFileOperation extends RemoteOperation {
private Account mAccount;
private OCFile mFile;
private Set<OnDatatransferProgressListener> mDataTransferListeners = new HashSet<OnDatatransferProgressListener>();
- private final AtomicBoolean mCancellationRequested = new AtomicBoolean(false);
private long mModificationTimestamp = 0;
- private GetMethod mGet;
+
+ private DownloadRemoteFileOperation mDownloadOperation;
public DownloadFileOperation(Account account, OCFile file) {
mAccount = account;
mFile = file;
+
}
return FileStorageUtils.getTemporalPath(mAccount.name) + mFile.getRemotePath();
}
+ public String getTmpFolder() {
+ return FileStorageUtils.getTemporalPath(mAccount.name);
+ }
+
public String getRemotePath() {
return mFile.getRemotePath();
}
public long getModificationTimestamp() {
return (mModificationTimestamp > 0) ? mModificationTimestamp : mFile.getModificationTimestamp();
}
-
-
- public void addDatatransferProgressListener (OnDatatransferProgressListener listener) {
- synchronized (mDataTransferListeners) {
- mDataTransferListeners.add(listener);
- }
- }
-
- public void removeDatatransferProgressListener(OnDatatransferProgressListener listener) {
- synchronized (mDataTransferListeners) {
- mDataTransferListeners.remove(listener);
- }
- }
@Override
protected RemoteOperationResult run(WebdavClient client) {
/// download will be performed to a temporal file, then moved to the final location
File tmpFile = new File(getTmpPath());
+ String tmpFolder = getTmpFolder();
+ RemoteFile remoteFile = FileStorageUtils.fillRemoteFile(mFile);
+
/// perform the download
- try {
- tmpFile.getParentFile().mkdirs();
- int status = downloadFile(client, tmpFile);
- if (isSuccess(status)) {
- newFile = new File(getSavePath());
- newFile.getParentFile().mkdirs();
- moved = tmpFile.renameTo(newFile);
- }
+ mDownloadOperation = new DownloadRemoteFileOperation(remoteFile, tmpFolder);
+ Iterator<OnDatatransferProgressListener> listener = mDataTransferListeners.iterator();
+ while (listener.hasNext()) {
+ mDownloadOperation.addDatatransferProgressListener(listener.next());
+ }
+ result = mDownloadOperation.execute(client);
+
+ if (result.isSuccess()) {
+ newFile = new File(getSavePath());
+ newFile.getParentFile().mkdirs();
+ moved = tmpFile.renameTo(newFile);
+
if (!moved)
result = new RemoteOperationResult(RemoteOperationResult.ResultCode.LOCAL_STORAGE_NOT_MOVED);
- else
- result = new RemoteOperationResult(isSuccess(status), status, (mGet != null ? mGet.getResponseHeaders() : null));
- Log_OC.i(TAG, "Download of " + mFile.getRemotePath() + " to " + getSavePath() + ": " + result.getLogMessage());
-
- } catch (Exception e) {
- result = new RemoteOperationResult(e);
- Log_OC.e(TAG, "Download of " + mFile.getRemotePath() + " to " + getSavePath() + ": " + result.getLogMessage(), e);
}
+ Log_OC.i(TAG, "Download of " + mFile.getRemotePath() + " to " + getSavePath() + ": " + result.getLogMessage());
+
return result;
}
-
- public boolean isSuccess(int status) {
- return (status == HttpStatus.SC_OK);
+ public void cancel() {
+ mDownloadOperation.cancel();
}
-
-
- protected int downloadFile(WebdavClient client, File targetFile) throws HttpException, IOException, OperationCancelledException {
- int status = -1;
- boolean savedFile = false;
- mGet = new GetMethod(client.getBaseUri() + WebdavUtils.encodePath(mFile.getRemotePath()));
- Iterator<OnDatatransferProgressListener> it = null;
-
- FileOutputStream fos = null;
- try {
- status = client.executeMethod(mGet);
- if (isSuccess(status)) {
- targetFile.createNewFile();
- BufferedInputStream bis = new BufferedInputStream(mGet.getResponseBodyAsStream());
- fos = new FileOutputStream(targetFile);
- long transferred = 0;
- byte[] bytes = new byte[4096];
- int readResult = 0;
- while ((readResult = bis.read(bytes)) != -1) {
- synchronized(mCancellationRequested) {
- if (mCancellationRequested.get()) {
- mGet.abort();
- throw new OperationCancelledException();
- }
- }
- fos.write(bytes, 0, readResult);
- transferred += readResult;
- synchronized (mDataTransferListeners) {
- it = mDataTransferListeners.iterator();
- while (it.hasNext()) {
- it.next().onTransferProgress(readResult, transferred, mFile.getFileLength(), targetFile.getName());
- }
- }
- }
- savedFile = true;
- Header modificationTime = mGet.getResponseHeader("Last-Modified");
- if (modificationTime != null) {
- Date d = WebdavUtils.parseResponseDate((String) modificationTime.getValue());
- mModificationTimestamp = (d != null) ? d.getTime() : 0;
- }
-
- } else {
- client.exhaustResponse(mGet.getResponseBodyAsStream());
- }
-
- } finally {
- if (fos != null) fos.close();
- if (!savedFile && targetFile.exists()) {
- targetFile.delete();
- }
- mGet.releaseConnection(); // let the connection available for other methods
+
+ public void addDatatransferProgressListener (OnDatatransferProgressListener listener) {
+ synchronized (mDataTransferListeners) {
+ mDataTransferListeners.add(listener);
}
- return status;
}
-
- public void cancel() {
- mCancellationRequested.set(true); // atomic set; there is no need of synchronizing it
+ public void removeDatatransferProgressListener(OnDatatransferProgressListener listener) {
+ synchronized (mDataTransferListeners) {
+ mDataTransferListeners.remove(listener);
+ }
}
-
-
+
}
+++ /dev/null
-/* ownCloud Android client application
- * Copyright (C) 2012 ownCloud Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * 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
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-package com.owncloud.android.operations;
-
-import org.apache.commons.httpclient.HttpStatus;
-import org.apache.commons.httpclient.methods.HeadMethod;
-
-import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
-import com.owncloud.android.oc_framework.operations.RemoteOperation;
-import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
-import com.owncloud.android.oc_framework.network.webdav.WebdavUtils;
-import com.owncloud.android.utils.Log_OC;
-
-import android.content.Context;
-import android.net.ConnectivityManager;
-
-/**
- * Operation to check the existence or absence of a path in a remote server.
- *
- * @author David A. Velasco
- */
-public class ExistenceCheckOperation extends RemoteOperation {
-
- /** Maximum time to wait for a response from the server in MILLISECONDs. */
- public static final int TIMEOUT = 10000;
-
- private static final String TAG = ExistenceCheckOperation.class.getSimpleName();
-
- private String mPath;
- private Context mContext;
- private boolean mSuccessIfAbsent;
-
-
- /**
- * Full constructor. Success of the operation will depend upon the value of successIfAbsent.
- *
- * @param path Path to append to the URL owned by the client instance.
- * @param context Android application context.
- * @param successIfAbsent When 'true', the operation finishes in success if the path does NOT exist in the remote server (HTTP 404).
- */
- public ExistenceCheckOperation(String path, Context context, boolean successIfAbsent) {
- mPath = (path != null) ? path : "";
- mContext = context;
- mSuccessIfAbsent = successIfAbsent;
- }
-
-
- @Override
- protected RemoteOperationResult run(WebdavClient client) {
- if (!isOnline()) {
- return new RemoteOperationResult(RemoteOperationResult.ResultCode.NO_NETWORK_CONNECTION);
- }
- RemoteOperationResult result = null;
- HeadMethod head = null;
- try {
- head = new HeadMethod(client.getBaseUri() + WebdavUtils.encodePath(mPath));
- int status = client.executeMethod(head, TIMEOUT, TIMEOUT);
- client.exhaustResponse(head.getResponseBodyAsStream());
- boolean success = (status == HttpStatus.SC_OK && !mSuccessIfAbsent) || (status == HttpStatus.SC_NOT_FOUND && mSuccessIfAbsent);
- result = new RemoteOperationResult(success, status, head.getResponseHeaders());
- Log_OC.d(TAG, "Existence check for " + client.getBaseUri() + WebdavUtils.encodePath(mPath) + " targeting for " + (mSuccessIfAbsent ? " absence " : " existence ") + "finished with HTTP status " + status + (!success?"(FAIL)":""));
-
- } catch (Exception e) {
- result = new RemoteOperationResult(e);
- Log_OC.e(TAG, "Existence check for " + client.getBaseUri() + WebdavUtils.encodePath(mPath) + " targeting for " + (mSuccessIfAbsent ? " absence " : " existence ") + ": " + result.getLogMessage(), result.getException());
-
- } finally {
- if (head != null)
- head.releaseConnection();
- }
- return result;
- }
-
- private boolean isOnline() {
- ConnectivityManager cm = (ConnectivityManager) mContext
- .getSystemService(Context.CONNECTIVITY_SERVICE);
- return cm != null && cm.getActiveNetworkInfo() != null
- && cm.getActiveNetworkInfo().isConnectedOrConnecting();
- }
-
-
-}
package com.owncloud.android.operations;
-import org.apache.http.HttpStatus;
-import org.apache.jackrabbit.webdav.DavConstants;
-import org.apache.jackrabbit.webdav.MultiStatus;
-import org.apache.jackrabbit.webdav.client.methods.PropFindMethod;
-
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.files.services.FileDownloader;
import com.owncloud.android.files.services.FileUploader;
import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
-import com.owncloud.android.oc_framework.network.webdav.WebdavEntry;
-import com.owncloud.android.oc_framework.network.webdav.WebdavUtils;
import com.owncloud.android.oc_framework.operations.RemoteOperation;
import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
import com.owncloud.android.oc_framework.operations.RemoteOperationResult.ResultCode;
+import com.owncloud.android.oc_framework.operations.remote.ReadRemoteFileOperation;
+import com.owncloud.android.utils.FileStorageUtils;
import com.owncloud.android.utils.Log_OC;
import android.accounts.Account;
import android.content.Context;
import android.content.Intent;
+/**
+ * Remote operation performing the read of remote file in the ownCloud server.
+ *
+ * @author David A. Velasco
+ * @author masensio
+ */
public class SynchronizeFileOperation extends RemoteOperation {
private String TAG = SynchronizeFileOperation.class.getSimpleName();
- private static final int SYNC_READ_TIMEOUT = 10000;
- private static final int SYNC_CONNECTION_TIMEOUT = 5000;
private OCFile mLocalFile;
private OCFile mServerFile;
@Override
protected RemoteOperationResult run(WebdavClient client) {
-
- PropFindMethod propfind = null;
+
RemoteOperationResult result = null;
mTransferWasRequested = false;
- try {
- if (!mLocalFile.isDown()) {
- /// easy decision
- requestForDownload(mLocalFile);
- result = new RemoteOperationResult(ResultCode.OK);
-
- } else {
- /// local copy in the device -> need to think a bit more before do anything
-
- if (mServerFile == null) {
- /// take the duty of check the server for the current state of the file there
- propfind = new PropFindMethod(client.getBaseUri() + WebdavUtils.encodePath(mLocalFile.getRemotePath()),
- DavConstants.PROPFIND_ALL_PROP,
- DavConstants.DEPTH_0);
- int status = client.executeMethod(propfind, SYNC_READ_TIMEOUT, SYNC_CONNECTION_TIMEOUT);
- boolean isMultiStatus = status == HttpStatus.SC_MULTI_STATUS;
- if (isMultiStatus) {
- MultiStatus resp = propfind.getResponseBodyAsMultiStatus();
- WebdavEntry we = new WebdavEntry(resp.getResponses()[0],
- client.getBaseUri().getPath());
- mServerFile = fillOCFile(we);
- mServerFile.setLastSyncDateForProperties(System.currentTimeMillis());
-
- } else {
- client.exhaustResponse(propfind.getResponseBodyAsStream());
- result = new RemoteOperationResult(false, status, propfind.getResponseHeaders());
- }
+ if (!mLocalFile.isDown()) {
+ /// easy decision
+ requestForDownload(mLocalFile);
+ result = new RemoteOperationResult(ResultCode.OK);
+
+ } else {
+ /// local copy in the device -> need to think a bit more before do anything
+
+ if (mServerFile == null) {
+ String remotePath = mLocalFile.getRemotePath();
+ ReadRemoteFileOperation operation = new ReadRemoteFileOperation(remotePath);
+ result = operation.execute(client);
+ if (result.isSuccess()){
+ mServerFile = FileStorageUtils.fillOCFile(result.getData().get(0));
+ mServerFile.setLastSyncDateForProperties(System.currentTimeMillis());
}
-
- if (result == null) { // true if the server was not checked. nothing was wrong with the remote request
-
- /// check changes in server and local file
- boolean serverChanged = false;
- /* time for eTag is coming, but not yet
+ }
+
+ if (result.isSuccess()) {
+
+ /// check changes in server and local file
+ boolean serverChanged = false;
+ /* time for eTag is coming, but not yet
if (mServerFile.getEtag() != null) {
serverChanged = (!mServerFile.getEtag().equals(mLocalFile.getEtag())); // TODO could this be dangerous when the user upgrades the server from non-tagged to tagged?
} else { */
- // server without etags
- serverChanged = (mServerFile.getModificationTimestamp() > mLocalFile.getModificationTimestampAtLastSyncForData());
- //}
- boolean localChanged = (mLocalFile.getLocalModificationTimestamp() > mLocalFile.getLastSyncDateForData());
- // TODO this will be always true after the app is upgraded to database version 2; will result in unnecessary uploads
-
- /// decide action to perform depending upon changes
- //if (!mLocalFile.getEtag().isEmpty() && localChanged && serverChanged) {
- if (localChanged && serverChanged) {
- result = new RemoteOperationResult(ResultCode.SYNC_CONFLICT);
-
- } else if (localChanged) {
- if (mSyncFileContents) {
- requestForUpload(mLocalFile);
- // the local update of file properties will be done by the FileUploader service when the upload finishes
- } else {
- // NOTHING TO DO HERE: updating the properties of the file in the server without uploading the contents would be stupid;
- // So, an instance of SynchronizeFileOperation created with syncFileContents == false is completely useless when we suspect
- // that an upload is necessary (for instance, in FileObserverService).
- }
- result = new RemoteOperationResult(ResultCode.OK);
-
- } else if (serverChanged) {
- if (mSyncFileContents) {
- requestForDownload(mLocalFile); // local, not server; we won't to keep the value of keepInSync!
- // the update of local data will be done later by the FileUploader service when the upload finishes
- } else {
- // TODO CHECK: is this really useful in some point in the code?
- mServerFile.setKeepInSync(mLocalFile.keepInSync());
- mServerFile.setLastSyncDateForData(mLocalFile.getLastSyncDateForData());
- mServerFile.setStoragePath(mLocalFile.getStoragePath());
- mServerFile.setParentId(mLocalFile.getParentId());
- mStorageManager.saveFile(mServerFile);
-
- }
- result = new RemoteOperationResult(ResultCode.OK);
-
+ // server without etags
+ serverChanged = (mServerFile.getModificationTimestamp() != mLocalFile.getModificationTimestampAtLastSyncForData());
+ //}
+ boolean localChanged = (mLocalFile.getLocalModificationTimestamp() > mLocalFile.getLastSyncDateForData());
+ // TODO this will be always true after the app is upgraded to database version 2; will result in unnecessary uploads
+
+ /// decide action to perform depending upon changes
+ //if (!mLocalFile.getEtag().isEmpty() && localChanged && serverChanged) {
+ if (localChanged && serverChanged) {
+ result = new RemoteOperationResult(ResultCode.SYNC_CONFLICT);
+
+ } else if (localChanged) {
+ if (mSyncFileContents) {
+ requestForUpload(mLocalFile);
+ // the local update of file properties will be done by the FileUploader service when the upload finishes
} else {
- // nothing changed, nothing to do
- result = new RemoteOperationResult(ResultCode.OK);
+ // NOTHING TO DO HERE: updating the properties of the file in the server without uploading the contents would be stupid;
+ // So, an instance of SynchronizeFileOperation created with syncFileContents == false is completely useless when we suspect
+ // that an upload is necessary (for instance, in FileObserverService).
}
-
- }
-
- }
-
- Log_OC.i(TAG, "Synchronizing " + mAccount.name + ", file " + mLocalFile.getRemotePath() + ": " + result.getLogMessage());
-
- } catch (Exception e) {
- result = new RemoteOperationResult(e);
- Log_OC.e(TAG, "Synchronizing " + mAccount.name + ", file " + (mLocalFile != null ? mLocalFile.getRemotePath() : "NULL") + ": " + result.getLogMessage(), result.getException());
-
- } finally {
- if (propfind != null)
- propfind.releaseConnection();
+ result = new RemoteOperationResult(ResultCode.OK);
+
+ } else if (serverChanged) {
+ if (mSyncFileContents) {
+ requestForDownload(mLocalFile); // local, not server; we won't to keep the value of keepInSync!
+ // the update of local data will be done later by the FileUploader service when the upload finishes
+ } else {
+ // TODO CHECK: is this really useful in some point in the code?
+ mServerFile.setKeepInSync(mLocalFile.keepInSync());
+ mServerFile.setLastSyncDateForData(mLocalFile.getLastSyncDateForData());
+ mServerFile.setStoragePath(mLocalFile.getStoragePath());
+ mServerFile.setParentId(mLocalFile.getParentId());
+ mStorageManager.saveFile(mServerFile);
+
+ }
+ result = new RemoteOperationResult(ResultCode.OK);
+
+ } else {
+ // nothing changed, nothing to do
+ result = new RemoteOperationResult(ResultCode.OK);
+ }
+
+ }
+
}
+
+ Log_OC.i(TAG, "Synchronizing " + mAccount.name + ", file " + mLocalFile.getRemotePath() + ": " + result.getLogMessage());
+
return result;
}
}
- /**
- * Creates and populates a new {@link OCFile} object with the data read from the server.
- *
- * @param we WebDAV entry read from the server for a WebDAV resource (remote file or folder).
- * @return New OCFile instance representing the remote resource described by we.
- */
- private OCFile fillOCFile(WebdavEntry we) {
- OCFile file = new OCFile(we.decodedPath());
- file.setCreationTimestamp(we.createTimestamp());
- file.setFileLength(we.contentLength());
- file.setMimetype(we.contentType());
- file.setModificationTimestamp(we.modifiedTimestamp());
- file.setEtag(we.etag());
-
- return file;
- }
-
-
public boolean transferWasRequested() {
return mTransferWasRequested;
}
import java.util.Vector;
import org.apache.http.HttpStatus;
-import org.apache.jackrabbit.webdav.DavConstants;
-import org.apache.jackrabbit.webdav.client.methods.PropFindMethod;
-
import android.accounts.Account;
import android.content.Context;
import android.content.Intent;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
-import com.owncloud.android.oc_framework.network.webdav.WebdavEntry;
-import com.owncloud.android.oc_framework.network.webdav.WebdavUtils;
import com.owncloud.android.oc_framework.operations.RemoteOperation;
import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
import com.owncloud.android.oc_framework.operations.RemoteOperationResult.ResultCode;
+import com.owncloud.android.oc_framework.operations.remote.ReadRemoteFileOperation;
import com.owncloud.android.oc_framework.operations.remote.ReadRemoteFolderOperation;
import com.owncloud.android.oc_framework.operations.RemoteFile;
import com.owncloud.android.syncadapter.FileSyncService;
mRemoteFolderChanged = false;
RemoteOperationResult result = null;
String remotePath = null;
- PropFindMethod query = null;
-
- try {
+
remotePath = mLocalFolder.getRemotePath();
Log_OC.d(TAG, "Checking changes in " + mAccount.name + remotePath);
// remote request
- query = new PropFindMethod(client.getBaseUri() + WebdavUtils.encodePath(remotePath),
- DavConstants.PROPFIND_ALL_PROP,
- DavConstants.DEPTH_0);
- int status = client.executeMethod(query);
-
- // check and process response
- if (isMultiStatus(status)) {
- // parse data from remote folder
- WebdavEntry we = new WebdavEntry(query.getResponseBodyAsMultiStatus().getResponses()[0], client.getBaseUri().getPath());
- OCFile remoteFolder = fillOCFile(we);
-
- // check if remote and local folder are different
- mRemoteFolderChanged = !(remoteFolder.getEtag().equalsIgnoreCase(mLocalFolder.getEtag()));
-
- result = new RemoteOperationResult(ResultCode.OK);
+ ReadRemoteFileOperation operation = new ReadRemoteFileOperation(remotePath);
+ result = operation.execute(client);
+ if (result.isSuccess()){
+ OCFile remoteFolder = FileStorageUtils.fillOCFile(result.getData().get(0));
+ // check if remote and local folder are different
+ mRemoteFolderChanged = !(remoteFolder.getEtag().equalsIgnoreCase(mLocalFolder.getEtag()));
+
+ result = new RemoteOperationResult(ResultCode.OK);
+
+ Log_OC.i(TAG, "Checked " + mAccount.name + remotePath + " : " + (mRemoteFolderChanged ? "changed" : "not changed"));
} else {
// check failed
- client.exhaustResponse(query.getResponseBodyAsStream());
- if (status == HttpStatus.SC_NOT_FOUND) {
+ if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
removeLocalFolder();
}
- result = new RemoteOperationResult(false, status, query.getResponseHeaders());
- }
-
- } catch (Exception e) {
- result = new RemoteOperationResult(e);
-
-
- } finally {
- if (query != null)
- query.releaseConnection(); // let the connection available for other methods
- if (result.isSuccess()) {
- Log_OC.i(TAG, "Checked " + mAccount.name + remotePath + " : " + (mRemoteFolderChanged ? "changed" : "not changed"));
- } else {
if (result.isException()) {
Log_OC.e(TAG, "Checked " + mAccount.name + remotePath + " : " + result.getLogMessage(), result.getException());
} else {
}
}
- }
return result;
}
return (status == HttpStatus.SC_MULTI_STATUS);
}
-
- /**
- * Creates and populates a new {@link OCFile} object with the data read from the server.
- *
- * @param we WebDAV entry read from the server for a WebDAV resource (remote file or folder).
- * @return New OCFile instance representing the remote resource described by we.
- */
- private OCFile fillOCFile(WebdavEntry we) {
- OCFile file = new OCFile(we.decodedPath());
- file.setCreationTimestamp(we.createTimestamp());
- file.setFileLength(we.contentLength());
- file.setMimetype(we.contentType());
- file.setModificationTimestamp(we.modifiedTimestamp());
- file.setEtag(we.etag());
- return file;
- }
-
/**
* Creates and populates a new {@link OCFile} object with the data read from the server.
*
import java.io.InputStream;
import java.io.OutputStream;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.Set;
import java.util.concurrent.atomic.AtomicBoolean;
-import org.apache.commons.httpclient.HttpException;
import org.apache.commons.httpclient.methods.PutMethod;
import org.apache.commons.httpclient.methods.RequestEntity;
-import org.apache.http.HttpStatus;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.files.services.FileUploader;
import com.owncloud.android.oc_framework.network.ProgressiveDataTransferer;
-import com.owncloud.android.oc_framework.network.webdav.FileRequestEntity;
import com.owncloud.android.oc_framework.network.webdav.OnDatatransferProgressListener;
import com.owncloud.android.oc_framework.network.webdav.WebdavClient;
-import com.owncloud.android.oc_framework.network.webdav.WebdavUtils;
import com.owncloud.android.oc_framework.operations.OperationCancelledException;
import com.owncloud.android.oc_framework.operations.RemoteOperation;
import com.owncloud.android.oc_framework.operations.RemoteOperationResult;
import com.owncloud.android.oc_framework.operations.RemoteOperationResult.ResultCode;
+import com.owncloud.android.oc_framework.operations.remote.ChunkedUploadRemoteFileOperation;
+import com.owncloud.android.oc_framework.operations.remote.ExistenceCheckRemoteOperation;
+import com.owncloud.android.oc_framework.operations.remote.UploadRemoteFileOperation;
import com.owncloud.android.utils.FileStorageUtils;
import com.owncloud.android.utils.Log_OC;
import android.accounts.Account;
+import android.content.Context;
/**
private OCFile mFile;
private OCFile mOldFile;
private String mRemotePath = null;
+ private boolean mChunked = false;
private boolean mIsInstant = false;
private boolean mRemoteFolderToBeCreated = false;
private boolean mForceOverwrite = false;
PutMethod mPutMethod = null;
private Set<OnDatatransferProgressListener> mDataTransferListeners = new HashSet<OnDatatransferProgressListener>();
private final AtomicBoolean mCancellationRequested = new AtomicBoolean(false);
+ private Context mContext;
+
+ private UploadRemoteFileOperation mUploadOperation;
protected RequestEntity mEntity = null;
public UploadFileOperation( Account account,
OCFile file,
+ boolean chunked,
boolean isInstant,
boolean forceOverwrite,
- int localBehaviour) {
+ int localBehaviour,
+ Context context) {
if (account == null)
throw new IllegalArgumentException("Illegal NULL account in UploadFileOperation creation");
if (file == null)
mAccount = account;
mFile = file;
mRemotePath = file.getRemotePath();
+ mChunked = chunked;
mIsInstant = isInstant;
mForceOverwrite = forceOverwrite;
mLocalBehaviour = localBehaviour;
mOriginalStoragePath = mFile.getStoragePath();
mOriginalFileName = mFile.getFileName();
+ mContext = context;
}
public Account getAccount() {
// !!!
expectedFile = new File(expectedPath);
- // / check location of local file; if not the expected, copy to a
+ // check location of local file; if not the expected, copy to a
// temporal file before upload (if COPY is the expected behaviour)
if (!mOriginalStoragePath.equals(expectedPath) && mLocalBehaviour == FileUploader.LOCAL_BEHAVIOUR_COPY) {
}
localCopyPassed = true;
- // / perform the upload
- synchronized (mCancellationRequested) {
- if (mCancellationRequested.get()) {
- throw new OperationCancelledException();
- } else {
- mPutMethod = new PutMethod(client.getBaseUri() + WebdavUtils.encodePath(mFile.getRemotePath()));
- }
+ /// perform the upload
+ if ( mChunked && (new File(mFile.getStoragePath())).length() > ChunkedUploadRemoteFileOperation.CHUNK_SIZE ) {
+ mUploadOperation = new ChunkedUploadRemoteFileOperation(mFile.getStoragePath(), mFile.getRemotePath(),
+ mFile.getMimetype());
+ } else {
+ mUploadOperation = new UploadRemoteFileOperation(mFile.getStoragePath(), mFile.getRemotePath(),
+ mFile.getMimetype());
+ }
+ Iterator <OnDatatransferProgressListener> listener = mDataTransferListeners.iterator();
+ while (listener.hasNext()) {
+ mUploadOperation.addDatatransferProgressListener(listener.next());
}
- int status = uploadFile(client);
+ result = mUploadOperation.execute(client);
- // / move local temporal file or original file to its corresponding
+ /// move local temporal file or original file to its corresponding
// location in the ownCloud local folder
- if (isSuccess(status)) {
+ if (result.isSuccess()) {
if (mLocalBehaviour == FileUploader.LOCAL_BEHAVIOUR_FORGET) {
mFile.setStoragePath(null);
}
}
- result = new RemoteOperationResult(isSuccess(status), status, (mPutMethod != null ? mPutMethod.getResponseHeaders() : null));
-
} catch (Exception e) {
// TODO something cleaner with cancellations
if (mCancellationRequested.get()) {
mFile = newFile;
}
- public boolean isSuccess(int status) {
- return ((status == HttpStatus.SC_OK || status == HttpStatus.SC_CREATED || status == HttpStatus.SC_NO_CONTENT));
- }
-
- protected int uploadFile(WebdavClient client) throws HttpException, IOException, OperationCancelledException {
- int status = -1;
- try {
- File f = new File(mFile.getStoragePath());
- mEntity = new FileRequestEntity(f, getMimeType());
- synchronized (mDataTransferListeners) {
- ((ProgressiveDataTransferer)mEntity).addDatatransferProgressListeners(mDataTransferListeners);
- }
- mPutMethod.setRequestEntity(mEntity);
- status = client.executeMethod(mPutMethod);
- client.exhaustResponse(mPutMethod.getResponseBodyAsStream());
-
- } finally {
- mPutMethod.releaseConnection(); // let the connection available for
- // other methods
- }
- return status;
- }
-
/**
* Checks if remotePath does not exist in the server and returns it, or adds
* a suffix to it in order to avoid the server file is overwritten.
* @return
*/
private String getAvailableRemotePath(WebdavClient wc, String remotePath) throws Exception {
- boolean check = wc.existsFile(remotePath);
+ boolean check = existsFile(wc, remotePath);
if (!check) {
return remotePath;
}
int count = 2;
do {
suffix = " (" + count + ")";
- if (pos >= 0)
- check = wc.existsFile(remotePath + suffix + "." + extension);
- else
- check = wc.existsFile(remotePath + suffix);
+ if (pos >= 0) {
+ check = existsFile(wc, remotePath + suffix + "." + extension);
+ }
+ else {
+ check = existsFile(wc, remotePath + suffix);
+ }
count++;
} while (check);
}
}
+ private boolean existsFile(WebdavClient client, String remotePath){
+ ExistenceCheckRemoteOperation existsOperation = new ExistenceCheckRemoteOperation(remotePath, mContext, false);
+ RemoteOperationResult result = existsOperation.execute(client);
+ return result.isSuccess();
+ }
+
public void cancel() {
- synchronized (mCancellationRequested) {
- mCancellationRequested.set(true);
- if (mPutMethod != null)
- mPutMethod.abort();
- }
+ mUploadOperation.cancel();
}
}
import org.apache.http.client.methods.HttpPut;
import org.apache.http.entity.ByteArrayEntity;
-import com.owncloud.android.authentication.AccountAuthenticator;
import com.owncloud.android.authentication.AccountUtils;
import com.owncloud.android.oc_framework.accounts.OwnCloudAccount;
import org.apache.jackrabbit.webdav.DavException;
-import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.authentication.AuthenticatorActivity;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.operations.UpdateOCVersionOperation;
import com.owncloud.android.oc_framework.operations.RemoteOperationResult.ResultCode;
import com.owncloud.android.ui.activity.ErrorsWhileCopyingHandlerActivity;
+import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.Log_OC;
private void fetchChildren(OCFile parent, List<OCFile> files, boolean parentEtagChanged) {
int i;
OCFile newFile = null;
- String etag = null;
- boolean syncDown = false;
+ //String etag = null;
+ //boolean syncDown = false;
for (i=0; i < files.size() && !mCancellation; i++) {
newFile = files.get(i);
if (newFile.isFolder()) {
* Notifies the user about a failed synchronization through the status notification bar
*/
private void notifyFailedSynchronization() {
- Notification notification = new Notification(R.drawable.icon, getContext().getString(R.string.sync_fail_ticker), System.currentTimeMillis());
+ Notification notification = new Notification(DisplayUtils.getSeasonalIconId(), getContext().getString(R.string.sync_fail_ticker), System.currentTimeMillis());
notification.flags |= Notification.FLAG_AUTO_CANCEL;
boolean needsToUpdateCredentials = (mLastFailedResult != null &&
( mLastFailedResult.getCode() == ResultCode.UNAUTHORIZED ||
*/
private void notifyFailsInFavourites() {
if (mFailedResultsCounter > 0) {
- Notification notification = new Notification(R.drawable.icon, getContext().getString(R.string.sync_fail_in_favourites_ticker), System.currentTimeMillis());
+ Notification notification = new Notification(DisplayUtils.getSeasonalIconId(), getContext().getString(R.string.sync_fail_in_favourites_ticker), System.currentTimeMillis());
notification.flags |= Notification.FLAG_AUTO_CANCEL;
// TODO put something smart in the contentIntent below
notification.contentIntent = PendingIntent.getActivity(getContext().getApplicationContext(), (int)System.currentTimeMillis(), new Intent(), 0);
((NotificationManager) getContext().getSystemService(Context.NOTIFICATION_SERVICE)).notify(R.string.sync_fail_in_favourites_ticker, notification);
} else {
- Notification notification = new Notification(R.drawable.icon, getContext().getString(R.string.sync_conflicts_in_favourites_ticker), System.currentTimeMillis());
+ Notification notification = new Notification(DisplayUtils.getSeasonalIconId(), getContext().getString(R.string.sync_conflicts_in_favourites_ticker), System.currentTimeMillis());
notification.flags |= Notification.FLAG_AUTO_CANCEL;
// TODO put something smart in the contentIntent below
notification.contentIntent = PendingIntent.getActivity(getContext().getApplicationContext(), (int)System.currentTimeMillis(), new Intent(), 0);
* We won't consider a synchronization as failed when foreign files can not be copied to the ownCloud local directory.
*/
private void notifyForgottenLocalFiles() {
- Notification notification = new Notification(R.drawable.icon, getContext().getString(R.string.sync_foreign_files_forgotten_ticker), System.currentTimeMillis());
+ Notification notification = new Notification(DisplayUtils.getSeasonalIconId(), getContext().getString(R.string.sync_foreign_files_forgotten_ticker), System.currentTimeMillis());
notification.flags |= Notification.FLAG_AUTO_CANCEL;
/// includes a pending intent in the notification showing a more detailed explanation
*/\r
package com.owncloud.android.syncadapter;\r
\r
-import com.owncloud.android.utils.Log_OC;\r
-\r
import android.app.Service;\r
import android.content.Intent;\r
import android.os.IBinder;\r
import android.accounts.AccountManager;
import android.accounts.AccountManagerCallback;
import android.accounts.AccountManagerFuture;
-import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.owncloud.android.authentication.AuthenticatorActivity;
import com.owncloud.android.authentication.AccountUtils;
import com.owncloud.android.oc_framework.accounts.OwnCloudAccount;
+import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.Log_OC;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
mPreviousAccount = AccountUtils.getCurrentOwnCloudAccount(this);
}
- ActionBar action_bar = getSupportActionBar();
- action_bar.setDisplayShowTitleEnabled(true);
- action_bar.setDisplayHomeAsUpEnabled(false);
+ ActionBar actionBar = getSupportActionBar();
+ actionBar.setIcon(DisplayUtils.getSeasonalIconId());
+ actionBar.setDisplayShowTitleEnabled(true);
+ actionBar.setDisplayHomeAsUpEnabled(false);
}
@Override
package com.owncloud.android.ui.activity;
+import com.actionbarsherlock.app.ActionBar;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.files.services.FileUploader;
import com.owncloud.android.ui.dialog.ConflictsResolveDialog;
import com.owncloud.android.ui.dialog.ConflictsResolveDialog.Decision;
import com.owncloud.android.ui.dialog.ConflictsResolveDialog.OnConflictDecisionMadeListener;
+import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.Log_OC;
import android.content.Intent;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
+ ActionBar actionBar = getSupportActionBar();
+ actionBar.setIcon(DisplayUtils.getSeasonalIconId());
}
@Override
- public void ConflictDecisionMade(Decision decision) {
+ public void conflictDecisionMade(Decision decision) {
Intent i = new Intent(getApplicationContext(), FileUploader.class);
switch (decision) {
public static final String EXTRA_FILE = "com.owncloud.android.ui.activity.FILE";
public static final String EXTRA_ACCOUNT = "com.owncloud.android.ui.activity.ACCOUNT";
public static final String EXTRA_WAITING_TO_PREVIEW = "com.owncloud.android.ui.activity.WAITING_TO_PREVIEW";
+ public static final String EXTRA_FROM_NOTIFICATION= "com.owncloud.android.ui.activity.FROM_NOTIFICATION";
public static final String TAG = FileActivity.class.getSimpleName();
/** Flag to signal when the value of mAccount was restored from a saved state */
private boolean mAccountWasRestored;
+
+ /** Flag to signal if the activity is launched by a notification */
+ private boolean mFromNotification;
/**
if(savedInstanceState != null) {
account = savedInstanceState.getParcelable(FileActivity.EXTRA_ACCOUNT);
mFile = savedInstanceState.getParcelable(FileActivity.EXTRA_FILE);
+ mFromNotification = savedInstanceState.getBoolean(FileActivity.EXTRA_FROM_NOTIFICATION);
} else {
account = getIntent().getParcelableExtra(FileActivity.EXTRA_ACCOUNT);
mFile = getIntent().getParcelableExtra(FileActivity.EXTRA_FILE);
+ mFromNotification = getIntent().getBooleanExtra(FileActivity.EXTRA_FROM_NOTIFICATION, false);
}
setAccount(account, savedInstanceState != null);
super.onSaveInstanceState(outState);
outState.putParcelable(FileActivity.EXTRA_FILE, mFile);
outState.putParcelable(FileActivity.EXTRA_ACCOUNT, mAccount);
+ outState.putBoolean(FileActivity.EXTRA_FROM_NOTIFICATION, mFromNotification);
}
return mAccount;
}
+ /**
+ * @return Value of mFromNotification: True if the Activity is launched by a notification
+ */
+ public boolean fromNotification() {
+ return mFromNotification;
+ }
/**
* @return 'True' when the Activity is finishing to enforce the setup of a new account.
import com.owncloud.android.ui.preview.PreviewImageActivity;
import com.owncloud.android.ui.preview.PreviewMediaFragment;
import com.owncloud.android.ui.preview.PreviewVideoActivity;
+import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.Log_OC;
// PIN CODE request ; best location is to decide, let's try this first
if (getIntent().getAction() != null && getIntent().getAction().equals(Intent.ACTION_MAIN) && savedInstanceState == null) {
requestPinCode();
+ } else if (getIntent().getAction() == null && savedInstanceState == null) {
+ requestPinCode();
}
/// file observer
// Action bar setup
mDirectories = new CustomArrayAdapter<String>(this, R.layout.sherlock_spinner_dropdown_item);
getSupportActionBar().setHomeButtonEnabled(true); // mandatory since Android ICS, according to the official documentation
- setSupportProgressBarIndeterminateVisibility(mSyncInProgress); // always AFTER setContentView(...) ; to work around bug in its implementation
-
-
+ setSupportProgressBarIndeterminateVisibility(mSyncInProgress); // always AFTER setContentView(...) ; to work around bug in its implementation
Log_OC.d(TAG, "onCreate() end");
}
-
+
+ @Override
+ protected void onStart() {
+ super.onStart();
+ getSupportActionBar().setIcon(DisplayUtils.getSeasonalIconId());
+ }
@Override
protected void onDestroy() {
}
-// private void updateDisplayHomeAtSync(){
-// ActionBar actionBar = getSupportActionBar();
-// OCFile currentDir = getCurrentDir();
-// if (currentDir.getParentId() != DataStorageManager.ROOT_PARENT_ID) {
-// actionBar.setHomeButtonEnabled(!mSyncInProgress);
-// actionBar.setDisplayHomeAsUpEnabled(!mSyncInProgress);
-// }
-// else {
-// actionBar.setHomeButtonEnabled(true);
-// actionBar.setDisplayHomeAsUpEnabled(false);
-// }
-// }
-//
/**
* {@inheritDoc}
*/
import android.widget.ListView;
import android.widget.TextView;
+import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.owncloud.android.R;
+import com.owncloud.android.utils.DisplayUtils;
/**
} else {
listView.setVisibility(View.GONE);
}
+
+ ActionBar actionBar = getSupportActionBar();
+ actionBar.setIcon(DisplayUtils.getSeasonalIconId());
}
public class ExplanationListAdapterView extends ArrayAdapter<String> {
import com.actionbarsherlock.view.MenuItem;
import com.owncloud.android.R;
import com.owncloud.android.ui.adapter.LogListAdapter;
+import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.FileStorageUtils;
setContentView(R.layout.log_send_file);
setTitle("Log History");
ActionBar actionBar = getSherlock().getActionBar();
+ actionBar.setIcon(DisplayUtils.getSeasonalIconId());
actionBar.setDisplayHomeAsUpEnabled(true);
ListView listView = (ListView) findViewById(android.R.id.list);
Button deleteHistoryButton = (Button) findViewById(R.id.deleteLogHistoryButton);
import java.util.Arrays;
+import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.owncloud.android.R;
+import com.owncloud.android.utils.DisplayUtils;
import android.app.AlertDialog;
import android.content.DialogInterface;
public final static String EXTRA_ACTIVITY = "com.owncloud.android.ui.activity.PinCodeActivity.ACTIVITY";
public final static String EXTRA_NEW_STATE = "com.owncloud.android.ui.activity.PinCodeActivity.NEW_STATE";
- Button bCancel;
- TextView mPinHdr;
- TextView mPinHdrExplanation;
- EditText mText1;
- EditText mText2;
- EditText mText3;
- EditText mText4;
+ private Button mBCancel;
+ private TextView mPinHdr;
+ private TextView mPinHdrExplanation;
+ private EditText mText1;
+ private EditText mText2;
+ private EditText mText3;
+ private EditText mText4;
- String [] tempText ={"","","",""};
+ private String [] mTempText ={"","","",""};
- String activity;
+ private String mActivity;
- boolean confirmingPinCode = false;
- boolean pinCodeChecked = false;
- boolean newPasswordEntered = false;
- boolean bChange = true; // to control that only one blocks jump
- int tCounter ; // Count the number of attempts an user could introduce the PIN code
+ private boolean mConfirmingPinCode = false;
+ private boolean mPinCodeChecked = false;
+ private boolean mNewPasswordEntered = false;
+ private boolean mBChange = true; // to control that only one blocks jump
+ //private int mTCounter ; // Count the number of attempts an user could introduce the PIN code
protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.pincodelock);
Intent intent = getIntent();
- activity = intent.getStringExtra(EXTRA_ACTIVITY);
+ mActivity = intent.getStringExtra(EXTRA_ACTIVITY);
- bCancel = (Button) findViewById(R.id.cancel);
+ mBCancel = (Button) findViewById(R.id.cancel);
mPinHdr = (TextView) findViewById(R.id.pinHdr);
mPinHdrExplanation = (TextView) findViewById(R.id.pinHdrExpl);
mText1 = (EditText) findViewById(R.id.txt1);
// In a previous version settings is allow from start
if ( (appPrefs.getString("PrefPinCode1", null) == null ) ){
setChangePincodeView(true);
- pinCodeChecked = true;
- newPasswordEntered = true;
+ mPinCodeChecked = true;
+ mNewPasswordEntered = true;
}else{
if (appPrefs.getBoolean("set_pincode", false)){
// pincode activated
- if (activity.equals("preferences")){
+ if (mActivity.equals("preferences")){
// PIN has been activated yet
mPinHdr.setText(R.string.pincode_configure_your_pin);
mPinHdrExplanation.setVisibility(View.VISIBLE);
- pinCodeChecked = true ; // No need to check it
+ mPinCodeChecked = true ; // No need to check it
setChangePincodeView(true);
}else{
// PIN active
- bCancel.setVisibility(View.INVISIBLE);
- bCancel.setVisibility(View.GONE);
+ mBCancel.setVisibility(View.INVISIBLE);
+ mBCancel.setVisibility(View.GONE);
mPinHdr.setText(R.string.pincode_enter_pin_code);
mPinHdrExplanation.setVisibility(View.INVISIBLE);
setChangePincodeView(false);
// pincode removal
mPinHdr.setText(R.string.pincode_remove_your_pincode);
mPinHdrExplanation.setVisibility(View.INVISIBLE);
- pinCodeChecked = false;
+ mPinCodeChecked = false;
setChangePincodeView(true);
}
}
setTextListeners();
-
+ ActionBar actionBar = getSupportActionBar();
+ actionBar.setIcon(DisplayUtils.getSeasonalIconId());
}
protected void setInitVars(){
- confirmingPinCode = false;
- pinCodeChecked = false;
- newPasswordEntered = false;
+ mConfirmingPinCode = false;
+ mPinCodeChecked = false;
+ mNewPasswordEntered = false;
}
protected void setInitView(){
- bCancel.setVisibility(View.INVISIBLE);
- bCancel.setVisibility(View.GONE);
+ mBCancel.setVisibility(View.INVISIBLE);
+ mBCancel.setVisibility(View.GONE);
mPinHdr.setText(R.string.pincode_enter_pin_code);
mPinHdrExplanation.setVisibility(View.INVISIBLE);
}
protected void setChangePincodeView(boolean state){
if(state){
- bCancel.setVisibility(View.VISIBLE);
- bCancel.setOnClickListener(new OnClickListener() {
+ mBCancel.setVisibility(View.VISIBLE);
+ mBCancel.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
@Override
public void afterTextChanged(Editable s) {
if (s.length() > 0) {
- if (!confirmingPinCode){
- tempText[0] = mText1.getText().toString();
+ if (!mConfirmingPinCode){
+ mTempText[0] = mText1.getText().toString();
}
mText2.requestFocus();
@Override
public void afterTextChanged(Editable s) {
if (s.length() > 0) {
- if (!confirmingPinCode){
- tempText[1] = mText2.getText().toString();
+ if (!mConfirmingPinCode){
+ mTempText[1] = mText2.getText().toString();
}
mText3.requestFocus();
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
- if (keyCode == KeyEvent.KEYCODE_DEL && bChange) {
+ if (keyCode == KeyEvent.KEYCODE_DEL && mBChange) {
mText1.setText("");
mText1.requestFocus();
- if (!confirmingPinCode)
- tempText[0] = "";
- bChange= false;
+ if (!mConfirmingPinCode)
+ mTempText[0] = "";
+ mBChange= false;
- }else if(!bChange){
- bChange=true;
+ }else if(!mBChange){
+ mBChange=true;
}
return false;
@Override
public void afterTextChanged(Editable s) {
if (s.length() > 0) {
- if (!confirmingPinCode){
- tempText[2] = mText3.getText().toString();
+ if (!mConfirmingPinCode){
+ mTempText[2] = mText3.getText().toString();
}
mText4.requestFocus();
}
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
- if (keyCode == KeyEvent.KEYCODE_DEL && bChange) {
+ if (keyCode == KeyEvent.KEYCODE_DEL && mBChange) {
mText2.requestFocus();
- if (!confirmingPinCode)
- tempText[1] = "";
+ if (!mConfirmingPinCode)
+ mTempText[1] = "";
mText2.setText("");
- bChange= false;
+ mBChange= false;
- }else if(!bChange){
- bChange=true;
+ }else if(!mBChange){
+ mBChange=true;
}
return false;
public void afterTextChanged(Editable s) {
if (s.length() > 0) {
- if (!confirmingPinCode){
- tempText[3] = mText4.getText().toString();
+ if (!mConfirmingPinCode){
+ mTempText[3] = mText4.getText().toString();
}
mText1.requestFocus();
- if (!pinCodeChecked){
- pinCodeChecked = checkPincode();
+ if (!mPinCodeChecked){
+ mPinCodeChecked = checkPincode();
}
- if (pinCodeChecked && activity.equals("FileDisplayActivity")){
+ if (mPinCodeChecked &&
+ ( mActivity.equals("FileDisplayActivity") || mActivity.equals("PreviewImageActivity") ) ){
finish();
- } else if (pinCodeChecked){
+ } else if (mPinCodeChecked){
Intent intent = getIntent();
String newState = intent.getStringExtra(EXTRA_NEW_STATE);
}else{
- if (!confirmingPinCode){
+ if (!mConfirmingPinCode){
pinCodeChangeRequest();
} else {
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
- if (keyCode == KeyEvent.KEYCODE_DEL && bChange) {
+ if (keyCode == KeyEvent.KEYCODE_DEL && mBChange) {
mText3.requestFocus();
- if (!confirmingPinCode)
- tempText[2]="";
+ if (!mConfirmingPinCode)
+ mTempText[2]="";
mText3.setText("");
- bChange= false;
+ mBChange= false;
- }else if(!bChange){
- bChange=true;
+ }else if(!mBChange){
+ mBChange=true;
}
return false;
}
clearBoxes();
mPinHdr.setText(R.string.pincode_reenter_your_pincode);
mPinHdrExplanation.setVisibility(View.INVISIBLE);
- confirmingPinCode =true;
+ mConfirmingPinCode =true;
}
String pText3 = appPrefs.getString("PrefPinCode3", null);
String pText4 = appPrefs.getString("PrefPinCode4", null);
- if ( tempText[0].equals(pText1) &&
- tempText[1].equals(pText2) &&
- tempText[2].equals(pText3) &&
- tempText[3].equals(pText4) ) {
+ if ( mTempText[0].equals(pText1) &&
+ mTempText[1].equals(pText2) &&
+ mTempText[2].equals(pText3) &&
+ mTempText[3].equals(pText4) ) {
return true;
}else {
- Arrays.fill(tempText, null);
+ Arrays.fill(mTempText, null);
AlertDialog aDialog = new AlertDialog.Builder(this).create();
CharSequence errorSeq = getString(R.string.common_error);
aDialog.setTitle(errorSeq);
clearBoxes();
mPinHdr.setText(R.string.pincode_enter_pin_code);
mPinHdrExplanation.setVisibility(View.INVISIBLE);
- newPasswordEntered = true;
- confirmingPinCode = false;
+ mNewPasswordEntered = true;
+ mConfirmingPinCode = false;
}
protected void confirmPincode(){
- confirmingPinCode = false;
+ mConfirmingPinCode = false;
String rText1 = mText1.getText().toString();
String rText2 = mText2.getText().toString();
String rText3 = mText3.getText().toString();
String rText4 = mText4.getText().toString();
- if ( tempText[0].equals(rText1) &&
- tempText[1].equals(rText2) &&
- tempText[2].equals(rText3) &&
- tempText[3].equals(rText4) ) {
+ if ( mTempText[0].equals(rText1) &&
+ mTempText[1].equals(rText2) &&
+ mTempText[2].equals(rText3) &&
+ mTempText[3].equals(rText4) ) {
savePincodeAndExit();
} else {
- Arrays.fill(tempText, null);
+ Arrays.fill(mTempText, null);
AlertDialog aDialog = new AlertDialog.Builder(this).create();
CharSequence errorSeq = getString(R.string.common_error);
aDialog.setTitle(errorSeq);
SharedPreferences.Editor appPrefs = PreferenceManager
.getDefaultSharedPreferences(getApplicationContext()).edit();
- appPrefs.putString("PrefPinCode1", tempText[0]);
- appPrefs.putString("PrefPinCode2",tempText[1]);
- appPrefs.putString("PrefPinCode3", tempText[2]);
- appPrefs.putString("PrefPinCode4", tempText[3]);
+ appPrefs.putString("PrefPinCode1", mTempText[0]);
+ appPrefs.putString("PrefPinCode2",mTempText[1]);
+ appPrefs.putString("PrefPinCode3", mTempText[2]);
+ appPrefs.putString("PrefPinCode4", mTempText[3]);
appPrefs.putBoolean("set_pincode",true);
appPrefs.commit();
public boolean onKeyDown(int keyCode, KeyEvent event){
if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount()== 0){
- if (activity.equals("preferences")){
+ if (mActivity.equals("preferences")){
SharedPreferences.Editor appPrefsE = PreferenceManager
.getDefaultSharedPreferences(getApplicationContext()).edit();
*/
package com.owncloud.android.ui.activity;
-import java.util.Vector;
-
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import com.actionbarsherlock.view.MenuItem;
import com.owncloud.android.R;
import com.owncloud.android.db.DbHandler;
+import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.Log_OC;
-import com.owncloud.android.utils.OwnCloudSession;
/**
public class Preferences extends SherlockPreferenceActivity {
private static final String TAG = "OwnCloudPreferences";
- private final int mNewSession = 47;
- private final int mEditSession = 48;
private DbHandler mDbHandler;
- private Vector<OwnCloudSession> mSessions;
private CheckBoxPreference pCode;
//private CheckBoxPreference pLogging;
//private Preference pLoggingHistory;
private Preference pAboutApp;
- private int mSelectedMenuItem;
@SuppressWarnings("deprecation")
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mDbHandler = new DbHandler(getBaseContext());
- mSessions = new Vector<OwnCloudSession>();
addPreferencesFromResource(R.xml.preferences);
//populateAccountList();
ActionBar actionBar = getSherlock().getActionBar();
+ actionBar.setIcon(DisplayUtils.getSeasonalIconId());
actionBar.setDisplayHomeAsUpEnabled(true);
Preference p = findPreference("manage_account");
import com.owncloud.android.ui.fragment.ConfirmationDialogFragment;
import com.owncloud.android.ui.fragment.LocalFileListFragment;
import com.owncloud.android.ui.fragment.ConfirmationDialogFragment.ConfirmationDialogFragmentListener;
+import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.FileStorageUtils;
import com.owncloud.android.utils.Log_OC;
// Action bar setup
ActionBar actionBar = getSupportActionBar();
+ actionBar.setIcon(DisplayUtils.getSeasonalIconId());
actionBar.setHomeButtonEnabled(true); // mandatory since Android ICS, according to the official documentation
actionBar.setDisplayHomeAsUpEnabled(mCurrentDir != null && mCurrentDir.getName() != null);
actionBar.setDisplayShowTitleEnabled(false);
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
-import com.owncloud.android.R.id;
-import com.owncloud.android.R.layout;
-import com.owncloud.android.R.string;
import com.owncloud.android.authentication.AccountAuthenticator;
import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.datamodel.OCFile;
import com.actionbarsherlock.app.SherlockDialogFragment;
import com.owncloud.android.R;
+import com.owncloud.android.utils.DisplayUtils;
/**
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
Dialog dialog = builder.setView(webview)
- .setIcon(R.drawable.icon)
+ .setIcon(DisplayUtils.getSeasonalIconId())
//.setTitle(R.string.whats_new)
.setPositiveButton(R.string.common_ok,
new DialogInterface.OnClickListener() {
import com.actionbarsherlock.app.SherlockDialogFragment;
import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.owncloud.android.R;
+import com.owncloud.android.utils.DisplayUtils;
/**
public Dialog onCreateDialog(Bundle savedInstanceState) {
String remotepath = getArguments().getString("remotepath");
return new AlertDialog.Builder(getSherlockActivity())
- .setIcon(R.drawable.icon)
+ .setIcon(DisplayUtils.getSeasonalIconId())
.setTitle(R.string.conflict_title)
.setMessage(String.format(getString(R.string.conflict_message), remotepath))
.setPositiveButton(R.string.conflict_overwrite,
@Override
public void onClick(DialogInterface dialog, int which) {
if (mListener != null)
- mListener.ConflictDecisionMade(Decision.OVERWRITE);
+ mListener.conflictDecisionMade(Decision.OVERWRITE);
}
})
.setNeutralButton(R.string.conflict_keep_both,
@Override
public void onClick(DialogInterface dialog, int which) {
if (mListener != null)
- mListener.ConflictDecisionMade(Decision.KEEP_BOTH);
+ mListener.conflictDecisionMade(Decision.KEEP_BOTH);
}
})
.setNegativeButton(R.string.conflict_dont_upload,
@Override
public void onClick(DialogInterface dialog, int which) {
if (mListener != null)
- mListener.ConflictDecisionMade(Decision.CANCEL);
+ mListener.conflictDecisionMade(Decision.CANCEL);
}
})
.create();
@Override
public void onCancel(DialogInterface dialog) {
- mListener.ConflictDecisionMade(Decision.CANCEL);
+ mListener.conflictDecisionMade(Decision.CANCEL);
}
public interface OnConflictDecisionMadeListener {
- public void ConflictDecisionMade(Decision decision);
+ public void conflictDecisionMade(Decision decision);
}
}
import android.content.Intent;
import android.content.IntentFilter;
import android.content.ServiceConnection;
+import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.IBinder;
+import android.preference.PreferenceManager;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import com.owncloud.android.files.services.FileUploader.FileUploaderBinder;
import com.owncloud.android.ui.activity.FileActivity;
import com.owncloud.android.ui.activity.FileDisplayActivity;
+import com.owncloud.android.ui.activity.PinCodeActivity;
import com.owncloud.android.ui.dialog.LoadingDialog;
import com.owncloud.android.ui.fragment.FileFragment;
+import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.Log_OC;
setContentView(R.layout.preview_image_activity);
ActionBar actionBar = getSupportActionBar();
+ actionBar.setIcon(DisplayUtils.getSeasonalIconId());
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.hide();
+ // PIN CODE request
+ if (getIntent().getExtras() != null && savedInstanceState == null && fromNotification()) {
+ requestPinCode();
+ }
+
mFullScreen = true;
if (savedInstanceState != null) {
mRequestWaitingForBinder = savedInstanceState.getBoolean(KEY_WAITING_FOR_BINDER);
}
+ /**
+ * Launch an intent to request the PIN code to the user before letting him use the app
+ */
+ private void requestPinCode() {
+ boolean pinStart = false;
+ SharedPreferences appPrefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
+ pinStart = appPrefs.getBoolean("set_pincode", false);
+ if (pinStart) {
+ Intent i = new Intent(getApplicationContext(), PinCodeActivity.class);
+ i.putExtra(PinCodeActivity.EXTRA_ACTIVITY, "PreviewImageActivity");
+ startActivity(i);
+ }
+ }
+
}
package com.owncloud.android.utils;\r
\r
import java.util.Arrays;\r
+import java.util.Calendar;\r
import java.util.Date;\r
import java.util.HashMap;\r
import java.util.HashSet;\r
import java.util.Set;\r
\r
import com.owncloud.android.R;\r
-import com.owncloud.android.R.drawable;\r
\r
/**\r
* A helper class for some string operations.\r
Date date = new Date(milliseconds);\r
return date.toLocaleString();\r
}\r
+ \r
+ \r
+ public static int getSeasonalIconId() {\r
+ if (Calendar.getInstance().get(Calendar.DAY_OF_YEAR) >= 354) {\r
+ return R.drawable.winter_holidays_icon;\r
+ } else {\r
+ return R.drawable.icon;\r
+ }\r
+ }\r
}\r
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.datamodel.OCFile;
+import com.owncloud.android.oc_framework.operations.RemoteFile;
import android.annotation.SuppressLint;
import android.content.Context;
parentPath = parentPath.endsWith(OCFile.PATH_SEPARATOR) ? parentPath : parentPath + OCFile.PATH_SEPARATOR;
return parentPath;
}
+
+ /**
+ * Creates and populates a new {@link OCFile} object with the data read from the server.
+ *
+ * @param remote remote file read from the server (remote file or folder).
+ * @return New OCFile instance representing the remote resource described by we.
+ */
+ public static OCFile fillOCFile(RemoteFile remote) {
+ OCFile file = new OCFile(remote.getRemotePath());
+ file.setCreationTimestamp(remote.getCreationTimestamp());
+ file.setFileLength(remote.getLength());
+ file.setMimetype(remote.getMimeType());
+ file.setModificationTimestamp(remote.getModifiedTimestamp());
+ file.setEtag(remote.getEtag());
+
+ return file;
+ }
+
+ /**
+ * Creates and populates a new {@link RemoteFile} object with the data read from an {@link OCFile}.
+ *
+ * @param oCFile OCFile
+ * @return New RemoteFile instance representing the resource described by ocFile.
+ */
+ public static RemoteFile fillRemoteFile(OCFile ocFile){
+ RemoteFile file = new RemoteFile(ocFile.getRemotePath());
+ file.setCreationTimestamp(ocFile.getCreationTimestamp());
+ file.setLength(ocFile.getFileLength());
+ file.setMimeType(ocFile.getMimetype());
+ file.setModifiedTimestamp(ocFile.getModificationTimestamp());
+ file.setEtag(ocFile.getEtag());
+ return file;
+ }
}
\ No newline at end of file