along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<manifest package="com.owncloud.android"
- android:versionCode="104006"
- android:versionName="1.4.6" xmlns:android="http://schemas.android.com/apk/res/android">
+ android:versionCode="105000"
+ android:versionName="1.5.0" 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" />
- If you want to start help developing ownCloud please follow the [contribution guidlines][0] and observe these instructions:
+If you want to start help developing ownCloud please follow the [contribution guidelines][0] and observe these instructions:
- 1. Fork and download android/develop repository:
-
- - NOTE: You must have git in your enviroment path
- - Navigate to https://github.com/owncloud/android, click fork.
- - Clone your new repo: "git clone git@github.com:YOURGITHUBNAME/android.git"
- - "cd android"
- - Checkout remote develop branch: "git checkout -b develop remotes/origin/develop"
- - Pull changes from your develop branch: "git pull origin develop"
- - Make sure to get the latest changes from official android/develop branch:
- - Make official owncloud repo known as upstream: "git remote add upstream git@github.com:owncloud/android.git"
- - Pull latest changes from upstream: "git pull upstream develop"
-
- 2. Building with console/maven:
-
- - OPTIONAL, CONTINUE WITH STEP 3 IF NOT REQUIRED!
- - NOTE: You must have mvn in your enviroment path
- - Download/install Android plugin for Maven, then build ownCloud with mvn:
- - "cd .."
- - "git clone https://github.com/mosabua/maven-android-sdk-deployer.git"
- - "cd maven-android-sdk-deployer"
- - "mvn -pl com.simpligility.android.sdk-deployer:android-17 -am install"
- - "cd ../android"
- - Now you can create APK using "mvn package"
-
- 3. Building with Eclipse:
-
- - NOTE: You must have android/tools, and 'platforms-tools' in your enviroment path
- - Prepare building with Eclipse:
- - "setup_env.bat" or "./setup_env.sh"
- - Open Eclipse and create new "Android Project from Existing Code". As root choose android/actionbarsherlock/library
- - Increase Android API level until project compiles. 14 should work.
- - Clean project and compile.
- - Make sure android/actionbarsherlock/library/bin/library.jar was created!
- - Import OwnCloud Android project.
- - Increase Android API level to 17.
- - Clean project and compile.
- - After those actions you should be good to go. HAVE FUN!
- - NOTE: Even though API level is set to 17, APK also runs on older devices because in AndroidManifest.xml minSdkVersion is set to 8.
-
- 4. Create pull request:
+### 1. Fork and download android/develop repository:
+
+NOTE: You must have git in your environment path variable to perform the next operations.
+
+* Navigate to https://github.com/owncloud/android, click fork.
+* Clone your new repo: "git clone git@github.com:YOURGITHUBNAME/android.git"
+* Move to the project folder with "cd android"
+* Checkout remote develop branch: "git checkout -b develop remotes/origin/develop"
+* Pull changes from your develop branch: "git pull origin develop"
+* Make official ownCloud repo known as upstream: "git remote add upstream git@github.com:owncloud/android.git"
+* Make sure to get the latest changes from official android/develop branch: "git pull upstream develop"
+
+At this point you can continue using different tools to build the project. Section 2, 3 and 4 describe some of the existing alternatives.
+
+### 2. Building with Ant:
+
+NOTE: You must have the Android SDK 'tools/', and 'platforms-tools/' folders in your environment path variable.
+
+* Complete the setup of project properties and resolve pending dependencies running "setup_env.bat" or "./setup_env.sh" .
+* Run "ant clean" .
+* Run "ant debug" to generate a debuggable version of the ownCkoud app.
+
+### 3. Building with console/maven:
+
+NOTE: You must have mvn in your environment path
+
+* Download/install Android plugin for Maven, then build ownCloud with mvn:
+* "cd .."
+* "git clone https://github.com/mosabua/maven-android-sdk-deployer.git"
+* "cd maven-android-sdk-deployer"
+* "mvn -pl com.simpligility.android.sdk-deployer:android-17 -am install"
+* "cd ../android"
+* Now you can create APK using "mvn package"
+
+### 4. Building with Eclipse:
+
+NOTE: You must have the Android SDK 'tools/', and 'platforms-tools/' folders in your environment path variable.
+
+* Complete the setup of project properties and resolve pending dependencies running "setup_env.bat" or "./setup_env.sh" .
+* Open Eclipse and create new "Android Project from Existing Code". Choose android/actionbarsherlock/library as root.
+* Clean project and compile.
+* If any error appear, check the project properties; in the 'Android' section, API Level should be greater or equal than 14.
+* Make sure android/actionbarsherlock/library/bin/library.jar was created.
+* Create a new "Android Project from Existing Code". Choose android/oc_framework/library as root.
+* Clean project and compile.
+* If any error appear, check the project properties; in the 'Android' section, API Level should be 19 or greater.
+* Make sure android/oc_framework/bin/classes.jar was created.
+* Import ownCloud Android project.
+* Clean project and compile.
+* If any error appears, check the project properties; in the 'Android' section:
+ - API Level should be 19 or greater.
+ - Two library projects should appear referred in the bottom square: actionbarsherlock/library and oc_framework. Add them if needed.
+* After those actions you should be good to go. HAVE FUN!
+
+NOTE: Even though API level is set to 19, APK also runs on older devices because in AndroidManifest.xml minSdkVersion is set to 8.
+
+### 5. Create pull request:
- - NOTE: You must sign the [Contributor Agreement][1] before your changes can be accepted!
- - Commit your changes locally: "git commit -a"
- - Push your changes to your Github repo: "git push"
- - Browse to https://github.com/YOURGITHUBNAME/android/pulls and issue pull request
- - Click "Edit" and set "base:develop"
- - Again, click "Edit" and set "compare:develop"
- - Enter description and send pull request.
+NOTE: You must sign the [Contributor Agreement][1] before your changes can be accepted!
+
+* Commit your changes locally: "git commit -a"
+* Push your changes to your Github repo: "git push"
+* Browse to https://github.com/YOURGITHUBNAME/android/pulls and issue pull request
+* Click "Edit" and set "base:develop"
+* Again, click "Edit" and set "compare:develop"
+* Enter description and send pull request.
[0]: https://github.com/owncloud/android/blob/master/CONTRIBUTING.md
[1]: http://owncloud.org/about/contributor-agreement/
-
*/
public void testCreateFolder() {
- String folderName = "testCreateFolder" + mCurrentDate;
String remotePath = "/testCreateFolder" + mCurrentDate;
boolean createFullPath = true;
- RemoteOperationResult result = mActivity.createFolder(folderName, remotePath, createFullPath);
+ RemoteOperationResult result = mActivity.createFolder(remotePath, createFullPath);
assertTrue(result.isSuccess() || result.getCode() == ResultCode.TIMEOUT);
// Create Subfolder
- folderName = "testCreateFolder" + mCurrentDate;
remotePath = "/testCreateFolder" + mCurrentDate + "/" + "testCreateFolder" + mCurrentDate;
createFullPath = true;
- result = mActivity.createFolder(folderName, remotePath, createFullPath);
+ result = mActivity.createFolder(remotePath, createFullPath);
assertTrue(result.isSuccess() || result.getCode() == ResultCode.TIMEOUT);
}
public void testCreateFolderSpecialCharacters() {
boolean createFullPath = true;
- String folderName = "testSpecialCharacters_//" + mCurrentDate;
- String remotePath = "/testSpecialCharacters_//" + mCurrentDate;
- RemoteOperationResult result = mActivity.createFolder(folderName, remotePath, createFullPath);
+ String remotePath = "/testSpecialCharacters_\\" + mCurrentDate;
+ RemoteOperationResult result = mActivity.createFolder(remotePath, createFullPath);
assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME);
- folderName = "testSpecialCharacters_\\" + mCurrentDate;
- remotePath = "/testSpecialCharacters_\\" + mCurrentDate;
- result = mActivity.createFolder(folderName, remotePath, createFullPath);
- assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME);
-
- folderName = "testSpecialCharacters_<" + mCurrentDate;
remotePath = "/testSpecialCharacters_<" + mCurrentDate;
- result = mActivity.createFolder(folderName, remotePath, createFullPath);
+ result = mActivity.createFolder(remotePath, createFullPath);
assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME);
- folderName = "testSpecialCharacters_>" + mCurrentDate;
remotePath = "/testSpecialCharacters_>" + mCurrentDate;
- result = mActivity.createFolder(folderName, remotePath, createFullPath);
+ result = mActivity.createFolder(remotePath, createFullPath);
assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME);
- folderName = "testSpecialCharacters_:" + mCurrentDate;
remotePath = "/testSpecialCharacters_:" + mCurrentDate;
- result = mActivity.createFolder(folderName, remotePath, createFullPath);
+ result = mActivity.createFolder(remotePath, createFullPath);
assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME);
- folderName = "testSpecialCharacters_\"" + mCurrentDate;
remotePath = "/testSpecialCharacters_\"" + mCurrentDate;
- result = mActivity.createFolder(folderName, remotePath, createFullPath);
+ result = mActivity.createFolder(remotePath, createFullPath);
assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME);
- folderName = "testSpecialCharacters_|" + mCurrentDate;
remotePath = "/testSpecialCharacters_|" + mCurrentDate;
- result = mActivity.createFolder(folderName, remotePath, createFullPath);
+ result = mActivity.createFolder(remotePath, createFullPath);
assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME);
- folderName = "testSpecialCharacters_?" + mCurrentDate;
remotePath = "/testSpecialCharacters_?" + mCurrentDate;
- result = mActivity.createFolder(folderName, remotePath, createFullPath);
+ result = mActivity.createFolder(remotePath, createFullPath);
assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME);
- folderName = "testSpecialCharacters_*" + mCurrentDate;
remotePath = "/testSpecialCharacters_*" + mCurrentDate;
- result = mActivity.createFolder(folderName, remotePath, createFullPath);
+ result = mActivity.createFolder(remotePath, createFullPath);
assertTrue(result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME);
}
import com.owncloud.android.oc_framework.operations.remote.CreateRemoteFolderOperation;
import com.owncloud.android.oc_framework.operations.remote.RenameRemoteFileOperation;
+import android.os.AsyncTask;
import android.os.Bundle;
import android.accounts.Account;
import android.accounts.AccountManager;
import android.accounts.AuthenticatorException;
import android.accounts.OperationCanceledException;
import android.app.Activity;
+import android.content.Context;
import android.util.Log;
import android.view.Menu;
}
}
-// if (mAccount == null) {
-// mAccount = new Account(accountName, mAccountType);
-// am.addAccountExplicitly(mAccount, mAccountPass, null);
-// am.setUserData(mAccount, "oc_version", "5.0.14");
-// am.setUserData(mAccount, "oc_base_url", "http://beta.owncloud.com/owncloud");
-// } else {
-// Log.d(TAG, "oc_version --->"+ am.getUserData(mAccount, "oc_version") );
-// Log.d(TAG, "oc_base_url --->"+ am.getUserData(mAccount, "oc_base_url") );
-// }
-
+ // Get the WebDavClient
+ AuthTask task = new AuthTask();
+ task.execute(this.getApplicationContext());
- try {
- mClient = OwnCloudClientFactory.createOwnCloudClient(mAccount, this.getApplicationContext());
- } catch (OperationCanceledException e) {
- Log.e(TAG, "Error while trying to access to " + mAccount.name, e);
- e.printStackTrace();
- } catch (AuthenticatorException e) {
- Log.e(TAG, "Error while trying to access to " + mAccount.name, e);
- e.printStackTrace();
- } catch (AccountNotFoundException e) {
- Log.e(TAG, "Error while trying to access to " + mAccount.name, e);
- e.printStackTrace();
- } catch (IOException e) {
- Log.e(TAG, "Error while trying to access to " + mAccount.name, e);
- e.printStackTrace();
- }
}
@Override
/**
* Access to the library method to Create a Folder
- * @param folderName
* @param remotePath
* @param createFullPath
*
* @return
*/
- public RemoteOperationResult createFolder(String folderName, String remotePath, boolean createFullPath) {
+ public RemoteOperationResult createFolder(String remotePath, boolean createFullPath) {
- CreateRemoteFolderOperation createOperation = new CreateRemoteFolderOperation(folderName, remotePath, createFullPath);
+ CreateRemoteFolderOperation createOperation = new CreateRemoteFolderOperation(remotePath, createFullPath);
RemoteOperationResult result = createOperation.execute(mClient);
return result;
return result;
}
+
+ private class AuthTask extends AsyncTask<Context, Void, WebdavClient> {
+
+ @Override
+ protected WebdavClient doInBackground(Context... params) {
+ WebdavClient client = null;
+ try {
+ client = OwnCloudClientFactory.createOwnCloudClient(mAccount, (Context) params[0] );
+ } catch (OperationCanceledException e) {
+ Log.e(TAG, "Error while trying to access to " + mAccount.name, e);
+ e.printStackTrace();
+ } catch (AuthenticatorException e) {
+ Log.e(TAG, "Error while trying to access to " + mAccount.name, e);
+ e.printStackTrace();
+ } catch (AccountNotFoundException e) {
+ Log.e(TAG, "Error while trying to access to " + mAccount.name, e);
+ e.printStackTrace();
+ } catch (IOException e) {
+ Log.e(TAG, "Error while trying to access to " + mAccount.name, e);
+ e.printStackTrace();
+ } catch (IllegalStateException e) {
+ Log.e(TAG, "Error while trying to access to " + mAccount.name, e);
+ e.printStackTrace();
+ }
+ return client;
+ }
+
+ @Override
+ protected void onPostExecute(WebdavClient result) {
+ // TODO Auto-generated method stub
+ super.onPostExecute(result);
+ mClient = result;
+ }
+
+ }
}
private static final int CONNECTION_TIMEOUT = 5000;
- protected String mFolderName;
protected String mRemotePath;
protected boolean mCreateFullPath;
/**
* Constructor
*
- * @param folderName Name of new directory
* @param remotePath Full path to the new directory to create in the remote server.
* @param createFullPath 'True' means that all the ancestor folders should be created if don't exist yet.
*/
- public CreateRemoteFolderOperation(String folderName, String remotePath, boolean createFullPath) {
- mFolderName = folderName;
+ public CreateRemoteFolderOperation(String remotePath, boolean createFullPath) {
mRemotePath = remotePath;
mCreateFullPath = createFullPath;
}
RemoteOperationResult result = null;
MkColMethod mkcol = null;
- boolean noInvalidChars = FileUtils.validateName(mFolderName);
+ boolean noInvalidChars = FileUtils.isValidPath(mRemotePath);
if (noInvalidChars) {
try {
mkcol = new MkColMethod(client.getBaseUri() + WebdavUtils.encodePath(mRemotePath));
private RemoteOperationResult createParentFolder(String parentPath, WebdavClient client) {
- RemoteOperation operation = new CreateRemoteFolderOperation("", parentPath,
+ RemoteOperation operation = new CreateRemoteFolderOperation(parentPath,
mCreateFullPath);
return operation.execute(client);
}
LocalMoveMethod move = null;
- boolean noInvalidChars = FileUtils.validateName(mNewName);
+ boolean noInvalidChars = FileUtils.isValidPath(mNewRemotePath);
if (noInvalidChars) {
try {
* @param fileName
* @return
*/
- public static boolean validateName(String fileName) {
+ public static boolean isValidName(String fileName) {
boolean result = true;
- Log.d("FileUtils", "fileName ======= " + fileName);
- if (fileName.contains("/") || fileName.contains("\\") || fileName.contains("<") ||
- fileName.contains(">") || fileName.contains(":") || fileName.contains("\"") ||
- fileName.contains("|") || fileName.contains("?") || fileName.contains("*")) {
+ Log.d("FileUtils", "fileName =======" + fileName);
+ if (fileName.contains(PATH_SEPARATOR) ||
+ fileName.contains("\\") || fileName.contains("<") || fileName.contains(">") ||
+ fileName.contains(":") || fileName.contains("\"") || fileName.contains("|") ||
+ fileName.contains("?") || fileName.contains("*")) {
+ result = false;
+ }
+ return result;
+ }
+
+ /**
+ * Validate the path to detect if contains any forbidden character: \ , < , > , : , " , | , ? , *
+ * @param path
+ * @return
+ */
+ public static boolean isValidPath(String path) {
+ boolean result = true;
+
+ Log.d("FileUtils", "path ....... " + path);
+ if (path.contains("\\") || path.contains("<") || path.contains(">") ||
+ path.contains(":") || path.contains("\"") || path.contains("|") ||
+ path.contains("?") || path.contains("*")) {
result = false;
}
return result;
<?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="0100008"
- android:versionName="1.0.8" >
+ android:versionCode="0100010"
+ android:versionName="1.0.10" >
<uses-sdk
android:minSdkVersion="16"
- android:targetSdkVersion="16" />
+ android:targetSdkVersion="19" />
<application
android:allowBackup="false"
android:icon="@drawable/workaround_app_icon"
android:label="@string/workaround_app_name"
- android:theme="@style/AppTheme" >
+ >
<service
android:name=".AccountAuthenticatorService"
android:exported="false">
+++ /dev/null
-<resources>
-
- <!--
- Base application theme for API 11+. This theme completely replaces
- AppBaseTheme from res/values/styles.xml on API 11+ devices.
- -->
- <style name="AppBaseTheme" parent="android:Theme.Holo.Light">
- <!-- API 11 theme customizations can go here. -->
- </style>
-
-</resources>
\ No newline at end of file
+++ /dev/null
-<resources>
-
- <!--
- Base application theme for API 14+. This theme completely replaces
- AppBaseTheme from BOTH res/values/styles.xml and
- res/values-v11/styles.xml on API 14+ devices.
- -->
- <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
- <!-- API 14 theme customizations can go here. -->
- </style>
-
-</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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/>.
+-->
<resources>
<string name="workaround_app_name">ownCloud Jelly Bean Workaround for lost credentials</string>
+++ /dev/null
-<resources>
-
- <!--
- Base application theme, dependent on API level. This theme is replaced
- by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
- -->
- <style name="AppBaseTheme" parent="android:Theme.Light">
- <!--
- Theme customizations available in newer API levels can go in
- res/values-vXX/styles.xml, while customizations related to
- backward-compatibility can go here.
- -->
- </style>
-
- <!-- Application theme. -->
- <style name="AppTheme" parent="AppBaseTheme">
- <!-- All customizations that are NOT specific to a particular API-level can go here. -->
- </style>
-
-</resources>
\ No newline at end of file
<string name="prefs_log_summary_history">Ez megjeleníti a rögzitett eseményeket</string>
<string name="prefs_log_delete_history_button">Elözmények törlése</string>
<string name="prefs_help">Súgó</string>
+ <string name="prefs_recommend">Ajánlja egy barátjának</string>
+ <string name="prefs_feedback">Visszajelzés</string>
<string name="prefs_imprint">Impresszum</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_username">Felhasználói név</string>
<string name="sync_foreign_files_forgotten_ticker">Néhány helyi fájlt figyelmen kívül hagytunk</string>
<string name="sync_foreign_files_forgotten_content">%1$d fájlt nem sikerült a %2$s mappából bemásolni</string>
<string name="sync_foreign_files_forgotten_explanation">Az 1.3.16 verzió használatakor azok az állományok, amiket erről az eszközről töltenek fel, a helyi %1$s mappába másolódnak be, hogy elkerülhető legyen az adatveszteség, amikor ugyanazt az állományt több résztvevő is szinkronizál.\n\nEmiatt a változás miatt, az e program korábbi változataival feltöltött állományok a %2$s mappába másolódtak. Sajnos azonban egy a szinkronizáció közben fellépő hiba miatt ez a feladat csak részben valósult meg. Két lehetősége van: vagy úgy dönt, hogy maradjanak a fájl(ok) ahol vannak és akkor törölje a %3$s-re mutató linket, vagy pedig helyezze át az állomány(oka)t a %1$s mappába, és tartsa meg a %4$s-re mutató linket.\n\nAz alábbiakban látható a helyi fájl(ok) listája és a távoli fájl(ok) a %5$s mappában, amihez linkelve voltak.</string>
+ <string name="sync_current_folder_was_removed">A %1$s mappa már nem létezik</string>
<string name="foreign_files_move">Helyezzük át mindet</string>
<string name="foreign_files_success">Az összes fájlt áthelyeztük</string>
<string name="foreign_files_fail">Egyes fájlokat nem sikerült áthelyezni</string>
<string name="media_err_unsupported">Nem támogatott média kodek</string>
<string name="media_err_io">Media fájl nem olvasható</string>
<string name="media_err_malformed">Médiafájl kódolása nem megfelelő</string>
+ <string name="media_err_timeout">A lejátszás közben időtúllépés történt</string>
<string name="media_err_invalid_progressive_playback">A média fájlt nem lehet streamelni.</string>
<string name="media_err_unknown">A média fájlt nem tudja lejátszani a jelenlegi médialejátszó</string>
<string name="media_err_security_ex">Biztonsági hiba amikor megpróbálja lejátszani a %1$s</string>
<string name="auth_connection_established">A kapcsolat létrejött</string>
<string name="auth_testing_connection">Kapcsolat tesztelése...</string>
<string name="auth_not_configured_title">Hibás a kiszolgáló beállítása</string>
+ <string name="auth_account_not_new">Egy bejelentkezési beállítás már létezik ugyanehhez a kiszolgálóhoz és felhasználóhoz</string>
+ <string name="auth_account_not_the_same">A megadott felhasználó nem azonos ezzel a belépési jogosultsággal</string>
<string name="auth_unknown_error_title">Ismeretlen hiba történt!</string>
<string name="auth_unknown_host_title">A kiszolgáló nem található</string>
<string name="auth_incorrect_path_title">Kiszolgáló nem található</string>
<string name="auth_timeout_title">A kiszolgáló túl sokára válaszolt</string>
<string name="auth_incorrect_address_title">Hibás URL</string>
<string name="auth_ssl_general_error_title">Nem sikerült az SSL kapcsolat felépítése</string>
+ <string name="auth_ssl_unverified_server_title">Az SSL kiszolgáló tanúsítványát nem sikerült ellenőrizni</string>
<string name="auth_bad_oc_version_title">Ismeretlen változat a kiszolgálón</string>
<string name="auth_wrong_connection_title">A kapcsolat nem hozható létre</string>
<string name="auth_secure_connection">Létrejött a titkosított kapcsolat</string>
<string name="auth_oauth_error">Sikertelen azonosítás</string>
<string name="auth_oauth_error_access_denied">Hozzáférés megtagadva az azonsítást végző szerver által</string>
<string name="auth_wtf_reenter_URL">Nem várt állapot; kérlek, menj a szerver URL-jére újra.</string>
+ <string name="auth_expired_oauth_token_toast">A jogosultsága lejárt. Kérjük jelentkezzen be ismét!</string>
<string name="auth_expired_basic_auth_toast">Kélek, írd be a jelenlegi jelszavadat</string>
+ <string name="auth_expired_saml_sso_token_toast">Lejárt a munkamenetének érvényessége. Kérjük jelentkezzen be ismét!</string>
+ <string name="auth_connecting_auth_server">Kapcsolódás a felhasználóazonosítást végző kiszolgálóhoz...</string>
+ <string name="auth_unsupported_auth_method">A kiszolgáló nem támogatja ezt a felhasználóazonosítási módszert</string>
+ <string name="auth_unsupported_multiaccount">%1$s nem támogat több bejelenkezési jogosultságot</string>
<string name="fd_keep_in_sync">Automatikusan frissítse a fájlokat</string>
<string name="common_rename">Átnevezés</string>
<string name="common_remove">Eltávolítás</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="oauth_check_onoff">Bejelentkezés oAuth2-vel</string>
<string name="oauth_login_connection">Kapcsolódás az oAuth2 szerverhez...</string>
<string name="ssl_validator_header">A kiszolgálót nem sikerült azonosítani</string>
<string name="ssl_validator_reason_cert_not_trusted">- A kiszolgáló tanúsítványa nem megbízható</string>
<?xml version='1.0' encoding='UTF-8'?>
<resources>
+ <string name="about_version">različica %1$s</string>
+ <string name="actionbar_sync">Osveži račun</string>
<string name="actionbar_upload">Pošlji datoteko</string>
<string name="actionbar_upload_from_apps">Vsebina iz drugih programov</string>
<string name="actionbar_upload_files">Datoteke</string>
<string name="prefs_help">Pomoč</string>
<string name="prefs_feedback">Odziv</string>
<string name="prefs_imprint">Natis</string>
+ <string name="auth_check_server">Preveri strežnik</string>
<string name="auth_host_url">Naslov strežnika</string>
<string name="auth_username">Uporabniško ime</string>
<string name="auth_password">Geslo</string>
<string name="pincode_configure_your_pin_explanation">Koda PIN bo zahtevana vsakič pred zagonom programa.</string>
<string name="pincode_reenter_your_pincode">Ponovno vnesite kodo PIN programa</string>
<string name="pincode_remove_your_pincode">Odstrani kodo PIN programa</string>
- <string name="pincode_mismatch">Vrednosti kodo PIN programa nista enaki</string>
- <string name="pincode_wrong">Nepravilen kodo PIN programa</string>
+ <string name="pincode_mismatch">Vrednosti kod PIN programa nista enaki</string>
+ <string name="pincode_wrong">Nepravilna koda PIN programa</string>
<string name="pincode_removed">Koda PIN programa je odstranjena</string>
<string name="pincode_stored">Koda PIN programa je shranjena</string>
+ <string name="media_notif_ticker">Predvajalnik glasbe %1$s</string>
<string name="media_state_playing">%1$s (predvajanja)</string>
<string name="media_state_loading">%1$s (nalaganja)</string>
<string name="media_err_nothing_to_play">Medijskih datotek ni bilo mogoče najti</string>
<string name="auth_nossl_plain_ok_title">Varna povezava ni na voljo.</string>
<string name="auth_connection_established">Povezava je vzpostavljena</string>
<string name="auth_testing_connection">Preizkušanje povezave ...</string>
- <string name="auth_not_configured_title">Nastavitve servera so napačno oblikovane</string>
- <string name="auth_unknown_error_title">Prišlo je do neznane napake</string>
+ <string name="auth_not_configured_title">Napačno oblikovane nastavitve strežnika</string>
+ <string name="auth_unknown_error_title">Prišlo je do neznane napake!</string>
<string name="auth_unknown_host_title">Gostitelja ni mogoče najti</string>
<string name="auth_incorrect_path_title">Namestitve servera ni mogoče najti</string>
<string name="auth_timeout_title">Strežnik je potreboval preveč časa za odgovor</string>
<string name="auth_incorrect_address_title">Napačno oblikovan naslov URL</string>
<string name="auth_ssl_general_error_title">Začenjanje SSL je spodletelo</string>
- <string name="auth_bad_oc_version_title">Neprepoznana različica strežnika servera</string>
- <string name="auth_wrong_connection_title">Povezave ni mogoče vzpostaviti</string>
+ <string name="auth_bad_oc_version_title">Nepoznana različica strežnika</string>
+ <string name="auth_wrong_connection_title">Ni mogoče vzpostaviti povezave</string>
<string name="auth_secure_connection">Varna povezava je vzpostavljena</string>
<string name="fd_keep_in_sync">Datoteka naj bo posodobljena</string>
<string name="common_rename">Preimenuj</string>
<string name="ssl_validator_label_signature">Podpis:</string>
<string name="ssl_validator_label_signature_algorithm">Algoritem:</string>
<string name="placeholder_sentence">To je vsebnik predmetov.</string>
+ <string name="placeholder_filetype">Slika 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_error_unknown_format">Te slike ni mogoče prikazati</string>
<string name="error__upload__local_file_not_copied">Datoteke %1$s ni mogoče kopirati v krajevno mapo %2$s.</string>
<string name="failed_upload_all_cb">izberi vse</string>
+ <string name="failed_upload_headline_retryall_btn">vse izbrane poskusi znova</string>
<string name="failed_upload_load_more_images">Naloži več slik</string>
<string name="failed_upload_failure_text">Sporočilo o napaki:</string>
</resources>
<string name="sync_file_fail_msg">Remote file could not be checked</string>
<string name="sync_file_nothing_to_do_msg">File contents already synchronized</string>
<string name="create_dir_fail_msg">Directory could not be created</string>
- <string name="create_dir_fail_msg_invalid_characters">Invalid character in foldername: / \\ < > : " | ? *</string>
+ <string name="filename_forbidden_characters">Forbidden characters: / \\ < > : " | ? *</string>
<string name="wait_a_moment">Wait a moment</string>
<string name="filedisplay_unexpected_bad_get_content">"Unexpected problem ; please select the file from a different app"</string>
<string name="filedisplay_no_file_selected">No file was selected</string>
<string name="preview_image_error_unknown_format">This image can not be shown</string>
<string name="error__upload__local_file_not_copied">%1$s could not be copied to %2$s local directory</string>
- <string name="actionbar_failed_instant_upload">Failed InstantUpload"</string>
+ <string name="actionbar_failed_instant_upload">Failed InstantUpload</string>
<string name="failed_upload_headline_text">Failed instant uploads</string>
<string name="failed_upload_headline_hint">Summary of all failed instant uploads</string>
<string name="failed_upload_all_cb">select all</string>
import com.owncloud.android.ui.activity.ConflictsResolveActivity;
import com.owncloud.android.utils.Log_OC;
-
-
import android.accounts.Account;
import android.content.Context;
import android.content.Intent;
public class OwnCloudFileObserver extends FileObserver {
- public static int CHANGES_ONLY = CLOSE_WRITE;
+ private static int MASK = (FileObserver.MODIFY | FileObserver.CLOSE_WRITE);
private static String TAG = OwnCloudFileObserver.class.getSimpleName();
private String mPath;
private int mMask;
private Account mOCAccount;
- //private OCFile mFile;
private Context mContext;
+ private boolean mModified;
- public OwnCloudFileObserver(String path, Account account, Context context, int mask) {
- super(path, mask);
+ public OwnCloudFileObserver(String path, Account account, Context context) {
+ super(path, MASK);
if (path == null)
throw new IllegalArgumentException("NULL path argument received");
- /*if (file == null)
- throw new IllegalArgumentException("NULL file argument received");*/
if (account == null)
throw new IllegalArgumentException("NULL account argument received");
if (context == null)
throw new IllegalArgumentException("NULL context argument received");
- /*if (!path.equals(file.getStoragePath()) && !path.equals(FileStorageUtils.getDefaultSavePathFor(account.name, file)))
- throw new IllegalArgumentException("File argument is not linked to the local file set in path argument"); */
mPath = path;
- //mFile = file;
mOCAccount = account;
mContext = context;
- mMask = mask;
+ mModified = false;
}
+
@Override
public void onEvent(int event, String path) {
Log_OC.d(TAG, "Got file modified with event " + event + " and path " + mPath + ((path != null) ? File.separator + path : ""));
- if ((event & mMask) == 0) {
+ if ((event & MASK) == 0) {
Log_OC.wtf(TAG, "Incorrect event " + event + " sent for file " + mPath + ((path != null) ? File.separator + path : "") +
" with registered for " + mMask + " and original path " +
mPath);
- return;
- }
+ } else {
+ if ((event & FileObserver.MODIFY) != 0) {
+ // file changed
+ mModified = true;
+ }
+ // not sure if it's possible, but let's assume that both kind of events can be received at the same time
+ if ((event & FileObserver.CLOSE_WRITE) != 0) {
+ // file closed
+ if (mModified) {
+ mModified = false;
+ startSyncOperation();
+ }
+ }
+ }
+ }
+
+
+ private void startSyncOperation() {
FileDataStorageManager storageManager = new FileDataStorageManager(mOCAccount, mContext.getContentResolver());
OCFile file = storageManager.getFileByLocalPath(mPath); // a fresh object is needed; many things could have occurred to the file since it was registered to observe
// again, assuming that local files are linked to a remote file AT MOST, SOMETHING TO BE DONE;
OwnCloudFileObserver observer =
new OwnCloudFileObserver( path,
account,
- getApplicationContext(),
- OwnCloudFileObserver.CHANGES_ONLY);
+ getApplicationContext());
mObserversMap.put(path, observer);
if (new File(path).exists()) {
observer.startWatching();
/// the local file was never registered to observe before
observer = new OwnCloudFileObserver( localPath,
account,
- getApplicationContext(),
- OwnCloudFileObserver.CHANGES_ONLY);
+ getApplicationContext());
mObserversMap.put(localPath, observer);
Log_OC.d(TAG, "Observer added for path " + localPath);
RemoteOperation operation = new ExistenceCheckOperation(pathToGrant, this, false);
RemoteOperationResult result = operation.execute(mUploadClient);
if (!result.isSuccess() && result.getCode() == ResultCode.FILE_NOT_FOUND && mCurrentUpload.isRemoteFolderToBeCreated()) {
- operation = new CreateFolderOperation( mCurrentUpload.getFileName(),
- pathToGrant,
+ operation = new CreateFolderOperation( pathToGrant,
true,
mStorageManager );
result = operation.execute(mUploadClient);
private static final String TAG = CreateFolderOperation.class.getSimpleName();
- protected String mFolderName;
protected String mRemotePath;
protected boolean mCreateFullPath;
protected FileDataStorageManager mStorageManager;
/**
* Constructor
*
- * @param remotePath Full path to the new directory to create in the remote server.
* @param createFullPath 'True' means that all the ancestor folders should be created if don't exist yet.
* @param storageManager Reference to the local database corresponding to the account where the file is contained.
*/
- public CreateFolderOperation(String folderName, String remotePath, boolean createFullPath, FileDataStorageManager storageManager) {
- mFolderName = folderName;
+ public CreateFolderOperation(String remotePath, boolean createFullPath, FileDataStorageManager storageManager) {
mRemotePath = remotePath;
mCreateFullPath = createFullPath;
mStorageManager = storageManager;
@Override
protected RemoteOperationResult run(WebdavClient client) {
- CreateRemoteFolderOperation operation = new CreateRemoteFolderOperation(mFolderName, mRemotePath, mCreateFullPath);
+ CreateRemoteFolderOperation operation = new CreateRemoteFolderOperation(mRemotePath, mCreateFullPath);
RemoteOperationResult result = operation.execute(client);
if (result.isSuccess()) {
} else {
dismissLoadingDialog();
if (result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME) {
- Toast.makeText(FileDisplayActivity.this, R.string.create_dir_fail_msg_invalid_characters, Toast.LENGTH_LONG).show();
+ Toast.makeText(FileDisplayActivity.this, R.string.filename_forbidden_characters, Toast.LENGTH_LONG).show();
} else {
try {
Toast msg = Toast.makeText(FileDisplayActivity.this, R.string.create_dir_fail_msg, Toast.LENGTH_LONG);
msg.show();
// TODO throw again the new rename dialog
} if (result.getCode().equals(ResultCode.INVALID_CHARACTER_IN_NAME)) {
- Toast msg = Toast.makeText(this, R.string.create_dir_fail_msg_invalid_characters, Toast.LENGTH_LONG);
+ Toast msg = Toast.makeText(this, R.string.filename_forbidden_characters, Toast.LENGTH_LONG);
msg.show();
} else {
Toast msg = Toast.makeText(this, R.string.rename_server_fail_msg, Toast.LENGTH_LONG);
// Create directory
path += newDirectoryName + OCFile.PATH_SEPARATOR;
- RemoteOperation operation = new CreateFolderOperation(newDirectoryName, path, false, mStorageManager);
+ RemoteOperation operation = new CreateFolderOperation(path, false, mStorageManager);
operation.execute( getAccount(),
FileDisplayActivity.this,
FileDisplayActivity.this,
import android.view.WindowManager.LayoutParams;
import android.widget.EditText;
import android.widget.TextView;
+import android.widget.Toast;
import com.actionbarsherlock.app.SherlockDialogFragment;
import com.owncloud.android.R;
-
+import com.owncloud.android.oc_framework.utils.FileUtils;
/**
switch (which) {
case AlertDialog.BUTTON_POSITIVE: {
mNewFilename = ((TextView)(getDialog().findViewById(R.id.user_input))).getText().toString();
+ if (!FileUtils.isValidName(mNewFilename)) {
+ Toast.makeText(getSherlockActivity(), R.string.filename_forbidden_characters, Toast.LENGTH_LONG).show();
+ return;
+ }
mResult = true;
}
case AlertDialog.BUTTON_NEGATIVE: { // fall through
msg.show();
// TODO throw again the new rename dialog
} if (result.getCode().equals(ResultCode.INVALID_CHARACTER_IN_NAME)) {
- Toast msg = Toast.makeText(getActivity(), R.string.create_dir_fail_msg_invalid_characters, Toast.LENGTH_LONG);
+ Toast msg = Toast.makeText(getActivity(), R.string.filename_forbidden_characters, Toast.LENGTH_LONG);
msg.show();
} else {
Toast msg = Toast.makeText(getActivity(), R.string.rename_server_fail_msg, Toast.LENGTH_LONG);