Merge pull request #755 from owncloud/OpenWithInContextMenu
authorjabarros <jabarros@solidgear.es>
Fri, 26 Dec 2014 08:13:58 +0000 (09:13 +0100)
committerjabarros <jabarros@solidgear.es>
Fri, 26 Dec 2014 08:13:58 +0000 (09:13 +0100)
"open with" in ContextMenu of downloaded files

135 files changed:
.gitignore
.gitmodules
.travis.yml
AndroidManifest.xml
README.md
SETUP.md
actionbarsherlock [deleted submodule]
build.gradle [new file with mode: 0644]
gradle/wrapper/gradle-wrapper.jar [new file with mode: 0644]
gradle/wrapper/gradle-wrapper.properties [new file with mode: 0644]
gradlew [new file with mode: 0755]
gradlew.bat [new file with mode: 0644]
libs/actionbarsherlock_lib/build.gradle [new file with mode: 0644]
libs/actionbarsherlock_lib/library-4.1.0.aar [new file with mode: 0644]
oc_jb_workaround/AndroidManifest.xml
oc_jb_workaround/build.gradle [new file with mode: 0644]
oc_jb_workaround/gradle/wrapper/gradle-wrapper.jar [new file with mode: 0644]
oc_jb_workaround/gradle/wrapper/gradle-wrapper.properties [new file with mode: 0644]
oc_jb_workaround/gradlew [new file with mode: 0755]
oc_jb_workaround/gradlew.bat [new file with mode: 0644]
oc_jb_workaround/project.properties
owncloud-android-library
pom.xml
res/layout/files_folder_picker.xml [new file with mode: 0644]
res/layout/files_move.xml [deleted file]
res/layout/list_footer.xml [new file with mode: 0644]
res/layout/list_fragment.xml
res/layout/preference_widget_radiobutton.xml [new file with mode: 0644]
res/values-af-rZA/strings.xml
res/values-ar/strings.xml
res/values-be/strings.xml
res/values-bg-rBG/strings.xml
res/values-bn-rBD/strings.xml
res/values-ca/strings.xml
res/values-cs-rCZ/strings.xml
res/values-cy-rGB/strings.xml
res/values-da/strings.xml
res/values-de-rDE/strings.xml
res/values-de/strings.xml
res/values-el/strings.xml
res/values-en-rGB/strings.xml
res/values-eo/strings.xml
res/values-es-rAR/strings.xml
res/values-es-rCL/strings.xml
res/values-es-rMX/strings.xml
res/values-es/strings.xml
res/values-et-rEE/strings.xml
res/values-eu/strings.xml
res/values-fa/strings.xml
res/values-fi-rFI/strings.xml
res/values-fi/strings.xml [new file with mode: 0644]
res/values-fr/strings.xml
res/values-gl/strings.xml
res/values-he/strings.xml
res/values-hr/strings.xml
res/values-hu-rHU/strings.xml
res/values-ia/strings.xml
res/values-id/strings.xml
res/values-is/strings.xml
res/values-it/strings.xml
res/values-ja-rJP/strings.xml
res/values-ka-rGE/strings.xml
res/values-km/strings.xml
res/values-kn/strings.xml
res/values-ko/strings.xml
res/values-lb/strings.xml
res/values-lo/strings.xml [new file with mode: 0644]
res/values-lt-rLT/strings.xml
res/values-lv/strings.xml
res/values-mk/strings.xml
res/values-mn/strings.xml
res/values-ms-rMY/strings.xml
res/values-my/strings.xml
res/values-nb-rNO/strings.xml
res/values-nl/strings.xml
res/values-nn-rNO/strings.xml
res/values-oc/strings.xml
res/values-pa/strings.xml
res/values-pl/strings.xml
res/values-pt-rBR/strings.xml
res/values-pt-rPT/strings.xml
res/values-ro/strings.xml
res/values-ru/strings.xml
res/values-si-rLK/strings.xml
res/values-sk-rSK/strings.xml
res/values-sl/strings.xml
res/values-sq/strings.xml
res/values-sr-rSP/strings.xml
res/values-sr/strings.xml
res/values-sv/strings.xml
res/values-ta-rLK/strings.xml
res/values-th-rTH/strings.xml
res/values-tr/strings.xml
res/values-uk/strings.xml
res/values-ur-rPK/strings.xml
res/values-vi/strings.xml
res/values-zh-rCN/strings.xml
res/values-zh-rTW/strings.xml
res/values/strings.xml
res/xml/preferences.xml
settings.gradle [new file with mode: 0644]
setup_env.bat
setup_env.sh
src/com/owncloud/android/datamodel/FileDataStorageManager.java
src/com/owncloud/android/datamodel/OCFile.java
src/com/owncloud/android/datamodel/ThumbnailsCacheManager.java
src/com/owncloud/android/files/InstantUploadBroadcastReceiver.java
src/com/owncloud/android/files/services/FileDownloader.java
src/com/owncloud/android/operations/CreateShareOperation.java
src/com/owncloud/android/operations/DetectAuthenticationMethodOperation.java
src/com/owncloud/android/operations/DownloadFileOperation.java
src/com/owncloud/android/operations/GetSharesForFileOperation.java
src/com/owncloud/android/operations/RenameFileOperation.java
src/com/owncloud/android/providers/FileContentProvider.java
src/com/owncloud/android/services/OperationsService.java
src/com/owncloud/android/ui/LongClickableCheckBoxPreference.java [deleted file]
src/com/owncloud/android/ui/PreferenceWithLongSummary.java [new file with mode: 0644]
src/com/owncloud/android/ui/RadioButtonPreference.java [new file with mode: 0644]
src/com/owncloud/android/ui/activity/FileDisplayActivity.java
src/com/owncloud/android/ui/activity/FolderPickerActivity.java [new file with mode: 0644]
src/com/owncloud/android/ui/activity/LogHistoryActivity.java
src/com/owncloud/android/ui/activity/MoveActivity.java [deleted file]
src/com/owncloud/android/ui/activity/Preferences.java
src/com/owncloud/android/ui/activity/UploadPathActivity.java [new file with mode: 0644]
src/com/owncloud/android/ui/adapter/FileListListAdapter.java
src/com/owncloud/android/ui/dialog/RemoveFileDialogFragment.java
src/com/owncloud/android/ui/dialog/RenameFileDialogFragment.java
src/com/owncloud/android/ui/fragment/ExtendedListFragment.java
src/com/owncloud/android/ui/fragment/OCFileListFragment.java
src/com/owncloud/android/ui/preview/PreviewImageActivity.java
src/com/owncloud/android/ui/preview/PreviewImageFragment.java
src/com/owncloud/android/utils/BitmapUtils.java
src/com/owncloud/android/utils/DisplayUtils.java
src/com/owncloud/android/utils/FileStorageUtils.java
third_party/android-support-library/android-support-v4.jar

index 9b9bd8e..8346dbf 100644 (file)
@@ -10,6 +10,8 @@
 
 # generated files
 bin/
+build/
+*.iml
 gen/
 target/
 
@@ -30,5 +32,11 @@ oc_framework/proguard-project.txt
 oc_framework-test-project/proguard-project.txt
 tests/proguard-project.txt
 
-# Should not be commited inside this repo:
-actionbarsherlock/
\ No newline at end of file
+# Android Studio and Gradle specific entries
+.gradle
+.idea
+*.iml
+build
+
+# Actionbarsherlock is now ignored since scripts takes care of init the sub-modules.
+actionbarsherlock
\ No newline at end of file
index f0ca872..fa52fcd 100644 (file)
@@ -1,6 +1,5 @@
-[submodule "actionbarsherlock"]
-       path = actionbarsherlock
-       url = git://github.com/JakeWharton/ActionBarSherlock.git
+
 [submodule "owncloud-android-library"]
        path = owncloud-android-library
        url = git://github.com/owncloud/android-library.git
+       branch = develop
index 50b73d1..d7e46cb 100644 (file)
@@ -1,22 +1,14 @@
 language: android
 android:
   components:
+    - platform-tools
+    - tools
     - build-tools-20.0.0
     - android-19
-    - android-17
-    - android-14
-    - extra-android-support
-  licenses:
-    - 'android-sdk-license-5be876d5'
-    - 'android-sdk-license-598b93a6'
-  
-jdk: oraclejdk7
-
 before_install:
   - rm pom.xml
-  - ./setup_env.sh
-
 script:
+  - ./setup_env.sh ant
   - ant clean
   - ant debug
 
index a5990af..fd92d3d 100644 (file)
@@ -18,8 +18,8 @@
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
  -->
 <manifest package="com.owncloud.android"
-    android:versionCode="10600100"
-    android:versionName="1.6.1" xmlns:android="http://schemas.android.com/apk/res/android">
+    android:versionCode="10600200"
+    android:versionName="1.6.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" />
                        android:icon="@drawable/copy_link"/>
 
         <activity 
-                       android:name=".ui.activity.MoveActivity"
+                       android:name=".ui.activity.FolderPickerActivity"
+                       android:label="@string/app_name"/>
+
+        <activity 
+                       android:name=".ui.activity.UploadPathActivity"
                        android:label="@string/app_name"/>
         
     </application>
index 45cb4be..dd75d3f 100644 (file)
--- a/README.md
+++ b/README.md
@@ -5,4 +5,4 @@ The app performs file synchronization with an ownCloud server. Other ownCloud fe
 Make sure you read [SETUP.md][1] when you start working on this project.
 
 [0]: https://github.com/owncloud/core
-[1]: https://raw.github.com/owncloud/android/master/SETUP.md
\ No newline at end of file
+[1]: https://github.com/owncloud/android/blob/master/SETUP.md
index 3953903..a9e2a93 100644 (file)
--- a/SETUP.md
+++ b/SETUP.md
@@ -1,13 +1,11 @@
-  
+
 If you want to start help developing ownCloud please follow the [contribution guidelines][0] and observe these instructions.
 
 If you have any problems, start again with 1) and work your way down. If something still does not work as described here, please open a new issue describing exactly what you did, what happened, and what should have happened.
-  
-### 1) Fork and download android/develop repository:
 
-NOTE: Android SDK with platforms 8, 14 and 19 (and maybe others) need to be installed.
-      You must have the Android SDK 'tools/', and 'platforms-tools/' folders in your environment path variable.
-      "git" need to be installed and in your environment path variable.
+### 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"
@@ -16,23 +14,28 @@ NOTE: Android SDK with platforms 8, 14 and 19 (and maybe others) need to be inst
 * 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"
-* Complete the setup of project properties and resolve pending dependencies running "setup_env.bat" or "./setup_env.sh" .
 
-At this point you can continue using different tools to build the project. Sections 2a), 2b), and 2c) describe some of the existing alternatives.
+At this point you can continue using different tools to build the project. Section 2, 3, 4, 5 and 6 describe some of the existing alternatives.
+
+### 2. Building with Ant:
 
-### 2a) Building with Ant:
-  
 NOTE: You must have the Android SDK 'tools/', and 'platforms-tools/' folders in your environment path variable.
 
-* Run "ant clean" .
+* Resolve necessary dependencies running:
+    - Windows: "setup_env.bat ant"
+    - Mac OS/Linux: "./setup_env.sh ant"
+* Run "ant clean".
 * Run "ant debug" to generate a debuggable version of the ownCloud app.
 
-### 2b) Building with console/maven:
+### 3. Building with console/maven:
 
 NOTE: You must have mvn (version >= 3.1.1) in your environment path. Current Android 'platforms-tools' need to be installed.
 
-Download/install Android plugin for Maven, install owncloud-android-library, then build ownCloud with mvn:
+Download/install Android plugin for Maven, then build ownCloud with mvn:
 
+* Resolve necessary dependencies running:
+    - Windows: "setup_env.bat maven"
+    - Mac OS/Linux: "./setup_env.sh maven"
 * cd ..
 * git clone https://github.com/mosabua/maven-android-sdk-deployer.git
 * cd maven-android-sdk-deployer
@@ -41,43 +44,65 @@ Download/install Android plugin for Maven, install owncloud-android-library, the
 * mvn install
 * cd ..
 
-Now you can create ownCloud APK using "mvn package"
+Now you can create ownCloud APK using "mvn package" and find it as ownCloud.apk under the target
+
+### 4. Building with Gradle:
 
-### 2c) Building with Eclipse:
+* Complete the setup of project properties running:
+    - Windows: "setup_env.bat gradle"
+    - Mac OS/Linux: "./setup_env.sh gradle"
+* Open a terminal and go to the "android" directory that contains the repository.
+* Run the 'clean' and 'build' tasks using the Gradle wrapper provided:
+    - Windows: gradlew.bat clean build
+    - Mac OS/Linux: ./gradlew clean build
+* You can find the generated apk file in android/build/outputs/apk
+
+### 5. 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.
+* Resolve necessary dependencies running:
+    - Windows: "setup_env.bat ant"
+    - Mac OS/Linux: "./setup_env.sh ant"
+    * 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.
-* If "error loading libz.so.1" appears, try "sudo apt-get install lib32z1"
+* If any error appears, 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/owncloud-android-library as root. (test and sample clients are not required.)
+* Create a new "Android Project from Existing Code". Choose android/owncloud-android-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/owncloud-android-library/bin/owncloud android library.jar' was created.
+* If any error appears, check the project properties; in the 'Android' section, API Level should be 19 or greater.
+* Make sure android/owncloud-android-library/bin/classes.jar was created.
 * Import ownCloud Android project.
 * Clean project and compile.
 * If any error appears, check the project properties of owncloud-android project; in the 'Android' section:
-  - API Level should be 19 or greater.
-  - Two library projects should appear referred in the bottom square: actionbarsherlock/library and owncloud-android-library. Add them if needed. 
+    - API Level should be 19 or greater.
+    - Two library projects should appear referred in the bottom square: actionbarsherlock/library and owncloud-android-library. 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.
 
-### 3) Create pull request:
-  
+### 6. Building with Android Studio:
+
+* Complete the setup of project properties running:
+    - Windows: "setup_env.bat gradle"
+    - Mac OS/Linux: "./setup_env.sh gradle"
+* The first time you want to open the project in Android Studio, select 'Import Project...' and choose the file "android/settings.gradle".
+  Android Studio will then create the '.iml' files it needs. If you ever close the project but the files are still there, you just select
+  'Open Project...'. The file chooser will show an Android face as the folder icon, which you can select to reopen the project.
+* To build the project, follow the guidelines shown on [4. Building with Gradle][2].
+
+### 7. 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"
+* 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.
 
-### 4) Create another pull request:
+### 8. Create another pull request:
 
 To make sure your new pull request does not contain commits which are already contained in previous PRs, create a new branch which is a clone of upstream/develop.
 
@@ -85,8 +110,9 @@ To make sure your new pull request does not contain commits which are already co
 * git checkout -b my_new_develop_branch upstream/develop
 * If you want to rename that branch later: "git checkout -b my_new_develop_branch_with_new_name"
 * Push branch to server: "git push -u origin name_of_local_develop_branch"
-* Use Github to issue PR
+* Use GitHub to issue PR
 
 
 [0]: https://github.com/owncloud/android/blob/master/CONTRIBUTING.md
 [1]: http://owncloud.org/about/contributor-agreement/
+[2]: https://github.com/owncloud/android/blob/master/SETUP.md#4-building-with-gradle
diff --git a/actionbarsherlock b/actionbarsherlock
deleted file mode 160000 (submodule)
index 9598f2b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 9598f2bb2ceed4a834cd5586a903f270ca4c0ccc
diff --git a/build.gradle b/build.gradle
new file mode 100644 (file)
index 0000000..46308ac
--- /dev/null
@@ -0,0 +1,78 @@
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.14.0'
+    }
+}
+
+apply plugin: 'com.android.application'
+
+
+repositories {
+    mavenCentral()
+
+    flatDir {
+        dirs 'libs'
+    }
+}
+
+artifacts.add("default", file('libs/actionbarsherlock.aar'))
+
+dependencies {
+    compile name: 'touch-image-view'
+    compile 'com.android.support:support-v4:19.1.0'
+    compile project('libs/actionbarsherlock_lib')
+    compile project(':owncloud-android-library')
+    compile 'com.jakewharton:disklrucache:2.0.2'
+}
+
+android {
+    compileSdkVersion 19
+    buildToolsVersion "20.0.0"
+    sourceSets {
+        main {
+            manifest.srcFile 'AndroidManifest.xml'
+            java.srcDirs = ['src']
+            resources.srcDirs = ['src']
+            aidl.srcDirs = ['src']
+            renderscript.srcDirs = ['src']
+            res.srcDirs = ['res']
+            assets.srcDirs = ['res']
+        }
+
+        // Move the tests to tests/java, tests/res, etc...
+        instrumentTest.setRoot('tests')
+
+        // Move the build types to build-types/<type>
+        // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
+        // This moves them out of them default location under src/<type>/... which would
+        // conflict with src/ being used by the main source set.
+        // Adding new build types or product flavors should be accompanied
+        // by a similar customization.
+        debug.setRoot('build-types/debug')
+        release.setRoot('build-types/release')
+    }
+
+    android {
+        lintOptions {
+            abortOnError false
+        }
+    }
+
+
+    compileOptions {
+        sourceCompatibility JavaVersion.VERSION_1_7
+        targetCompatibility JavaVersion.VERSION_1_7
+    }
+    
+    productFlavors {
+    }
+
+    packagingOptions {
+        exclude 'META-INF/LICENSE.txt'
+    }
+}
+
+
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644 (file)
index 0000000..3d0dee6
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644 (file)
index 0000000..8d63f89
--- /dev/null
@@ -0,0 +1,6 @@
+#Wed Oct 15 10:45:44 CEST 2014
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-all.zip
diff --git a/gradlew b/gradlew
new file mode 100755 (executable)
index 0000000..91a7e26
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+    echo "$*"
+}
+
+die ( ) {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >&-
+APP_HOME="`pwd -P`"
+cd "$SAVED" >&-
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+    JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644 (file)
index 0000000..aec9973
--- /dev/null
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off\r
+@rem ##########################################################################\r
+@rem\r
+@rem  Gradle startup script for Windows\r
+@rem\r
+@rem ##########################################################################\r
+\r
+@rem Set local scope for the variables with windows NT shell\r
+if "%OS%"=="Windows_NT" setlocal\r
+\r
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\r
+set DEFAULT_JVM_OPTS=\r
+\r
+set DIRNAME=%~dp0\r
+if "%DIRNAME%" == "" set DIRNAME=.\r
+set APP_BASE_NAME=%~n0\r
+set APP_HOME=%DIRNAME%\r
+\r
+@rem Find java.exe\r
+if defined JAVA_HOME goto findJavaFromJavaHome\r
+\r
+set JAVA_EXE=java.exe\r
+%JAVA_EXE% -version >NUL 2>&1\r
+if "%ERRORLEVEL%" == "0" goto init\r
+\r
+echo.\r
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\r
+echo.\r
+echo Please set the JAVA_HOME variable in your environment to match the\r
+echo location of your Java installation.\r
+\r
+goto fail\r
+\r
+:findJavaFromJavaHome\r
+set JAVA_HOME=%JAVA_HOME:"=%\r
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe\r
+\r
+if exist "%JAVA_EXE%" goto init\r
+\r
+echo.\r
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\r
+echo.\r
+echo Please set the JAVA_HOME variable in your environment to match the\r
+echo location of your Java installation.\r
+\r
+goto fail\r
+\r
+:init\r
+@rem Get command-line arguments, handling Windowz variants\r
+\r
+if not "%OS%" == "Windows_NT" goto win9xME_args\r
+if "%@eval[2+2]" == "4" goto 4NT_args\r
+\r
+:win9xME_args\r
+@rem Slurp the command line arguments.\r
+set CMD_LINE_ARGS=\r
+set _SKIP=2\r
+\r
+:win9xME_args_slurp\r
+if "x%~1" == "x" goto execute\r
+\r
+set CMD_LINE_ARGS=%*\r
+goto execute\r
+\r
+:4NT_args\r
+@rem Get arguments from the 4NT Shell from JP Software\r
+set CMD_LINE_ARGS=%$\r
+\r
+:execute\r
+@rem Setup the command line\r
+\r
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar\r
+\r
+@rem Execute Gradle\r
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\r
+\r
+:end\r
+@rem End local scope for the variables with windows NT shell\r
+if "%ERRORLEVEL%"=="0" goto mainEnd\r
+\r
+:fail\r
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r
+rem the _cmd.exe /c_ return code!\r
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1\r
+exit /b 1\r
+\r
+:mainEnd\r
+if "%OS%"=="Windows_NT" endlocal\r
+\r
+:omega\r
diff --git a/libs/actionbarsherlock_lib/build.gradle b/libs/actionbarsherlock_lib/build.gradle
new file mode 100644 (file)
index 0000000..58172e2
--- /dev/null
@@ -0,0 +1,2 @@
+configurations.create("default")
+artifacts.add("default", file('library-4.1.0.aar'))
diff --git a/libs/actionbarsherlock_lib/library-4.1.0.aar b/libs/actionbarsherlock_lib/library-4.1.0.aar
new file mode 100644 (file)
index 0000000..f340e01
Binary files /dev/null and b/libs/actionbarsherlock_lib/library-4.1.0.aar differ
index ada508c..478e3c4 100644 (file)
@@ -1,8 +1,8 @@
 <?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="0100019"
-    android:versionName="1.0.19" >
+    android:versionCode="0100020"
+    android:versionName="1.0.20" >
 
     <uses-sdk
         android:minSdkVersion="16"
diff --git a/oc_jb_workaround/build.gradle b/oc_jb_workaround/build.gradle
new file mode 100644 (file)
index 0000000..882a090
--- /dev/null
@@ -0,0 +1,42 @@
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.13.0'
+    }
+}
+apply plugin: 'com.android.library'
+
+dependencies {
+    compile fileTree(dir: 'libs', include: '*.jar')
+}
+
+android {
+    compileSdkVersion 19
+    buildToolsVersion "20.0.0"
+
+    sourceSets {
+        main {
+            manifest.srcFile 'AndroidManifest.xml'
+            java.srcDirs = ['src']
+            resources.srcDirs = ['src']
+            aidl.srcDirs = ['src']
+            renderscript.srcDirs = ['src']
+            res.srcDirs = ['res']
+            assets.srcDirs = ['assets']
+        }
+
+        // Move the tests to tests/java, tests/res, etc...
+        instrumentTest.setRoot('tests')
+
+        // Move the build types to build-types/<type>
+        // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
+        // This moves them out of them default location under src/<type>/... which would
+        // conflict with src/ being used by the main source set.
+        // Adding new build types or product flavors should be accompanied
+        // by a similar customization.
+        debug.setRoot('build-types/debug')
+        release.setRoot('build-types/release')
+    }
+}
diff --git a/oc_jb_workaround/gradle/wrapper/gradle-wrapper.jar b/oc_jb_workaround/gradle/wrapper/gradle-wrapper.jar
new file mode 100644 (file)
index 0000000..8c0fb64
Binary files /dev/null and b/oc_jb_workaround/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/oc_jb_workaround/gradle/wrapper/gradle-wrapper.properties b/oc_jb_workaround/gradle/wrapper/gradle-wrapper.properties
new file mode 100644 (file)
index 0000000..1e61d1f
--- /dev/null
@@ -0,0 +1,6 @@
+#Wed Apr 10 15:27:10 PDT 2013
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
diff --git a/oc_jb_workaround/gradlew b/oc_jb_workaround/gradlew
new file mode 100755 (executable)
index 0000000..91a7e26
--- /dev/null
@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+    echo "$*"
+}
+
+die ( ) {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >&-
+APP_HOME="`pwd -P`"
+cd "$SAVED" >&-
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+    JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/oc_jb_workaround/gradlew.bat b/oc_jb_workaround/gradlew.bat
new file mode 100644 (file)
index 0000000..aec9973
--- /dev/null
@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off\r
+@rem ##########################################################################\r
+@rem\r
+@rem  Gradle startup script for Windows\r
+@rem\r
+@rem ##########################################################################\r
+\r
+@rem Set local scope for the variables with windows NT shell\r
+if "%OS%"=="Windows_NT" setlocal\r
+\r
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\r
+set DEFAULT_JVM_OPTS=\r
+\r
+set DIRNAME=%~dp0\r
+if "%DIRNAME%" == "" set DIRNAME=.\r
+set APP_BASE_NAME=%~n0\r
+set APP_HOME=%DIRNAME%\r
+\r
+@rem Find java.exe\r
+if defined JAVA_HOME goto findJavaFromJavaHome\r
+\r
+set JAVA_EXE=java.exe\r
+%JAVA_EXE% -version >NUL 2>&1\r
+if "%ERRORLEVEL%" == "0" goto init\r
+\r
+echo.\r
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\r
+echo.\r
+echo Please set the JAVA_HOME variable in your environment to match the\r
+echo location of your Java installation.\r
+\r
+goto fail\r
+\r
+:findJavaFromJavaHome\r
+set JAVA_HOME=%JAVA_HOME:"=%\r
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe\r
+\r
+if exist "%JAVA_EXE%" goto init\r
+\r
+echo.\r
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\r
+echo.\r
+echo Please set the JAVA_HOME variable in your environment to match the\r
+echo location of your Java installation.\r
+\r
+goto fail\r
+\r
+:init\r
+@rem Get command-line arguments, handling Windowz variants\r
+\r
+if not "%OS%" == "Windows_NT" goto win9xME_args\r
+if "%@eval[2+2]" == "4" goto 4NT_args\r
+\r
+:win9xME_args\r
+@rem Slurp the command line arguments.\r
+set CMD_LINE_ARGS=\r
+set _SKIP=2\r
+\r
+:win9xME_args_slurp\r
+if "x%~1" == "x" goto execute\r
+\r
+set CMD_LINE_ARGS=%*\r
+goto execute\r
+\r
+:4NT_args\r
+@rem Get arguments from the 4NT Shell from JP Software\r
+set CMD_LINE_ARGS=%$\r
+\r
+:execute\r
+@rem Setup the command line\r
+\r
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar\r
+\r
+@rem Execute Gradle\r
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\r
+\r
+:end\r
+@rem End local scope for the variables with windows NT shell\r
+if "%ERRORLEVEL%"=="0" goto mainEnd\r
+\r
+:fail\r
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\r
+rem the _cmd.exe /c_ return code!\r
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1\r
+exit /b 1\r
+\r
+:mainEnd\r
+if "%OS%"=="Windows_NT" endlocal\r
+\r
+:omega\r
index a3ee5ab..4ab1256 100644 (file)
@@ -11,4 +11,4 @@
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 
 # Project target.
-target=android-17
+target=android-19
index 2799b3e..8261865 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 2799b3e853c79e8ebb37051c92dfcc43f8d63788
+Subproject commit 8261865ff24c1bfc05be19ae9364a66dac8f26c3
diff --git a/pom.xml b/pom.xml
index 6a8cf6a..538df03 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns="http://maven.apache.org/POM/4.0.0"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.owncloud.android</groupId>
@@ -13,7 +14,7 @@
         <owncloud.version>1.5.1-SNAPSHOT</owncloud.version>
         <java-version>1.6</java-version>
         <!-- Given by maven-android-sdk-deployer -->
-        <google.android-version>4.4.2_r3</google.android-version>
+        <google.android-version>4.4.2_r4</google.android-version>
         <!-- Usually the latest Android API -->
         <google.android-api>19</google.android-api>
         <actionbarsherlock-version>4.2.0</actionbarsherlock-version>
         <developerConnection>scm:git:git@github.com:owncloud/android.git</developerConnection>
         <url>https://github.com/owncloud/android</url>
     </scm>
-    
+
+
+    <!--<repositories>-->
+        <!--<repository>-->
+            <!--<id>android-support</id>-->
+            <!--<url>file://${env.ANDROID_HOME}/extras/android/m2repository</url>-->
+        <!--</repository>-->
+    <!--</repositories>-->
+
     <dependencies>
+
         <!-- Dirty trick, but it works. TouchImageView library is not available as Maven project. -->
         <dependency>
             <groupId>touch-image-view.jar</groupId>
             <version>19.1.0</version>
         </dependency>-->
         <!-- Instead we need to include the exact same version -->
+
+        <dependency>
+            <groupId>com.jakewharton</groupId>
+            <artifactId>disklrucache</artifactId>
+            <version>2.0.2</version>
+        </dependency>
+
         <dependency>
             <groupId>android-support-v4.jar</groupId>
             <artifactId>android-support-v4.jar</artifactId>
             <scope>system</scope>
             <systemPath>${basedir}/third_party/android-support-library/android-support-v4.jar</systemPath>
         </dependency>
-        
-        <dependency>
-            <groupId>android</groupId>
-            <artifactId>android</artifactId>
-            <version>${google.android-version}</version>
-            <scope>provided</scope>
-        </dependency>
+
 
         <dependency>
             <groupId>com.actionbarsherlock</groupId>
-            <artifactId>actionbarsherlock</artifactId>
+            <artifactId>library</artifactId>
             <version>${actionbarsherlock-version}</version>
-            <scope>provided</scope>
+            <type>apklib</type>
         </dependency>
 
         <dependency>
-            <groupId>com.actionbarsherlock</groupId>
-            <artifactId>actionbarsherlock</artifactId>
-            <version>${actionbarsherlock-version}</version>
-            <type>apklib</type>
+            <groupId>android</groupId>
+            <artifactId>android</artifactId>
+            <version>${google.android-version}</version>
+            <scope>provided</scope>
         </dependency>
 
+        <!--<dependency>-->
+            <!--<groupId>android.support</groupId>-->
+            <!--<artifactId>compatibility-v4</artifactId>-->
+            <!--<version>19.1.0</version>-->
+        <!--</dependency>-->
+
+
         <!-- MUST BE INSTALLED FIRST: cd owncloud-android-library; mvn install -->
         <dependency>
-         <groupId>com.owncloud.android</groupId>
-         <artifactId>owncloud-android-library</artifactId>
-         <version>${owncloud.version}</version>
-      </dependency>
+            <groupId>com.owncloud.android</groupId>
+            <artifactId>owncloud-android-library</artifactId>
+            <version>${owncloud.version}</version>
+        </dependency>
 
     </dependencies>
 
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.0</version>
+                <version>3.1</version>
                 <configuration>
                     <source>${java-version}</source>
                     <target>${java-version}</target>
             <plugin>
                 <groupId>com.jayway.maven.plugins.android.generation2</groupId>
                 <artifactId>android-maven-plugin</artifactId>
-                <version>3.8.0</version>
+                <version>3.8.2</version>
                 <configuration>
                     <sdk>
                         <path>${env.ANDROID_HOME}</path>
diff --git a/res/layout/files_folder_picker.xml b/res/layout/files_folder_picker.xml
new file mode 100644 (file)
index 0000000..6db8377
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/background_color"
+    android:orientation="vertical" >
+
+       <FrameLayout 
+               android:layout_width="match_parent"
+               android:layout_height="0dip"
+        android:layout_weight="1"
+               android:id="@+id/fragment_container" />
+       
+       <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center"
+        android:orientation="horizontal" >
+
+        <Button
+            android:id="@+id/folder_picker_btn_cancel"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:text="@string/common_cancel" />
+
+               <Button
+                   android:id="@+id/folder_picker_btn_choose"
+                   android:layout_width="wrap_content"
+                   android:layout_height="wrap_content"
+                   android:layout_weight="1"
+                   android:text="@string/folder_picker_choose_button_text" />
+
+       </LinearLayout>
+
+ </LinearLayout>
\ No newline at end of file
diff --git a/res/layout/files_move.xml b/res/layout/files_move.xml
deleted file mode 100644 (file)
index 491bcd8..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="@color/background_color"
-    android:orientation="vertical" >
-
-       <FrameLayout 
-               android:layout_width="match_parent"
-               android:layout_height="0dip"
-        android:layout_weight="1"
-               android:id="@+id/fragment_container" />
-       
-       <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:gravity="center"
-        android:orientation="horizontal" >
-
-        <Button
-            android:id="@+id/move_files_btn_cancel"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:text="@string/common_cancel" />
-
-               <Button
-                   android:id="@+id/move_files_btn_choose"
-                   android:layout_width="wrap_content"
-                   android:layout_height="wrap_content"
-                   android:layout_weight="1"
-                   android:text="@string/move_choose_button_text" />
-
-       </LinearLayout>
-
- </LinearLayout>
\ No newline at end of file
diff --git a/res/layout/list_footer.xml b/res/layout/list_footer.xml
new file mode 100644 (file)
index 0000000..a49874d
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="wrap_content"
+    android:layout_height="56dp"
+    android:layout_gravity="center_horizontal"
+    android:gravity="center_horizontal"
+    android:orientation="vertical"
+    android:showDividers="none" >
+
+    <TextView
+        android:id="@+id/footerText"
+        android:layout_width="match_parent"
+        android:layout_height="56dp"
+        android:layout_gravity="center"
+        android:gravity="center"
+        android:textColor="@color/setup_text_hint" />
+
+</LinearLayout> 
\ No newline at end of file
index 4236d07..160edc1 100644 (file)
     <android.support.v4.widget.SwipeRefreshLayout
         android:id="@+id/swipe_refresh_files"
         android:layout_width="match_parent"
-        android:layout_height="match_parent" >
-
+        android:layout_height="match_parent" 
+        android:layout_weight="1"
+        android:footerDividersEnabled="false" > 
+        
         <com.owncloud.android.ui.ExtendedListView
             android:id="@+id/list_root"
             android:layout_width="match_parent"
             android:layout_height="match_parent" />
-        
+            
     </android.support.v4.widget.SwipeRefreshLayout>
-
-    <android.support.v4.widget.SwipeRefreshLayout
+       
+       <android.support.v4.widget.SwipeRefreshLayout
         android:id="@+id/swipe_refresh_files_emptyView"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
diff --git a/res/layout/preference_widget_radiobutton.xml b/res/layout/preference_widget_radiobutton.xml
new file mode 100644 (file)
index 0000000..85f8f60
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2006 The Android Open Source Project
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<!-- Layout used by CheckBoxPreference for the checkbox style. This is inflated
+inside android.R.layout.preference. -->
+<RadioButton xmlns:android="http://schemas.android.com/apk/res/android"
+android:id="@+android:id/checkbox"
+android:layout_width="wrap_content"
+android:layout_height="wrap_content"
+android:layout_gravity="center"
+android:focusable="false"
+android:clickable="false" />
\ No newline at end of file
index 4b024b7..634d267 100644 (file)
@@ -7,8 +7,11 @@
   <string name="auth_username">Gebruikersnaam</string>
   <string name="auth_password">Wagwoord</string>
   <string name="file_list_seconds_ago">sekondes gelede</string>
+  <string name="common_yes">Ja</string>
+  <string name="common_no">Nee</string>
   <string name="common_ok">OK</string>
   <string name="common_cancel">Kanseleer</string>
+  <string name="common_error">Fout</string>
   <string name="empty"></string>
-  <string name="move_choose_button_text">Kies</string>
+  <string name="folder_picker_choose_button_text">Kies</string>
 </resources>
index 276af9b..49d6c3c 100644 (file)
   <string name="file_list_seconds_ago">منذ ثواني</string>
   <string name="file_list_empty">لا يوجد شيء هنا. إرفع بعض الملفات!</string>
   <string name="file_list_loading">جاري التحميل ...</string>
+  <string name="file_list_folder">مجلد</string>
+  <string name="file_list_folders">مجلدات</string>
+  <string name="file_list_file">ملف</string>
+  <string name="file_list_files">ملفات</string>
   <string name="filedetails_select_file">اضغظ على الملف ليتم عرض خيارات أكثر</string>
   <string name="filedetails_size">الحجم :</string>
   <string name="filedetails_type">النوع :</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">حسابات</string>
   <string name="saml_authentication_wrong_pass">كلمة مرور خاطئة</string>
-  <string name="move_choose_button_text">اختيار</string>
+  <string name="folder_picker_choose_button_text">اختيار</string>
   <string name="prefs_category_security">الأمان</string>
 </resources>
index c0dd55b..0fa7ba3 100644 (file)
@@ -9,5 +9,5 @@
   <string name="common_ok">Добра</string>
   <string name="common_error">Памылка</string>
   <string name="empty"></string>
-  <string name="move_choose_button_text">Выбар</string>
+  <string name="folder_picker_choose_button_text">Выбар</string>
 </resources>
index ff47c31..27178f2 100644 (file)
   <string name="file_list_empty">Тук няма нищо. Качете нещо!</string>
   <string name="file_list_loading">Зареждане...</string>
   <string name="local_file_list_empty">Няма файлове в тази папка.</string>
+  <string name="file_list_folder">папка</string>
+  <string name="file_list_folders">папки</string>
+  <string name="file_list_file">файл</string>
+  <string name="file_list_files">файл</string>
   <string name="filedetails_select_file">Натисни върху файл, за да видиш допълнителна информация.</string>
   <string name="filedetails_size">Размер:</string>
   <string name="filedetails_type">Тип:</string>
   <string name="auth_redirect_non_secure_connection_title">Сигурна връзка е пренасочена по несигурен път.</string>
   <string name="actionbar_logger">Доклади</string>
   <string name="log_send_history_button">Изпрати История</string>
-  <string name="log_mail_subject">ownCloud Android доклади</string>
-  <string name="log_progress_dialog_text">Зареждане на информация...</string>
   <string name="saml_authentication_required_text">Нужна е идентификация</string>
   <string name="saml_authentication_wrong_pass">Грешна парола</string>
   <string name="actionbar_move">Премести</string>
   <string name="file_list_empty_moving">Тук няма нищо. Можеш да добавиш папка!</string>
-  <string name="move_choose_button_text">Избери</string>
+  <string name="folder_picker_choose_button_text">Избери</string>
   <string name="move_file_not_found">Неуспешно преместване. Моля, провери дали файла съществува.</string>
   <string name="move_file_invalid_into_descendent">Не е възможно да преместиш папка в нейна под папка.</string>
   <string name="move_file_invalid_overwrite">Файлът вече съществува в отдалечената папка.</string>
index f0f2300..49e04b4 100644 (file)
   <string name="saml_authentication_wrong_pass">ভুল কুটশব্দ</string>
   <string name="actionbar_move">সরাও</string>
   <string name="file_list_empty_moving">এখানে কিছু নেই। একটি ফোল্ডার যোগ করতে পারেন!</string>
-  <string name="move_choose_button_text">বেছে নিন</string>
+  <string name="folder_picker_choose_button_text">বেছে নিন</string>
   <string name="move_file_not_found">সরাতে ব্যার্থ হলো। ফাইলটি রয়েছে কিনা দেখুন।</string>
   <string name="prefs_category_security">নিরাপত্তা</string>
 </resources>
index 1908508..9980cf2 100644 (file)
   <string name="file_list_empty">Res per aquí. Pugeu alguna cosa!</string>
   <string name="file_list_loading">Carregant...</string>
   <string name="local_file_list_empty">No hi ha arxius a aquesta carpeta</string>
+  <string name="file_list_folder">carpeta</string>
+  <string name="file_list_folders">carpetes</string>
+  <string name="file_list_file">fitxer</string>
+  <string name="file_list_files">fitxers</string>
   <string name="filedetails_select_file">Feu clic en un fitxer per mostrar informació addicional.</string>
   <string name="filedetails_size">Mida:</string>
   <string name="filedetails_type">Tipus:</string>
   <string name="prefs_add_account">Afegeix compte</string>
   <string name="saml_authentication_required_text">Es requereix autenticació</string>
   <string name="saml_authentication_wrong_pass">Contrasenya incorrecta</string>
-  <string name="move_choose_button_text">Escull</string>
+  <string name="folder_picker_choose_button_text">Escull</string>
   <string name="prefs_category_security">Seguretat</string>
 </resources>
index 08f37b6..56b7702 100644 (file)
   <string name="file_list_empty">Žádný obsah. Nahrajte něco!</string>
   <string name="file_list_loading">Načítám...</string>
   <string name="local_file_list_empty">V tomto adresáři nejsou žádné soubory.</string>
+  <string name="file_list_folder">adresář</string>
+  <string name="file_list_folders">adresáře</string>
+  <string name="file_list_file">soubor</string>
+  <string name="file_list_files">soubory</string>
   <string name="filedetails_select_file">Více informací získáte klepnutím na soubor.</string>
   <string name="filedetails_size">Velikost:</string>
   <string name="filedetails_type">Typ:</string>
@@ -277,13 +281,14 @@ správce systému.</string>
   <string name="auth_redirect_non_secure_connection_title">Bezpečné spojení je přesměrováno na nezabezpečenou trasu.</string>
   <string name="actionbar_logger">Logy</string>
   <string name="log_send_history_button">Odeslat historii</string>
-  <string name="log_mail_subject">Logy aplikace ownCloud pro Android</string>
-  <string name="log_progress_dialog_text">Načítám data...</string>
+  <string name="log_send_no_mail_app">Nebyla nalezena žádná aplikace pro zasílání logů. Nainstalujte poštovní aplikaci!</string>
+  <string name="log_send_mail_subject">%1$s logy aplikace pro Android</string>
+  <string name="log_progress_dialog_text">Načítání dat…</string>
   <string name="saml_authentication_required_text">Vyžadováno přihlášení</string>
   <string name="saml_authentication_wrong_pass">Nesprávné heslo</string>
   <string name="actionbar_move">Přesunout</string>
   <string name="file_list_empty_moving">Zde nic není. Můžete přidat adresář!</string>
-  <string name="move_choose_button_text">Vybrat</string>
+  <string name="folder_picker_choose_button_text">Vybrat</string>
   <string name="move_file_not_found">Nelze přesunout. Zkontrolujte prosím že soubor existuje</string>
   <string name="move_file_invalid_into_descendent">Není možné adresář přesunout do vlastního podadresáře</string>
   <string name="move_file_invalid_overwrite">Soubor již v cílovém adresáři existuje</string>
@@ -291,4 +296,5 @@ správce systému.</string>
   <string name="forbidden_permissions_move">pro přesun tohoto souboru</string>
   <string name="prefs_category_instant_uploading">Okamžitá odesílání</string>
   <string name="prefs_category_security">Zabezpečení</string>
+  <string name="prefs_instant_video_upload_path_title">Cesta pro nahrávání videí</string>
 </resources>
index 97ef067..eccb3fd 100644 (file)
   <string name="activity_chooser_send_file_title">Anfon</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">Cyfrifon</string>
-  <string name="move_choose_button_text">Dewisiwch</string>
+  <string name="folder_picker_choose_button_text">Dewisiwch</string>
 </resources>
index df31bdc..149862b 100644 (file)
   <string name="file_list_empty">Her er tomt. Upload noget!</string>
   <string name="file_list_loading">Indlæser...</string>
   <string name="local_file_list_empty">Der er ingen filer i denne mappe.</string>
+  <string name="file_list_folder">mappe</string>
+  <string name="file_list_folders">mapper</string>
+  <string name="file_list_file">fil</string>
+  <string name="file_list_files">filer</string>
   <string name="filedetails_select_file">Tryk på en fil for at vise yderligere information.</string>
   <string name="filedetails_size">Størelse:</string>
   <string name="filedetails_type">Type:</string>
   <string name="auth_redirect_non_secure_connection_title">Sikker forbindelse videredirigeres til en usikker rute.</string>
   <string name="actionbar_logger">Logge</string>
   <string name="log_send_history_button">Send historik</string>
-  <string name="log_mail_subject">App-logregistreringer for ownCloud Android</string>
-  <string name="log_progress_dialog_text">Indlæser data...</string>
+  <string name="log_send_no_mail_app">Der blev ikke fundet apps, der kan sende logge. Installér mail-app\'en!</string>
+  <string name="log_send_mail_subject">%1$s Android-app - logge</string>
+  <string name="log_progress_dialog_text">Indlæser data ...</string>
   <string name="saml_authentication_required_text">Godkendelse påkrævet</string>
   <string name="saml_authentication_wrong_pass">Forkert kodeord</string>
   <string name="actionbar_move">Flyt</string>
   <string name="file_list_empty_moving">Der er intet her. Du kan tilføje en mappe!</string>
-  <string name="move_choose_button_text">Vælg</string>
+  <string name="folder_picker_choose_button_text">Vælg</string>
   <string name="move_file_not_found">Kan ikke flytte. Tjek venligst om filen findes</string>
   <string name="move_file_invalid_into_descendent">Det er ikke muligt at flytte en mappe til en undermappe</string>
   <string name="move_file_invalid_overwrite">Filen findes allerede i destinationsmappen</string>
   <string name="forbidden_permissions_move">til at flytte denne fil</string>
   <string name="prefs_category_instant_uploading">Øjeblikkelige uploads</string>
   <string name="prefs_category_security">Sikkerhed</string>
+  <string name="prefs_instant_video_upload_path_title">Sti til videoupload</string>
 </resources>
index 2669130..b1a9e68 100644 (file)
   <string name="file_list_empty">Alles leer. Laden Sie etwas hoch!</string>
   <string name="file_list_loading">Ladevorgang …</string>
   <string name="local_file_list_empty">Es befinden sich keine Dateien in diesem Ordner.</string>
+  <string name="file_list_folder">Ordner</string>
+  <string name="file_list_folders">Ordner</string>
+  <string name="file_list_file">Datei</string>
+  <string name="file_list_files">Dateien</string>
   <string name="filedetails_select_file">Klicken Sie auf eine Datei für weitere Informationen.</string>
   <string name="filedetails_size">Größe:</string>
   <string name="filedetails_type">Art:</string>
   <string name="auth_redirect_non_secure_connection_title">Die gesicherte Verbindung wird auf eine unsichere Route weitergeleitet.</string>
   <string name="actionbar_logger">Protokolle</string>
   <string name="log_send_history_button">Verlauf senden</string>
-  <string name="log_mail_subject">Protokolle der ownCloud-Android-App</string>
-  <string name="log_progress_dialog_text">Daten werden geladen …</string>
+  <string name="log_send_no_mail_app">Keine App zum Versenden der Meldungen gefunden. Bitte installieren Sie die Mail-App!</string>
+  <string name="log_send_mail_subject">%1$s Android-App Meldungen</string>
+  <string name="log_progress_dialog_text">Lade Daten…</string>
   <string name="saml_authentication_required_text">Legitimierung benötigt</string>
   <string name="saml_authentication_wrong_pass">Falsches Passwort</string>
   <string name="actionbar_move">Verschieben</string>
   <string name="file_list_empty_moving">Nichts vorhanden. Sie können einen Ordner hinzufügen!</string>
-  <string name="move_choose_button_text">Auswählen</string>
+  <string name="folder_picker_choose_button_text">Auswählen</string>
   <string name="move_file_not_found">Verschieben nicht möglich. Bitte überprüfen Sie, ob die Datei existiert</string>
   <string name="move_file_invalid_into_descendent">Es ist nicht möglich einen Ordner eine Ebene tiefer zu verschieben</string>
   <string name="move_file_invalid_overwrite">Die Datei ist bereits im Zielordner vorhanden</string>
   <string name="forbidden_permissions_move">um diese Datei zu verschieben</string>
   <string name="prefs_category_instant_uploading">Sofortiges Hochladen</string>
   <string name="prefs_category_security">Sicherheit</string>
+  <string name="prefs_instant_video_upload_path_title">Verzeichnis zum Hochladen der Videos</string>
 </resources>
index 45f078d..23cdb64 100644 (file)
   <string name="file_list_empty">Alles leer. Lade etwas hoch!</string>
   <string name="file_list_loading">Ladevorgang …</string>
   <string name="local_file_list_empty">Es befinden sich keine Dateien in diesem Ordner.</string>
+  <string name="file_list_folder">Ordner</string>
+  <string name="file_list_folders">Ordner</string>
+  <string name="file_list_file">Datei</string>
+  <string name="file_list_files">Dateien</string>
   <string name="filedetails_select_file">Klicken Sie auf eine Datei für weitere Informationen.</string>
   <string name="filedetails_size">Größe:</string>
   <string name="filedetails_type">Art:</string>
   <string name="auth_redirect_non_secure_connection_title">Die gesicherte Verbindung wird auf eine unsichere Route weitergeleitet.</string>
   <string name="actionbar_logger">Protokolle</string>
   <string name="log_send_history_button">Verlauf senden</string>
-  <string name="log_mail_subject">Protokolle der ownCloud-Android-App</string>
-  <string name="log_progress_dialog_text">Daten werden geladen …</string>
+  <string name="log_send_no_mail_app">Keine App zum Versenden der Meldungen gefunden. Bitte installiere die Mail-App!</string>
+  <string name="log_send_mail_subject">%1$s Android-App Meldungen</string>
+  <string name="log_progress_dialog_text">Lade Daten…</string>
   <string name="saml_authentication_required_text">Legitimierung benötigt</string>
   <string name="saml_authentication_wrong_pass">Falsches Passwort</string>
   <string name="actionbar_move">Verschieben</string>
   <string name="file_list_empty_moving">Nichts vorhanden. Du kannst einen Ordner hinzufügen!</string>
-  <string name="move_choose_button_text">Auswählen</string>
+  <string name="folder_picker_choose_button_text">Auswählen</string>
   <string name="move_file_not_found">Verschieben nicht möglich. Prüfe, dass die Datei existiert</string>
   <string name="move_file_invalid_into_descendent">Es ist nicht möglich, einen Ordner in einen seiner Unterordner zu verschieben</string>
   <string name="move_file_invalid_overwrite">Die Datei ist bereits im Zielordner vorhanden</string>
   <string name="forbidden_permissions_move">um diese Datei zu verschieben</string>
   <string name="prefs_category_instant_uploading">Sofortiges Hochladen</string>
   <string name="prefs_category_security">Sicherheit</string>
+  <string name="prefs_instant_video_upload_path_title">Verzeichnis zum Hochladen der Videos</string>
 </resources>
index 6a304ca..805c725 100644 (file)
@@ -11,6 +11,8 @@
   <string name="actionbar_settings">Ρυθμίσεις</string>
   <string name="actionbar_see_details">Λεπτομέρειες</string>
   <string name="actionbar_send_file">Αποστολή</string>
+  <string name="actionbar_sort">Ταξινόμηση</string>
+  <string name="actionbar_sort_title">Ταξινόμηση κατά</string>
   <string-array name="actionbar_sortby">
     <item>A-Z</item>
     <item>Νεότερο - Παλαιότερο</item>
@@ -36,6 +38,8 @@
   <string name="prefs_recommend">Προτείνετε σε φίλο</string>
   <string name="prefs_feedback">Σχόλια </string>
   <string name="prefs_imprint">Αποτύπωμα</string>
+  <string name="prefs_remember_last_share_location">Αποθήκευση σημείου διαμοιρασμού</string>
+  <string name="prefs_remember_last_upload_location_summary">Αποθήκευση τελευταίου σημείου διαμοιρασμού μεταφόρτωσης</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="file_list_empty">Δεν υπάρχει τίποτα εδώ. Ανεβάστε κάτι!</string>
   <string name="file_list_loading">Φόρτωση ...</string>
   <string name="local_file_list_empty">Δεν υπάρχουν αρχεία σε αυτό τον φάκελο.</string>
+  <string name="file_list_folder">φάκελος</string>
+  <string name="file_list_folders">φάκελοι</string>
+  <string name="file_list_file">αρχείο</string>
+  <string name="file_list_files">αρχεία</string>
   <string name="filedetails_select_file">Αγγίξτε κάποιο αρχείο για να προβάλετε περισσότερες πληροφορίες.</string>
   <string name="filedetails_size">Μέγεθος:</string>
   <string name="filedetails_type">Τύπος:</string>
   <string name="auth_redirect_non_secure_connection_title">Ασφαλής σύνδεση ανακατευθύνεται σε μια μη ασφαλή διαδρομή.</string>
   <string name="actionbar_logger">Αρχεία καταγραφών</string>
   <string name="log_send_history_button">Αποστολή ιστορικού</string>
-  <string name="log_mail_subject">αρχεία καταγραφής της εφαρμογής ownCloud Android</string>
+  <string name="log_send_no_mail_app">Δεν εντοπίστηκε εφαρμογή αποστολής αναφορών συστήματος. Εγκαταστήστε το mail app!</string>
+  <string name="log_send_mail_subject">%1$s αναφορές του Android app</string>
   <string name="log_progress_dialog_text">Φόρτωση δεδομένων....</string>
   <string name="saml_authentication_required_text">Απαιτείται πιστοποίηση</string>
   <string name="saml_authentication_wrong_pass">Εσφαλμένο συνθηματικό</string>
   <string name="actionbar_move">Μετακίνηση</string>
   <string name="file_list_empty_moving">Δεν υπάρχει τίποτα εδώ. Μπορείτε να προσθέσετε ένα φάκελο!</string>
-  <string name="move_choose_button_text">Επιλέξτε</string>
+  <string name="folder_picker_choose_button_text">Επιλέξτε</string>
   <string name="move_file_not_found">Αδύνατη η μετακίνηση. Παρακαλώ ελέγξτε αν ο φάκελος υπάρχει</string>
   <string name="move_file_invalid_into_descendent">Δεν είναι δυνατό να μετακινηθεί ο φάκελος σε έναν απογονικό</string>
   <string name="move_file_invalid_overwrite">Το αρχείο υπάρχει ήδη στο φάκελο προορισμού</string>
   <string name="forbidden_permissions_move">για μετακίνηση αυτού του αρχείου</string>
   <string name="prefs_category_instant_uploading">Στιγμιαίες Μεταφορτώσεις</string>
   <string name="prefs_category_security">Ασφάλεια</string>
+  <string name="prefs_instant_video_upload_path_title">Διαδρομή Μεταφόρτωσης Βίντεο</string>
 </resources>
index 94bf042..054cb6b 100644 (file)
   <string name="file_list_empty">Nothing in here. Upload something!</string>
   <string name="file_list_loading">Loading...</string>
   <string name="local_file_list_empty">There are no files in this folder.</string>
+  <string name="file_list_folder">folder</string>
+  <string name="file_list_folders">folders</string>
+  <string name="file_list_file">file</string>
+  <string name="file_list_files">files</string>
   <string name="filedetails_select_file">Tap on a file to display additional information.</string>
   <string name="filedetails_size">Size:</string>
   <string name="filedetails_type">Type:</string>
   <string name="auth_redirect_non_secure_connection_title">Secure connection is redirected to an unsecured route.</string>
   <string name="actionbar_logger">Logs</string>
   <string name="log_send_history_button">Send History</string>
-  <string name="log_mail_subject">ownCloud Android app logs</string>
-  <string name="log_progress_dialog_text">Loading data...</string>
+  <string name="log_send_no_mail_app">No app for sending logs found. Install mail app!</string>
+  <string name="log_send_mail_subject">%1$s Android app logs</string>
+  <string name="log_progress_dialog_text">Loading data…</string>
   <string name="saml_authentication_required_text">Authentication required</string>
   <string name="saml_authentication_wrong_pass">Incorrect password</string>
   <string name="actionbar_move">Move</string>
   <string name="file_list_empty_moving">Nothing in here. You can add a folder!</string>
-  <string name="move_choose_button_text">Choose</string>
+  <string name="folder_picker_choose_button_text">Choose</string>
   <string name="move_file_not_found">Unable to move. Please check whether the file exists</string>
   <string name="move_file_invalid_into_descendent">It is not possible to move a folder into a descendant</string>
   <string name="move_file_invalid_overwrite">The file exists already in the destination folder</string>
   <string name="forbidden_permissions_move">to move this file</string>
   <string name="prefs_category_instant_uploading">Instant Uploads</string>
   <string name="prefs_category_security">Security</string>
+  <string name="prefs_instant_video_upload_path_title">Upload Video Path</string>
 </resources>
index 6b15f10..faf4525 100644 (file)
   <string name="uploader_info_uploading">Alŝutante</string>
   <string name="file_list_seconds_ago">sekundoj antaŭe</string>
   <string name="file_list_empty">Nenio estas ĉi tie. Alŝutu ion!</string>
+  <string name="file_list_folder">dosierujo</string>
+  <string name="file_list_folders">dosierujoj</string>
+  <string name="file_list_file">dosiero</string>
+  <string name="file_list_files">dosieroj</string>
   <string name="filedetails_size">Grando:</string>
   <string name="filedetails_type">Tipo:</string>
   <string name="filedetails_created">Kreita je:</string>
   <string name="prefs_category_accounts">Kontoj</string>
   <string name="saml_authentication_required_text">Aŭtentiĝo nepras</string>
   <string name="saml_authentication_wrong_pass">Malĝusta pasvorto</string>
-  <string name="move_choose_button_text">Elekti</string>
+  <string name="folder_picker_choose_button_text">Elekti</string>
   <string name="prefs_category_security">Sekuro</string>
 </resources>
index eeb51c3..3baeea2 100644 (file)
   <string name="file_list_empty">No hay nada. ¡Subí contenido!</string>
   <string name="file_list_loading">Cargando...</string>
   <string name="local_file_list_empty">No existen archivos en esta carpeta.</string>
+  <string name="file_list_folder">carpeta</string>
+  <string name="file_list_folders">carpetas</string>
+  <string name="file_list_file">archivo</string>
+  <string name="file_list_files">archivos</string>
   <string name="filedetails_select_file">Pulsá sobre un archivo para mostrar información adicional.</string>
   <string name="filedetails_size">Tamaño:</string>
   <string name="filedetails_type">Tipo:</string>
   <string name="prefs_category_accounts">Cuentas</string>
   <string name="saml_authentication_required_text">Autentificación requerida</string>
   <string name="saml_authentication_wrong_pass">Clave incorrecta</string>
-  <string name="move_choose_button_text">Elegir</string>
+  <string name="folder_picker_choose_button_text">Elegir</string>
   <string name="prefs_category_security">Seguridad</string>
 </resources>
index 8f2457d..16485ea 100644 (file)
   <string name="error__upload__local_file_not_copied">%1$s no pudo ser copiado a la carpeta local %2$s</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">Cuentas</string>
-  <string name="move_choose_button_text">Choose</string>
+  <string name="folder_picker_choose_button_text">Choose</string>
 </resources>
index 3606025..a760bfe 100644 (file)
   <string name="empty"></string>
   <string name="prefs_category_accounts">Cuentas</string>
   <string name="saml_authentication_wrong_pass">Contraseña incorrecta</string>
-  <string name="move_choose_button_text">Seleccionar</string>
+  <string name="folder_picker_choose_button_text">Seleccionar</string>
   <string name="prefs_category_security">Seguridad</string>
 </resources>
index 93e83c2..793c094 100644 (file)
   <string name="file_list_empty">No hay nada aquí. ¡Suba algo!</string>
   <string name="file_list_loading">Cargando...</string>
   <string name="local_file_list_empty">No hay archivos en esta carpeta.</string>
+  <string name="file_list_folder">carpeta</string>
+  <string name="file_list_folders">carpetas</string>
+  <string name="file_list_file">archivo</string>
+  <string name="file_list_files">archivos</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="auth_redirect_non_secure_connection_title">La conexión segura está siendo desviada por una ruta insegura.</string>
   <string name="actionbar_logger">Logs</string>
   <string name="log_send_history_button">Enviar historial</string>
-  <string name="log_mail_subject">Logs de las apps ownCloud Android</string>
+  <string name="log_send_no_mail_app">No se ha encontrado una app para enviar logs. Instale la app mail!</string>
+  <string name="log_send_mail_subject">Se han encontrado %1$s logs de la app Android</string>
   <string name="log_progress_dialog_text">Cargando datos...</string>
   <string name="saml_authentication_required_text">Se necesita autenticación</string>
   <string name="saml_authentication_wrong_pass">Contraseña incorrecta</string>
   <string name="actionbar_move">Mover</string>
   <string name="file_list_empty_moving">Aquí no hay nada. ¡Puede agregar una carpeta!</string>
-  <string name="move_choose_button_text">Seleccionar</string>
+  <string name="folder_picker_choose_button_text">Seleccionar</string>
   <string name="move_file_not_found">No se puede mover. Revise si el archivo existe</string>
   <string name="move_file_invalid_into_descendent">No se puede mover una carpeta dentro de una de SUS subcarpetas.</string>
   <string name="move_file_invalid_overwrite">El archivo ya existe en la carpeta de destino</string>
   <string name="forbidden_permissions_move">para mover este archivo</string>
   <string name="prefs_category_instant_uploading">Subidas instantáneas</string>
   <string name="prefs_category_security">Seguridad</string>
+  <string name="prefs_instant_video_upload_path_title">Ruta de vídeo de subida</string>
 </resources>
index 75f28a7..e7ac96b 100644 (file)
   <string name="file_list_empty">Siin pole midagi. Lae midagi üles!</string>
   <string name="file_list_loading">Laen ...</string>
   <string name="local_file_list_empty">Kaustas pole faile.</string>
+  <string name="file_list_folder">kaust</string>
+  <string name="file_list_folders">kausta</string>
+  <string name="file_list_file">fail</string>
+  <string name="file_list_files">faili</string>
   <string name="filedetails_select_file">Lisainfo vaatamiseks vajuta failile.</string>
   <string name="filedetails_size">Suurus:</string>
   <string name="filedetails_type">Tüüp:</string>
@@ -282,13 +286,11 @@ Allpool on loend kohalikest failidest ning serveris asuvatest failidest %5$s, mi
   <string name="auth_redirect_non_secure_connection_title">Turvaline ühendus suunatakse läbi turvamata ühenduse.</string>
   <string name="actionbar_logger">Logid</string>
   <string name="log_send_history_button">Saada ajalugu</string>
-  <string name="log_mail_subject">ownCloud Android rakenduse logid</string>
-  <string name="log_progress_dialog_text">Andmete laadimine...</string>
   <string name="saml_authentication_required_text">Autentimine on vajalik</string>
   <string name="saml_authentication_wrong_pass">Vale parool</string>
   <string name="actionbar_move">Tõsta ümber</string>
   <string name="file_list_empty_moving">Siin pole midagi. Sa võid lisada kausta!</string>
-  <string name="move_choose_button_text">Vali</string>
+  <string name="folder_picker_choose_button_text">Vali</string>
   <string name="move_file_not_found">Liigutamine ebaõnnestus. Palun kontrolli, kas fail on olemas</string>
   <string name="move_file_invalid_into_descendent">Kausta ei saa liigutada selle alamkausta</string>
   <string name="move_file_invalid_overwrite">See fail on juba sihtkaustas olemas</string>
index 7480e32..d8dd263 100644 (file)
   <string name="file_list_empty">Ez dago ezer. Igo zerbait!</string>
   <string name="file_list_loading">Kargatzen...</string>
   <string name="local_file_list_empty">Ez dago fitxategirik karpeta honetan.</string>
+  <string name="file_list_folder">karpeta</string>
+  <string name="file_list_folders">Karpetak</string>
+  <string name="file_list_file">fitxategia</string>
+  <string name="file_list_files">fitxategiak</string>
   <string name="filedetails_select_file">Sakatu fitxategi baten gainean informazio gehiago lortzeko</string>
   <string name="filedetails_size">Tamaina:</string>
   <string name="filedetails_type">Mota:</string>
@@ -267,12 +271,10 @@ Mesedez, baimendu berriz</string>
   <string name="downloader_download_file_not_found">Fitxategia jadanik ez dago eskuragarri zerbitzarian</string>
   <string name="prefs_category_accounts">Kontuak</string>
   <string name="prefs_add_account">Gehitu kontua</string>
-  <string name="log_mail_subject">ownCloud Android programaren egunerokoak</string>
-  <string name="log_progress_dialog_text">Datuak kargatzen...</string>
   <string name="saml_authentication_required_text">Autentikazioa beharrezkoa</string>
   <string name="saml_authentication_wrong_pass">Pasahitz okerra</string>
   <string name="actionbar_move">Mugitu</string>
-  <string name="move_choose_button_text">Aukeratu</string>
+  <string name="folder_picker_choose_button_text">Aukeratu</string>
   <string name="prefs_category_instant_uploading">Berehalako Igoerak</string>
   <string name="prefs_category_security">Segurtasuna</string>
 </resources>
index d11e513..0140c07 100644 (file)
   <string name="file_list_empty">اینجا هیچ چیز نیست.</string>
   <string name="file_list_loading">درحال بارگذاری...</string>
   <string name="local_file_list_empty">هیچ فایلی در این پوشه نیست.</string>
+  <string name="file_list_folder">پوشه</string>
+  <string name="file_list_folders">پوشه ها</string>
+  <string name="file_list_file">پرونده</string>
+  <string name="file_list_files">پرونده ها</string>
   <string name="filedetails_select_file">روی هر فایل کلیک کنید تا اطلاعات اضافی نمایش داده شود.</string>
   <string name="filedetails_size">اندازه</string>
   <string name="filedetails_type">نوع:</string>
   <string name="prefs_category_accounts">حساب‌ها</string>
   <string name="saml_authentication_required_text">احراز هویت مورد نیاز است</string>
   <string name="saml_authentication_wrong_pass">رمز عبور اشتباه است</string>
-  <string name="move_choose_button_text">انتخاب کردن</string>
+  <string name="folder_picker_choose_button_text">انتخاب کردن</string>
   <string name="prefs_category_security">امنیت</string>
 </resources>
index 3d77e6b..2fe99bf 100644 (file)
   <string name="file_list_empty">Täällä ei ole mitään. Lähetä tänne jotakin!</string>
   <string name="file_list_loading">Ladataan...</string>
   <string name="local_file_list_empty">Tässä kansiossa ei ole tiedostoja</string>
+  <string name="file_list_folder">kansio</string>
+  <string name="file_list_folders">kansiota</string>
+  <string name="file_list_file">tiedosto</string>
+  <string name="file_list_files">tiedostoa</string>
   <string name="filedetails_select_file">Napauta tiedostoa nähdäksesi lisätietoja.</string>
   <string name="filedetails_size">Koko:</string>
   <string name="filedetails_type">Tyyppi:</string>
@@ -71,6 +75,7 @@
   <string name="filedetails_sync_file">Päivitä tiedosto</string>
   <string name="filedetails_renamed_in_upload_msg">Tiedoston nimeksi muutettiin %1$s siirron yhteydessä</string>
   <string name="action_share_file">Jaa linkki</string>
+  <string name="action_unshare_file">Poista linkin jako</string>
   <string name="common_yes">Kyllä</string>
   <string name="common_no">Ei</string>
   <string name="common_ok">OK</string>
   <string name="auth_testing_connection">Testataan yhteyttä...</string>
   <string name="auth_not_configured_title">Väärin tehdyt palvelin-asetukset</string>
   <string name="auth_account_not_new">Laitteella on jo tili samalle käyttäjälle ja palvelimelle</string>
+  <string name="auth_account_not_the_same">Syötetty käyttäjä ei täsmää tämän tilin käyttäjän kanssa</string>
   <string name="auth_unknown_error_title">Tuntematon virhe</string>
   <string name="auth_unknown_host_title">Isäntää ei löydy</string>
   <string name="auth_incorrect_path_title">Palvelin-instanssia ei löydetty</string>
   <string name="auth_redirect_non_secure_connection_title">Salattu yhteys on ohjattu uudelleen salaamatonta reittiä pitkin.</string>
   <string name="actionbar_logger">Lokit</string>
   <string name="log_send_history_button">Lähetä historia</string>
-  <string name="log_mail_subject">ownCloudin Android-sovelluksen lokit</string>
-  <string name="log_progress_dialog_text">Ladataan tietoja...</string>
+  <string name="log_send_no_mail_app">Lokien lähettämistä varten ei löytynyt sovellusta. Asenna sähköpostisovellus!</string>
+  <string name="log_progress_dialog_text">Ladataan tietoja</string>
   <string name="saml_authentication_required_text">Tunnistautuminen vaaditaan</string>
   <string name="saml_authentication_wrong_pass">Väärä salasana</string>
   <string name="actionbar_move">Siirrä</string>
   <string name="file_list_empty_moving">Täällä ei ole mitään. Voit lisätä kansion!</string>
-  <string name="move_choose_button_text">Valitse</string>
+  <string name="folder_picker_choose_button_text">Valitse</string>
   <string name="move_file_not_found">Siirto ei onnistu. Tarkista, ettei tiedostoa ole jo olemassa</string>
   <string name="move_file_invalid_overwrite">Tiedosto on jo olemassa kohdekansiossa</string>
   <string name="move_file_error">Tämän tiedoston tai kansion siirtoa yrittäessä tapahtui virhe</string>
diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml
new file mode 100644 (file)
index 0000000..5244404
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<resources>
+  <string name="actionbar_upload">Lähetä</string>
+  <string name="actionbar_open_with">Avaa sovelluksessa</string>
+  <string name="actionbar_mkdir">Luo kansio</string>
+  <string name="actionbar_settings">Asetukset</string>
+  <!--TODO re-enable when server-side folder size calculation is available   
+       <item>Biggest - Smallest</item>-->
+  <string name="prefs_category_more">Lisää</string>
+  <string name="prefs_manage_accounts">Hallitse tilejä</string>
+  <string name="prefs_pincode">Sovelluksen PIN</string>
+  <string name="prefs_help">Apua</string>
+  <string name="auth_host_url">http://esimerkki.fi/palvelu/</string>
+  <string name="auth_username">Käyttäjätunnus</string>
+  <string name="auth_password">Salasana</string>
+  <string name="uploader_btn_upload_text">Lähetä</string>
+  <string name="file_list_empty">Ei sisältöä. Siirrä tänne jotakin!</string>
+  <string name="file_list_loading">Ladataan...</string>
+  <string name="file_list_folder">kansio</string>
+  <string name="file_list_folders">kansiot</string>
+  <string name="file_list_file">tiedosto</string>
+  <string name="file_list_files">Tiedostot</string>
+  <string name="action_share_file">Jaa linkki</string>
+  <string name="action_unshare_file">Poista linkin jako</string>
+  <string name="common_yes">KYLLÄ</string>
+  <string name="common_no">EI</string>
+  <string name="common_ok">Ok</string>
+  <string name="common_cancel">Peruuta</string>
+  <string name="common_error">Virhe</string>
+  <string name="pincode_wrong">Virheellinen PIN</string>
+  <string name="pincode_removed">Sovelluksen PIN poistettu</string>
+  <string name="pincode_stored">Sovelluksen PIN tallennettu</string>
+  <string name="auth_account_not_the_same">Syötetty käyttäjä ei täsmää tämän tilin käyttäjän kanssa</string>
+  <string name="auth_unsupported_auth_method">Palvelin ei tue tätä autentikointitapaa</string>
+  <string name="common_rename">Nimeä uudelleen</string>
+  <string name="ssl_validator_label_L">Sijainti:</string>
+  <string name="conflict_overwrite">Ylikirjoita</string>
+  <string name="copy_link">Kopioi linkki</string>
+  <string name="empty"></string>
+  <string name="actionbar_move">Siirrä</string>
+  <string name="folder_picker_choose_button_text">Valitse</string>
+  <string name="move_file_invalid_overwrite">Tiedosto on jo kohdekansiossa.</string>
+</resources>
index 90c7ba7..5876c04 100644 (file)
@@ -64,6 +64,10 @@ Téléchargez-le ici : %2$s</string>
   <string name="file_list_empty">Il n\'y a rien ici ! Envoyez donc quelque chose :)</string>
   <string name="file_list_loading">Chargement…</string>
   <string name="local_file_list_empty">Aucun fichier n\'est présent dans ce dossier.</string>
+  <string name="file_list_folder">dossier</string>
+  <string name="file_list_folders">dossiers</string>
+  <string name="file_list_file">fichier</string>
+  <string name="file_list_files">fichiers</string>
   <string name="filedetails_select_file">Effleurez un fichier pour afficher les informations complémentaires</string>
   <string name="filedetails_size">Taille :</string>
   <string name="filedetails_type">Type :</string>
@@ -140,7 +144,7 @@ Ci-dessous la liste des fichiers locaux, et les fichiers distants dans %5$s auxq
   <string name="media_notif_ticker">%1$s lecteur de musique</string>
   <string name="media_state_playing">%1$s (lecture)</string>
   <string name="media_state_loading">%1$s (chargement)</string>
-  <string name="media_event_done">%1$s pourcentage de lecture finie</string>
+  <string name="media_event_done">Lecture de %1$s terminée</string>
   <string name="media_err_nothing_to_play">Fichier média introuvable </string>
   <string name="media_err_no_account">Aucun compte n\'a été trouvé</string>
   <string name="media_err_not_in_owncloud">Le fichier n\'est pas dans un compte valide</string>
@@ -178,7 +182,7 @@ Ci-dessous la liste des fichiers locaux, et les fichiers distants dans %5$s auxq
   <string name="auth_unauthorized">Nom d\'utilisateur ou mot de passe incorrect</string>
   <string name="auth_oauth_error">Échec d\'autorisation</string>
   <string name="auth_oauth_error_access_denied">Accès refusé par le serveur d\'autorisation</string>
-  <string name="auth_wtf_reenter_URL">État inattendu ; veuillez entrer à nouveau l\'URL du serveur</string>
+  <string name="auth_wtf_reenter_URL">État inattendu ; veuillez saisir à nouveau l\'URL du serveur</string>
   <string name="auth_expired_oauth_token_toast">Votre autorisation a expiré. Merci de vous authentifier à nouveau</string>
   <string name="auth_expired_basic_auth_toast">Veuillez saisir le mot de passe courant</string>
   <string name="auth_expired_saml_sso_token_toast">Votre session a expiré. Merci de vous reconnecter</string>
@@ -282,13 +286,13 @@ Ci-dessous la liste des fichiers locaux, et les fichiers distants dans %5$s auxq
   <string name="auth_redirect_non_secure_connection_title">La connexion sécurisée est redirigée via une route non-sécurisée.</string>
   <string name="actionbar_logger">Journaux</string>
   <string name="log_send_history_button">Envoyer l\'historique</string>
-  <string name="log_mail_subject">Journaux de l\'application Android ownCloud</string>
+  <string name="log_send_mail_subject">Journaux de l\'application Android %1$s</string>
   <string name="log_progress_dialog_text">Chargement des données...</string>
   <string name="saml_authentication_required_text">Authentification requise</string>
   <string name="saml_authentication_wrong_pass">Mot de passe incorrect</string>
   <string name="actionbar_move">Déplacer</string>
   <string name="file_list_empty_moving">Il n\'y a rien ici. Vous pouvez ajouter un dossier !</string>
-  <string name="move_choose_button_text">Choisir</string>
+  <string name="folder_picker_choose_button_text">Choisir</string>
   <string name="move_file_not_found">Impossible de déplacer. Vérifiez que le fichier existe</string>
   <string name="move_file_invalid_into_descendent">Il n\'est pas possible de déplacer un dossier vers un de ses descendants</string>
   <string name="move_file_invalid_overwrite">Le fichier existe déjà dans le dossier de destination</string>
@@ -296,4 +300,5 @@ Ci-dessous la liste des fichiers locaux, et les fichiers distants dans %5$s auxq
   <string name="forbidden_permissions_move">de déplacer ce fichier</string>
   <string name="prefs_category_instant_uploading">Téléchargements instantanés</string>
   <string name="prefs_category_security">Sécurité</string>
+  <string name="prefs_instant_video_upload_path_title">Chemin d\'accès pour le téléversement</string>
 </resources>
index d278332..c3a178a 100644 (file)
   <string name="actionbar_settings">Preferencias</string>
   <string name="actionbar_see_details">Detalles</string>
   <string name="actionbar_send_file">Enviar</string>
+  <string name="actionbar_sort">Ordenar</string>
+  <string name="actionbar_sort_title">Ordenar por</string>
+  <string-array name="actionbar_sortby">
+    <item>A-Z</item>
+    <item>Máis novo - Máis antigo</item>
+  </string-array>
   <!--TODO re-enable when server-side folder size calculation is available   
        <item>Biggest - Smallest</item>-->
   <string name="prefs_category_general">Xeral</string>
   <string name="prefs_category_more">Máis</string>
   <string name="prefs_accounts">Contas</string>
-  <string name="prefs_manage_accounts">Xestionar as contas</string>
+  <string name="prefs_manage_accounts">Administrar as contas</string>
   <string name="prefs_pincode">PIN da aplicación</string>
-  <string name="prefs_pincode_summary">Protexe o seu cliente</string>
+  <string name="prefs_pincode_summary">Protexa o seu cliente</string>
   <string name="prefs_instant_upload">Envío instantáneo de fotos</string>
   <string name="prefs_instant_upload_summary">Enviar instantaneamente as fotos tiradas coa cámara</string>
   <string name="prefs_instant_video_upload">Envío instantáneo de vídeos</string>
   <string name="prefs_recommend">Recomendar a un amigo</string>
   <string name="prefs_feedback">Comentarios</string>
   <string name="prefs_imprint">Impresión</string>
+  <string name="prefs_remember_last_share_location">Lembrar a localización da compartición</string>
+  <string name="prefs_remember_last_upload_location_summary">Lembrar a localización do envío da última compartición</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!
+Descárgueo de aquí: %2$s</string>
   <string name="auth_check_server">Comprobar o servidor</string>
   <string name="auth_host_url">Enderezo do servidor https://…</string>
   <string name="auth_username">Nome de usuario</string>
   <string name="file_list_empty">Aquí non hai nada. Envíe algo!</string>
   <string name="file_list_loading">Cargando...</string>
   <string name="local_file_list_empty">Non hai ficheiros neste cartafol.</string>
+  <string name="file_list_folder">cartafol</string>
+  <string name="file_list_folders">cartafoles</string>
+  <string name="file_list_file">ficheiro</string>
+  <string name="file_list_files">ficheiros</string>
   <string name="filedetails_select_file">Prema nun ficheiro para que amose a información adicional.</string>
   <string name="filedetails_size">Tamaño:</string>
   <string name="filedetails_type">Tipo:</string>
   <string name="sync_fail_in_favourites_content">Non foi posíbel sincronizar o contido de %1$d ficheiros (%2$d conflitos)</string>
   <string name="sync_foreign_files_forgotten_ticker">Algúns ficheiros locais foron esquecidos</string>
   <string name="sync_foreign_files_forgotten_content">Non é posíbel copiar %1$d ficheiros do cartafol %2$s en</string>
+  <string name="sync_foreign_files_forgotten_explanation">Desde a versión 1.3.16, os ficheiros enviados desde este dispositivo cópianse no cartafol local %1$s para evitar a perda de datos cando se sincroniza un ficheiro con varias contas.\n\nPor mor deste cambio, todos os ficheiros enviados coas versións anteriores desta aplicación cópianse no cartafol %2$s. Porén, un erro impediu a finalización desta operación durante a sincronización da conta. É posíbel deixar o(s) ficheiro(s) como está(n) e retirar a ligazón a %3$s, ou mover o(s) ficheiro(s) ao directorio %1$s e manter a ligazón a %4$s.\n\nA seguir enuméranse o(s) ficheiro(s) local(is), e o(s) ficheiro(s) remoto(s) en %5$s co(s) que estaba(n) ligado(s).</string>
   <string name="sync_current_folder_was_removed">O cartafol %1$s xa non existe</string>
   <string name="foreign_files_move">Mover todo</string>
   <string name="foreign_files_success">Foron movidos todos os ficheiros</string>
   <string name="preview_image_description">Vista previa da imaxe</string>
   <string name="preview_image_error_unknown_format">Esta imaxe non pode ser amosada</string>
   <string name="error__upload__local_file_not_copied">Non foi posíbel copiar %1$s no cartafol local %2$s</string>
+  <string name="prefs_instant_upload_path_title">Enviar a ruta</string>
   <string name="share_link_no_support_share_api">O seu servidor non ten activada a opción de compartir. Póñase en contacto co
                administrador.</string>
+  <string name="share_link_file_no_exist">Non foi posíbel compartir. Comprobe que existe o ficheiro</string>
   <string name="share_link_file_error">Produciuse un erro ao tentar compartir este ficheiro ou cartafol.</string>
+  <string name="unshare_link_file_no_exist">Non foi posíbel deixar de compartir. Comprobe que existe o ficheiro</string>
   <string name="unshare_link_file_error">Produciuse un erro ao tentar deixar de compartir este ficheiro ou cartafol</string>
   <string name="activity_chooser_send_file_title">Enviar</string>
   <string name="copy_link">Copiar a ligazón</string>
   <string name="downloader_download_file_not_found">O ficheiro xa non está dispoñíbel no servidor</string>
   <string name="prefs_category_accounts">Contas</string>
   <string name="prefs_add_account">Engadir unha conta</string>
+  <string name="auth_redirect_non_secure_connection_title">A conexión segura está a ser redirixida a unha ruta non segura.</string>
+  <string name="actionbar_logger">Rexistros</string>
+  <string name="log_send_history_button">Enviar o historial</string>
+  <string name="log_send_no_mail_app">Non se atopou unha aplicación para enviar os rexistros. Instale unha aplicación de correo!</string>
+  <string name="log_send_mail_subject">Rexistros da aplicación %1$s Android</string>
+  <string name="log_progress_dialog_text">Cargando os datos...</string>
   <string name="saml_authentication_required_text">Requírese autenticación</string>
   <string name="saml_authentication_wrong_pass">Contrasinal incorrecto</string>
   <string name="actionbar_move">Mover</string>
-  <string name="move_choose_button_text">Escoller</string>
+  <string name="file_list_empty_moving">Aquí non hai nada. Pode engadir un cartafol!</string>
+  <string name="folder_picker_choose_button_text">Escoller</string>
+  <string name="move_file_not_found">Non é posíbel movelo. Comprobe se existe o ficheiro</string>
+  <string name="move_file_invalid_into_descendent">Non é posíbel mover un cartafol cara un descendente</string>
+  <string name="move_file_invalid_overwrite">Este ficheiro xa existe no cartafol de destino</string>
+  <string name="move_file_error">Produciuse un erro ao tentar mover este ficheiro ou cartafol.</string>
+  <string name="forbidden_permissions_move">para mover este ficheiro</string>
+  <string name="prefs_category_instant_uploading">Envío instantáneo</string>
   <string name="prefs_category_security">Seguranza</string>
+  <string name="prefs_instant_video_upload_path_title">Enviar a ruta do vídeo</string>
 </resources>
index 4599f2f..120ca55 100644 (file)
   <string name="file_list_empty">אין כאן שום דבר. אולי ברצונך להעלות משהו?</string>
   <string name="file_list_loading">בטעינה...</string>
   <string name="local_file_list_empty">אין קבצים בתיקייה זו:</string>
+  <string name="file_list_folder">תקיה</string>
+  <string name="file_list_folders">תקיות</string>
+  <string name="file_list_file">קובץ</string>
+  <string name="file_list_files">קבצים</string>
   <string name="filedetails_select_file">יש לגעת בקובץ כדי להציג פרטים נוספים.</string>
   <string name="filedetails_size">גודל:</string>
   <string name="filedetails_type">סוג:</string>
   <string name="downloader_download_file_not_found">הקובץ אינו זמין יותר על השרת</string>
   <string name="prefs_category_accounts">חשבונות</string>
   <string name="prefs_add_account">הוספת חשבון</string>
-  <string name="move_choose_button_text">בחירה</string>
+  <string name="folder_picker_choose_button_text">בחירה</string>
   <string name="prefs_category_security">אבטחה</string>
 </resources>
index c9bf237..173239c 100644 (file)
   <string name="uploader_wrn_no_account_quit_btn_text">Izlaz</string>
   <string name="file_list_seconds_ago">prije par sekundi</string>
   <string name="file_list_empty">Nema ničega u ovoj mapi. Pošalji nešto!</string>
+  <string name="file_list_folder">mapa</string>
+  <string name="file_list_folders">mape</string>
+  <string name="file_list_file">datoteka</string>
+  <string name="file_list_files">datoteke</string>
   <string name="filedetails_download">Preuzimanje</string>
   <string name="action_share_file">Podijelite vezu</string>
   <string name="common_yes">Da</string>
@@ -38,6 +42,6 @@
   <string name="prefs_category_accounts">Korisnićki računi</string>
   <string name="saml_authentication_required_text">Potrebna autentikacija</string>
   <string name="saml_authentication_wrong_pass">Pogrešna lozinka</string>
-  <string name="move_choose_button_text">Izaberi</string>
+  <string name="folder_picker_choose_button_text">Odaberite</string>
   <string name="prefs_category_security">Sigurnost</string>
 </resources>
index 0e64683..ff42f94 100644 (file)
   <string name="file_list_empty">Itt nincs semmi. Töltsön fel valamit!</string>
   <string name="file_list_loading">Betöltés...</string>
   <string name="local_file_list_empty">Nincs fájl ebben a mappában.</string>
+  <string name="file_list_folder">mappa</string>
+  <string name="file_list_folders">mappák</string>
+  <string name="file_list_file">fájl</string>
+  <string name="file_list_files">fájlok</string>
   <string name="filedetails_select_file">Érintsen meg egy fájlt a további információkért.</string>
   <string name="filedetails_size">Méret:</string>
   <string name="filedetails_type">Tipus:</string>
   <string name="clipboard_text_copied">Bemásolva a vágólapra</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">Fiókok</string>
+  <string name="prefs_add_account">Fiók hozzáadása</string>
+  <string name="actionbar_logger">Naplók</string>
   <string name="saml_authentication_required_text">Felhasználóazonosítás szükséges</string>
   <string name="saml_authentication_wrong_pass">Hibás jelszó</string>
-  <string name="move_choose_button_text">Válasszon</string>
+  <string name="actionbar_move">Mozgatás</string>
+  <string name="folder_picker_choose_button_text">Válasszon</string>
   <string name="prefs_category_security">Biztonság</string>
 </resources>
index 598d99a..1f8c5b4 100644 (file)
@@ -29,5 +29,5 @@
   <string name="uploader_info_dirname">Nomine de dossier</string>
   <string name="activity_chooser_send_file_title">Invia</string>
   <string name="empty"></string>
-  <string name="move_choose_button_text">Seliger</string>
+  <string name="folder_picker_choose_button_text">Seliger</string>
 </resources>
index 1434642..1b0dd76 100644 (file)
   <string name="file_list_empty">Tidak ada apa-apa di sini. Unggah sesuatu!</string>
   <string name="file_list_loading">Memuat...</string>
   <string name="local_file_list_empty">Tidak ada satupun berkas dalam folder ini.</string>
+  <string name="file_list_folder">folder</string>
+  <string name="file_list_folders">folder-folder</string>
+  <string name="file_list_file">berkas</string>
+  <string name="file_list_files">berkas-berkas</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="auth_redirect_non_secure_connection_title">Sambungan aman dialihkan ke rute yang tidak aman.</string>
   <string name="actionbar_logger">Log</string>
   <string name="log_send_history_button">Kirim Riwayat</string>
-  <string name="log_mail_subject">Log apl ownCloud Android</string>
-  <string name="log_progress_dialog_text">Memuat data...</string>
   <string name="saml_authentication_required_text">Diperlukan otentikasi</string>
   <string name="saml_authentication_wrong_pass">Sandi salah</string>
   <string name="actionbar_move">Pindah</string>
   <string name="file_list_empty_moving">Tdak ada apapun disini. Anda dapat menambahkan sebuah folder!</string>
-  <string name="move_choose_button_text">Pilih</string>
+  <string name="folder_picker_choose_button_text">Pilih</string>
   <string name="move_file_not_found">Tidak dapat memindahkan. Silakan periksa apakah berkas ada</string>
   <string name="move_file_invalid_into_descendent">Tidak mungkin untuk memindahkan folder kedalam turunannya</string>
   <string name="move_file_invalid_overwrite">Berkas sudah ada didalam folder tujuan</string>
index 1e14885..2811b4c 100644 (file)
@@ -27,5 +27,5 @@
   <string name="common_remove">Fjarlægja</string>
   <string name="activity_chooser_send_file_title">Senda</string>
   <string name="empty"></string>
-  <string name="move_choose_button_text">Veldu</string>
+  <string name="folder_picker_choose_button_text">Veldu</string>
 </resources>
index b5dc46b..94fc138 100644 (file)
@@ -35,7 +35,7 @@
   <string name="prefs_log_summary_history">Mostra i log registrati</string>
   <string name="prefs_log_delete_history_button">Elimina la cronologia</string>
   <string name="prefs_help">Aiuto</string>
-  <string name="prefs_recommend">Consiglia ad un amico</string>
+  <string name="prefs_recommend">Consiglia a un amico</string>
   <string name="prefs_feedback">Segnalazioni</string>
   <string name="prefs_imprint">Imprint</string>
   <string name="prefs_remember_last_share_location">Ricorda la posizione della condivisione</string>
   <string name="file_list_empty">Non c\'è niente qui. Carica qualcosa!</string>
   <string name="file_list_loading">Caricamento in corso...</string>
   <string name="local_file_list_empty">Non ci sono file in questa cartella.</string>
+  <string name="file_list_folder">cartella</string>
+  <string name="file_list_folders">cartelle</string>
+  <string name="file_list_file">file</string>
+  <string name="file_list_files">file</string>
   <string name="filedetails_select_file">Tocca un file per visualizzare informazioni aggiuntive.</string>
   <string name="filedetails_size">Dimensione:</string>
   <string name="filedetails_type">Tipo:</string>
   <string name="auth_redirect_non_secure_connection_title">La connessione sicura è rediretta su un percorso non sicuro.</string>
   <string name="actionbar_logger">Registri</string>
   <string name="log_send_history_button">Invia cronologia</string>
-  <string name="log_mail_subject">Registri applicazione ownCloud Android</string>
+  <string name="log_send_no_mail_app">Non è stata trovata alcuna applicazione per l\'invio dei registri. Installa l\'applicazione mail!</string>
+  <string name="log_send_mail_subject">Registri applicazione %1$s Android</string>
   <string name="log_progress_dialog_text">Caricamento dati in corso...</string>
   <string name="saml_authentication_required_text">Autenticazione richiesta</string>
   <string name="saml_authentication_wrong_pass">Password errata</string>
   <string name="actionbar_move">Sposta</string>
   <string name="file_list_empty_moving">Qui non c\'è niente. Puoi aggiungere una cartella.</string>
-  <string name="move_choose_button_text">Scegli</string>
+  <string name="folder_picker_choose_button_text">Scegli</string>
   <string name="move_file_not_found">Impossibile spostare. Assicurati che il file esista</string>
   <string name="move_file_invalid_into_descendent">Impossibile spostare una cartella in una cartella inferiore</string>
   <string name="move_file_invalid_overwrite">Il file esiste già nella cartella di destinazione</string>
   <string name="forbidden_permissions_move">per spostare questo file</string>
   <string name="prefs_category_instant_uploading">Caricamenti istantanei</string>
   <string name="prefs_category_security">Protezione</string>
+  <string name="prefs_instant_video_upload_path_title">Percorso di caricamento video</string>
 </resources>
index f6e43e2..cbc84bb 100644 (file)
   <string name="file_list_empty">ここには何もありません。何かアップロードしてください。</string>
   <string name="file_list_loading">読込中 ...</string>
   <string name="local_file_list_empty">このフォルダーにはファイルがありません。</string>
+  <string name="file_list_folder">フォルダ</string>
+  <string name="file_list_folders">フォルダ</string>
+  <string name="file_list_file">ファイル</string>
+  <string name="file_list_files">ファイル</string>
   <string name="filedetails_select_file">ファイルをタップすると追加情報が表示されます。</string>
   <string name="filedetails_size">サイズ:</string>
   <string name="filedetails_type">タイプ:</string>
   <string name="auth_redirect_non_secure_connection_title">暗号化接続は非暗号化接続にリダイレクトされました。</string>
   <string name="actionbar_logger">ログ</string>
   <string name="log_send_history_button">ログを送信</string>
-  <string name="log_mail_subject">ownCloud Android アプリログ</string>
-  <string name="log_progress_dialog_text">読込中 ...</string>
   <string name="saml_authentication_required_text">認証を必要とする</string>
   <string name="saml_authentication_wrong_pass">無効なパスワード</string>
   <string name="actionbar_move">移動</string>
   <string name="file_list_empty_moving">ファイルが有りません。フォルダを追加してください。</string>
-  <string name="move_choose_button_text">選択</string>
+  <string name="folder_picker_choose_button_text">選択</string>
   <string name="move_file_not_found">移動できません。ファイルがあるか確認してください。</string>
   <string name="move_file_invalid_into_descendent">フォルダを子フォルダへ移動することはできません。</string>
   <string name="move_file_invalid_overwrite">そのファイルは、宛先フォルダに既に存在しています。</string>
   <string name="forbidden_permissions_move">このファイルを移動</string>
   <string name="prefs_category_instant_uploading">自動アップロード</string>
   <string name="prefs_category_security">セキュリティ</string>
+  <string name="prefs_instant_video_upload_path_title">動画のアップロードパス</string>
 </resources>
index f0efc92..7836c23 100644 (file)
   <string name="clipboard_text_copied">კოპირებულია კლიპბორდში</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">ანგარიში</string>
-  <string name="move_choose_button_text">არჩევა</string>
+  <string name="folder_picker_choose_button_text">არჩევა</string>
   <string name="prefs_category_security">უსაფრთხოება</string>
 </resources>
index 75c68d7..36bbbcf 100644 (file)
@@ -85,6 +85,6 @@
   <string name="empty"></string>
   <string name="prefs_category_accounts">គណនី</string>
   <string name="saml_authentication_wrong_pass">ខុស​ពាក្យ​សម្ងាត់</string>
-  <string name="move_choose_button_text">ជ្រើស</string>
+  <string name="folder_picker_choose_button_text">ជ្រើស</string>
   <string name="prefs_category_security">សុវត្ថិភាព</string>
 </resources>
index 69623e1..f55428e 100644 (file)
@@ -1,6 +1,35 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <resources>
+  <string name="actionbar_upload">ಪೇರಿಸು</string>
+  <string name="actionbar_upload_files">ಕಡತಗಳು</string>
+  <string name="actionbar_mkdir">ಹೊಸ ಕಡತಕೋಶ</string>
+  <string name="actionbar_settings">ಆಯ್ಕೆ</string>
+  <string name="actionbar_send_file">ಕಳುಹಿಸಿ</string>
   <!--TODO re-enable when server-side folder size calculation is available   
        <item>Biggest - Smallest</item>-->
+  <string name="prefs_category_more">ಇನ್ನಷ್ಟು</string>
+  <string name="prefs_help">ಸಹಾಯ</string>
+  <string name="prefs_imprint">ಮುದ್ರೆ</string>
+  <string name="auth_username">ಬಳಕೆಯ ಹೆಸರು</string>
+  <string name="auth_password">ಗುಪ್ತ ಪದ</string>
+  <string name="sync_string_files">ಕಡತಗಳು</string>
+  <string name="uploader_btn_upload_text">ಪೇರಿಸು</string>
+  <string name="filedetails_download">ಪ್ರತಿಯನ್ನು ಸ್ಥಳೀಯವಾಗಿ ಉಳಿಸಿಕೊಳ್ಳಿ</string>
+  <string name="action_share_file">ಸಂಪರ್ಕ ಕೊಂಡಿಯನ್ನು  ಹಂಚಿಕೊಳ್ಳಬಹುದು</string>
+  <string name="common_yes">ಹೌದು</string>
+  <string name="common_no">ಇಲ್ಲ</string>
+  <string name="common_ok">ಸರಿ</string>
+  <string name="common_cancel_upload">ವರ್ಗಾವಣೆ ರದ್ದು ಮಾಡಿ</string>
+  <string name="common_cancel">ರದ್ದು</string>
+  <string name="common_error">ತಪ್ಪಾಗಿದೆ</string>
+  <string name="common_error_unknown">ಗೊತ್ತಿಲ್ಲದ ದೋಷ</string>
+  <string name="change_password">ಗುಪ್ತ ಪದವನ್ನು ಬದಲಾಯಿಸಿ</string>
+  <string name="common_rename">ಮರುಹೆಸರಿಸು</string>
+  <string name="common_remove">ತೆಗೆದುಹಾಕಿ</string>
+  <string name="activity_chooser_send_file_title">ಕಳುಹಿಸಿ</string>
   <string name="empty"></string>
+  <string name="saml_authentication_required_text">ದೃಢೀಕರಣ ಅಗತ್ಯವಿದೆ</string>
+  <string name="saml_authentication_wrong_pass">ದುರ್ಬಲ ಗುಪ್ತಪದ</string>
+  <string name="folder_picker_choose_button_text">ಆಯ್ಕೆ</string>
+  <string name="prefs_category_security">ಭದ್ರತೆ</string>
 </resources>
index a298ff5..3bb9a60 100644 (file)
   <string name="uploader_info_uploading">업로드 중</string>
   <string name="file_list_seconds_ago">초 전</string>
   <string name="file_list_empty">내용이 없습니다. 업로드할 수 있습니다!</string>
+  <string name="file_list_folder">폴더</string>
+  <string name="file_list_folders">폴더</string>
+  <string name="file_list_file">파일</string>
+  <string name="file_list_files">파일</string>
   <string name="filedetails_select_file">파일을 누르면 추가 정보가 표시됩니다.</string>
   <string name="filedetails_size">크기:</string>
   <string name="filedetails_type">종류:</string>
   <string name="prefs_category_accounts">계정</string>
   <string name="saml_authentication_required_text">인증 필요함</string>
   <string name="saml_authentication_wrong_pass">잘못된 암호</string>
-  <string name="move_choose_button_text">선택</string>
+  <string name="folder_picker_choose_button_text">선택</string>
   <string name="prefs_category_security">보안</string>
 </resources>
index 545c842..826c0a2 100644 (file)
   <string name="uploader_info_uploading">Eroplueden</string>
   <string name="file_list_seconds_ago">Sekonnen hir</string>
   <string name="file_list_empty">Hei ass näischt. Lued eppes rop!</string>
+  <string name="file_list_folder">Dossier</string>
+  <string name="file_list_folders">Dossieren</string>
+  <string name="file_list_file">Datei</string>
+  <string name="file_list_files">Dateien</string>
   <string name="filedetails_size">Gréisst:</string>
   <string name="filedetails_type">Typ:</string>
   <string name="filedetails_created">Erstallt:</string>
@@ -87,5 +91,5 @@
   <string name="activity_chooser_send_file_title">Schécken</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">Accounten</string>
-  <string name="move_choose_button_text">Auswielen</string>
+  <string name="folder_picker_choose_button_text">Auswielen</string>
 </resources>
diff --git a/res/values-lo/strings.xml b/res/values-lo/strings.xml
new file mode 100644 (file)
index 0000000..69623e1
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<resources>
+  <!--TODO re-enable when server-side folder size calculation is available   
+       <item>Biggest - Smallest</item>-->
+  <string name="empty"></string>
+</resources>
index 2f45be1..76e0e52 100644 (file)
   <string name="actionbar_settings">Nustatymai</string>
   <string name="actionbar_see_details">Informacija</string>
   <string name="actionbar_send_file">Siųsti</string>
+  <string name="actionbar_sort">Rikiuoti</string>
+  <string name="actionbar_sort_title">Rikiuoti pagal</string>
+  <string-array name="actionbar_sortby">
+    <item>A-Z</item>
+    <item>Naujausi - Seniausi</item>
+  </string-array>
   <!--TODO re-enable when server-side folder size calculation is available   
        <item>Biggest - Smallest</item>-->
   <string name="prefs_category_general">Bendras</string>
@@ -32,6 +38,8 @@
   <string name="prefs_recommend">Rekomenduoti draugui</string>
   <string name="prefs_feedback">Atsiliepimai</string>
   <string name="prefs_imprint">Imprint</string>
+  <string name="prefs_remember_last_share_location">Prisiminti bendrinimo vietą</string>
+  <string name="prefs_remember_last_upload_location_summary">Prisiminti paskutinio bendrinimo įkėlimo vietą</string>
   <string name="recommend_subject">Išbandykite %1$s savo išmaniajame telefone!</string>
   <string name="auth_check_server">Patikrinti Serverį</string>
   <string name="auth_host_url">Serverio adresas </string>
   <string name="file_list_empty">Čia tuščia. Įkelkite ką nors!</string>
   <string name="file_list_loading">Įkeliama ...</string>
   <string name="local_file_list_empty">Šiame aplanke nėra failų.</string>
+  <string name="file_list_folder">katalogas</string>
+  <string name="file_list_folders">katalogai</string>
+  <string name="file_list_file">failas</string>
+  <string name="file_list_files">failai</string>
   <string name="filedetails_select_file">Palieskite failą, kad parodyti papildomą informaciją.</string>
   <string name="filedetails_size">Dydis:</string>
   <string name="filedetails_type">Tipas:</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">Paskyros</string>
   <string name="saml_authentication_wrong_pass">Neteisingas slaptažodis</string>
-  <string name="move_choose_button_text">Pasirinkite</string>
+  <string name="folder_picker_choose_button_text">Pasirinkite</string>
   <string name="prefs_category_security">Saugumas</string>
 </resources>
index 39ea5bf..c185f73 100644 (file)
   <string name="uploader_info_uploading">Augšupielādē</string>
   <string name="file_list_seconds_ago">sekundes atpakaļ</string>
   <string name="file_list_empty">Te vēl nekas nav. Rīkojies, sāc augšupielādēt!</string>
+  <string name="file_list_folder">mape</string>
+  <string name="file_list_folders">mapes</string>
+  <string name="file_list_file">fails</string>
+  <string name="file_list_files">faili</string>
   <string name="filedetails_select_file">Uzsitiet uz datnes, lai redzētu papildinformāciju.</string>
   <string name="filedetails_size">Izmērs:</string>
   <string name="filedetails_type">Tips:</string>
   <string name="activity_chooser_send_file_title">Sūtīt</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">Konti</string>
-  <string name="move_choose_button_text">Izvēlieties</string>
+  <string name="folder_picker_choose_button_text">Izvēlieties</string>
   <string name="prefs_category_security">Drošība</string>
 </resources>
index 5333aae..2ce829c 100644 (file)
   <string name="uploader_wrn_no_account_quit_btn_text">Прекини</string>
   <string name="file_list_seconds_ago">пред секунди</string>
   <string name="file_list_empty">Тука нема ништо. Снимете нешто!</string>
+  <string name="file_list_folder">фолдер</string>
+  <string name="file_list_folders">фолдери</string>
+  <string name="file_list_file">датотека</string>
+  <string name="file_list_files">датотеки</string>
   <string name="filedetails_size">Големина:</string>
   <string name="filedetails_type">Тип:</string>
   <string name="filedetails_created">Создадено:</string>
   <string name="prefs_category_accounts">Сметки</string>
   <string name="saml_authentication_required_text">Потребна е автентификација</string>
   <string name="saml_authentication_wrong_pass">Погрешна лозинка</string>
-  <string name="move_choose_button_text">Избери</string>
+  <string name="folder_picker_choose_button_text">Избери</string>
   <string name="prefs_category_security">Безбедност</string>
 </resources>
index 69623e1..b4185fd 100644 (file)
@@ -1,6 +1,17 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <resources>
+  <string name="actionbar_upload">Байршуулах</string>
+  <string name="actionbar_upload_files">Файлууд</string>
+  <string name="actionbar_settings">Тохиргоо</string>
   <!--TODO re-enable when server-side folder size calculation is available   
        <item>Biggest - Smallest</item>-->
+  <string name="prefs_category_general">Ерөнхий</string>
+  <string name="auth_username">Хэрэглэгчийн нэр</string>
+  <string name="auth_password">Нууц үг</string>
+  <string name="sync_string_files">Файлууд</string>
+  <string name="uploader_btn_upload_text">Байршуулах</string>
+  <string name="create_account">Аккаунт үүсгэх</string>
+  <string name="common_remove">Устгах</string>
   <string name="empty"></string>
+  <string name="prefs_category_security">Аюулгүй байдал</string>
 </resources>
index 808ab65..9e24a59 100644 (file)
   <string name="uploader_wrn_no_account_quit_btn_text">Berhenti</string>
   <string name="uploader_info_uploading">Memuatnaik</string>
   <string name="file_list_empty">Tiada apa-apa di sini. Muat naik sesuatu!</string>
+  <string name="file_list_folder">direktori</string>
+  <string name="file_list_folders">direktori</string>
+  <string name="file_list_file">fail</string>
+  <string name="file_list_files">fail</string>
   <string name="filedetails_size">Saiz</string>
   <string name="filedetails_type">Jenis</string>
   <string name="filedetails_created">Telah dibina:</string>
index 7ec9005..b016f79 100644 (file)
@@ -14,5 +14,5 @@
   <string name="common_ok">အိုကေ</string>
   <string name="common_cancel">ပယ်ဖျက်မည်</string>
   <string name="empty"></string>
-  <string name="move_choose_button_text">ရွေးချယ်</string>
+  <string name="folder_picker_choose_button_text">ရွေးချယ်</string>
 </resources>
index 1132651..98f4ff6 100644 (file)
   <string name="file_list_empty">Ingenting her. Last opp noe!</string>
   <string name="file_list_loading">Laster...</string>
   <string name="local_file_list_empty">Det er ingen filer i denne mappen.</string>
+  <string name="file_list_folder">mappe</string>
+  <string name="file_list_folders">mapper</string>
+  <string name="file_list_file">fil</string>
+  <string name="file_list_files">filer</string>
   <string name="filedetails_select_file">Trykk på en fil for å vise ekstra informasjon.</string>
   <string name="filedetails_size">Størrelse:</string>
   <string name="filedetails_type">Type:</string>
   <string name="prefs_add_account">Legg til en konto</string>
   <string name="actionbar_logger">Logger</string>
   <string name="log_send_history_button">Send historikk</string>
-  <string name="log_mail_subject">logger for ownCloud Android app</string>
-  <string name="log_progress_dialog_text">Laster data...</string>
   <string name="saml_authentication_required_text">Autentisering kreves</string>
   <string name="saml_authentication_wrong_pass">Feil passord</string>
   <string name="actionbar_move">Flytt</string>
   <string name="file_list_empty_moving">Ingenting her. Du kan legge til en mappe!</string>
-  <string name="move_choose_button_text">Velg</string>
+  <string name="folder_picker_choose_button_text">Velg</string>
   <string name="move_file_not_found">Kan ikke flytte. Sjekk om filen eksisterer.</string>
   <string name="move_file_invalid_into_descendent">Det er ikke mulig å flytte en mappe inn i sin egen undermappe</string>
   <string name="move_file_invalid_overwrite">Filen finnes allerede i målmappen</string>
index e0bcaa4..a6fc894 100644 (file)
@@ -64,6 +64,10 @@ Download hier: %2$s</string>
   <string name="file_list_empty">Er bevindt zich hier niets. Upload een bestand!</string>
   <string name="file_list_loading">Laden ...</string>
   <string name="local_file_list_empty">Er staan geen bestanden in deze map.</string>
+  <string name="file_list_folder">map</string>
+  <string name="file_list_folders">mappen</string>
+  <string name="file_list_file">bestand</string>
+  <string name="file_list_files">bestanden</string>
   <string name="filedetails_select_file">Druk op een bestand om extra informatie weer te geven</string>
   <string name="filedetails_size">Grootte:</string>
   <string name="filedetails_type">Type:</string>
@@ -281,13 +285,14 @@ Hieronder staan de lokale bestanden en de externe bestanden in %5$s waar ze naar
   <string name="auth_redirect_non_secure_connection_title">De beveiligde verbinding is omgeleid naar een onveilige route.</string>
   <string name="actionbar_logger">Logs</string>
   <string name="log_send_history_button">Verstuur geschiedenis</string>
-  <string name="log_mail_subject">ownCloud Android app logs</string>
+  <string name="log_send_no_mail_app">Geen app voor versturen van logs gevonden. Installeer de mail app!</string>
+  <string name="log_send_mail_subject">%1$s Android app logs</string>
   <string name="log_progress_dialog_text">Laden data...</string>
   <string name="saml_authentication_required_text">Authenticatie vereist</string>
   <string name="saml_authentication_wrong_pass">Onjuist wachtwoord</string>
   <string name="actionbar_move">verplaatsen</string>
   <string name="file_list_empty_moving">Niets hier. U kunt een map toevoegen!</string>
-  <string name="move_choose_button_text">Kies</string>
+  <string name="folder_picker_choose_button_text">Kies</string>
   <string name="move_file_not_found">Kan niet verplaatsen. Ga na of het bestand wel bestaat</string>
   <string name="move_file_invalid_into_descendent">De map kan niet naar een onderliggende map worden verplaatst</string>
   <string name="move_file_invalid_overwrite">Het bestand bestaat al in de doelmap</string>
@@ -295,4 +300,5 @@ Hieronder staan de lokale bestanden en de externe bestanden in %5$s waar ze naar
   <string name="forbidden_permissions_move">om dit bestand te verplaatsen</string>
   <string name="prefs_category_instant_uploading">Directe uploads</string>
   <string name="prefs_category_security">Beveiliging</string>
+  <string name="prefs_instant_video_upload_path_title">Upload Video Pad</string>
 </resources>
index 9cf7ac6..930ff33 100644 (file)
   <string name="empty"></string>
   <string name="prefs_category_accounts">Kontoar</string>
   <string name="saml_authentication_wrong_pass">Feil passord</string>
-  <string name="move_choose_button_text">Vel</string>
+  <string name="folder_picker_choose_button_text">Vel</string>
   <string name="prefs_category_security">Tryggleik</string>
 </resources>
index e6a7eae..5d11e00 100644 (file)
   <string name="uploader_info_uploading">Al amontcargar</string>
   <string name="file_list_seconds_ago">segonda a</string>
   <string name="file_list_empty">Pas res dedins. Amontcarga qualquaren</string>
+  <string name="file_list_folder">Dorsièr</string>
+  <string name="file_list_folders">Dorsièrs</string>
+  <string name="file_list_file">fichièr</string>
+  <string name="file_list_files">fichièrs</string>
   <string name="filedetails_size">Talha :</string>
   <string name="filedetails_type">Tipe :</string>
   <string name="filedetails_created">Creat :</string>
@@ -44,5 +48,5 @@
   <string name="common_rename">Torna nomenar</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">Comptes</string>
-  <string name="move_choose_button_text">Causís</string>
+  <string name="folder_picker_choose_button_text">Causís</string>
 </resources>
index bf5abd6..05d612d 100644 (file)
   <string name="activity_chooser_send_file_title">ਭੇਜੋ</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">ਅਕਾਊਂਟ</string>
-  <string name="move_choose_button_text">ਚੁਣੋ</string>
+  <string name="folder_picker_choose_button_text">ਚੁਣੋ</string>
 </resources>
index a5a7b7b..2049b35 100644 (file)
@@ -38,6 +38,7 @@
   <string name="prefs_recommend">Poleć znajomemu</string>
   <string name="prefs_feedback">Wsparcie</string>
   <string name="prefs_imprint">Stopka</string>
+  <string name="prefs_remember_last_share_location">Zapamiętaj położenie udostępnienia</string>
   <string name="recommend_subject">Wypróbuj %1$s na swoim smartphonie!</string>
   <string name="recommend_text">Chciałbym zaprosić Cię do używania %1$s na swoim smartfonie!\nŚciągnij tutaj: %2$s</string>
   <string name="auth_check_server">Sprawdź serwer</string>
   <string name="file_list_empty">Pusto. Wyślij coś!</string>
   <string name="file_list_loading">Ładowanie...</string>
   <string name="local_file_list_empty">Nie ma plików w tym folderze.</string>
+  <string name="file_list_folder">folder</string>
+  <string name="file_list_folders">foldery</string>
+  <string name="file_list_file">plik</string>
+  <string name="file_list_files">pliki</string>
   <string name="filedetails_select_file">Dotknij plik aby wyświetlić dodatkowe informacje</string>
   <string name="filedetails_size">Rozmiar:</string>
   <string name="filedetails_type">Typ:</string>
   <string name="auth_redirect_non_secure_connection_title">Bezpieczne połączenie jest przekierowywane przez niezabezpieczone trasy.</string>
   <string name="actionbar_logger">Logi</string>
   <string name="log_send_history_button">Wyślij historię</string>
-  <string name="log_mail_subject">Logi aplikacji ownCloud Android</string>
+  <string name="log_send_mail_subject">%1$s Logi aplikacji Android</string>
   <string name="log_progress_dialog_text">Ładuję dane...</string>
   <string name="saml_authentication_required_text">Wymagana autoryzacja</string>
   <string name="saml_authentication_wrong_pass">Złe hasło</string>
   <string name="actionbar_move">Przenieś</string>
   <string name="file_list_empty_moving">Nic tu nie ma. Możesz dodać folder!</string>
-  <string name="move_choose_button_text">Wybierz</string>
+  <string name="folder_picker_choose_button_text">Wybierz</string>
   <string name="move_file_not_found">Nie można przenieść. Proszę sprawdzić, czy plik istnieje</string>
   <string name="move_file_invalid_into_descendent">Nie jest możliwe przeniesienie folderu do potomka</string>
   <string name="move_file_invalid_overwrite">Plik istnieje już w folderze docelowym</string>
   <string name="forbidden_permissions_move">aby przenieść ten plik</string>
   <string name="prefs_category_instant_uploading">Automatyczne wysyłanie</string>
   <string name="prefs_category_security">Bezpieczeństwo</string>
+  <string name="prefs_instant_video_upload_path_title">Katalog wysyłania dla wideo</string>
 </resources>
index 512cfe5..45909b4 100644 (file)
   <string name="file_list_empty">Nada aqui. Envie alguma coisa!</string>
   <string name="file_list_loading">Carregando...</string>
   <string name="local_file_list_empty">Não existe nenhum arquivo nesta pasta.</string>
+  <string name="file_list_folder">pasta</string>
+  <string name="file_list_folders">pastas</string>
+  <string name="file_list_file">arquivo</string>
+  <string name="file_list_files">arquivos</string>
   <string name="filedetails_select_file">Toque em um arquivo para mostrar informações adicionais.</string>
   <string name="filedetails_size">Tamanho:</string>
   <string name="filedetails_type">Tipo:</string>
   <string name="auth_redirect_non_secure_connection_title">Conexão segura esta redirecionada para uma rota não segura.</string>
   <string name="actionbar_logger">Logs</string>
   <string name="log_send_history_button">Enviar Histórico</string>
-  <string name="log_mail_subject">Logs do aplicativo ownCloud Android</string>
-  <string name="log_progress_dialog_text">Carregamento de dados...</string>
+  <string name="log_send_no_mail_app">Não foi encontrado nenhum app para envio de logs. Instale o mail app!</string>
+  <string name="log_send_mail_subject">%1$s logs do Android app</string>
+  <string name="log_progress_dialog_text">Carregando dados...</string>
   <string name="saml_authentication_required_text">Autenticação é requerida</string>
   <string name="saml_authentication_wrong_pass">Senha incorreta</string>
   <string name="actionbar_move">Mover</string>
   <string name="file_list_empty_moving">Nada aqui. Você pode adicionar uma pasta!</string>
-  <string name="move_choose_button_text">Escolher</string>
+  <string name="folder_picker_choose_button_text">Escolher</string>
   <string name="move_file_not_found">Não é possível mover. Por favor verifique se o arquivo existe</string>
   <string name="move_file_invalid_into_descendent">Não é possível mover a pasta para uma descendente</string>
   <string name="move_file_invalid_overwrite">O arquivo já existe na pasta de destino</string>
   <string name="forbidden_permissions_move">mover este arquivo</string>
   <string name="prefs_category_instant_uploading">Envios Instantâneos</string>
   <string name="prefs_category_security">Segurança</string>
+  <string name="prefs_instant_video_upload_path_title">Enviar o Caminho do Vídeo</string>
 </resources>
index 072a085..60d9377 100644 (file)
@@ -40,7 +40,7 @@
   <string name="prefs_imprint">Imprint</string>
   <string name="prefs_remember_last_share_location">Lembrar localização de partilha</string>
   <string name="prefs_remember_last_upload_location_summary">Lembrar da última localização de envio de partilha</string>
-  <string name="recommend_subject">Experimente %1$s no seu smartphone!</string>
+  <string name="recommend_subject">Test %1$s no seu smartphone!</string>
   <string name="recommend_text">Quero convidar-te a usares %1$s no teu smartphone!\nFaz download aqui: %2$s</string>
   <string name="auth_check_server">Verificar Servidor</string>
   <string name="auth_host_url">Endereço do servidor https://..</string>
   <string name="uploader_error_forbidden_content">O  %1$s não está autorizado a aceder aos ficheiro partilhados.</string>
   <string name="uploader_info_uploading">A enviar</string>
   <string name="file_list_seconds_ago">segundos atrás</string>
-  <string name="file_list_empty">Vazio. Envie alguma coisa!</string>
+  <string name="file_list_empty">Aqui não existe nada. Envie alguma coisa!</string>
   <string name="file_list_loading">A carregar ...</string>
   <string name="local_file_list_empty">Não existem ficheiros nesta pasta.</string>
-  <string name="filedetails_select_file">Clique no ficheiro para visualizar informação adicional.</string>
+  <string name="file_list_folder">pasta</string>
+  <string name="file_list_folders">pastas</string>
+  <string name="file_list_file">ficheiro</string>
+  <string name="file_list_files">ficheiros</string>
+  <string name="filedetails_select_file">Toque num ficheiro para visualizar a informação adicional.</string>
   <string name="filedetails_size">Tamanho:</string>
   <string name="filedetails_type">Tipo:</string>
   <string name="filedetails_created">Criado:</string>
   <string name="filedetails_modified">Modificado:</string>
   <string name="filedetails_download">Transferir</string>
   <string name="filedetails_sync_file">Atualizar ficheiro</string>
-  <string name="filedetails_renamed_in_upload_msg">O nome do ficheiro foi alterado para %1$s durante o envio.</string>
+  <string name="filedetails_renamed_in_upload_msg">O ficheiro foi renomeado para %1$s durante o envio.</string>
   <string name="action_share_file">Partilhar a hiperligação</string>
   <string name="action_unshare_file">Deixar de partilhar a ligação</string>
   <string name="common_yes">Sim</string>
   <string name="common_no">Não</string>
-  <string name="common_ok">OK</string>
+  <string name="common_ok">ACEITAR</string>
   <string name="common_cancel_download">Cancelar a transferência</string>
   <string name="common_cancel_upload">Cancelar o envio</string>
   <string name="common_cancel">Cancelar</string>
   <string name="upload_chooser_title">Enviar de ...</string>
   <string name="uploader_info_dirname">Nome da pasta</string>
   <string name="uploader_upload_in_progress_ticker">A enviar ...</string>
-  <string name="uploader_upload_in_progress_content">A enviar %1$d%% , %2$s completo.</string>
-  <string name="uploader_upload_succeeded_ticker">Carregado com sucesso</string>
-  <string name="uploader_upload_succeeded_content_single">%1$s foi carregado com sucesso</string>
-  <string name="uploader_upload_failed_ticker">Carregamento falhou</string>
+  <string name="uploader_upload_in_progress_content">%1$d%%  A enviar %2$s</string>
+  <string name="uploader_upload_succeeded_ticker">Envio bem sucedido</string>
+  <string name="uploader_upload_succeeded_content_single">%1$s foi enviado com sucesso</string>
+  <string name="uploader_upload_failed_ticker">Não foi possível enviar</string>
   <string name="uploader_upload_failed_content_single">O envio do ficheiro %1$s não foi concluído.</string>
   <string name="uploader_upload_failed_credentials_error">Falha no carregamento, é necessário fazer novo login</string>
   <string name="downloader_download_in_progress_ticker">A transferir ...</string>
-  <string name="downloader_download_in_progress_content">%1$d%% A decarregar %2$s</string>
-  <string name="downloader_download_succeeded_ticker">Descarga com sucesso</string>
+  <string name="downloader_download_in_progress_content">%1$d%% A transferir %2$s</string>
+  <string name="downloader_download_succeeded_ticker">Transferência bem sucedida</string>
   <string name="downloader_download_succeeded_content">%1$s foi descarregado com sucesso</string>
   <string name="downloader_download_failed_ticker">Descarga falhou</string>
   <string name="downloader_download_failed_content">O descarregamento %1$s não foi possível descarregar</string>
-  <string name="downloader_not_downloaded_yet">Não transferido</string>
-  <string name="downloader_download_failed_credentials_error">Falha no download, é necessário fazer login </string>
+  <string name="downloader_not_downloaded_yet">Ainda não foi transferido</string>
+  <string name="downloader_download_failed_credentials_error">Não foi possível transferir, tem de iniciar a sessão novamente</string>
   <string name="common_choose_account">Escolha a conta</string>
   <string name="sync_fail_ticker">Falhou a sincronização</string>
   <string name="sync_fail_ticker_unauthorized">Falhou a sincronização, necessita fazer um novo login</string>
   <string name="sync_foreign_files_forgotten_explanation">Tal como na versão 1.3.16, os ficheiros que foram enviados deste dispositivo são copiados para a pasta local %1$s para prevenir perda de dados quando um ficheiro é partilhado com várias contas.\n\nDevido a esta alteração, todos os ficheiros das versões anteriores foram copiados para a pasta %2$s. No entanto, um erro impediu a conclusão deste processo durante a sincronização da conta. Pode deixar o ficheiro(s) como estão e remover o link para %3$s, ou mover o(s) ficheiro(s) para a pasta %1$s e guardar o link para %4$s. \n\nEm baixo estão listados ficheiro(s) locais e remotos em %5$s que foram ligados.</string>
   <string name="sync_current_folder_was_removed">A pasta %1$s já não existe</string>
   <string name="foreign_files_move">Mover Todos</string>
-  <string name="foreign_files_success">Todos os ficheiros foram movidos</string>
+  <string name="foreign_files_success">Foram movidos todos os ficheiros</string>
   <string name="foreign_files_fail">Não foi possível mover alguns ficheiros</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">Não existe espaço disponível para copiar o ficheiro seleccionado para a pasta %1$s . Em vez disso deseja mover o ficheiro?</string>
-  <string name="pincode_enter_pin_code">Por favor escreva o PIN da Aplicação</string>
-  <string name="pincode_configure_your_pin">Escreva o PIN da Aplicação</string>
-  <string name="pincode_configure_your_pin_explanation">O PIN vai ser pedido todas as vezes que iniciar a aplicação.</string>
-  <string name="pincode_reenter_your_pincode">Volte a inserir o App PIN, por favor</string>
-  <string name="pincode_remove_your_pincode">Remover o PIN do aplicação.</string>
+  <string name="pincode_enter_pin_code">Por favor, insira o PIN da App</string>
+  <string name="pincode_configure_your_pin">Insira o PIN da App</string>
+  <string name="pincode_configure_your_pin_explanation">O PIN será pedido sempre que a app seja iniciada.</string>
+  <string name="pincode_reenter_your_pincode">Por favor, reinsira o PIN da App</string>
+  <string name="pincode_remove_your_pincode">Remover o seu PIN da App</string>
   <string name="pincode_mismatch">Os códigos PIN introduzidos não são iguais.</string>
   <string name="pincode_wrong">Código PIN Incorrecto.</string>
   <string name="pincode_removed">PIN da aplicação removido</string>
   <string name="pincode_stored">PIN da aplicação guardado</string>
   <string name="media_notif_ticker">%1$s leitor de música</string>
-  <string name="media_state_playing">A tocar: %1$s</string>
-  <string name="media_state_loading">%1$s (A carregar)</string>
+  <string name="media_state_playing">%1$s (a reproduzir)</string>
+  <string name="media_state_loading">%1$s (a carregar)</string>
   <string name="media_event_done">%1$s leitura terminada</string>
   <string name="media_err_nothing_to_play">Não foi encontrado nenhum ficheiro de média</string>
   <string name="media_err_no_account">Não foi fornecida conta</string>
   <string name="auth_redirect_non_secure_connection_title">Ligação segura é redireccionada para um caminho inseguro.</string>
   <string name="actionbar_logger">Registos de Alterações</string>
   <string name="log_send_history_button">Enviar Histórico</string>
-  <string name="log_mail_subject">Registos das alterações da app ownCloud Android</string>
-  <string name="log_progress_dialog_text">A carregar os dados ...</string>
+  <string name="log_send_no_mail_app">Não foi encontrado o aplicativo para envio de registos . Instale app e-mail!</string>
+  <string name="log_send_mail_subject">%1$s Android Aplicação de Registyos</string>
+  <string name="log_progress_dialog_text">A carregar os dados...</string>
   <string name="saml_authentication_required_text">Autenticação necessária</string>
   <string name="saml_authentication_wrong_pass">Palavra-passe errada</string>
   <string name="actionbar_move">Mover</string>
   <string name="file_list_empty_moving">Não está aqui nada. Pode adicionar uma pasta!</string>
-  <string name="move_choose_button_text">Escolher</string>
+  <string name="folder_picker_choose_button_text">Escolher</string>
   <string name="move_file_not_found">Não é possível mover. Por favor, verifique se o ficheiro existe</string>
   <string name="move_file_invalid_into_descendent">Não é possível mover esta pasta deste modo</string>
   <string name="move_file_invalid_overwrite">O ficheiro já existe na pasta de destino</string>
   <string name="forbidden_permissions_move">para mover este ficheiro</string>
   <string name="prefs_category_instant_uploading">Envios Instantâneos</string>
   <string name="prefs_category_security">Segurança</string>
+  <string name="prefs_instant_video_upload_path_title">Envio do Caminho do Vídeo</string>
 </resources>
index 5df31b3..bb03b02 100644 (file)
   <string name="file_list_empty">Nimic aici. Încarcă ceva!</string>
   <string name="file_list_loading">Se incarca</string>
   <string name="local_file_list_empty">In acest folder nu sunt fisiere.</string>
+  <string name="file_list_folder">director</string>
+  <string name="file_list_folders">directoare</string>
+  <string name="file_list_file">fișier</string>
+  <string name="file_list_files">fișiere</string>
   <string name="filedetails_select_file">Selectati un fisier pentru a afisa informatia aditionala</string>
   <string name="filedetails_size">Mărime:</string>
   <string name="filedetails_type">Tip:</string>
   <string name="downloader_download_file_not_found">Fișierul nu mai este disponibil pe server</string>
   <string name="prefs_category_accounts">Conturi</string>
   <string name="prefs_add_account">Adaugă cont</string>
-  <string name="log_progress_dialog_text">Se încarcă datele...</string>
   <string name="saml_authentication_required_text">Autentificare necesară</string>
   <string name="saml_authentication_wrong_pass">Parolă greșită</string>
   <string name="actionbar_move">Mutare</string>
   <string name="file_list_empty_moving">Nu este nimic aici. Poți adăuga un director!</string>
-  <string name="move_choose_button_text">Alege</string>
+  <string name="folder_picker_choose_button_text">Alege</string>
   <string name="forbidden_permissions_move">pentru a muta acest fișier</string>
   <string name="prefs_category_security">Securitate</string>
 </resources>
index 1f773f9..99b9acf 100644 (file)
@@ -38,6 +38,8 @@
   <string name="prefs_recommend">Рекомендовать другу</string>
   <string name="prefs_feedback">Обратная связь</string>
   <string name="prefs_imprint">Штамп</string>
+  <string name="prefs_remember_last_share_location">Запомнить расположение публикации</string>
+  <string name="prefs_remember_last_upload_location_summary">Запомнить расположение загрузки последней публикации</string>
   <string name="recommend_subject">Попробуйте %1$s на вашем смартфоне!</string>
   <string name="recommend_text">Хочу предложить вам использовать %1$s на смартфоне!\nЗагрузить можно здесь: %2$s
        </string>
   <string name="file_list_empty">Здесь ничего нет. Загрузите что-нибудь!</string>
   <string name="file_list_loading">Загрузка...</string>
   <string name="local_file_list_empty">В данной папке нет файлов.</string>
+  <string name="file_list_folder">папка</string>
+  <string name="file_list_folders">папки</string>
+  <string name="file_list_file">файл</string>
+  <string name="file_list_files">файлы</string>
   <string name="filedetails_select_file">Нажмите на файл для отображения дополнительной информации.</string>
   <string name="filedetails_size">Размер:</string>
   <string name="filedetails_type">Тип:</string>
   <string name="auth_redirect_non_secure_connection_title">Защищённое соединение перенаправлено по незащищённому маршруту</string>
   <string name="actionbar_logger">Журналы</string>
   <string name="log_send_history_button">История Отправлений</string>
-  <string name="log_mail_subject">Журналы Андроид-приложения ownCloud</string>
-  <string name="log_progress_dialog_text">Загружаются данные...</string>
+  <string name="log_send_no_mail_app">Приложение для отправки журнала не найдено. Установите почтовое приложение!</string>
+  <string name="log_send_mail_subject">Журналы приложения %1$s для Android</string>
+  <string name="log_progress_dialog_text">Загрузка данных…</string>
   <string name="saml_authentication_required_text">Требуется аутентификация </string>
   <string name="saml_authentication_wrong_pass">Неправильный пароль</string>
   <string name="actionbar_move">Переместить</string>
   <string name="file_list_empty_moving">Здесь ничего нет. Вы можете добавить папку!</string>
-  <string name="move_choose_button_text">Выбрать</string>
+  <string name="folder_picker_choose_button_text">Выбрать</string>
   <string name="move_file_not_found">Невозможно переместить. Пожалуйста, проверьте, существует ли файл</string>
   <string name="move_file_invalid_into_descendent">Невозможно переместить папку в папку-потомок</string>
   <string name="move_file_invalid_overwrite">Файл уже существует в папке назначения</string>
   <string name="forbidden_permissions_move">переместить этот файл</string>
   <string name="prefs_category_instant_uploading">Мгновенные загрузки</string>
   <string name="prefs_category_security">Безопасность</string>
+  <string name="prefs_instant_video_upload_path_title">Путь для загрузки Видео</string>
 </resources>
index d413c8f..6eeb4f0 100644 (file)
   <string name="uploader_info_uploading">උඩුගතවේ</string>
   <string name="file_list_seconds_ago">තත්පරයන්ට පෙර</string>
   <string name="file_list_empty">මෙහි කිසිවක් නොමැත. යමක් උඩුගත කරන්න</string>
+  <string name="file_list_folder">ෆෝල්ඩරය</string>
+  <string name="file_list_folders">ෆෝල්ඩර</string>
+  <string name="file_list_file">ගොනුව</string>
+  <string name="file_list_files">ගොනු</string>
   <string name="filedetails_select_file">වැඩි විස්තර සඳහා ගොනුවක් ස්පර්ෂ කරන්න</string>
   <string name="filedetails_size">විශාලත්වය:</string>
   <string name="filedetails_type">ගණය:</string>
@@ -76,5 +80,5 @@
   <string name="ssl_validator_btn_details_hide">සඟවන්න</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">ගිණුම්</string>
-  <string name="move_choose_button_text">තෝරන්න</string>
+  <string name="folder_picker_choose_button_text">තෝරන්න</string>
 </resources>
index 3946e28..1566ded 100644 (file)
   <string name="file_list_empty">Žiadny súbor. Nahrajte niečo!</string>
   <string name="file_list_loading">Nahráva sa...</string>
   <string name="local_file_list_empty">V tomto priečinku nie sú žiadne súbory.</string>
+  <string name="file_list_folder">priečinok</string>
+  <string name="file_list_folders">priečinky</string>
+  <string name="file_list_file">súbor</string>
+  <string name="file_list_files">súbory</string>
   <string name="filedetails_select_file">Viac informácií získate kliknutím na súbor.</string>
   <string name="filedetails_size">Veľkosť:</string>
   <string name="filedetails_type">Typ:</string>
   <string name="auth_redirect_non_secure_connection_title">Zabezpečené pripojenie je presmerované na nezabezpečenú trasu.</string>
   <string name="actionbar_logger">Logy</string>
   <string name="log_send_history_button">Odoslať históriu</string>
-  <string name="log_mail_subject">Logy aplikácie ownCloud pre Android</string>
-  <string name="log_progress_dialog_text">Nahrávam dáta...</string>
   <string name="saml_authentication_required_text">Vyžaduje sa overenie</string>
   <string name="saml_authentication_wrong_pass">Nesprávne heslo</string>
   <string name="actionbar_move">Presunúť</string>
   <string name="file_list_empty_moving">Nič tu nie je. Pridajte priečinok!</string>
-  <string name="move_choose_button_text">Vybrať</string>
+  <string name="folder_picker_choose_button_text">Vybrať</string>
   <string name="move_file_not_found">Nemožno presunúť. Skontrolujte, či súbor existuje</string>
   <string name="move_file_invalid_into_descendent">Priečinok nemožno presunúť do vlastného podpriečinka</string>
   <string name="move_file_invalid_overwrite">Súbor už v cieľovom priečinku existuje</string>
index f0c1ee2..731bd67 100644 (file)
   <string name="file_list_empty">Tukaj še ni ničesar. Najprej je treba datoteke poslati v oblak!</string>
   <string name="file_list_loading">Poteka nalaganje ...</string>
   <string name="local_file_list_empty">V tej mapi ni datotek.</string>
+  <string name="file_list_folder">mapa</string>
+  <string name="file_list_folders">mape</string>
+  <string name="file_list_file">datoteka</string>
+  <string name="file_list_files">datoteke</string>
   <string name="filedetails_select_file">Pritisnite na datoteko za prikaz dodatnih podrobnosti.</string>
   <string name="filedetails_size">Velikost:</string>
   <string name="filedetails_type">Vrsta:</string>
   <string name="auth_redirect_non_secure_connection_title">Varna povezava je preusmerjena preko ne-varne poti.</string>
   <string name="actionbar_logger">Dnevnik</string>
   <string name="log_send_history_button">Pošlji zgodovino</string>
-  <string name="log_mail_subject">Dnevnik programa ownCloud</string>
+  <string name="log_send_no_mail_app">Ni nameščenega poštnega programa za pošiljanje dnevnikov.</string>
+  <string name="log_send_mail_subject">%1$s dnevniki programa</string>
   <string name="log_progress_dialog_text">Poteka nalaganje podatkov ...</string>
   <string name="saml_authentication_required_text">Zahtevana je overitev</string>
   <string name="saml_authentication_wrong_pass">Napačno geslo</string>
   <string name="actionbar_move">Premakni</string>
   <string name="file_list_empty_moving">Ni vsebine in datotek. Lahko ustvarite na primer mapo.</string>
-  <string name="move_choose_button_text">Izbor</string>
+  <string name="folder_picker_choose_button_text">Izbor</string>
   <string name="move_file_not_found">Ni mogoče premakniti datoteke. Preverite, ali obstaja.</string>
   <string name="move_file_invalid_into_descendent">Ni mogoče premakniti mape v podrejeno mapo.</string>
   <string name="move_file_invalid_overwrite">Datoteka v ciljni mapi že obstaja.</string>
   <string name="forbidden_permissions_move">med premikanjem datoteke</string>
   <string name="prefs_category_instant_uploading">Takojšnje pošiljanje v oblak</string>
   <string name="prefs_category_security">Varnost</string>
+  <string name="prefs_instant_video_upload_path_title">Pot videa za pošiljanje</string>
 </resources>
index 6a79dc7..02918e8 100644 (file)
@@ -75,6 +75,6 @@
   <string name="empty"></string>
   <string name="prefs_category_accounts">Llogarit</string>
   <string name="saml_authentication_wrong_pass">Fjalëkalim i gabuar</string>
-  <string name="move_choose_button_text">Zgjidh</string>
+  <string name="folder_picker_choose_button_text">Zgjidh</string>
   <string name="prefs_category_security">Siguria</string>
 </resources>
index 64e2de0..b5d14f1 100644 (file)
@@ -57,5 +57,5 @@
   <string name="activity_chooser_send_file_title">Pošalji</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">Nalozi</string>
-  <string name="move_choose_button_text">Izaberi</string>
+  <string name="folder_picker_choose_button_text">Izaberi</string>
 </resources>
index ea8c40e..b9235ad 100644 (file)
   <string name="activity_chooser_send_file_title">Пошаљи</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">Налози</string>
-  <string name="move_choose_button_text">Одабери</string>
+  <string name="folder_picker_choose_button_text">Одабери</string>
   <string name="prefs_category_security">Безбедност</string>
 </resources>
index 0a01a65..f87edff 100644 (file)
   <string name="file_list_empty">Ingenting här. Ladda upp något!</string>
   <string name="file_list_loading">Laddar...</string>
   <string name="local_file_list_empty">Det finns inga filer i den här mappen.</string>
+  <string name="file_list_folder">mapp</string>
+  <string name="file_list_folders">mappar</string>
+  <string name="file_list_file">fil</string>
+  <string name="file_list_files">filer</string>
   <string name="filedetails_select_file">Peka på en fil för att visa mer information.</string>
   <string name="filedetails_size">Storlek:</string>
   <string name="filedetails_type">Typ:</string>
   <string name="downloader_download_file_not_found">Filen är inte längre tillgänglig på servern</string>
   <string name="prefs_category_accounts">Konton</string>
   <string name="prefs_add_account">Lägg till konto</string>
-  <string name="log_progress_dialog_text">Laddar data...</string>
   <string name="saml_authentication_required_text">Autentisering krävs</string>
   <string name="saml_authentication_wrong_pass">Fel lösenord</string>
   <string name="actionbar_move">Flytta</string>
   <string name="file_list_empty_moving">Ingenting här. Du kan skapa en mapp!</string>
-  <string name="move_choose_button_text">Välj</string>
+  <string name="folder_picker_choose_button_text">Välj</string>
   <string name="move_file_not_found">Gick inte att flytta. Vänligen kontrollera att filen existerar</string>
   <string name="forbidden_permissions_move">att flytta den här filen</string>
   <string name="prefs_category_security">Säkerhet</string>
index f317edf..42fc1b6 100644 (file)
   <string name="conflict_dont_upload">பதிவேற்ற வேண்டாம்</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">கணக்குகள்</string>
-  <string name="move_choose_button_text">தெரிவுசெய்க </string>
+  <string name="folder_picker_choose_button_text">தெரிவுசெய்க </string>
 </resources>
index f10ec0f..0f2a409 100644 (file)
   <string name="uploader_info_uploading">กำลังอัพโหลด</string>
   <string name="file_list_seconds_ago">วินาที ก่อนหน้านี้</string>
   <string name="file_list_empty">ยังไม่มีไฟล์ใดๆอยู่ที่นี่ กรุณาอัพโหลดไฟล์!</string>
+  <string name="file_list_folder">โฟลเดอร์</string>
+  <string name="file_list_folders">โฟลเดอร์</string>
+  <string name="file_list_file">ไฟล์</string>
+  <string name="file_list_files">ไฟล์</string>
   <string name="filedetails_select_file">แตะที่ไฟล์ เพื่อแสดงข้อมูลเพิ่มเติม</string>
   <string name="filedetails_size">ขนาด:</string>
   <string name="filedetails_type">ชนิด:</string>
   <string name="activity_chooser_send_file_title">ส่ง</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">บัญชี</string>
-  <string name="move_choose_button_text">เลือก</string>
+  <string name="folder_picker_choose_button_text">เลือก</string>
 </resources>
index 2a34fcf..680190c 100644 (file)
   <string name="file_list_empty">Burada hiçbir şey yok. Bir şeyler yükleyin!</string>
   <string name="file_list_loading">Yükleniyor...</string>
   <string name="local_file_list_empty">Bu klasörde dosya yok.</string>
+  <string name="file_list_folder">klasör</string>
+  <string name="file_list_folders">klasörler</string>
+  <string name="file_list_file">dosya</string>
+  <string name="file_list_files">dosyalar</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="auth_redirect_non_secure_connection_title">Güvenli bağlantı, güvenli olmayan bir rotaya yönlendirildi.</string>
   <string name="actionbar_logger">Günlükler</string>
   <string name="log_send_history_button">Geçmişi Gönder</string>
-  <string name="log_mail_subject">ownCloud Android uygulama kayıtları</string>
-  <string name="log_progress_dialog_text">Veri yükleniyor...</string>
+  <string name="log_send_no_mail_app">Logları göndermek için uygulama bulunamadı. Eposta uygulamasını yükleyin!</string>
+  <string name="log_send_mail_subject">%1$s Android uygulama kayıtları</string>
+  <string name="log_progress_dialog_text">Yükleniyor...</string>
   <string name="saml_authentication_required_text">Kimlik doğrulama gerekli</string>
   <string name="saml_authentication_wrong_pass">Hatalı parola</string>
   <string name="actionbar_move">Taşı</string>
   <string name="file_list_empty_moving">Burada bir şey yok. Bir klasör ekleyebilirsiniz!</string>
-  <string name="move_choose_button_text">Seç</string>
+  <string name="folder_picker_choose_button_text">Seç</string>
   <string name="move_file_not_found">Taşıma başarısız. Lütfen dosyanın mevcut olup olmadığını denetleyin</string>
   <string name="move_file_invalid_into_descendent">Klasörü, kendi alt klasörüne taşımak mümkün değil</string>
   <string name="move_file_invalid_overwrite">Dosya zaten hedef klasörde mevcut</string>
   <string name="forbidden_permissions_move">bu dosyayı taşımak için</string>
   <string name="prefs_category_instant_uploading">Anında Yüklemeler</string>
   <string name="prefs_category_security">Güvenlik</string>
+  <string name="prefs_instant_video_upload_path_title">Video Yükleme Yolu</string>
 </resources>
index 597150b..4c07d79 100644 (file)
   <string name="file_list_empty">Тут нічого немає. Відвантажте що-небудь!</string>
   <string name="file_list_loading">Завантаження...</string>
   <string name="local_file_list_empty">В цій теці немає файлів.</string>
+  <string name="file_list_folder">тека</string>
+  <string name="file_list_folders">теки</string>
+  <string name="file_list_file">файл</string>
+  <string name="file_list_files">файли</string>
   <string name="filedetails_select_file">Натисніть на файлі для відображення додаткової інформації</string>
   <string name="filedetails_size">Розмір:</string>
   <string name="filedetails_type">Тип:</string>
   <string name="auth_redirect_non_secure_connection_title">Безпечне підключення перенаправляється через незабезпечений маршрут.</string>
   <string name="actionbar_logger">Журнали</string>
   <string name="log_send_history_button">Надіслати історію</string>
-  <string name="log_mail_subject">Журнали Android-додатка ownCloud</string>
-  <string name="log_progress_dialog_text">Завантаження даних...</string>
   <string name="saml_authentication_required_text">Потрібна аутентифікація</string>
   <string name="saml_authentication_wrong_pass">Невірний пароль</string>
   <string name="actionbar_move">Перемістити</string>
   <string name="file_list_empty_moving">Тут нічого немає. Ви можете додати теку!</string>
-  <string name="move_choose_button_text">Обрати</string>
+  <string name="folder_picker_choose_button_text">Обрати</string>
   <string name="move_file_not_found">Неможливо перемістити. Будь ласка, перевірте, чи існує файл</string>
   <string name="move_file_invalid_into_descendent">Неможливо перемістити теку до теки-нащадка</string>
   <string name="move_file_invalid_overwrite">Файл вже існує в теці призначення</string>
index 229bdac..874499e 100644 (file)
@@ -20,5 +20,5 @@
   <string name="common_error_unknown">غیر معروف خرابی</string>
   <string name="activity_chooser_send_file_title">بھجیں</string>
   <string name="empty"></string>
-  <string name="move_choose_button_text">منتخب کریں</string>
+  <string name="folder_picker_choose_button_text">منتخب کریں</string>
 </resources>
index 52e3c56..d2517eb 100644 (file)
   <string name="uploader_info_uploading">Đang tải lên</string>
   <string name="file_list_seconds_ago">vài giây trước</string>
   <string name="file_list_empty">Không có gì ở đây .Hãy tải lên một cái gì đó !</string>
+  <string name="file_list_folder">folder</string>
+  <string name="file_list_folders">folders</string>
+  <string name="file_list_file">file</string>
+  <string name="file_list_files">files</string>
   <string name="filedetails_select_file">Tap vào một tập tin để hiển thị thêm thông tin</string>
   <string name="filedetails_size">Kích thước:</string>
   <string name="filedetails_type">Loại:</string>
   <string name="activity_chooser_send_file_title">Gởi</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">Tài khoản</string>
-  <string name="move_choose_button_text">Chọn</string>
+  <string name="folder_picker_choose_button_text">Chọn</string>
 </resources>
index 8c647c4..ba02f55 100644 (file)
@@ -4,13 +4,19 @@
   <string name="about_version">版本:%1$s</string>
   <string name="actionbar_sync">刷新帐户</string>
   <string name="actionbar_upload">上传</string>
-  <string name="actionbar_upload_from_apps">来自其它app的内容</string>
+  <string name="actionbar_upload_from_apps">来自其它应用的内容</string>
   <string name="actionbar_upload_files">文件</string>
-  <string name="actionbar_open_with">打开</string>
-  <string name="actionbar_mkdir">增加文件夹</string>
+  <string name="actionbar_open_with">打开方式</string>
+  <string name="actionbar_mkdir">新建文件夹</string>
   <string name="actionbar_settings">设置</string>
   <string name="actionbar_see_details">详细信息</string>
   <string name="actionbar_send_file">发送</string>
+  <string name="actionbar_sort">排序</string>
+  <string name="actionbar_sort_title">排序方式</string>
+  <string-array name="actionbar_sortby">
+    <item>A - Z</item>
+    <item>新 - 旧</item>
+  </string-array>
   <!--TODO re-enable when server-side folder size calculation is available   
        <item>Biggest - Smallest</item>-->
   <string name="prefs_category_general">常规</string>
   <string name="prefs_accounts">账号</string>
   <string name="prefs_manage_accounts">管理账号</string>
   <string name="prefs_pincode">App PIN</string>
-  <string name="prefs_pincode_summary">保护您的App客户端</string>
+  <string name="prefs_pincode_summary">保护客户端</string>
   <string name="prefs_instant_upload">即时图片上传</string>
   <string name="prefs_instant_upload_summary">即时上传相机拍摄的图片</string>
-  <string name="prefs_instant_video_upload">立即上传视频</string>
+  <string name="prefs_instant_video_upload">即时上传视频</string>
   <string name="prefs_instant_video_upload_summary">即时上传由相机拍摄的视频</string>
   <string name="prefs_log_title">开启日志</string>
-  <string name="prefs_log_summary">这过去是日志问题</string>
+  <string name="prefs_log_summary">用于记录问题</string>
   <string name="prefs_log_title_history">日志历史</string>
   <string name="prefs_log_summary_history">这显示已经保存的日志</string>
   <string name="prefs_log_delete_history_button">删除历史</string>
   <string name="prefs_recommend">推荐给朋友</string>
   <string name="prefs_feedback">反馈</string>
   <string name="prefs_imprint">版本说明</string>
-  <string name="recommend_subject">在您的智能手机上试用一下 %1$s!</string>
-  <string name="recommend_text">“我邀请你使用在你的智能手机上使用 %1$s,在这下载:%2$s”
-       </string>
+  <string name="prefs_remember_last_share_location">记住共享位置</string>
+  <string name="prefs_remember_last_upload_location_summary">记住上次共享上传的位置</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">服务器地址 https://...</string>
   <string name="auth_username">用户名</string>
   <string name="auth_password">密码</string>
-  <string name="auth_register">新增到 %1$s?</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="uploader_top_message">选择上传文件夹:</string>
   <string name="uploader_wrn_no_account_title">未找到账号</string>
-  <string name="uploader_wrn_no_account_text">设备上未找到账号,请先创建账号。</string>
+  <string name="uploader_wrn_no_account_text">设备上未找到 %1$s 账号,请先设置账号。</string>
   <string name="uploader_wrn_no_account_setup_btn_text">设置</string>
   <string name="uploader_wrn_no_account_quit_btn_text">退出</string>
-  <string name="uploader_wrn_no_content_title">没有上传的内容</string>
-  <string name="uploader_wrn_no_content_text">没æ\9c\89æ\8e¥æ\94¶å\88°å\86\85容ï¼\8cæ\97 å\8f¯ä¸\8aä¼ 。</string>
+  <string name="uploader_wrn_no_content_title">没有需要上传的内容</string>
+  <string name="uploader_wrn_no_content_text">没æ\9c\89æ\8e¥æ\94¶å\88°å\86\85容ï¼\8c没æ\9c\89é\9c\80è¦\81ä¸\8aä¼ ç\9a\84å\86\85容。</string>
   <string name="uploader_error_forbidden_content">%1$s未被允许访问共享内容。</string>
   <string name="uploader_info_uploading">上传</string>
-  <string name="file_list_seconds_ago">秒前</string>
+  <string name="file_list_seconds_ago">秒前</string>
   <string name="file_list_empty">这里还什么都没有。上传些东西吧!</string>
   <string name="file_list_loading">载入中....</string>
   <string name="local_file_list_empty">在该文件夹中不存在文件。</string>
-  <string name="filedetails_select_file">点击一个文件来显示额外的信息。</string>
+  <string name="file_list_folder">文件夹</string>
+  <string name="file_list_folders">文件夹</string>
+  <string name="file_list_file">文件</string>
+  <string name="file_list_files">文件</string>
+  <string name="filedetails_select_file">点击一个文件可以显示额外的信息。</string>
   <string name="filedetails_size">大小:</string>
   <string name="filedetails_type">类型:</string>
   <string name="filedetails_created">创建于:</string>
-  <string name="filedetails_modified">已修改:</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="action_share_file">分享链接</string>
-  <string name="action_unshare_file">å\8f\96æ¶\88å\85±享链接</string>
+  <string name="action_unshare_file">å\8f\96æ¶\88å\88\86享链接</string>
   <string name="common_yes">是</string>
   <string name="common_no">否</string>
-  <string name="common_ok">OK</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="delete_account">删除账号</string>
   <string name="create_account">创建账号</string>
   <string name="upload_chooser_title">上传自...</string>
-  <string name="uploader_info_dirname">目录名称</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="uploader_upload_succeeded_content_single">%1$s 成功上传</string>
   <string name="uploader_upload_failed_ticker">上传失败</string>
-  <string name="uploader_upload_failed_content_single">1$上传未能完成</string>
+  <string name="uploader_upload_failed_content_single">%1$s 未能成功上传</string>
   <string name="uploader_upload_failed_credentials_error">上传失败,您需要重新登录</string>
-  <string name="downloader_download_in_progress_ticker">下载中……</string>
+  <string name="downloader_download_in_progress_ticker">下载中...</string>
   <string name="downloader_download_in_progress_content">%1$d%% 下载中 %2$s</string>
   <string name="downloader_download_succeeded_ticker">下载成功</string>
-  <string name="downloader_download_succeeded_content">%1$s 成功下载</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_download_failed_content">%1$s 下载未能完成</string>
   <string name="downloader_not_downloaded_yet">未下载完毕</string>
   <string name="downloader_download_failed_credentials_error">下载失败,您需要重新登录</string>
   <string name="common_choose_account">选择账户</string>
   <string name="sync_fail_ticker">同步失败</string>
   <string name="sync_fail_ticker_unauthorized">同步失败,您需要重新登录</string>
   <string name="sync_fail_content"> %1$s同步未完成。</string>
-  <string name="sync_fail_content_unauthorized">密码错误%1$s</string>
+  <string name="sync_fail_content_unauthorized">%1$s 的密码错误</string>
   <string name="sync_conflicts_in_favourites_ticker">发现冲突</string>
   <string name="sync_conflicts_in_favourites_content">%1$d 文件无法同步</string>
   <string name="sync_fail_in_favourites_ticker">文件同步失败</string>
-  <string name="sync_fail_in_favourites_content">无法同步 %1$d 文件内容(与 %2$d 冲突)</string>
+  <string name="sync_fail_in_favourites_content">无法同步 %1$d 文件内容(%2$d 冲突)</string>
   <string name="sync_foreign_files_forgotten_ticker">某些本地文件已被遗忘</string>
   <string name="sync_foreign_files_forgotten_content">%2$s 目录中的 %1$d 个文件不能被复制到</string>
   <string name="sync_foreign_files_forgotten_explanation">从 1.3.16 版起,从此设备上传的文件将被复制到本地的 %1$s 文件夹,以防止某个单一文件在多个账户间同步而造成的数据损失。\n\n 由于此项变化,此应用之前的版本上传的全部文件都已被复制到了 %2$s 文件夹。然而,账户同步期间有一个错误阻止了此操作的完成。您可能想保持文件不动,并移除指向 %3$s 的链接,或将文件移动到 %1$s 文件夹中并保持其到 %4$s 的链接。下面列出的是本地文件,以及它们被链接到的 %5$s 中的远程文件。</string>
-  <string name="sync_current_folder_was_removed">文件夹%1$s 不存在</string>
+  <string name="sync_current_folder_was_removed">文件夹%1$s 已经不存在</string>
   <string name="foreign_files_move">移动所有</string>
   <string name="foreign_files_success">所有文件已被移动</string>
   <string name="foreign_files_fail">某些文件无法被移动</string>
   <string name="pincode_mismatch">两次 App PIN码不同</string>
   <string name="pincode_wrong">App PIN码不正确</string>
   <string name="pincode_removed">App PIN码已移除</string>
-  <string name="pincode_stored">App PIN码已保存</string>
+  <string name="pincode_stored">App 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_play_pause_description">播放暂停按钮</string>
   <string name="media_forward_description">快进按钮</string>
   <string name="auth_getting_authorization">正在认证...</string>
-  <string name="auth_trying_to_login">尝试登录</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="auth_nossl_plain_ok_title">安全连接不可用。</string>
   <string name="auth_connection_established">连接已建立。</string>
   <string name="auth_testing_connection">测试连接……</string>
-  <string name="auth_not_configured_title">服务器配置不正确</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_unknown_host_title">无法找到主机</string>
   <string name="auth_incorrect_path_title">未发现服务器实例</string>
   <string name="auth_timeout_title">看起来服务器不太给力</string>
   <string name="auth_incorrect_address_title">网址不正确</string>
   <string name="auth_ssl_unverified_server_title">无法验证 SSL 服务器的身份</string>
   <string name="auth_bad_oc_version_title">不可辨识的服务器服务器版本</string>
   <string name="auth_wrong_connection_title">无法建立连接</string>
-  <string name="auth_secure_connection">å\8a å¯\86连接已建立</string>
-  <string name="auth_unauthorized">用户名或密码错误</string>
+  <string name="auth_secure_connection">å®\89å\85¨连接已建立</string>
+  <string name="auth_unauthorized">用户名或密码错误</string>
   <string name="auth_oauth_error">认证不成功</string>
   <string name="auth_oauth_error_access_denied">访问被认证服务器拒绝</string>
   <string name="auth_wtf_reenter_URL">意外状态;请再次输入服务器的地址</string>
   <string name="auth_expired_oauth_token_toast">你的授权已经过期。请重新授权。</string>
-  <string name="auth_expired_basic_auth_toast">请输入当前密码</string>
+  <string name="auth_expired_basic_auth_toast">请输入当前密码</string>
   <string name="auth_expired_saml_sso_token_toast">您的会话超时了,请重新连接</string>
   <string name="auth_connecting_auth_server">正在连接到认证服务器....</string>
   <string name="auth_unsupported_auth_method">服务器不支持这种验证方式</string>
   <string name="filename_empty">文件名不能为空</string>
   <string name="wait_a_moment">请稍候</string>
   <string name="filedisplay_unexpected_bad_get_content">未知问题;请试试用其他程序选择此文件</string>
-  <string name="filedisplay_no_file_selected">未选择文件</string>
+  <string name="filedisplay_no_file_selected">未选择文件</string>
   <string name="activity_chooser_title">发送链接给 …</string>
   <string name="oauth_check_onoff">使用oAuth2登陆</string>
   <string name="oauth_login_connection">连接oAuth2 服务器...</string>
   <string name="ssl_validator_header">站点身份无法验证</string>
-  <string name="ssl_validator_reason_cert_not_trusted">不受信任的服务器证书</string>
-  <string name="ssl_validator_reason_cert_expired">服务器证书过期</string>
-  <string name="ssl_validator_reason_cert_not_yet_valid">服务器证书过新</string>
-  <string name="ssl_validator_reason_hostname_not_verified">主机名与证书中的记录不匹配</string>
+  <string name="ssl_validator_reason_cert_not_trusted">不受信任的服务器证书</string>
+  <string name="ssl_validator_reason_cert_expired">服务器证书过期</string>
+  <string name="ssl_validator_reason_cert_not_yet_valid">- 服务器证书时间比当前时间还晚</string>
+  <string name="ssl_validator_reason_hostname_not_verified">主机名与证书中的记录不匹配</string>
   <string name="ssl_validator_question">是否信任此证书?</string>
   <string name="ssl_validator_not_saved">证书无法保存</string>
   <string name="ssl_validator_btn_details_see">详细信息</string>
   <string name="placeholder_filesize">389字节</string>
   <string name="placeholder_timestamp">2012/05/18 下午12:23 </string>
   <string name="placeholder_media_time">12:23:45</string>
-  <string name="instant_upload_on_wifi">仅通过WIFI上传图片。</string>
-  <string name="instant_video_upload_on_wifi">仅在 WIFI 下上传视频</string>
+  <string name="instant_upload_on_wifi">仅通过 WIFI 上传图片。</string>
+  <string name="instant_video_upload_on_wifi">仅通过 WIFI 上传视频</string>
   <string name="instant_upload_path">/InstantUpload</string>
   <string name="conflict_title">上传冲突</string>
   <string name="conflict_message">远程文件 %s 未与本地文件同步。继续将替换服务器上的文件内容。</string>
   <string name="conflict_overwrite">覆盖</string>
   <string name="conflict_dont_upload">不上传</string>
   <string name="preview_image_description">图片预览</string>
-  <string name="preview_image_error_unknown_format">不能显示图片</string>
+  <string name="preview_image_error_unknown_format">无法显示图片</string>
   <string name="error__upload__local_file_not_copied">无法复制 %1$s 到本地目录 %2$s</string>
+  <string name="prefs_instant_upload_path_title">上传路径</string>
   <string name="share_link_no_support_share_api">抱歉,共享功能未启用。请联系管理员。</string>
   <string name="share_link_file_no_exist">无法共享。请检查文件是否存在</string>
   <string name="share_link_file_error">共享文件或目录出错</string>
   <string name="network_error_connect_timeout_exception">等待服务器响应时发生了一个错误,此操作无法完成</string>
   <string name="network_host_not_available">服务器不可用,此操作无法完成</string>
   <string name="empty"></string>
-  <string name="forbidden_permissions">你没有许可%s</string>
+  <string name="forbidden_permissions">你没有权限%s</string>
   <string name="forbidden_permissions_rename">重命名该文件</string>
   <string name="forbidden_permissions_delete">删除该文件</string>
-  <string name="share_link_forbidden_permissions">å\88\86享该文件</string>
+  <string name="share_link_forbidden_permissions">å\85±享该文件</string>
   <string name="unshare_link_forbidden_permissions">取消共享该文件</string>
   <string name="forbidden_permissions_create">创建文件</string>
-  <string name="uploader_upload_forbidden_permissions">上传此文件夹</string>
+  <string name="uploader_upload_forbidden_permissions">在此文件夹上传</string>
   <string name="downloader_download_file_not_found">该文件在服务器上不可用</string>
   <string name="prefs_category_accounts">账号</string>
   <string name="prefs_add_account">添加账号</string>
+  <string name="auth_redirect_non_secure_connection_title">安全连接被重定向到非安全路径.</string>
   <string name="actionbar_logger">日志</string>
   <string name="log_send_history_button">发送历史</string>
-  <string name="log_mail_subject">ownCloud安卓客户端日志</string>
-  <string name="log_progress_dialog_text">加载数据中...</string>
+  <string name="log_send_no_mail_app">未找到可以发送日志的程序。请安装 mail!</string>
+  <string name="log_send_mail_subject">%1$s Android 程序日志</string>
+  <string name="log_progress_dialog_text">载入数据...</string>
   <string name="saml_authentication_required_text">需要认证</string>
   <string name="saml_authentication_wrong_pass">错误密码</string>
   <string name="actionbar_move">移动</string>
   <string name="file_list_empty_moving">这里还什么都没有。上传些东西吧!</string>
-  <string name="move_choose_button_text">选择(&amp;C)...</string>
+  <string name="folder_picker_choose_button_text">选择</string>
   <string name="move_file_not_found">无法移动。请检查文件是否存在</string>
-  <string name="move_file_invalid_into_descendent">b不能够把一个目录移动到它的下级</string>
+  <string name="move_file_invalid_into_descendent">无法把一个目录移动到它的下级</string>
   <string name="move_file_invalid_overwrite">该文件已经存在在目标文件夹</string>
   <string name="move_file_error">尝试移动该文件或文件夹时发生错误</string>
   <string name="forbidden_permissions_move">移动该文件</string>
+  <string name="prefs_category_instant_uploading">即时上传</string>
   <string name="prefs_category_security">安全</string>
+  <string name="prefs_instant_video_upload_path_title">视频上传路径</string>
 </resources>
index 8dc73b0..45ccd3f 100644 (file)
   <string name="file_list_empty">這裡還沒有東西,上傳一些吧!</string>
   <string name="file_list_loading">載入中…</string>
   <string name="local_file_list_empty">這個目錄中沒有任何檔案.</string>
+  <string name="file_list_folder">資料夾</string>
+  <string name="file_list_folders">資料夾</string>
+  <string name="file_list_file">檔案</string>
+  <string name="file_list_files">檔案</string>
   <string name="filedetails_select_file">在檔案上輕觸來顯示更多資訊。</string>
   <string name="filedetails_size">容量:</string>
   <string name="filedetails_type">類型:</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">å\8fªä½¿ç\94¨ WiFi ä¸\8aå\82³</string>
-  <string name="instant_video_upload_on_wifi">只透過無線網路來執行即時影像上傳的功能</string>
+  <string name="instant_upload_on_wifi">å\8fªä½¿ç\94¨ WiFi ä¾\86å\9f·è¡\8cå\8d³æ\99\82å\9c\96ç\89\87ä¸\8aå\82³ç\9a\84å\8a\9fè\83½</string>
+  <string name="instant_video_upload_on_wifi">只使用 WiFi 來執行即時影像上傳的功能</string>
   <string name="instant_upload_path">/InstantUpload</string>
   <string name="conflict_title">更新衝突</string>
   <string name="conflict_message">遠端檔案 %s 未同步到本地. 繼續將取代伺服器上的文件.</string>
   <string name="auth_redirect_non_secure_connection_title">安全連線被轉向到一個非安全的連線</string>
   <string name="actionbar_logger">紀錄</string>
   <string name="log_send_history_button">傳送歷史記錄</string>
-  <string name="log_mail_subject">ownCloud Android 應用程式記錄</string>
+  <string name="log_send_no_mail_app">找不到可以傳送記錄的電子郵件程式. 請安裝電子郵件軟體!</string>
+  <string name="log_send_mail_subject">%1$s Android 應用程式記錄</string>
   <string name="log_progress_dialog_text">資料載入中...</string>
   <string name="saml_authentication_required_text">必須驗證</string>
   <string name="saml_authentication_wrong_pass">密碼錯誤</string>
   <string name="actionbar_move">移動</string>
   <string name="file_list_empty_moving">找不到任何檔案. 你可以新增一個目錄!</string>
-  <string name="move_choose_button_text">選擇</string>
+  <string name="folder_picker_choose_button_text">選擇</string>
   <string name="move_file_not_found">無法搬移. 請檢查該檔案是否存在</string>
   <string name="move_file_invalid_into_descendent">把一個目錄搬移到其底下的子目錄是不可能的</string>
   <string name="move_file_invalid_overwrite">這個檔案已經存在於目的目錄中</string>
   <string name="forbidden_permissions_move">移動這個檔案</string>
   <string name="prefs_category_instant_uploading">即時上傳</string>
   <string name="prefs_category_security">安全性</string>
+  <string name="prefs_instant_video_upload_path_title">影片上傳路徑</string>
 </resources>
index d8f1e93..27751d1 100644 (file)
     <string name="file_list_empty">Nothing in here. Upload something!</string>
     <string name="file_list_loading">Loading...</string>
     <string name="local_file_list_empty">There are no files in this folder.</string>
+    <string name="file_list_folder">folder</string>
+    <string name="file_list_folders">folders</string>
+    <string name="file_list_file">file</string>
+    <string name="file_list_files">files</string>
     <string name="filedetails_select_file">Tap on a file to display additional information.</string>
     <string name="filedetails_size">Size:</string>
     <string name="filedetails_type">Type:</string>
 
        <string name="actionbar_logger">Logs</string>
        <string name="log_send_history_button">Send History</string>
-       <string name="log_mail_subject">ownCloud Android app logs</string>
-       <string name="log_progress_dialog_text">Loading data...</string>
+       <string name="log_send_no_mail_app">No app for sending logs found. Install mail app!</string>
+       <string name="log_send_mail_subject">%1$s Android app logs</string>
+       <string name="log_progress_dialog_text">Loading data&#8230;</string>
 
        <string name="saml_authentication_required_text">Authentication required</string>
        <string name="saml_authentication_wrong_pass">Wrong password</string>
        <string name="actionbar_move">Move</string>
        <string name="file_list_empty_moving">Nothing in here. You can add a folder!</string>
-       <string name="move_choose_button_text">Choose</string>
+       <string name="folder_picker_choose_button_text">Choose</string>
 
        <string name="move_file_not_found">Unable to move. Please check whether the file exists</string>
        <string name="move_file_invalid_into_descendent">It is not possible to move a folder into a descendant</string>
 
        <string name="prefs_category_instant_uploading">Instant Uploads</string>
        <string name="prefs_category_security">Security</string>
+
+       <string name="prefs_instant_video_upload_path_title">Upload Video Path</string>
+
+       <string name="shared_subject_header">shared</string>
+       <string name="with_you_subject_header">with you</string>
+       <string name="subject_token">%1$s %2$s &gt;&gt;%3$s&lt;&lt; %4$s</string>
+
 </resources>
index 3b8b3e8..1673e21 100644 (file)
@@ -32,9 +32,9 @@
        </PreferenceCategory>
 
     <PreferenceCategory android:title="@string/prefs_category_instant_uploading">
-           <EditTextPreference android:title="@string/prefs_instant_upload_path_title"
-                                               android:defaultValue="@string/instant_upload_path"
-                                               android:key="instant_upload_path"/>
+        <com.owncloud.android.ui.PreferenceWithLongSummary
+                                                       android:title="@string/prefs_instant_upload_path_title"
+                                                       android:key="instant_upload_path" />
            <com.owncloud.android.ui.CheckBoxPreferenceWithLongTitle android:key="instant_uploading"
                                android:title="@string/prefs_instant_upload"
                                android:summary="@string/prefs_instant_upload_summary"/>
@@ -42,6 +42,9 @@
                                                android:disableDependentsState="true"
                                                android:title="@string/instant_upload_on_wifi"
                                                android:key="instant_upload_on_wifi"/>
+           <com.owncloud.android.ui.PreferenceWithLongSummary
+                                                       android:title="@string/prefs_instant_video_upload_path_title"
+                                                       android:key="instant_video_upload_path" />
            <com.owncloud.android.ui.CheckBoxPreferenceWithLongTitle android:key="instant_video_uploading"
                                android:title="@string/prefs_instant_video_upload"
                                android:summary="@string/prefs_instant_video_upload_summary"/>
diff --git a/settings.gradle b/settings.gradle
new file mode 100644 (file)
index 0000000..66022f5
--- /dev/null
@@ -0,0 +1,3 @@
+include ':owncloud-android-library'
+include 'libs/actionbarsherlock_lib'
+include ':'
index dc44a12..0781036 100644 (file)
@@ -1,8 +1,59 @@
+@echo off
+
+:: Use argument to decide which build system should be used
+if "%1" == "gradle" goto initForGradle
+if "%1" == "maven" goto initForMaven
+if "%1" == "ant" goto initForAnt
+goto invalidInput
+
+:initForGradle
+echo "Executing Gradle setup..."
+goto initDefault
+
+:initForMaven
+echo "Executing Maven setup..."
+goto initDefault
+
+:initForAnt
+echo "Executing Ant setup..."
+::If the directory exists the script has already been executed
+if not exist .\actionbarsherlock (
+
+    ::Gets the owncloud-android-library
+    call git submodule init
+    call git submodule update
+    
+    ::Clones the actionbarsherlock and checks-out the right release (4.2.0)
+    git clone "https://github.com/JakeWharton/ActionBarSherlock.git" "actionbarsherlock"
+    cd "actionbarsherlock"
+    git checkout "90939dc3925ffaaa0de269bbbe1b35e274968ea1"
+    cd ../
+
+    call android.bat update project -p actionbarsherlock/library -n ActionBarSherlock --target android-19
+    call android.bat update lib-project -p owncloud-android-library
+    call android.bat update project -p .
+    call android.bat update project -p oc_jb_workaround
+    copy /Y third_party\android-support-library\android-support-v4.jar actionbarsherlock\library\libs\android-support-v4.jar
+    call android.bat update test-project -p tests -m ..
+)
+goto complete
+
+:initDefault
 call git submodule init
 call git submodule update
-call android.bat update project -p actionbarsherlock\library -n ActionBarSherlock
 call android.bat update lib-project -p owncloud-android-library
 call android.bat update project -p .
 call android.bat update project -p oc_jb_workaround
-copy /Y third_party\android-support-library\android-support-v4.jar actionbarsherlock\library\libs\android-support-v4.jar
 call android.bat update test-project -p tests -m ..
+goto complete
+
+:invalidInput
+echo "Input argument invalid."
+echo "Usage: %0 [ant | maven | gradle]."
+goto exit
+
+:complete
+echo "...setup complete."
+goto exit
+
+:exit
\ No newline at end of file
index ae42142..8c9af07 100755 (executable)
@@ -1,10 +1,75 @@
 #!/bin/bash -e
 
-git submodule init
-git submodule update
-android update project -p actionbarsherlock/library -n ActionBarSherlock
-android update lib-project -p owncloud-android-library
-android update project -p .
-android update project -p oc_jb_workaround
-cp third_party/android-support-library/android-support-v4.jar actionbarsherlock/library/libs/android-support-v4.jar 
-android update test-project -p tests -m ..
+
+#Repository
+ActionBarSherlockRepo="https://github.com/JakeWharton/ActionBarSherlock.git"
+
+#Directory for actionbarsherlock
+DIRECTORY="actionbarsherlock"
+
+#Commit for version 4.2 of actionbar sherlock
+COMMIT="90939dc3925ffaaa0de269bbbe1b35e274968ea1"
+
+
+function initDefault {
+    git submodule init
+    git submodule update
+    android update lib-project -p owncloud-android-library
+    android update project -p .
+    android update project -p oc_jb_workaround
+    android update test-project -p tests -m ..
+}
+
+function initForAnt {
+    #If the directory exists the script has already been executed
+    if [ ! -d "$DIRECTORY" ]; then
+
+        #Gets the owncloud-android-library
+        git submodule init
+        git submodule update
+
+        #Clones the actionbarsherlock and checks-out the right release (4.2.0)
+        git clone $ActionBarSherlockRepo $DIRECTORY
+        cd $DIRECTORY
+        git checkout $COMMIT
+        cd ../
+
+        #As default it updates the ant scripts
+        android update project -p "$DIRECTORY"/library -n ActionBarSherlock --target android-19
+        android update lib-project -p owncloud-android-library
+        android update project -p .
+        android update project -p oc_jb_workaround
+        cp third_party/android-support-library/android-support-v4.jar actionbarsherlock/library/libs/android-support-v4.jar
+        android update test-project -p tests -m ..
+    fi
+}
+
+#No args
+if [ $# -lt 1 ]; then
+        echo "No args found"
+        echo "Usage : $0 [gradle | maven | ant]"
+        exit
+fi
+
+#checking args
+case "$1" in
+
+    "ant")  
+        echo "Creating Ant environment"
+        initForAnt
+        ;;
+
+    "gradle")  echo  "Creating gradle environment"
+        initDefault
+        ;;
+
+    "maven")  echo  "Creating maven environment"
+        initDefault
+        ;;
+
+    *)  echo "Argument not recognized"
+        echo "Usage : $0 [gradle | maven | ant]"
+       ;;
+esac
+
+exit
index 41a5106..d803064 100644 (file)
@@ -23,6 +23,7 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Vector;
 
 import com.owncloud.android.MainApp;
@@ -33,7 +34,6 @@ import com.owncloud.android.lib.resources.shares.ShareType;
 import com.owncloud.android.lib.resources.files.FileUtils;
 import com.owncloud.android.utils.FileStorageUtils;
 
-
 import android.accounts.Account;
 import android.content.ContentProviderClient;
 import android.content.ContentProviderOperation;
@@ -41,6 +41,7 @@ import android.content.ContentProviderResult;
 import android.content.ContentResolver;
 import android.content.ContentUris;
 import android.content.ContentValues;
+import android.content.Intent;
 import android.content.OperationApplicationException;
 import android.database.Cursor;
 import android.net.Uri;
@@ -346,7 +347,9 @@ public class FileDataStorageManager {
                     ).withSelection(where, whereArgs).build());
                     
                     if (file.isDown()) {
-                        new File(file.getStoragePath()).delete();
+                        String path = file.getStoragePath();
+                        new File(path).delete();
+                        triggerMediaScan(path); // notify MediaScanner about removed file
                     }
                 }
             }
@@ -484,8 +487,12 @@ public class FileDataStorageManager {
                     }
                     success &= (deleted > 0); 
                 }
-                if (removeLocalCopy && file.isDown() && file.getStoragePath() != null && success) {
-                    success = new File(file.getStoragePath()).delete();
+                String localPath = file.getStoragePath();
+                if (removeLocalCopy && file.isDown() && localPath != null && success) {
+                    success = new File(localPath).delete();
+                    if (success) {
+                        triggerMediaScan(localPath);
+                    }
                     if (!removeDBData && success) {
                         // maybe unnecessary, but should be checked TODO remove if unnecessary
                         file.setStoragePath(null);
@@ -542,11 +549,13 @@ public class FileDataStorageManager {
                         success &= removeLocalFolder(file);
                     } else {
                         if (file.isDown()) {
+                            String path = file.getStoragePath();
                             File localFile = new File(file.getStoragePath());
                             success &= localFile.delete();
                             if (success) {
                                 file.setStoragePath(null);
                                 saveFile(file);
+                                triggerMediaScan(path); // notify MediaScanner about removed file
                             }
                         }
                     }
@@ -568,7 +577,9 @@ public class FileDataStorageManager {
                 if (localFile.isDirectory()) {
                     success &= removeLocalFolder(localFile);
                 } else {
+                    String path = localFile.getAbsolutePath();
                     success &= localFile.delete();
+                    triggerMediaScan(path); // notify MediaScanner about removed file
                 }
             }
         }
@@ -576,109 +587,20 @@ public class FileDataStorageManager {
         return success;
     }
 
+    
     /**
-     * Updates database for a folder that was moved to a different location.
+     * Updates database and file system for a file or folder that was moved to a different location.
      * 
      * TODO explore better (faster) implementations
      * TODO throw exceptions up !
      */
-    public void moveFolder(OCFile folder, String newPath) {
-        // TODO check newPath
-
-        if (    folder != null && folder.isFolder() && 
-                folder.fileExists() && !OCFile.ROOT_PATH.equals(folder.getFileName())
-            ) {
-            /// 1. get all the descendants of 'dir' in a single QUERY (including 'dir')
-            Cursor c = null;
-            if (getContentProviderClient() != null) {
-                try {
-                    c = getContentProviderClient().query (
-                        ProviderTableMeta.CONTENT_URI, 
-                        null,
-                        ProviderTableMeta.FILE_ACCOUNT_OWNER + "=? AND " + 
-                                ProviderTableMeta.FILE_PATH + " LIKE ? ",
-                        new String[] { mAccount.name, folder.getRemotePath() + "%"  }, 
-                        ProviderTableMeta.FILE_PATH + " ASC "
-                    );
-                } catch (RemoteException e) {
-                    Log_OC.e(TAG, e.getMessage());
-                }
-            } else {
-                c = getContentResolver().query (
-                    ProviderTableMeta.CONTENT_URI, 
-                    null,
-                    ProviderTableMeta.FILE_ACCOUNT_OWNER + "=? AND " + 
-                            ProviderTableMeta.FILE_PATH + " LIKE ? ",
-                    new String[] { mAccount.name, folder.getRemotePath() + "%"  }, 
-                    ProviderTableMeta.FILE_PATH + " ASC "
-                );
-            }
-
-            /// 2. prepare a batch of update operations to change all the descendants
-            ArrayList<ContentProviderOperation> operations = 
-                    new ArrayList<ContentProviderOperation>(c.getCount());
-            int lengthOfOldPath = folder.getRemotePath().length();
-            String defaultSavePath = FileStorageUtils.getSavePath(mAccount.name);
-            int lengthOfOldStoragePath = defaultSavePath.length() + lengthOfOldPath;
-            if (c.moveToFirst()) {
-                do {
-                    ContentValues cv = new ContentValues(); // keep the constructor in the loop
-                    OCFile child = createFileInstance(c);
-                    cv.put(
-                        ProviderTableMeta.FILE_PATH, 
-                        newPath + child.getRemotePath().substring(lengthOfOldPath)
-                    );
-                    if (    child.getStoragePath() != null && 
-                            child.getStoragePath().startsWith(defaultSavePath)  ) {
-                        cv.put(
-                                ProviderTableMeta.FILE_STORAGE_PATH, 
-                                defaultSavePath + newPath + 
-                                    child.getStoragePath().substring(lengthOfOldStoragePath)
-                        );
-                    }
-                    operations.add(
-                            ContentProviderOperation.
-                            newUpdate(ProviderTableMeta.CONTENT_URI).
-                            withValues(cv).
-                            withSelection(  
-                                    ProviderTableMeta._ID + "=?", 
-                                    new String[] { String.valueOf(child.getFileId()) }
-                            ).
-                            build()
-                    );
-                } while (c.moveToNext());
-            }
-            c.close();
-
-            /// 3. apply updates in batch
-            try {
-                if (getContentResolver() != null) {
-                    getContentResolver().applyBatch(MainApp.getAuthority(), operations);
-
-                } else {
-                    getContentProviderClient().applyBatch(operations);
-                }
-
-            } catch (OperationApplicationException e) {
-                Log_OC.e(TAG, "Fail to update descendants of " + 
-                        folder.getFileId() + " in database", e);
-
-            } catch (RemoteException e) {
-                Log_OC.e(TAG, "Fail to update desendants of " + 
-                        folder.getFileId() + " in database", e);
-            }
-
-        }
-    }
-
-    
     public void moveLocalFile(OCFile file, String targetPath, String targetParentPath) {
 
         if (file != null && file.fileExists() && !OCFile.ROOT_PATH.equals(file.getFileName())) {
             
             OCFile targetParent = getFileByPath(targetParentPath);
             if (targetParent == null) {
-                // TODO panic
+                throw new IllegalStateException("Parent folder of the target path does not exist!!");
             }
             
             /// 1. get all the descendants of the moved element in a single QUERY
@@ -718,6 +640,8 @@ public class FileDataStorageManager {
             ArrayList<ContentProviderOperation> operations = 
                     new ArrayList<ContentProviderOperation>(c.getCount());
             String defaultSavePath = FileStorageUtils.getSavePath(mAccount.name);
+            List<String> originalPathsToTriggerMediaScan = new ArrayList<String>();
+            List<String> newPathsToTriggerMediaScan = new ArrayList<String>();
             if (c.moveToFirst()) {
                 int lengthOfOldPath = file.getRemotePath().length();
                 int lengthOfOldStoragePath = defaultSavePath.length() + lengthOfOldPath;
@@ -731,11 +655,14 @@ public class FileDataStorageManager {
                     if (child.getStoragePath() != null && 
                             child.getStoragePath().startsWith(defaultSavePath)) {
                         // update link to downloaded content - but local move is not done here!
-                        cv.put(
-                            ProviderTableMeta.FILE_STORAGE_PATH, 
-                            defaultSavePath + targetPath + 
-                                child.getStoragePath().substring(lengthOfOldStoragePath)
-                        );
+                        String targetLocalPath = defaultSavePath + targetPath + 
+                                child.getStoragePath().substring(lengthOfOldStoragePath);
+                        
+                        cv.put(ProviderTableMeta.FILE_STORAGE_PATH, targetLocalPath);
+                        
+                        originalPathsToTriggerMediaScan.add(child.getStoragePath());
+                        newPathsToTriggerMediaScan.add(targetLocalPath);
+                        
                     }
                     if (child.getRemotePath().equals(file.getRemotePath())) {
                         cv.put(
@@ -766,27 +693,35 @@ public class FileDataStorageManager {
                 }
 
             } catch (Exception e) {
-                Log_OC.e(
-                    TAG, 
-                    "Fail to update " + file.getFileId() + " and descendants in database", 
-                    e
-                );
+                Log_OC.e(TAG, "Fail to update " + file.getFileId() + " and descendants in database", e);
             }
 
             /// 4. move in local file system 
-            String localPath = FileStorageUtils.getDefaultSavePathFor(mAccount.name, file);
-            File localFile = new File(localPath);
+            String originalLocalPath = FileStorageUtils.getDefaultSavePathFor(mAccount.name, file);
+            String targetLocalPath = defaultSavePath + targetPath;
+            File localFile = new File(originalLocalPath);
             boolean renamed = false;
             if (localFile.exists()) {
-                File targetFile = new File(defaultSavePath + targetPath);
+                File targetFile = new File(targetLocalPath);
                 File targetFolder = targetFile.getParentFile();
                 if (!targetFolder.exists()) {
                     targetFolder.mkdirs();
                 }
                 renamed = localFile.renameTo(targetFile);
             }
-            Log_OC.d(TAG, "Local file RENAMED : " + renamed);
-            
+
+            if (renamed) {
+                Iterator<String> it = originalPathsToTriggerMediaScan.iterator();
+                while (it.hasNext()) {
+                    // Notify MediaScanner about removed file
+                    triggerMediaScan(it.next());
+                }
+                it = newPathsToTriggerMediaScan.iterator();
+                while (it.hasNext()) {
+                    // Notify MediaScanner about new file/folder
+                    triggerMediaScan(it.next());
+                }
+            }
         }
         
     }
@@ -1402,7 +1337,7 @@ public class FileDataStorageManager {
                 path = path + FileUtils.PATH_SEPARATOR;
             }           
 
-            // Update OCFile with data from share: ShareByLink  ¿and publicLink?
+            // Update OCFile with data from share: ShareByLink  and publicLink
             OCFile file = getFileByPath(path);
             if (file != null) {
                 if (share.getShareType().equals(ShareType.PUBLIC_LINK)) {
@@ -1549,4 +1484,10 @@ public class FileDataStorageManager {
         //}
     }
 
+    public void triggerMediaScan(String path) {
+        Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
+        intent.setData(Uri.fromFile(new File(path)));
+        MainApp.getAppContext().sendBroadcast(intent);
+    }
+
 }
index 392d03b..cf25d27 100644 (file)
 
 package com.owncloud.android.datamodel;
 
-import java.io.File;
-
-import com.owncloud.android.lib.common.utils.Log_OC;
-import third_parties.daveKoeller.AlphanumComparator;
-
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.webkit.MimeTypeMap;
 
+import com.owncloud.android.lib.common.utils.Log_OC;
+
+import java.io.File;
+
+import third_parties.daveKoeller.AlphanumComparator;
 public class OCFile implements Parcelable, Comparable<OCFile> {
 
     public static final Parcelable.Creator<OCFile> CREATOR = new Parcelable.Creator<OCFile>() {
@@ -45,7 +45,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
     public static final String ROOT_PATH = PATH_SEPARATOR;
 
     private static final String TAG = OCFile.class.getSimpleName();
-    
+
     private long mId;
     private long mParentId;
     private long mLength;
@@ -61,7 +61,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
     private boolean mKeepInSync;
 
     private String mEtag;
-    
+
     private boolean mShareByLink;
     private String mPublicLink;
 
@@ -73,9 +73,9 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
 
     /**
      * Create new {@link OCFile} with given path.
-     * 
+     * <p/>
      * The path received must be URL-decoded. Path separator must be OCFile.PATH_SEPARATOR, and it must be the first character in 'path'.
-     * 
+     *
      * @param path The remote path of the file.
      */
     public OCFile(String path) {
@@ -89,7 +89,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
 
     /**
      * Reconstruct from parcel
-     * 
+     *
      * @param source The source parcel
      */
     private OCFile(Parcel source) {
@@ -137,10 +137,10 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
         dest.writeString(mRemoteId);
         dest.writeInt(mNeedsUpdateThumbnail ? 1 : 0);
     }
-    
+
     /**
      * Gets the ID of the file
-     * 
+     *
      * @return the file ID
      */
     public long getFileId() {
@@ -149,7 +149,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
 
     /**
      * Returns the remote path of the file on ownCloud
-     * 
+     *
      * @return The remote path to the file
      */
     public String getRemotePath() {
@@ -159,7 +159,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
     /**
      * Can be used to check, whether or not this file exists in the database
      * already
-     * 
+     *
      * @return true, if the file exists in the database
      */
     public boolean fileExists() {
@@ -168,7 +168,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
 
     /**
      * Use this to find out if this file is a folder.
-     * 
+     *
      * @return true if it is a folder
      */
     public boolean isFolder() {
@@ -177,7 +177,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
 
     /**
      * Use this to check if this file is available locally
-     * 
+     *
      * @return true if it is
      */
     public boolean isDown() {
@@ -187,10 +187,10 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
         }
         return false;
     }
-    
+
     /**
      * The path, where the file is stored locally
-     * 
+     *
      * @return The local path to the file
      */
     public String getStoragePath() {
@@ -199,7 +199,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
 
     /**
      * Can be used to set the path where the file is stored
-     * 
+     *
      * @param storage_path to set
      */
     public void setStoragePath(String storage_path) {
@@ -208,7 +208,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
 
     /**
      * Get a UNIX timestamp of the file creation time
-     * 
+     *
      * @return A UNIX timestamp of the time that file was created
      */
     public long getCreationTimestamp() {
@@ -217,7 +217,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
 
     /**
      * Set a UNIX timestamp of the time the file was created
-     * 
+     *
      * @param creation_timestamp to set
      */
     public void setCreationTimestamp(long creation_timestamp) {
@@ -227,8 +227,8 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
     /**
      * Get a UNIX timestamp of the file modification time.
      *
-     * @return  A UNIX timestamp of the modification time, corresponding to the value returned by the server
-     *          in the last synchronization of the properties of this file. 
+     * @return A UNIX timestamp of the modification time, corresponding to the value returned by the server
+     * in the last synchronization of the properties of this file.
      */
     public long getModificationTimestamp() {
         return mModifiedTimestamp;
@@ -236,22 +236,22 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
 
     /**
      * Set a UNIX timestamp of the time the time the file was modified.
-     * 
-     * To update with the value returned by the server in every synchronization of the properties 
+     * <p/>
+     * To update with the value returned by the server in every synchronization of the properties
      * of this file.
-     * 
+     *
      * @param modification_timestamp to set
      */
     public void setModificationTimestamp(long modification_timestamp) {
         mModifiedTimestamp = modification_timestamp;
     }
 
-    
+
     /**
      * Get a UNIX timestamp of the file modification time.
      *
-     * @return  A UNIX timestamp of the modification time, corresponding to the value returned by the server
-     *          in the last synchronization of THE CONTENTS of this file. 
+     * @return A UNIX timestamp of the modification time, corresponding to the value returned by the server
+     * in the last synchronization of THE CONTENTS of this file.
      */
     public long getModificationTimestampAtLastSyncForData() {
         return mModifiedTimestampAtLastSyncForData;
@@ -259,39 +259,38 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
 
     /**
      * Set a UNIX timestamp of the time the time the file was modified.
-     * 
-     * To update with the value returned by the server in every synchronization of THE CONTENTS 
+     * <p/>
+     * To update with the value returned by the server in every synchronization of THE CONTENTS
      * of this file.
-     * 
-     * @param modification_timestamp to set
+     *
+     * @param modificationTimestamp to set
      */
     public void setModificationTimestampAtLastSyncForData(long modificationTimestamp) {
         mModifiedTimestampAtLastSyncForData = modificationTimestamp;
     }
 
-    
-    
+
     /**
      * Returns the filename and "/" for the root directory
-     * 
+     *
      * @return The name of the file
      */
     public String getFileName() {
         File f = new File(getRemotePath());
         return f.getName().length() == 0 ? ROOT_PATH : f.getName();
     }
-    
+
     /**
      * Sets the name of the file
-     * 
-     * Does nothing if the new name is null, empty or includes "/" ; or if the file is the root directory 
+     * <p/>
+     * Does nothing if the new name is null, empty or includes "/" ; or if the file is the root directory
      */
     public void setFileName(String name) {
         Log_OC.d(TAG, "OCFile name changin from " + mRemotePath);
         if (name != null && name.length() > 0 && !name.contains(PATH_SEPARATOR) && !mRemotePath.equals(ROOT_PATH)) {
             String parent = (new File(getRemotePath())).getParent();
             parent = (parent.endsWith(PATH_SEPARATOR)) ? parent : parent + PATH_SEPARATOR;
-            mRemotePath =  parent + name;
+            mRemotePath = parent + name;
             if (isFolder()) {
                 mRemotePath += PATH_SEPARATOR;
             }
@@ -301,7 +300,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
 
     /**
      * Can be used to get the Mimetype
-     * 
+     *
      * @return the Mimetype as a String
      */
     public String getMimetype() {
@@ -311,10 +310,10 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
     /**
      * Adds a file to this directory. If this file is not a directory, an
      * exception gets thrown.
-     * 
+     *
      * @param file to add
      * @throws IllegalStateException if you try to add a something and this is
-     *             not a directory
+     *                               not a directory
      */
     public void addFile(OCFile file) throws IllegalStateException {
         if (isFolder()) {
@@ -353,7 +352,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
 
     /**
      * Sets the ID of the file
-     * 
+     *
      * @param file_id to set
      */
     public void setFileId(long file_id) {
@@ -362,7 +361,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
 
     /**
      * Sets the Mime-Type of the
-     * 
+     *
      * @param mimetype to set
      */
     public void setMimetype(String mimetype) {
@@ -371,7 +370,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
 
     /**
      * Sets the ID of the parent folder
-     * 
+     *
      * @param parent_id to set
      */
     public void setParentId(long parent_id) {
@@ -380,7 +379,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
 
     /**
      * Sets the file size in bytes
-     * 
+     *
      * @param file_len to set
      */
     public void setFileLength(long file_len) {
@@ -389,7 +388,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
 
     /**
      * Returns the size of the file in bytes
-     * 
+     *
      * @return The filesize in bytes
      */
     public long getFileLength() {
@@ -398,7 +397,7 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
 
     /**
      * Returns the ID of the parent Folder
-     * 
+     *
      * @return The ID
      */
     public long getParentId() {
@@ -407,13 +406,13 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
 
     /**
      * Check, if this file needs updating
-     * 
+     *
      * @return
      */
     public boolean needsUpdatingWhileSaving() {
         return mNeedsUpdating;
     }
-    
+
     public boolean needsUpdateThumbnail() {
         return mNeedsUpdateThumbnail;
     }
@@ -425,11 +424,11 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
     public long getLastSyncDateForProperties() {
         return mLastSyncDateForProperties;
     }
-    
+
     public void setLastSyncDateForProperties(long lastSyncDate) {
         mLastSyncDateForProperties = lastSyncDate;
     }
-    
+
     public long getLastSyncDateForData() {
         return mLastSyncDateForData;
     }
@@ -441,14 +440,14 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
     public void setKeepInSync(boolean keepInSync) {
         mKeepInSync = keepInSync;
     }
-    
+
     public boolean keepInSync() {
         return mKeepInSync;
     }
-    
+
     @Override
     public int describeContents() {
-        return this.hashCode();
+        return ((Object) this).hashCode();
     }
 
     @Override
@@ -465,13 +464,13 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
 
     @Override
     public boolean equals(Object o) {
-        if(o instanceof OCFile){
+        if (o instanceof OCFile) {
             OCFile that = (OCFile) o;
-            if(that != null){
+            if (that != null) {
                 return this.mId == that.mId;
             }
         }
-        
+
         return false;
     }
 
@@ -489,8 +488,8 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
     public void setEtag(String etag) {
         this.mEtag = etag;
     }
-    
-    
+
+
     public boolean isShareByLink() {
         return mShareByLink;
     }
@@ -515,22 +514,28 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
         return 0;
     }
 
-    /** @return  'True' if the file contains audio */
+    /**
+     * @return 'True' if the file contains audio
+     */
     public boolean isAudio() {
         return (mMimeType != null && mMimeType.startsWith("audio/"));
     }
 
-    /** @return  'True' if the file contains video */
+    /**
+     * @return 'True' if the file contains video
+     */
     public boolean isVideo() {
         return (mMimeType != null && mMimeType.startsWith("video/"));
     }
 
-    /** @return  'True' if the file contains an image */
+    /**
+     * @return 'True' if the file contains an image
+     */
     public boolean isImage() {
         return ((mMimeType != null && mMimeType.startsWith("image/")) ||
-                 getMimeTypeFromName().startsWith("image/"));
+                getMimeTypeFromName().startsWith("image/"));
     }
-    
+
     public String getMimeTypeFromName() {
         String extension = "";
         int pos = mRemotePath.lastIndexOf('.');
index 1d2cda8..ce53c44 100644 (file)
@@ -29,8 +29,10 @@ import android.content.res.Resources;
 import android.graphics.Bitmap;
 import android.graphics.Bitmap.CompressFormat;
 import android.graphics.BitmapFactory;
+import android.graphics.Matrix;
 import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.Drawable;
+import android.media.ExifInterface;
 import android.media.ThumbnailUtils;
 import android.net.Uri;
 import android.os.AsyncTask;
@@ -216,6 +218,9 @@ public class ThumbnailsCacheManager {
                         
                         if (bitmap != null) {
                             thumbnail = ThumbnailUtils.extractThumbnail(bitmap, px, px);
+                            
+                            // Rotate image, obeying exif tag
+                            thumbnail = BitmapUtils.rotateImage(thumbnail, mFile.getStoragePath());
     
                             // Add thumbnail to cache
                             addBitmapToCache(imageKey, thumbnail);
@@ -317,5 +322,5 @@ public class ThumbnailsCacheManager {
             mThumbnailsDiskCacheLock.notifyAll(); // Wake any waiting threads
         }
     }
-
+    
 }
index efaa803..c1c3e9c 100644 (file)
@@ -161,7 +161,7 @@ public class InstantUploadBroadcastReceiver extends BroadcastReceiver {
         Intent i = new Intent(context, FileUploader.class);
         i.putExtra(FileUploader.KEY_ACCOUNT, account);
         i.putExtra(FileUploader.KEY_LOCAL_FILE, file_path);
-        i.putExtra(FileUploader.KEY_REMOTE_FILE, FileStorageUtils.getInstantUploadFilePath(context, file_name));
+        i.putExtra(FileUploader.KEY_REMOTE_FILE, FileStorageUtils.getInstantVideoUploadFilePath(context, file_name));
         i.putExtra(FileUploader.KEY_UPLOAD_TYPE, FileUploader.UPLOAD_SINGLE_FILE);
         i.putExtra(FileUploader.KEY_MIME_TYPE, mime_type);
         i.putExtra(FileUploader.KEY_INSTANT_UPLOAD, true);
index fdc35f8..c9ad961 100644 (file)
@@ -400,6 +400,7 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis
         file.setFileLength((new File(mCurrentDownload.getSavePath()).length()));
         file.setRemoteId(mCurrentDownload.getFile().getRemoteId());
         mStorageManager.saveFile(file);
+        mStorageManager.triggerMediaScan(file.getStoragePath());
     }
 
 
index c32c477..fc44f53 100644 (file)
@@ -24,8 +24,10 @@ package com.owncloud.android.operations;
  *
  */
 
+import android.content.Context;
 import android.content.Intent;
 
+import com.owncloud.android.R;
 import com.owncloud.android.datamodel.FileDataStorageManager;
 import com.owncloud.android.datamodel.OCFile;
 import com.owncloud.android.lib.common.OwnCloudClient;
@@ -46,6 +48,7 @@ public class CreateShareOperation extends SyncOperation {
 
     protected FileDataStorageManager mStorageManager;
 
+    private Context mContext;
     private String mPath;
     private ShareType mShareType;
     private String mShareWith;
@@ -56,25 +59,27 @@ public class CreateShareOperation extends SyncOperation {
 
     /**
      * Constructor
+     * @param context       The context that the share is coming from.
      * @param path          Full path of the file/folder being shared. Mandatory argument
-     * @param shareType     \910\92 = user, \911\92 = group, \913\92 = Public link. Mandatory argument
+     * @param shareType     0 = user, 1 = group, 3 = Public link. Mandatory argument
      * @param shareWith     User/group ID with who the file should be shared.  This is mandatory for shareType of 0 or 1
-     * @param publicUpload  If \91false\92 (default) public cannot upload to a public shared folder. 
-     *                      If \91true\92 public can upload to a shared folder. Only available for public link shares
+     * @param publicUpload  If false (default) public cannot upload to a public shared folder. 
+     *                      If true public can upload to a shared folder. Only available for public link shares
      * @param password      Password to protect a public link share. Only available for public link shares
-     * @param permissions   1 - Read only \96 Default for \93public\94 shares
+     * @param permissions   1 - Read only - Default for public shares
      *                      2 - Update
      *                      4 - Create
      *                      8 - Delete
      *                      16- Re-share
-     *                      31- All above \96 Default for \93private\94 shares
+     *                      31- All above - Default for private shares
      *                      For user or group shares.
      *                      To obtain combinations, add the desired values together.  
-     *                      For instance, for \93Re-Share\94\93delete\94\93read\94\93update\94, add 16+8+2+1 = 27.
+     *                      For instance, for Re-Share, delete, read, update, add 16+8+2+1 = 27.
      */
-    public CreateShareOperation(String path, ShareType shareType, String shareWith, boolean publicUpload, 
+    public CreateShareOperation(Context context, String path, ShareType shareType, String shareWith, boolean publicUpload,
             String password, int permissions, Intent sendIntent) {
 
+        mContext = context;
         mPath = path;
         mShareType = shareType;
         mShareWith = shareWith;
@@ -128,6 +133,9 @@ public class CreateShareOperation extends SyncOperation {
         OCFile file = getStorageManager().getFileByPath(mPath);
         if (file!=null) {
             mSendIntent.putExtra(Intent.EXTRA_TEXT, share.getShareLink());
+            mSendIntent.putExtra(Intent.EXTRA_SUBJECT, String.format(mContext.getString(R.string.subject_token),
+                    getClient().getCredentials().getUsername(), mContext.getString(R.string.shared_subject_header),
+                    file.getFileName(), mContext.getString(R.string.with_you_subject_header)));
             file.setPublicLink(share.getShareLink());
             file.setShareByLink(true);
             getStorageManager().saveFile(file);
index c86c8b5..5afc421 100644 (file)
@@ -36,7 +36,6 @@ import com.owncloud.android.lib.resources.files.ExistenceCheckRemoteOperation;
 
 import android.content.Context;
 import android.net.Uri;
-import android.util.Log;
 
 /**
  * Operation to find out what authentication method requires
index 9f2bed7..0a5ff94 100644 (file)
@@ -150,13 +150,11 @@ public class DownloadFileOperation extends RemoteOperation {
             newFile = new File(getSavePath());
             newFile.getParentFile().mkdirs();
             moved = tmpFile.renameTo(newFile);
-        
             if (!moved)
                 result = new RemoteOperationResult(RemoteOperationResult.ResultCode.LOCAL_STORAGE_NOT_MOVED);
         }
         Log_OC.i(TAG, "Download of " + mFile.getRemotePath() + " to " + getSavePath() + ": " + result.getLogMessage());
         
-        
         return result;
     }
 
index c319d62..649437d 100644 (file)
@@ -45,10 +45,10 @@ public class GetSharesForFileOperation extends SyncOperation {
      * Constructor
      * 
      * @param path      Path to file or folder
-     * @param reshares  If set to \91false\92 (default), only shares from the current user are returned
-     *                  If set to \91true\92, all shares from the given file are returned
-     * @param subfiles  If set to \91false\92 (default), lists only the folder being shared
-     *                  If set to \91true\92, all shared files within the folder are returned.
+     * @param reshares  If set to false (default), only shares from the current user are returned
+     *                  If set to true, all shares from the given file are returned
+     * @param subfiles  If set to false (default), lists only the folder being shared
+     *                  If set to true, all shared files within the folder are returned.
      */
     public GetSharesForFileOperation(String path, boolean reshares, boolean subfiles) {
         mPath = path;
index 95a5a9b..bd60e1f 100644 (file)
@@ -29,8 +29,6 @@ import com.owncloud.android.lib.resources.files.RenameRemoteFileOperation;
 import com.owncloud.android.operations.common.SyncOperation;
 import com.owncloud.android.utils.FileStorageUtils;
 
-import android.accounts.Account;
-
 
 /**
  * Remote operation performing the rename of a remote file (or folder?) in the ownCloud server.
@@ -44,7 +42,6 @@ public class RenameFileOperation extends SyncOperation {
     
     private OCFile mFile;
     private String mRemotePath;
-    private Account mAccount;
     private String mNewName;
     private String mNewRemotePath;
 
@@ -57,9 +54,8 @@ public class RenameFileOperation extends SyncOperation {
      * @param account               OwnCloud account containing the remote file 
      * @param newName               New name to set as the name of file.
      */
-    public RenameFileOperation(String remotePath, Account account, String newName) {
+    public RenameFileOperation(String remotePath, String newName) {
         mRemotePath = remotePath;
-        mAccount = account;
         mNewName = newName;
         mNewRemotePath = null;
     }
@@ -103,7 +99,8 @@ public class RenameFileOperation extends SyncOperation {
 
             if (result.isSuccess()) {
                 if (mFile.isFolder()) {
-                    saveLocalDirectory();
+                    getStorageManager().moveLocalFile(mFile, mNewRemotePath, parent);
+                    //saveLocalDirectory();
 
                 } else {
                     saveLocalFile();
@@ -118,28 +115,24 @@ public class RenameFileOperation extends SyncOperation {
         return result;
     }
 
-    
-    private void saveLocalDirectory() {
-        getStorageManager().moveFolder(mFile, mNewRemotePath);
-        String localPath = FileStorageUtils.getDefaultSavePathFor(mAccount.name, mFile);
-        File localDir = new File(localPath);
-        if (localDir.exists()) {
-            localDir.renameTo(new File(FileStorageUtils.getSavePath(mAccount.name) + mNewRemotePath));
-            // TODO - if renameTo fails, children files that are already down will result unlinked
-        }
-    }
-
     private void saveLocalFile() {
         mFile.setFileName(mNewName);
         
         // try to rename the local copy of the file
         if (mFile.isDown()) {
-            File f = new File(mFile.getStoragePath());
+            String oldPath = mFile.getStoragePath();
+            File f = new File(oldPath);
             String parentStoragePath = f.getParent();
             if (!parentStoragePath.endsWith(File.separator))
                 parentStoragePath += File.separator;
             if (f.renameTo(new File(parentStoragePath + mNewName))) {
-                mFile.setStoragePath(parentStoragePath + mNewName);
+                String newPath = parentStoragePath + mNewName;
+                mFile.setStoragePath(newPath);
+
+                // notify MediaScanner about removed file - TODO really works?
+                getStorageManager().triggerMediaScan(oldPath);
+                // notify to scan about new file
+                getStorageManager().triggerMediaScan(newPath);
             }
             // else - NOTHING: the link to the local file is kept although the local name can't be updated
             // TODO - study conditions when this could be a problem
index a94454c..21a8e2c 100644 (file)
@@ -22,7 +22,6 @@ import java.util.ArrayList;
 import java.util.HashMap;
 
 import com.owncloud.android.R;
-import com.owncloud.android.datamodel.ThumbnailsCacheManager;
 import com.owncloud.android.db.ProviderMeta;
 import com.owncloud.android.db.ProviderMeta.ProviderTableMeta;
 import com.owncloud.android.lib.common.utils.Log_OC;
index a5bb22d..ca370b3 100644 (file)
@@ -319,7 +319,7 @@ public class OperationsService extends Service {
                         String remotePath = operationIntent.getStringExtra(EXTRA_REMOTE_PATH);
                         Intent sendIntent = operationIntent.getParcelableExtra(EXTRA_SEND_INTENT);
                         if (remotePath.length() > 0) {
-                            operation = new CreateShareOperation(remotePath, ShareType.PUBLIC_LINK, 
+                            operation = new CreateShareOperation(OperationsService.this, remotePath, ShareType.PUBLIC_LINK,
                                     "", false, "", 1, sendIntent);
                         }
                         
@@ -359,7 +359,7 @@ public class OperationsService extends Service {
                         // Rename file or folder
                         String remotePath = operationIntent.getStringExtra(EXTRA_REMOTE_PATH);
                         String newName = operationIntent.getStringExtra(EXTRA_NEWNAME);
-                        operation = new RenameFileOperation(remotePath, account, newName);
+                        operation = new RenameFileOperation(remotePath, newName);
                         
                     } else if (action.equals(ACTION_REMOVE)) {
                         // Remove file or folder
diff --git a/src/com/owncloud/android/ui/LongClickableCheckBoxPreference.java b/src/com/owncloud/android/ui/LongClickableCheckBoxPreference.java
deleted file mode 100644 (file)
index 5befe64..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.owncloud.android.ui;
-
-import android.content.Context;
-import android.preference.CheckBoxPreference;
-import android.view.View;
-
-public class LongClickableCheckBoxPreference extends CheckBoxPreference implements View.OnLongClickListener {
-
-    public LongClickableCheckBoxPreference(Context context) {
-        super(context);
-    }
-
-    @Override
-    public boolean onLongClick(View v) {
-        return true;
-    }
-}
diff --git a/src/com/owncloud/android/ui/PreferenceWithLongSummary.java b/src/com/owncloud/android/ui/PreferenceWithLongSummary.java
new file mode 100644 (file)
index 0000000..e38d29a
--- /dev/null
@@ -0,0 +1,48 @@
+/* ownCloud Android client application
+ *   Copyright (C) 2014 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.ui;
+
+import android.content.Context;
+import android.text.TextUtils;
+import android.util.AttributeSet;
+import android.view.View;
+import android.widget.TextView;
+import android.preference.Preference;
+
+public class PreferenceWithLongSummary extends Preference{
+
+    public PreferenceWithLongSummary(Context context) {
+        super(context);
+    }
+
+    public PreferenceWithLongSummary(Context context, AttributeSet attrs) {
+        super(context, attrs);
+    }
+    public PreferenceWithLongSummary(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+    }
+
+    @Override
+    protected void onBindView(View view) {
+        super.onBindView(view);
+        TextView titleView = (TextView) view.findViewById(android.R.id.summary);
+        titleView.setSingleLine(true);
+        titleView.setMaxLines(1);
+        titleView.setEllipsize(TextUtils.TruncateAt.MIDDLE);
+    }
+}
\ No newline at end of file
diff --git a/src/com/owncloud/android/ui/RadioButtonPreference.java b/src/com/owncloud/android/ui/RadioButtonPreference.java
new file mode 100644 (file)
index 0000000..8f562b3
--- /dev/null
@@ -0,0 +1,20 @@
+package com.owncloud.android.ui;
+
+import android.content.Context;
+import android.preference.CheckBoxPreference;
+import android.view.View;
+
+import com.owncloud.android.R;
+
+public class RadioButtonPreference extends CheckBoxPreference implements View.OnLongClickListener {
+    
+    public RadioButtonPreference(Context context) {
+        super(context, null, android.R.attr.checkBoxPreferenceStyle);
+        setWidgetLayoutResource(R.layout.preference_widget_radiobutton);
+    }
+  
+    @Override
+    public boolean onLongClick(View v) {
+        return true;
+    }
+}
index 49259e9..f583749 100644 (file)
@@ -25,6 +25,8 @@ import android.accounts.Account;
 import android.accounts.AccountManager;
 import android.accounts.AuthenticatorException;
 import android.accounts.OperationCanceledException;
+import android.annotation.SuppressLint;
+import android.annotation.TargetApi;
 import android.app.AlertDialog;
 import android.app.Dialog;
 import android.app.ProgressDialog;
@@ -605,18 +607,27 @@ OnSslUntrustedCertListener, OnEnforceableRefreshListener {
 
     /**
      * Called, when the user selected something for uploading
+     *
      */
+    @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
         super.onActivityResult(requestCode, resultCode, data);
 
         if (requestCode == ACTION_SELECT_CONTENT_FROM_APPS && (resultCode == RESULT_OK || resultCode == UploadFilesActivity.RESULT_OK_AND_MOVE)) {
-            requestSimpleUpload(data, resultCode);
-
+            //getClipData is only supported on api level 16+, Jelly Bean
+            if (data.getData() == null && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN){
+                for( int i = 0; i < data.getClipData().getItemCount(); i++){
+                    Intent intent = new Intent();
+                    intent.setData(data.getClipData().getItemAt(i).getUri());
+                    requestSimpleUpload(intent, resultCode);
+                }
+            }else {
+                requestSimpleUpload(data, resultCode);
+            }
         } else if (requestCode == ACTION_SELECT_MULTIPLE_FILES && (resultCode == RESULT_OK || resultCode == UploadFilesActivity.RESULT_OK_AND_MOVE)) {
             requestMultipleUpload(data, resultCode);
 
-        } else if (requestCode == ACTION_MOVE_FILES && (resultCode == RESULT_OK || 
-                resultCode == MoveActivity.RESULT_OK_AND_MOVE)){
+        } else if (requestCode == ACTION_MOVE_FILES && resultCode == RESULT_OK){
 
             final Intent fData = data;
             final int fResultCode = resultCode; 
@@ -744,8 +755,8 @@ OnSslUntrustedCertListener, OnEnforceableRefreshListener {
      * @param resultCode        Result code received
      */
     private void requestMoveOperation(Intent data, int resultCode) {
-        OCFile folderToMoveAt = (OCFile) data.getParcelableExtra(MoveActivity.EXTRA_CURRENT_FOLDER);
-        OCFile targetFile = (OCFile) data.getParcelableExtra(MoveActivity.EXTRA_TARGET_FILE);
+        OCFile folderToMoveAt = (OCFile) data.getParcelableExtra(FolderPickerActivity.EXTRA_FOLDER);
+        OCFile targetFile = (OCFile) data.getParcelableExtra(FolderPickerActivity.EXTRA_FILE);
         getFileOperationsHelper().moveFile(folderToMoveAt, targetFile);
     }
 
@@ -878,6 +889,10 @@ OnSslUntrustedCertListener, OnEnforceableRefreshListener {
                     } else if (item == 1) {
                         Intent action = new Intent(Intent.ACTION_GET_CONTENT);
                         action = action.setType("*/*").addCategory(Intent.CATEGORY_OPENABLE);
+                        //Intent.EXTRA_ALLOW_MULTIPLE is only supported on api level 18+, Jelly Bean
+                        if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
+                            action.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
+                        }
                         startActivityForResult(Intent.createChooser(action, getString(R.string.upload_chooser_title)),
                                 ACTION_SELECT_CONTENT_FROM_APPS);
                     }
diff --git a/src/com/owncloud/android/ui/activity/FolderPickerActivity.java b/src/com/owncloud/android/ui/activity/FolderPickerActivity.java
new file mode 100644 (file)
index 0000000..07c9213
--- /dev/null
@@ -0,0 +1,584 @@
+/* ownCloud Android client application
+ *   Copyright (C) 2012-2014 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.ui.activity;
+
+import java.io.IOException;
+
+import android.accounts.Account;
+import android.accounts.AccountManager;
+import android.accounts.AuthenticatorException;
+import android.accounts.OperationCanceledException;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.res.Resources.NotFoundException;
+import android.os.Bundle;
+import android.os.Parcelable;
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentTransaction;
+import android.util.Log;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.Button;
+import android.widget.Toast;
+
+import com.actionbarsherlock.app.ActionBar;
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuInflater;
+import com.actionbarsherlock.view.MenuItem;
+import com.actionbarsherlock.view.Window;
+import com.owncloud.android.R;
+import com.owncloud.android.datamodel.OCFile;
+import com.owncloud.android.lib.common.OwnCloudAccount;
+import com.owncloud.android.lib.common.OwnCloudClient;
+import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;
+import com.owncloud.android.lib.common.OwnCloudCredentials;
+import com.owncloud.android.lib.common.accounts.AccountUtils.AccountNotFoundException;
+import com.owncloud.android.lib.common.operations.RemoteOperation;
+import com.owncloud.android.lib.common.operations.RemoteOperationResult;
+import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode;
+import com.owncloud.android.lib.common.utils.Log_OC;
+import com.owncloud.android.operations.CreateFolderOperation;
+import com.owncloud.android.operations.SynchronizeFolderOperation;
+import com.owncloud.android.syncadapter.FileSyncAdapter;
+import com.owncloud.android.ui.dialog.CreateFolderDialogFragment;
+import com.owncloud.android.ui.fragment.FileFragment;
+import com.owncloud.android.ui.fragment.OCFileListFragment;
+import com.owncloud.android.utils.DisplayUtils;
+import com.owncloud.android.utils.ErrorMessageAdapter;
+
+public class FolderPickerActivity extends FileActivity implements FileFragment.ContainerActivity, 
+    OnClickListener, OnEnforceableRefreshListener {
+
+    public static final String EXTRA_FOLDER = UploadFilesActivity.class.getCanonicalName()
+                                                            + ".EXTRA_FOLDER";
+    public static final String EXTRA_FILE = UploadFilesActivity.class.getCanonicalName()
+                                                            + ".EXTRA_FILE";
+    //TODO: Think something better
+
+    private SyncBroadcastReceiver mSyncBroadcastReceiver;
+
+    private static final String TAG = FolderPickerActivity.class.getSimpleName();
+    
+    private static final String TAG_LIST_OF_FOLDERS = "LIST_OF_FOLDERS";
+       
+    private boolean mSyncInProgress = false;
+
+    protected Button mCancelBtn;
+    protected Button mChooseBtn;
+
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        Log_OC.d(TAG, "onCreate() start");
+        requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
+
+        super.onCreate(savedInstanceState); 
+
+        setContentView(R.layout.files_folder_picker);
+        
+        if (savedInstanceState == null) {
+            createFragments();
+        }
+
+        // sets callback listeners for UI elements
+        initControls();
+
+        // Action bar setup
+        ActionBar actionBar = getSupportActionBar();
+        actionBar.setDisplayShowTitleEnabled(true);
+        actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
+        setSupportProgressBarIndeterminateVisibility(mSyncInProgress);
+            // always AFTER setContentView(...) ; to work around bug in its implementation
+        
+        // sets message for empty list of folders
+        setBackgroundText();
+
+        Log_OC.d(TAG, "onCreate() end");
+        
+    }
+
+    @Override
+    protected void onStart() {
+        super.onStart();
+        getSupportActionBar().setIcon(DisplayUtils.getSeasonalIconId());
+    }
+
+    /**
+     *  Called when the ownCloud {@link Account} associated to the Activity was just updated.
+     */
+    @Override
+    protected void onAccountSet(boolean stateWasRecovered) {
+        super.onAccountSet(stateWasRecovered);
+        if (getAccount() != null) {
+            
+            updateFileFromDB();
+            
+            OCFile folder = getFile();
+            if (folder == null || !folder.isFolder()) {
+                // fall back to root folder
+                setFile(getStorageManager().getFileByPath(OCFile.ROOT_PATH));
+                folder = getFile();
+            }
+            
+            if (!stateWasRecovered) {
+                OCFileListFragment listOfFolders = getListOfFilesFragment(); 
+                listOfFolders.listDirectory(folder);   
+                
+                startSyncFolderOperation(folder, false);
+            }
+            
+            updateNavigationElementsInActionBar();
+        }
+    }
+
+    private void createFragments() {
+        OCFileListFragment listOfFiles = new OCFileListFragment();
+        Bundle args = new Bundle();
+        args.putBoolean(OCFileListFragment.ARG_JUST_FOLDERS, true);
+        args.putBoolean(OCFileListFragment.ARG_ALLOW_CONTEXTUAL_ACTIONS, false);
+        listOfFiles.setArguments(args);
+        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
+        transaction.add(R.id.fragment_container, listOfFiles, TAG_LIST_OF_FOLDERS);
+        transaction.commit();
+    }
+
+    /**
+     * Show a text message on screen view for notifying user if content is
+     * loading or folder is empty
+     */
+    private void setBackgroundText() {
+        OCFileListFragment listFragment = getListOfFilesFragment();
+        if (listFragment != null) {
+            int message = R.string.file_list_loading;
+            if (!mSyncInProgress) {
+                // In case folder list is empty
+                message = R.string.file_list_empty_moving;
+            }
+            listFragment.setMessageForEmptyList(getString(message));
+        } else {
+            Log.e(TAG, "OCFileListFragment is null");
+        }
+    }
+
+    protected OCFileListFragment getListOfFilesFragment() {
+        Fragment listOfFiles = getSupportFragmentManager().findFragmentByTag(FolderPickerActivity.TAG_LIST_OF_FOLDERS);
+        if (listOfFiles != null) {
+            return (OCFileListFragment)listOfFiles;
+        }
+        Log_OC.wtf(TAG, "Access to unexisting list of files fragment!!");
+        return null;
+    }
+
+    
+    /**
+     * {@inheritDoc}
+     * 
+     * Updates action bar and second fragment, if in dual pane mode.
+     */
+    @Override
+    public void onBrowsedDownTo(OCFile directory) {
+        setFile(directory);
+        updateNavigationElementsInActionBar();
+        // Sync Folder
+        startSyncFolderOperation(directory, false);
+        
+    }
+
+    
+    public void startSyncFolderOperation(OCFile folder, boolean ignoreETag) {
+        long currentSyncTime = System.currentTimeMillis(); 
+        
+        mSyncInProgress = true;
+                
+        // perform folder synchronization
+        RemoteOperation synchFolderOp = new SynchronizeFolderOperation( folder,  
+                                                                        currentSyncTime, 
+                                                                        false,
+                                                                        getFileOperationsHelper().isSharedSupported(),
+                                                                        ignoreETag,
+                                                                        getStorageManager(), 
+                                                                        getAccount(), 
+                                                                        getApplicationContext()
+                                                                      );
+        synchFolderOp.execute(getAccount(), this, null, null);
+        
+        setSupportProgressBarIndeterminateVisibility(true);
+
+        setBackgroundText();
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+        Log_OC.e(TAG, "onResume() start");
+        
+        // refresh list of files
+        refreshListOfFilesFragment();
+
+        // Listen for sync messages
+        IntentFilter syncIntentFilter = new IntentFilter(FileSyncAdapter.EVENT_FULL_SYNC_START);
+        syncIntentFilter.addAction(FileSyncAdapter.EVENT_FULL_SYNC_END);
+        syncIntentFilter.addAction(FileSyncAdapter.EVENT_FULL_SYNC_FOLDER_CONTENTS_SYNCED);
+        syncIntentFilter.addAction(SynchronizeFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED);
+        syncIntentFilter.addAction(SynchronizeFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED);
+        mSyncBroadcastReceiver = new SyncBroadcastReceiver();
+        registerReceiver(mSyncBroadcastReceiver, syncIntentFilter);
+        
+        Log_OC.d(TAG, "onResume() end");
+    }
+    
+    @Override
+    protected void onPause() {
+        Log_OC.e(TAG, "onPause() start");
+        if (mSyncBroadcastReceiver != null) {
+            unregisterReceiver(mSyncBroadcastReceiver);
+            //LocalBroadcastManager.getInstance(this).unregisterReceiver(mSyncBroadcastReceiver);
+            mSyncBroadcastReceiver = null;
+        }
+        
+        Log_OC.d(TAG, "onPause() end");
+        super.onPause();
+    }
+    
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        MenuInflater inflater = getSherlock().getMenuInflater();
+        inflater.inflate(R.menu.main_menu, menu);
+        menu.findItem(R.id.action_upload).setVisible(false);
+        menu.findItem(R.id.action_settings).setVisible(false);
+        menu.findItem(R.id.action_sync_account).setVisible(false);
+        menu.findItem(R.id.action_logger).setVisible(false);
+        menu.findItem(R.id.action_sort).setVisible(false);
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        boolean retval = true;
+        switch (item.getItemId()) {
+        case R.id.action_create_dir: {
+            CreateFolderDialogFragment dialog = 
+                    CreateFolderDialogFragment.newInstance(getCurrentFolder());
+            dialog.show(
+                    getSupportFragmentManager(), 
+                    CreateFolderDialogFragment.CREATE_FOLDER_FRAGMENT
+            );
+            break;
+        }
+        case android.R.id.home: {
+            OCFile currentDir = getCurrentFolder();
+            if(currentDir != null && currentDir.getParentId() != 0) {
+                onBackPressed();
+            }
+            break;
+        }
+        default:
+            retval = super.onOptionsItemSelected(item);
+        }
+        return retval;
+    }
+
+    protected OCFile getCurrentFolder() {
+        OCFile file = getFile();
+        if (file != null) {
+            if (file.isFolder()) {
+                return file;
+            } else if (getStorageManager() != null) {
+                String parentPath = file.getRemotePath().substring(0, file.getRemotePath().lastIndexOf(file.getFileName()));
+                return getStorageManager().getFileByPath(parentPath);
+            }
+        }
+        return null;
+    }
+    
+    protected void refreshListOfFilesFragment() {
+        OCFileListFragment fileListFragment = getListOfFilesFragment();
+        if (fileListFragment != null) { 
+            fileListFragment.listDirectory();
+        }
+    }
+
+    public void browseToRoot() {
+        OCFileListFragment listOfFiles = getListOfFilesFragment(); 
+        if (listOfFiles != null) {  // should never be null, indeed
+            OCFile root = getStorageManager().getFileByPath(OCFile.ROOT_PATH);
+            listOfFiles.listDirectory(root);
+            setFile(listOfFiles.getCurrentFile());
+            updateNavigationElementsInActionBar();
+            startSyncFolderOperation(root, false);
+        }
+    }
+
+    @Override
+    public void onBackPressed() {
+        OCFileListFragment listOfFiles = getListOfFilesFragment();
+        if (listOfFiles != null) {  // should never be null, indeed
+            int levelsUp = listOfFiles.onBrowseUp();
+            if (levelsUp == 0) {
+                finish();
+                return;
+            }
+            setFile(listOfFiles.getCurrentFile());
+            updateNavigationElementsInActionBar();
+        }
+    }
+
+    protected void updateNavigationElementsInActionBar() {
+        ActionBar actionBar = getSupportActionBar();
+        OCFile currentDir = getCurrentFolder();
+        boolean atRoot = (currentDir == null || currentDir.getParentId() == 0);
+        actionBar.setDisplayHomeAsUpEnabled(!atRoot);
+        actionBar.setHomeButtonEnabled(!atRoot);
+        actionBar.setTitle(
+            atRoot 
+                ? getString(R.string.default_display_name_for_root_folder) 
+                : currentDir.getFileName()
+        );
+    }
+
+    /**
+     * Set per-view controllers
+     */
+    private void initControls(){
+        mCancelBtn = (Button) findViewById(R.id.folder_picker_btn_cancel);
+        mCancelBtn.setOnClickListener(this);
+        mChooseBtn = (Button) findViewById(R.id.folder_picker_btn_choose);
+        mChooseBtn.setOnClickListener(this);
+    }
+    
+    @Override
+    public void onClick(View v) {
+        if (v == mCancelBtn) {
+            finish();
+        } else if (v == mChooseBtn) {
+            Intent i = getIntent();
+            Parcelable targetFile = i.getParcelableExtra(FolderPickerActivity.EXTRA_FILE);
+
+            Intent data = new Intent();
+            data.putExtra(EXTRA_FOLDER, getCurrentFolder());
+            if (targetFile != null) {
+                data.putExtra(EXTRA_FILE, targetFile);
+            }
+            setResult(RESULT_OK, data);
+            finish();
+        }
+    }
+    
+    
+    @Override
+    public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) {
+        super.onRemoteOperationFinish(operation, result);
+        
+        if (operation instanceof CreateFolderOperation) {
+            onCreateFolderOperationFinish((CreateFolderOperation)operation, result);
+            
+        }
+    }
+    
+    
+    /**
+     * Updates the view associated to the activity after the finish of an operation trying 
+     * to create a new folder.
+     * 
+     * @param operation     Creation operation performed.
+     * @param result        Result of the creation.
+     */
+    private void onCreateFolderOperationFinish(
+            CreateFolderOperation operation, RemoteOperationResult result
+            ) {
+        
+        if (result.isSuccess()) {
+            dismissLoadingDialog();
+            refreshListOfFilesFragment();
+        } else {
+            dismissLoadingDialog();
+            try {
+                Toast msg = Toast.makeText(FolderPickerActivity.this, 
+                        ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()), 
+                        Toast.LENGTH_LONG); 
+                msg.show();
+
+            } catch (NotFoundException e) {
+                Log_OC.e(TAG, "Error while trying to show fail message " , e);
+            }
+        }
+    }
+    
+    
+    
+    private class SyncBroadcastReceiver extends BroadcastReceiver {
+
+        /**
+         * {@link BroadcastReceiver} to enable syncing feedback in UI
+         */
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            try {
+                String event = intent.getAction();
+                Log_OC.d(TAG, "Received broadcast " + event);
+                String accountName = intent.getStringExtra(FileSyncAdapter.EXTRA_ACCOUNT_NAME);
+                String synchFolderRemotePath = intent.getStringExtra(FileSyncAdapter.EXTRA_FOLDER_PATH); 
+                RemoteOperationResult synchResult = (RemoteOperationResult)intent.
+                        getSerializableExtra(FileSyncAdapter.EXTRA_RESULT);
+                boolean sameAccount = (getAccount() != null && 
+                        accountName.equals(getAccount().name) && getStorageManager() != null); 
+    
+                if (sameAccount) {
+                    
+                    if (FileSyncAdapter.EVENT_FULL_SYNC_START.equals(event)) {
+                        mSyncInProgress = true;
+                        
+                    } else {
+                        OCFile currentFile = (getFile() == null) ? null : 
+                            getStorageManager().getFileByPath(getFile().getRemotePath());
+                        OCFile currentDir = (getCurrentFolder() == null) ? null : 
+                            getStorageManager().getFileByPath(getCurrentFolder().getRemotePath());
+    
+                        if (currentDir == null) {
+                            // current folder was removed from the server 
+                            Toast.makeText( FolderPickerActivity.this, 
+                                            String.format(
+                                                    getString(R.string.sync_current_folder_was_removed), 
+                                                    getCurrentFolder().getFileName()), 
+                                            Toast.LENGTH_LONG)
+                                .show();
+                            browseToRoot();
+                            
+                        } else {
+                            if (currentFile == null && !getFile().isFolder()) {
+                                // currently selected file was removed in the server, and now we know it
+                                currentFile = currentDir;
+                            }
+
+                            if (synchFolderRemotePath != null && currentDir.getRemotePath().
+                                    equals(synchFolderRemotePath)) {
+                                OCFileListFragment fileListFragment = getListOfFilesFragment();
+                                if (fileListFragment != null) {
+                                    fileListFragment.listDirectory(currentDir);
+                                }
+                            }
+                            setFile(currentFile);
+                        }
+                        
+                        mSyncInProgress = (!FileSyncAdapter.EVENT_FULL_SYNC_END.equals(event) && 
+                                !SynchronizeFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED.equals(event));
+                                
+                        if (SynchronizeFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED.
+                                    equals(event) &&
+                                /// TODO refactor and make common
+                                synchResult != null && !synchResult.isSuccess() &&  
+                                (synchResult.getCode() == ResultCode.UNAUTHORIZED   || 
+                                    synchResult.isIdPRedirection()                  ||
+                                    (synchResult.isException() && synchResult.getException() 
+                                            instanceof AuthenticatorException))) {
+
+                            OwnCloudClient client = null;
+                            try {
+                                OwnCloudAccount ocAccount = 
+                                        new OwnCloudAccount(getAccount(), context);
+                                client = (OwnCloudClientManagerFactory.getDefaultSingleton().
+                                        removeClientFor(ocAccount));
+                                // TODO get rid of these exceptions
+                            } catch (AccountNotFoundException e) {
+                                e.printStackTrace();
+                            } catch (AuthenticatorException e) {
+                                e.printStackTrace();
+                            } catch (OperationCanceledException e) {
+                                e.printStackTrace();
+                            } catch (IOException e) {
+                                e.printStackTrace();
+                            }
+                            
+                            if (client != null) {
+                                OwnCloudCredentials cred = client.getCredentials();
+                                if (cred != null) {
+                                    AccountManager am = AccountManager.get(context);
+                                    if (cred.authTokenExpires()) {
+                                        am.invalidateAuthToken(
+                                                getAccount().type, 
+                                                cred.getAuthToken()
+                                        );
+                                    } else {
+                                        am.clearPassword(getAccount());
+                                    }
+                                }
+                            }
+                            
+                            requestCredentialsUpdate();
+                            
+                        }
+                    }
+                    removeStickyBroadcast(intent);
+                    Log_OC.d(TAG, "Setting progress visibility to " + mSyncInProgress);
+                    setSupportProgressBarIndeterminateVisibility(mSyncInProgress /*|| mRefreshSharesInProgress*/);
+
+                    setBackgroundText();
+                        
+                }
+                
+            } catch (RuntimeException e) {
+                // avoid app crashes after changing the serial id of RemoteOperationResult 
+                // in owncloud library with broadcast notifications pending to process
+                removeStickyBroadcast(intent);
+            }
+        }
+    }
+
+    
+
+    /**
+     * Shows the information of the {@link OCFile} received as a 
+     * parameter in the second fragment.
+     * 
+     * @param file          {@link OCFile} whose details will be shown
+     */
+    @Override
+    public void showDetails(OCFile file) {
+
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void onTransferStateChanged(OCFile file, boolean downloading, boolean uploading) {
+            
+    }
+
+    @Override
+    public void onRefresh() {
+        refreshList(true);
+    }
+
+    @Override
+    public void onRefresh(boolean enforced) {
+        refreshList(enforced);
+    }
+
+    private void refreshList(boolean ignoreETag) {
+        OCFileListFragment listOfFiles = getListOfFilesFragment();
+        if (listOfFiles != null) {
+            OCFile folder = listOfFiles.getCurrentFile();
+            if (folder != null) {
+                startSyncFolderOperation(folder, ignoreETag);
+            }
+        }
+    }
+}
index 676388d..793b3d9 100644 (file)
@@ -25,6 +25,7 @@ import java.lang.ref.WeakReference;
 import java.lang.reflect.Field;
 import java.util.ArrayList;
 
+import android.content.ActivityNotFoundException;
 import android.content.Intent;
 import android.net.Uri;
 import android.os.AsyncTask;
@@ -36,6 +37,7 @@ import android.view.View;
 import android.view.View.OnClickListener;
 import android.widget.Button;
 import android.widget.TextView;
+import android.widget.Toast;
 
 import com.actionbarsherlock.app.ActionBar;
 import com.actionbarsherlock.app.SherlockFragmentActivity;
@@ -51,12 +53,15 @@ public class LogHistoryActivity extends SherlockFragmentActivity  {
 
     private static final String MAIL_ATTACHMENT_TYPE = "text/plain";
 
+    private static final String KEY_LOG_TEXT = "LOG_TEXT";
+
     private static final String TAG = LogHistoryActivity.class.getSimpleName();
 
     private static final String DIALOG_WAIT_TAG = "DIALOG_WAIT";
 
     private String mLogPath = FileStorageUtils.getLogPath();
     private File logDIR = null;
+    private String mLogText;
 
 
     @Override
@@ -70,6 +75,7 @@ public class LogHistoryActivity extends SherlockFragmentActivity  {
         actionBar.setDisplayHomeAsUpEnabled(true);
         Button deleteHistoryButton = (Button) findViewById(R.id.deleteLogHistoryButton);
         Button sendHistoryButton = (Button) findViewById(R.id.sendLogHistoryButton);
+        TextView logTV = (TextView) findViewById(R.id.logTV);
 
         deleteHistoryButton.setOnClickListener(new OnClickListener() {
             
@@ -89,20 +95,22 @@ public class LogHistoryActivity extends SherlockFragmentActivity  {
             }
         });
 
-        if (mLogPath != null) {
-            logDIR = new File(mLogPath);
-        }
-
-        if (logDIR != null && logDIR.isDirectory()) {
-            // Show a dialog while log data is being loaded
-            showLoadingDialog();
-
-            TextView logTV = (TextView) findViewById(R.id.logTV);
+        if (savedInstanceState == null) {
+            if (mLogPath != null) {
+                logDIR = new File(mLogPath);
+            }
 
-            // Start a new thread that will load all the log data
-            LoadingLogTask task = new LoadingLogTask(logTV);
-            task.execute();
+            if (logDIR != null && logDIR.isDirectory()) {
+                // Show a dialog while log data is being loaded
+                showLoadingDialog();
 
+                // Start a new thread that will load all the log data
+                LoadingLogTask task = new LoadingLogTask(logTV);
+                task.execute();
+            }
+        } else {
+            mLogText = savedInstanceState.getString(KEY_LOG_TEXT);
+            logTV.setText(mLogText);
         }
     }
 
@@ -125,41 +133,45 @@ public class LogHistoryActivity extends SherlockFragmentActivity  {
      */
     private void sendMail() {
 
+        // For the moment we need to consider the possibility that setup.xml
+        // does not include the "mail_logger" entry. This block prevents that
+        // compilation fails in this case.
         String emailAddress;
         try {
             Class<?> stringClass = R.string.class;
             Field mailLoggerField = stringClass.getField("mail_logger");
-            int emailAddressId = (Integer)mailLoggerField.get(null);
+            int emailAddressId = (Integer) mailLoggerField.get(null);
             emailAddress = getString(emailAddressId);
-            
         } catch (Exception e) {
             emailAddress = "";
         }
-
+        
         ArrayList<Uri> uris = new ArrayList<Uri>();
 
         // Convert from paths to Android friendly Parcelable Uri's
         for (String file : Log_OC.getLogFileNames())
         {
-            if (new File(mLogPath + File.separator, file).exists()) {
-                Uri u = Uri.parse("file://" + mLogPath + File.separator + file);
-                uris.add(u);
+            File logFile = new File(mLogPath, file);
+            if (logFile.exists()) {
+                uris.add(Uri.fromFile(logFile));
             }
         }
 
         Intent intent = new Intent(Intent.ACTION_SEND_MULTIPLE);
 
-        // Explicitly only use Gmail to send
-        intent.setClassName("com.google.android.gm","com.google.android.gm.ComposeActivityGmail");
-        intent.putExtra(Intent.EXTRA_EMAIL, new String[]{ emailAddress });
-        intent.putExtra(Intent.EXTRA_SUBJECT, getText(R.string.log_mail_subject));
+        intent.putExtra(Intent.EXTRA_EMAIL, emailAddress);
+        String subject = String.format(getString(R.string.log_send_mail_subject), getString(R.string.app_name));
+        intent.putExtra(Intent.EXTRA_SUBJECT, subject);
         intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
         intent.setType(MAIL_ATTACHMENT_TYPE);
         intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris);
-
-        if (intent.resolveActivity(getPackageManager()) != null) {
+        try {
             startActivity(intent);
+        } catch (ActivityNotFoundException e) {
+            Toast.makeText(this, getString(R.string.log_send_no_mail_app), Toast.LENGTH_LONG).show();
+            Log_OC.i(TAG, "Could not find app for sending log history.");
         }
+
     }
 
     /**
@@ -183,7 +195,8 @@ public class LogHistoryActivity extends SherlockFragmentActivity  {
             if (textViewReference != null && result != null) {
                 final TextView logTV = textViewReference.get();
                 if (logTV != null) {
-                    logTV.setText(result);
+                    mLogText = result;
+                    logTV.setText(mLogText);
                     dismissLoadingDialog();
                 }
             }
@@ -258,4 +271,12 @@ public class LogHistoryActivity extends SherlockFragmentActivity  {
             loading.dismiss();
         }
     }
+
+    @Override
+    protected void onSaveInstanceState(Bundle outState) {
+        super.onSaveInstanceState(outState);
+
+        /// global state
+        outState.putString(KEY_LOG_TEXT, mLogText);
+    }
 }
\ No newline at end of file
diff --git a/src/com/owncloud/android/ui/activity/MoveActivity.java b/src/com/owncloud/android/ui/activity/MoveActivity.java
deleted file mode 100644 (file)
index 8a25470..0000000
+++ /dev/null
@@ -1,575 +0,0 @@
-/* ownCloud Android client application
- *   Copyright (C) 2012-2014 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.ui.activity;
-
-import java.io.IOException;
-
-import android.accounts.Account;
-import android.accounts.AccountManager;
-import android.accounts.AuthenticatorException;
-import android.accounts.OperationCanceledException;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.res.Resources.NotFoundException;
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.support.v4.app.FragmentTransaction;
-import android.util.Log;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.widget.Button;
-import android.widget.Toast;
-
-import com.actionbarsherlock.app.ActionBar;
-import com.actionbarsherlock.view.Menu;
-import com.actionbarsherlock.view.MenuInflater;
-import com.actionbarsherlock.view.MenuItem;
-import com.actionbarsherlock.view.Window;
-import com.owncloud.android.R;
-import com.owncloud.android.datamodel.OCFile;
-import com.owncloud.android.lib.common.OwnCloudAccount;
-import com.owncloud.android.lib.common.OwnCloudClient;
-import com.owncloud.android.lib.common.OwnCloudClientManagerFactory;
-import com.owncloud.android.lib.common.OwnCloudCredentials;
-import com.owncloud.android.lib.common.accounts.AccountUtils.AccountNotFoundException;
-import com.owncloud.android.lib.common.operations.RemoteOperation;
-import com.owncloud.android.lib.common.operations.RemoteOperationResult;
-import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode;
-import com.owncloud.android.operations.CreateFolderOperation;
-import com.owncloud.android.operations.SynchronizeFolderOperation;
-import com.owncloud.android.syncadapter.FileSyncAdapter;
-import com.owncloud.android.ui.dialog.CreateFolderDialogFragment;
-import com.owncloud.android.ui.fragment.FileFragment;
-import com.owncloud.android.ui.fragment.OCFileListFragment;
-import com.owncloud.android.utils.DisplayUtils;
-import com.owncloud.android.utils.ErrorMessageAdapter;
-import com.owncloud.android.lib.common.utils.Log_OC;
-
-public class MoveActivity extends HookActivity implements FileFragment.ContainerActivity, 
-    OnClickListener, OnEnforceableRefreshListener {
-
-    public static final String EXTRA_CURRENT_FOLDER = UploadFilesActivity.class.getCanonicalName() + ".EXTRA_CURRENT_FOLDER";
-    public static final String EXTRA_TARGET_FILE = UploadFilesActivity.class.getCanonicalName() + "EXTRA_TARGET_FILE";
-
-    public static final int RESULT_OK_AND_MOVE = 1;
-    
-    private SyncBroadcastReceiver mSyncBroadcastReceiver;
-
-    private static final String TAG = MoveActivity.class.getSimpleName();
-    
-    private static final String TAG_LIST_OF_FOLDERS = "LIST_OF_FOLDERS";
-       
-    private boolean mSyncInProgress = false;
-
-    private Button mCancelBtn;
-    private Button mChooseBtn;
-
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        Log_OC.d(TAG, "onCreate() start");
-        requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
-
-        super.onCreate(savedInstanceState); 
-
-        setContentView(R.layout.files_move);
-        
-        if (savedInstanceState == null) {
-            createFragments();
-        }
-
-        // sets callback listeners for UI elements
-        initControls();
-
-        // Action bar setup
-        ActionBar actionBar = getSupportActionBar();
-        actionBar.setDisplayShowTitleEnabled(true);
-        actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
-        setSupportProgressBarIndeterminateVisibility(mSyncInProgress);
-            // always AFTER setContentView(...) ; to work around bug in its implementation
-        
-        // sets message for empty list of folders
-        setBackgroundText();
-
-        Log_OC.d(TAG, "onCreate() end");
-        
-    }
-
-    @Override
-    protected void onStart() {
-        super.onStart();
-        getSupportActionBar().setIcon(DisplayUtils.getSeasonalIconId());
-    }
-
-    @Override
-    protected void onDestroy() {
-        super.onDestroy();
-    }
-
-    /**
-     *  Called when the ownCloud {@link Account} associated to the Activity was just updated.
-     */
-    @Override
-    protected void onAccountSet(boolean stateWasRecovered) {
-        super.onAccountSet(stateWasRecovered);
-        if (getAccount() != null) {
-            
-            updateFileFromDB();
-            
-            OCFile folder = getFile();
-            if (folder == null || !folder.isFolder()) {
-                // fall back to root folder
-                setFile(getStorageManager().getFileByPath(OCFile.ROOT_PATH));
-                folder = getFile();
-            }
-            
-            if (!stateWasRecovered) {
-                OCFileListFragment listOfFolders = getListOfFilesFragment(); 
-                listOfFolders.listDirectory(folder);   
-                
-                startSyncFolderOperation(folder, false);
-            }
-            
-            updateNavigationElementsInActionBar();
-        }
-    }
-
-    private void createFragments() {
-        OCFileListFragment listOfFiles = new OCFileListFragment();
-        Bundle args = new Bundle();
-        args.putBoolean(OCFileListFragment.ARG_JUST_FOLDERS, true);
-        args.putBoolean(OCFileListFragment.ARG_ALLOW_CONTEXTUAL_ACTIONS, false);
-        listOfFiles.setArguments(args);
-        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
-        transaction.add(R.id.fragment_container, listOfFiles, TAG_LIST_OF_FOLDERS);
-        transaction.commit();
-    }
-
-    /**
-     * Show a text message on screen view for notifying user if content is
-     * loading or folder is empty
-     */
-    private void setBackgroundText() {
-        OCFileListFragment listFragment = getListOfFilesFragment();
-        if (listFragment != null) {
-            int message = R.string.file_list_loading;
-            if (!mSyncInProgress) {
-                // In case folder list is empty
-                message = R.string.file_list_empty_moving;
-            }
-            listFragment.setMessageForEmptyList(getString(message));
-        } else {
-            Log.e(TAG, "OCFileListFragment is null");
-        }
-    }
-
-    private OCFileListFragment getListOfFilesFragment() {
-        Fragment listOfFiles = getSupportFragmentManager().findFragmentByTag(MoveActivity.TAG_LIST_OF_FOLDERS);
-        if (listOfFiles != null) {
-            return (OCFileListFragment)listOfFiles;
-        }
-        Log_OC.wtf(TAG, "Access to unexisting list of files fragment!!");
-        return null;
-    }
-
-    
-    /**
-     * {@inheritDoc}
-     * 
-     * Updates action bar and second fragment, if in dual pane mode.
-     */
-    @Override
-    public void onBrowsedDownTo(OCFile directory) {
-        setFile(directory);
-        updateNavigationElementsInActionBar();
-        // Sync Folder
-        startSyncFolderOperation(directory, false);
-        
-    }
-
-    
-    public void startSyncFolderOperation(OCFile folder, boolean ignoreETag) {
-        long currentSyncTime = System.currentTimeMillis(); 
-        
-        mSyncInProgress = true;
-                
-        // perform folder synchronization
-        RemoteOperation synchFolderOp = new SynchronizeFolderOperation( folder,  
-                                                                        currentSyncTime, 
-                                                                        false,
-                                                                        getFileOperationsHelper().isSharedSupported(),
-                                                                        ignoreETag,
-                                                                        getStorageManager(), 
-                                                                        getAccount(), 
-                                                                        getApplicationContext()
-                                                                      );
-        synchFolderOp.execute(getAccount(), this, null, null);
-        
-        setSupportProgressBarIndeterminateVisibility(true);
-
-        setBackgroundText();
-    }
-
-    @Override
-    protected void onResume() {
-        super.onResume();
-        Log_OC.e(TAG, "onResume() start");
-        
-        // refresh list of files
-        refreshListOfFilesFragment();
-
-        // Listen for sync messages
-        IntentFilter syncIntentFilter = new IntentFilter(FileSyncAdapter.EVENT_FULL_SYNC_START);
-        syncIntentFilter.addAction(FileSyncAdapter.EVENT_FULL_SYNC_END);
-        syncIntentFilter.addAction(FileSyncAdapter.EVENT_FULL_SYNC_FOLDER_CONTENTS_SYNCED);
-        syncIntentFilter.addAction(SynchronizeFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED);
-        syncIntentFilter.addAction(SynchronizeFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED);
-        mSyncBroadcastReceiver = new SyncBroadcastReceiver();
-        registerReceiver(mSyncBroadcastReceiver, syncIntentFilter);
-        
-        Log_OC.d(TAG, "onResume() end");
-    }
-    
-    @Override
-    protected void onPause() {
-        Log_OC.e(TAG, "onPause() start");
-        if (mSyncBroadcastReceiver != null) {
-            unregisterReceiver(mSyncBroadcastReceiver);
-            //LocalBroadcastManager.getInstance(this).unregisterReceiver(mSyncBroadcastReceiver);
-            mSyncBroadcastReceiver = null;
-        }
-        
-        Log_OC.d(TAG, "onPause() end");
-        super.onPause();
-    }
-    
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        MenuInflater inflater = getSherlock().getMenuInflater();
-        inflater.inflate(R.menu.main_menu, menu);
-        menu.findItem(R.id.action_upload).setVisible(false);
-        menu.findItem(R.id.action_settings).setVisible(false);
-        menu.findItem(R.id.action_sync_account).setVisible(false);
-        return true;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        boolean retval = true;
-        switch (item.getItemId()) {
-        case R.id.action_create_dir: {
-            CreateFolderDialogFragment dialog = 
-                    CreateFolderDialogFragment.newInstance(getCurrentFolder());
-            dialog.show(
-                    getSupportFragmentManager(), 
-                    CreateFolderDialogFragment.CREATE_FOLDER_FRAGMENT
-            );
-            break;
-        }
-        case android.R.id.home: {
-            OCFile currentDir = getCurrentFolder();
-            if(currentDir != null && currentDir.getParentId() != 0) {
-                onBackPressed();
-            }
-            break;
-        }
-        default:
-            retval = super.onOptionsItemSelected(item);
-        }
-        return retval;
-    }
-
-    private OCFile getCurrentFolder() {
-        OCFile file = getFile();
-        if (file != null) {
-            if (file.isFolder()) {
-                return file;
-            } else if (getStorageManager() != null) {
-                String parentPath = file.getRemotePath().substring(0, file.getRemotePath().lastIndexOf(file.getFileName()));
-                return getStorageManager().getFileByPath(parentPath);
-            }
-        }
-        return null;
-    }
-    
-    protected void refreshListOfFilesFragment() {
-        OCFileListFragment fileListFragment = getListOfFilesFragment();
-        if (fileListFragment != null) { 
-            fileListFragment.listDirectory();
-        }
-    }
-
-    public void browseToRoot() {
-        OCFileListFragment listOfFiles = getListOfFilesFragment(); 
-        if (listOfFiles != null) {  // should never be null, indeed
-            OCFile root = getStorageManager().getFileByPath(OCFile.ROOT_PATH);
-            listOfFiles.listDirectory(root);
-            setFile(listOfFiles.getCurrentFile());
-            updateNavigationElementsInActionBar();
-            startSyncFolderOperation(root, false);
-        }
-    }
-
-    @Override
-    public void onBackPressed() {
-        OCFileListFragment listOfFiles = getListOfFilesFragment();
-        if (listOfFiles != null) {  // should never be null, indeed
-            int levelsUp = listOfFiles.onBrowseUp();
-            if (levelsUp == 0) {
-                finish();
-                return;
-            }
-            setFile(listOfFiles.getCurrentFile());
-            updateNavigationElementsInActionBar();
-        }
-    }
-
-    private void updateNavigationElementsInActionBar() {
-        ActionBar actionBar = getSupportActionBar();
-        OCFile currentDir = getCurrentFolder();
-        boolean atRoot = (currentDir == null || currentDir.getParentId() == 0);
-        actionBar.setDisplayHomeAsUpEnabled(!atRoot);
-        actionBar.setHomeButtonEnabled(!atRoot);
-        actionBar.setTitle(
-            atRoot 
-                ? getString(R.string.default_display_name_for_root_folder) 
-                : currentDir.getFileName()
-        );
-    }
-
-    /**
-     * Set per-view controllers
-     */
-    private void initControls(){
-        mCancelBtn = (Button) findViewById(R.id.move_files_btn_cancel);
-        mCancelBtn.setOnClickListener(this);
-        mChooseBtn = (Button) findViewById(R.id.move_files_btn_choose);
-        mChooseBtn.setOnClickListener(this);
-    }
-    
-    @Override
-    public void onClick(View v) {
-        if (v == mCancelBtn) {
-            finish();
-        } else if (v == mChooseBtn) {
-            Intent i = getIntent();
-            OCFile targetFile = (OCFile) i.getParcelableExtra(MoveActivity.EXTRA_TARGET_FILE);
-
-            Intent data = new Intent();
-            data.putExtra(EXTRA_CURRENT_FOLDER, getCurrentFolder());
-            data.putExtra(EXTRA_TARGET_FILE, targetFile);
-            setResult(RESULT_OK_AND_MOVE, data);
-            finish();
-        }
-    }
-    
-    
-    @Override
-    public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) {
-        super.onRemoteOperationFinish(operation, result);
-        
-        if (operation instanceof CreateFolderOperation) {
-            onCreateFolderOperationFinish((CreateFolderOperation)operation, result);
-            
-        }
-    }
-    
-    
-    /**
-     * Updates the view associated to the activity after the finish of an operation trying 
-     * to create a new folder.
-     * 
-     * @param operation     Creation operation performed.
-     * @param result        Result of the creation.
-     */
-    private void onCreateFolderOperationFinish(
-            CreateFolderOperation operation, RemoteOperationResult result
-            ) {
-        
-        if (result.isSuccess()) {
-            dismissLoadingDialog();
-            refreshListOfFilesFragment();
-        } else {
-            dismissLoadingDialog();
-            try {
-                Toast msg = Toast.makeText(MoveActivity.this, 
-                        ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()), 
-                        Toast.LENGTH_LONG); 
-                msg.show();
-
-            } catch (NotFoundException e) {
-                Log_OC.e(TAG, "Error while trying to show fail message " , e);
-            }
-        }
-    }
-    
-    
-    
-    private class SyncBroadcastReceiver extends BroadcastReceiver {
-
-        /**
-         * {@link BroadcastReceiver} to enable syncing feedback in UI
-         */
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            try {
-                String event = intent.getAction();
-                Log_OC.d(TAG, "Received broadcast " + event);
-                String accountName = intent.getStringExtra(FileSyncAdapter.EXTRA_ACCOUNT_NAME);
-                String synchFolderRemotePath = intent.getStringExtra(FileSyncAdapter.EXTRA_FOLDER_PATH); 
-                RemoteOperationResult synchResult = (RemoteOperationResult)intent.getSerializableExtra(FileSyncAdapter.EXTRA_RESULT);
-                boolean sameAccount = (getAccount() != null && accountName.equals(getAccount().name) && getStorageManager() != null); 
-    
-                if (sameAccount) {
-                    
-                    if (FileSyncAdapter.EVENT_FULL_SYNC_START.equals(event)) {
-                        mSyncInProgress = true;
-                        
-                    } else {
-                        OCFile currentFile = (getFile() == null) ? null : getStorageManager().getFileByPath(getFile().getRemotePath());
-                        OCFile currentDir = (getCurrentFolder() == null) ? null : getStorageManager().getFileByPath(getCurrentFolder().getRemotePath());
-    
-                        if (currentDir == null) {
-                            // current folder was removed from the server 
-                            Toast.makeText( MoveActivity.this, 
-                                            String.format(getString(R.string.sync_current_folder_was_removed), getCurrentFolder().getFileName()), 
-                                            Toast.LENGTH_LONG)
-                                .show();
-                            browseToRoot();
-                            
-                        } else {
-                            if (currentFile == null && !getFile().isFolder()) {
-                                // currently selected file was removed in the server, and now we know it
-                                currentFile = currentDir;
-                            }
-
-                            if (synchFolderRemotePath != null && currentDir.getRemotePath().equals(synchFolderRemotePath)) {
-                                OCFileListFragment fileListFragment = getListOfFilesFragment();
-                                if (fileListFragment != null) {
-                                    fileListFragment.listDirectory(currentDir);
-                                }
-                            }
-                            setFile(currentFile);
-                        }
-                        
-                        mSyncInProgress = (!FileSyncAdapter.EVENT_FULL_SYNC_END.equals(event) && !SynchronizeFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED.equals(event));
-                                
-                        if (SynchronizeFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED.
-                                    equals(event) &&
-                                /// TODO refactor and make common
-                                synchResult != null && !synchResult.isSuccess() &&  
-                                (synchResult.getCode() == ResultCode.UNAUTHORIZED   || 
-                                    synchResult.isIdPRedirection()                  ||
-                                    (synchResult.isException() && synchResult.getException() 
-                                            instanceof AuthenticatorException))) {
-
-                            OwnCloudClient client = null;
-                            try {
-                                OwnCloudAccount ocAccount = 
-                                        new OwnCloudAccount(getAccount(), context);
-                                client = (OwnCloudClientManagerFactory.getDefaultSingleton().
-                                        removeClientFor(ocAccount));
-                                // TODO get rid of these exceptions
-                            } catch (AccountNotFoundException e) {
-                                e.printStackTrace();
-                            } catch (AuthenticatorException e) {
-                                e.printStackTrace();
-                            } catch (OperationCanceledException e) {
-                                e.printStackTrace();
-                            } catch (IOException e) {
-                                e.printStackTrace();
-                            }
-                            
-                            if (client != null) {
-                                OwnCloudCredentials cred = client.getCredentials();
-                                if (cred != null) {
-                                    AccountManager am = AccountManager.get(context);
-                                    if (cred.authTokenExpires()) {
-                                        am.invalidateAuthToken(
-                                                getAccount().type, 
-                                                cred.getAuthToken()
-                                        );
-                                    } else {
-                                        am.clearPassword(getAccount());
-                                    }
-                                }
-                            }
-                            
-                            requestCredentialsUpdate();
-                            
-                        }
-                    }
-                    removeStickyBroadcast(intent);
-                    Log_OC.d(TAG, "Setting progress visibility to " + mSyncInProgress);
-                    setSupportProgressBarIndeterminateVisibility(mSyncInProgress /*|| mRefreshSharesInProgress*/);
-
-                    setBackgroundText();
-                        
-                }
-                
-            } catch (RuntimeException e) {
-                // avoid app crashes after changing the serial id of RemoteOperationResult 
-                // in owncloud library with broadcast notifications pending to process
-                removeStickyBroadcast(intent);
-            }
-        }
-    }
-
-    
-
-    /**
-     * Shows the information of the {@link OCFile} received as a 
-     * parameter in the second fragment.
-     * 
-     * @param file          {@link OCFile} whose details will be shown
-     */
-    @Override
-    public void showDetails(OCFile file) {
-
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void onTransferStateChanged(OCFile file, boolean downloading, boolean uploading) {
-            
-    }
-
-    @Override
-    public void onRefresh() {
-        refreshList(true);
-    }
-
-    @Override
-    public void onRefresh(boolean enforced) {
-        refreshList(enforced);
-    }
-
-    private void refreshList(boolean ignoreETag) {
-        OCFileListFragment listOfFiles = getListOfFilesFragment();
-        if (listOfFiles != null) {
-            OCFile folder = listOfFiles.getCurrentFile();
-            if (folder != null) {
-                startSyncFolderOperation(folder, ignoreETag);
-            }
-        }
-    }
-}
index 2033093..1d80a70 100644 (file)
@@ -50,9 +50,10 @@ import com.owncloud.android.MainApp;
 import com.owncloud.android.R;
 import com.owncloud.android.authentication.AccountUtils;
 import com.owncloud.android.authentication.AuthenticatorActivity;
+import com.owncloud.android.datamodel.OCFile;
 import com.owncloud.android.db.DbHandler;
 import com.owncloud.android.lib.common.utils.Log_OC;
-import com.owncloud.android.ui.LongClickableCheckBoxPreference;
+import com.owncloud.android.ui.RadioButtonPreference;
 import com.owncloud.android.utils.DisplayUtils;
 
 
@@ -66,6 +67,9 @@ public class Preferences extends SherlockPreferenceActivity implements AccountMa
     
     private static final String TAG = "OwnCloudPreferences";
 
+    private static final int ACTION_SELECT_UPLOAD_PATH = 1;
+    private static final int ACTION_SELECT_UPLOAD_VIDEO_PATH = 2;
+
     private DbHandler mDbHandler;
     private CheckBoxPreference pCode;
     private Preference pAboutApp;
@@ -75,6 +79,9 @@ public class Preferences extends SherlockPreferenceActivity implements AccountMa
     private String mAccountName;
     private boolean mShowContextMenu = false;
     private String mUploadPath;
+    private Preference mPrefInstantUploadPath;
+    private Preference mPrefInstantVideoUploadPath;
+    private String mUploadVideoPath;
 
 
     @SuppressWarnings("deprecation")
@@ -89,8 +96,6 @@ public class Preferences extends SherlockPreferenceActivity implements AccountMa
         actionBar.setDisplayHomeAsUpEnabled(true);
         actionBar.setTitle(R.string.actionbar_settings);
 
-        loadInstantUploadPath();
-
         // Load the accounts category for adding the list of accounts
         mAccountsPrefCategory = (PreferenceCategory) findPreference("accounts_category");
 
@@ -102,9 +107,9 @@ public class Preferences extends SherlockPreferenceActivity implements AccountMa
                 ListAdapter listAdapter = listView.getAdapter();
                 Object obj = listAdapter.getItem(position);
 
-                if (obj != null && obj instanceof LongClickableCheckBoxPreference) {
+                if (obj != null && obj instanceof RadioButtonPreference) {
                     mShowContextMenu = true;
-                    mAccountName = ((LongClickableCheckBoxPreference) obj).getKey();
+                    mAccountName = ((RadioButtonPreference) obj).getKey();
 
                     Preferences.this.openContextMenu(listView);
 
@@ -114,7 +119,18 @@ public class Preferences extends SherlockPreferenceActivity implements AccountMa
                 return false;
             }
         });
-
+        
+        // Load package info
+        String temp;
+        try {
+            PackageInfo pkg = getPackageManager().getPackageInfo(getPackageName(), 0);
+            temp = pkg.versionName;
+        } catch (NameNotFoundException e) {
+            temp = "";
+            Log_OC.e(TAG, "Error while showing about dialog", e);
+        } 
+        final String appVersion = temp;
+       
         // Register context menu for list of preferences.
         registerForContextMenu(getListView());
 
@@ -203,7 +219,7 @@ public class Preferences extends SherlockPreferenceActivity implements AccountMa
                     @Override
                     public boolean onPreferenceClick(Preference preference) {
                         String feedbackMail   =(String) getText(R.string.mail_feedback);
-                        String feedback   =(String) getText(R.string.prefs_feedback);
+                        String feedback   =(String) getText(R.string.prefs_feedback) + " - android v" + appVersion;
                         Intent intent = new Intent(Intent.ACTION_SENDTO); 
                         intent.setType("text/plain");
                         intent.putExtra(Intent.EXTRA_SUBJECT, feedback);
@@ -243,33 +259,54 @@ public class Preferences extends SherlockPreferenceActivity implements AccountMa
             }
         }
 
-        Preference pInstantUploadPathApp = (Preference) findPreference("instant_upload_path");
+        mPrefInstantUploadPath =  findPreference("instant_upload_path");
+        if (mPrefInstantUploadPath != null){
 
-        pInstantUploadPathApp.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
-            @Override
-            public boolean onPreferenceChange(Preference preference, Object newValue) {
-                mUploadPath = updateInstantUploadPath(newValue.toString());
-                return true;
-            }
-        });
+            mPrefInstantUploadPath.setOnPreferenceClickListener(new OnPreferenceClickListener() {
+                    @Override
+                    public boolean onPreferenceClick(Preference preference) {
+                        if (!mUploadPath.endsWith(OCFile.PATH_SEPARATOR)) {
+                            mUploadPath += OCFile.PATH_SEPARATOR;
+                        }
+                        Intent intent = new Intent(Preferences.this, UploadPathActivity.class);
+                        intent.putExtra(UploadPathActivity.KEY_INSTANT_UPLOAD_PATH, mUploadPath);
+                        startActivityForResult(intent, ACTION_SELECT_UPLOAD_PATH);
+                        return true;
+                    }
+                });
+        }
+
+        mPrefInstantVideoUploadPath =  findPreference("instant_video_upload_path");
+        if (mPrefInstantVideoUploadPath != null){
+
+            mPrefInstantVideoUploadPath.setOnPreferenceClickListener(new OnPreferenceClickListener() {
+                    @Override
+                    public boolean onPreferenceClick(Preference preference) {
+                        if (!mUploadVideoPath.endsWith(OCFile.PATH_SEPARATOR)) {
+                            mUploadVideoPath += OCFile.PATH_SEPARATOR;
+                        }
+                        Intent intent = new Intent(Preferences.this, UploadPathActivity.class);
+                        intent.putExtra(UploadPathActivity.KEY_INSTANT_UPLOAD_PATH, mUploadVideoPath);
+                        startActivityForResult(intent, ACTION_SELECT_UPLOAD_VIDEO_PATH);
+                        return true;
+                    }
+                });
+        }
             
         /* About App */
        pAboutApp = (Preference) findPreference("about_app");
        if (pAboutApp != null) { 
                pAboutApp.setTitle(String.format(getString(R.string.about_android), getString(R.string.app_name)));
-               PackageInfo pkg;
-               try {
-                   pkg = getPackageManager().getPackageInfo(getPackageName(), 0);
-                   pAboutApp.setSummary(String.format(getString(R.string.about_version), pkg.versionName));
-               } catch (NameNotFoundException e) {
-                   Log_OC.e(TAG, "Error while showing about dialog", e);
-               }
+               pAboutApp.setSummary(String.format(getString(R.string.about_version), appVersion));
        }
+
+       loadInstantUploadPath();
+       loadInstantUploadVideoPath();
+
     }
 
     @Override
     protected void onPause() {
-        saveInstantUploadPathOnPreferences();
         super.onPause();
     }
 
@@ -371,6 +408,33 @@ public class Preferences extends SherlockPreferenceActivity implements AccountMa
     @Override
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
         super.onActivityResult(requestCode, resultCode, data);
+
+        if (requestCode == ACTION_SELECT_UPLOAD_PATH && resultCode == RESULT_OK){
+
+            OCFile folderToUpload = (OCFile) data.getParcelableExtra(UploadPathActivity.EXTRA_FOLDER);
+
+            mUploadPath = folderToUpload.getRemotePath();
+
+            mUploadPath = DisplayUtils.getPathWithoutLastSlash(mUploadPath);
+
+            // Show the path on summary preference
+            mPrefInstantUploadPath.setSummary(mUploadPath);
+
+            saveInstantUploadPathOnPreferences();
+
+        } else if (requestCode == ACTION_SELECT_UPLOAD_VIDEO_PATH && resultCode == RESULT_OK){
+
+            OCFile folderToUploadVideo = (OCFile) data.getParcelableExtra(UploadPathActivity.EXTRA_FOLDER);
+
+            mUploadVideoPath = folderToUploadVideo.getRemotePath();
+
+            mUploadVideoPath = DisplayUtils.getPathWithoutLastSlash(mUploadVideoPath);
+
+            // Show the video path on summary preference
+            mPrefInstantVideoUploadPath.setSummary(mUploadVideoPath);
+
+            saveInstantUploadVideoPathOnPreferences();
+        }
     }
 
     @Override
@@ -404,7 +468,7 @@ public class Preferences extends SherlockPreferenceActivity implements AccountMa
         else {
 
             for (Account a : accounts) {
-                LongClickableCheckBoxPreference accountPreference = new LongClickableCheckBoxPreference(this);
+                RadioButtonPreference accountPreference = new RadioButtonPreference(this);
                 accountPreference.setKey(a.name);
                 // Handle internationalized domain names
                 accountPreference.setTitle(DisplayUtils.convertIdn(a.name, false));
@@ -424,7 +488,7 @@ public class Preferences extends SherlockPreferenceActivity implements AccountMa
                         AccountManager am = (AccountManager) getSystemService(ACCOUNT_SERVICE);
                         Account accounts[] = am.getAccountsByType(MainApp.getAccountType());
                         for (Account a : accounts) {
-                            CheckBoxPreference p = (CheckBoxPreference) findPreference(a.name);
+                            RadioButtonPreference p = (RadioButtonPreference) findPreference(a.name);
                             if (key.equals(a.name)) {
                                 boolean accountChanged = !p.isChecked(); 
                                 p.setChecked(true);
@@ -483,37 +547,12 @@ public class Preferences extends SherlockPreferenceActivity implements AccountMa
     }
 
     /**
-     * Update the upload path checking that it is a correct path
-     * @param uploadPath: path write by user
-     * @return String: uploadPath
-     */
-    private String updateInstantUploadPath(String uploadPath) {
-        String slashString = "/";
-
-        // If slashes are duplicated, replace them for only one slash
-        uploadPath = uploadPath.replaceAll("/+", slashString);
-
-        // Remove last slash from path
-        if (uploadPath.length() > 0 && uploadPath.charAt(uploadPath.length()-1) == slashString.charAt(0)) {
-            uploadPath = uploadPath.substring(0, uploadPath.length()-1);
-        }
-
-        if (uploadPath.isEmpty()) { // Set default instant upload path
-            uploadPath = getString(R.string.instant_upload_path);
-        }else {
-            if (!uploadPath.startsWith(slashString)) { // Add initial slash on path if necessary
-                uploadPath = slashString.concat(uploadPath);
-            }
-        }
-        return uploadPath;
-    }
-
-    /**
      * Load upload path set on preferences
      */
     private void loadInstantUploadPath() {
         SharedPreferences appPrefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
         mUploadPath = appPrefs.getString("instant_upload_path", getString(R.string.instant_upload_path));
+        mPrefInstantUploadPath.setSummary(mUploadPath);
     }
 
     /**
@@ -525,4 +564,23 @@ public class Preferences extends SherlockPreferenceActivity implements AccountMa
         editor.putString("instant_upload_path", mUploadPath);
         editor.commit();
     }
+
+    /**
+     * Load upload video path set on preferences
+     */
+    private void loadInstantUploadVideoPath() {
+        SharedPreferences appPrefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
+        mUploadVideoPath = appPrefs.getString("instant_video_upload_path", getString(R.string.instant_upload_path));
+        mPrefInstantVideoUploadPath.setSummary(mUploadVideoPath);
+    }
+
+    /**
+     * Save the "Instant Video Upload Path" on preferences
+     */
+    private void saveInstantUploadVideoPathOnPreferences() {
+        SharedPreferences appPrefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());        
+        SharedPreferences.Editor editor = appPrefs.edit();
+        editor.putString("instant_video_upload_path", mUploadVideoPath);
+        editor.commit();
+    }
 }
diff --git a/src/com/owncloud/android/ui/activity/UploadPathActivity.java b/src/com/owncloud/android/ui/activity/UploadPathActivity.java
new file mode 100644 (file)
index 0000000..aa3b8aa
--- /dev/null
@@ -0,0 +1,77 @@
+/* ownCloud Android client application
+ *   Copyright (C) 2012-2014 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.ui.activity;
+
+import android.accounts.Account;
+
+import android.os.Bundle;
+import android.view.View.OnClickListener;
+
+import com.owncloud.android.datamodel.OCFile;
+import com.owncloud.android.ui.fragment.FileFragment;
+import com.owncloud.android.ui.fragment.OCFileListFragment;
+
+public class UploadPathActivity extends FolderPickerActivity implements FileFragment.ContainerActivity,
+        OnClickListener, OnEnforceableRefreshListener {
+
+    public static final String KEY_INSTANT_UPLOAD_PATH = "INSTANT_UPLOAD_PATH";
+
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        String instantUploadPath = getIntent().getStringExtra(KEY_INSTANT_UPLOAD_PATH);
+
+        // The caller activity (Preferences) is not a FileActivity, so it has no OCFile, only a path.
+        OCFile folder = new OCFile(instantUploadPath);
+
+        setFile(folder);
+    }
+
+    /**
+     * Called when the ownCloud {@link Account} associated to the Activity was
+     * just updated.
+     */
+    @Override
+    protected void onAccountSet(boolean stateWasRecovered) {
+        super.onAccountSet(stateWasRecovered);
+        if (getAccount() != null) {
+
+            updateFileFromDB();
+
+            OCFile folder = getFile();
+            if (folder == null || !folder.isFolder()) {
+                // fall back to root folder
+                setFile(getStorageManager().getFileByPath(OCFile.ROOT_PATH));
+                folder = getFile();
+            }
+
+            onBrowsedDownTo(folder);
+
+            if (!stateWasRecovered) {
+                OCFileListFragment listOfFolders = getListOfFilesFragment();
+                listOfFolders.listDirectory(folder);
+
+                startSyncFolderOperation(folder, false);
+            }
+
+            updateNavigationElementsInActionBar();
+        }
+    }
+}
index 1035632..1df1211 100644 (file)
@@ -47,7 +47,6 @@ import com.owncloud.android.datamodel.ThumbnailsCacheManager;
 import com.owncloud.android.datamodel.ThumbnailsCacheManager.AsyncDrawable;\r
 import com.owncloud.android.files.services.FileDownloader.FileDownloaderBinder;\r
 import com.owncloud.android.files.services.FileUploader.FileUploaderBinder;\r
-import com.owncloud.android.lib.common.utils.Log_OC;\r
 import com.owncloud.android.ui.activity.ComponentsGetter;\r
 import com.owncloud.android.utils.DisplayUtils;\r
 import com.owncloud.android.utils.FileStorageUtils;\r
index a78584a..2453404 100644 (file)
@@ -26,15 +26,15 @@ package com.owncloud.android.ui.dialog;
  */
 import java.util.Vector;
 
+import android.app.Dialog;
+import android.os.Bundle;
+
 import com.owncloud.android.R;
 import com.owncloud.android.datamodel.FileDataStorageManager;
 import com.owncloud.android.datamodel.OCFile;
 import com.owncloud.android.ui.activity.ComponentsGetter;
 import com.owncloud.android.ui.dialog.ConfirmationDialogFragment.ConfirmationDialogFragmentListener;
 
-import android.app.Dialog;
-import android.os.Bundle;
-
 public class RemoveFileDialogFragment extends ConfirmationDialogFragment 
 implements ConfirmationDialogFragmentListener {
 
@@ -105,8 +105,7 @@ implements ConfirmationDialogFragmentListener {
     @Override
     public void onNeutral(String callerTag) {
         ComponentsGetter cg = (ComponentsGetter)getSherlockActivity();
-        cg.getFileOperationsHelper()
-            .removeFile(mTargetFile, true);
+        cg.getFileOperationsHelper().removeFile(mTargetFile, true);
         
         FileDataStorageManager storageManager = cg.getStorageManager();
         
@@ -141,4 +140,4 @@ implements ConfirmationDialogFragmentListener {
         // nothing to do here
     }
     
-}
+}
\ No newline at end of file
index 530e920..d285f1e 100644 (file)
@@ -22,12 +22,6 @@ package com.owncloud.android.ui.dialog;
  * 
  *  Triggers the rename operation. 
  */
-import com.actionbarsherlock.app.SherlockDialogFragment;
-import com.owncloud.android.R;
-import com.owncloud.android.datamodel.OCFile;
-import com.owncloud.android.lib.resources.files.FileUtils;
-import com.owncloud.android.ui.activity.ComponentsGetter;
-
 import android.app.AlertDialog;
 import android.app.Dialog;
 import android.content.DialogInterface;
@@ -39,6 +33,12 @@ 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.datamodel.OCFile;
+import com.owncloud.android.lib.resources.files.FileUtils;
+import com.owncloud.android.ui.activity.ComponentsGetter;
+
 
 /**
  *  Dialog to input a new name for a file or folder to rename.  
@@ -125,12 +125,8 @@ extends SherlockDialogFragment implements DialogInterface.OnClickListener {
                         Toast.LENGTH_LONG).show();
                 return;
             }
-            
-            ((ComponentsGetter)getSherlockActivity()).
-                getFileOperationsHelper().renameFile(mTargetFile, newFileName);
-            
-            
+
+            ((ComponentsGetter)getSherlockActivity()).getFileOperationsHelper().renameFile(mTargetFile, newFileName);
         }
     }
-    
 }
index 5d3f7ac..1b7a1dd 100644 (file)
@@ -38,14 +38,14 @@ import com.owncloud.android.ui.ExtendedListView;
 import com.owncloud.android.ui.activity.OnEnforceableRefreshListener;
 
 /**
- *  TODO extending SherlockListFragment instead of SherlockFragment 
+ * TODO extending SherlockListFragment instead of SherlockFragment
  */
 public class ExtendedListFragment extends SherlockFragment 
 implements OnItemClickListener, OnEnforceableRefreshListener {
-    
+
     private static final String TAG = ExtendedListFragment.class.getSimpleName();
 
-    private static final String KEY_SAVED_LIST_POSITION = "SAVED_LIST_POSITION"; 
+    private static final String KEY_SAVED_LIST_POSITION = "SAVED_LIST_POSITION";
     private static final String KEY_INDEXES = "INDEXES";
     private static final String KEY_FIRST_POSITIONS= "FIRST_POSITIONS";
     private static final String KEY_TOPS = "TOPS";
@@ -53,7 +53,7 @@ implements OnItemClickListener, OnEnforceableRefreshListener {
     private static final String KEY_EMPTY_LIST_MESSAGE = "EMPTY_LIST_MESSAGE";
 
     protected ExtendedListView mList;
-    
+
     private SwipeRefreshLayout mRefreshLayout;
     private SwipeRefreshLayout mRefreshEmptyLayout;
     private TextView mEmptyListMessage;
@@ -72,18 +72,22 @@ implements OnItemClickListener, OnEnforceableRefreshListener {
         mList.invalidate();
     }
 
+    public void setFooterView(View footer) {
+        mList.addFooterView(footer, null, false);
+        mList.invalidate();
+    }
+
     public ListView getListView() {
         return mList;
     }
-    
-    
+
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
         Log_OC.e(TAG, "onCreateView");
-        
+
         View v = inflater.inflate(R.layout.list_fragment, null);
         mEmptyListMessage = (TextView) v.findViewById(R.id.empty_list_view);
-        mList = (ExtendedListView)(v.findViewById(R.id.list_root));
+        mList = (ExtendedListView) (v.findViewById(R.id.list_root));
         mList.setOnItemClickListener(this);
 
         mList.setDivider(getResources().getDrawable(R.drawable.uploader_list_separator));
@@ -93,7 +97,7 @@ implements OnItemClickListener, OnEnforceableRefreshListener {
             int referencePosition = savedInstanceState.getInt(KEY_SAVED_LIST_POSITION);
             setReferencePosition(referencePosition);
         }
-        
+
         // Pull down refresh
         mRefreshLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipe_refresh_files);
         mRefreshEmptyLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipe_refresh_files_emptyView);
@@ -106,7 +110,6 @@ implements OnItemClickListener, OnEnforceableRefreshListener {
         return v;
     }
 
-    
     /**
      * {@inheritDoc}
      */
@@ -142,14 +145,16 @@ implements OnItemClickListener, OnEnforceableRefreshListener {
         savedInstanceState.putString(KEY_EMPTY_LIST_MESSAGE, getEmptyViewText());
     }
 
-    
     /**
-     * Calculates the position of the item that will be used as a reference to reposition the visible items in the list when
-     * the device is turned to other position. 
+     * Calculates the position of the item that will be used as a reference to
+     * reposition the visible items in the list when the device is turned to
+     * other position.
      * 
-     * THe current policy is take as a reference the visible item in the center of the screen.  
+     * THe current policy is take as a reference the visible item in the center
+     * of the screen.
      * 
-     * @return      The position in the list of the visible item in the center of the screen.
+     * @return The position in the list of the visible item in the center of the
+     *         screen.
      */
     protected int getReferencePosition() {
         if (mList != null) {
@@ -159,11 +164,11 @@ implements OnItemClickListener, OnEnforceableRefreshListener {
         }
     }
 
-    
     /**
      * Sets the visible part of the list from the reference position.
      * 
-     * @param   position    Reference position previously returned by {@link LocalFileListFragment#getReferencePosition()}
+     * @param position Reference position previously returned by
+     *            {@link LocalFileListFragment#getReferencePosition()}
      */
     protected void setReferencePosition(int position) {
         if (mList != null) {
@@ -227,7 +232,7 @@ implements OnItemClickListener, OnEnforceableRefreshListener {
     
     @Override
     public void onItemClick (AdapterView<?> parent, View view, int position, long id) {
-        // to be @overriden  
+        // to be @overriden
     }
 
     @Override
@@ -240,7 +245,6 @@ implements OnItemClickListener, OnEnforceableRefreshListener {
             mOnRefreshListener.onRefresh();
         }
     }
-    
     public void setOnRefreshListener(OnEnforceableRefreshListener listener) {
         mOnRefreshListener = listener;
     }
index 981e30b..73ae5dc 100644 (file)
 package com.owncloud.android.ui.fragment;
 
 import java.io.File;
+import java.util.Vector;
 
 import android.app.Activity;
+import android.content.Context;
 import android.content.Intent;
 import android.os.Bundle;
 import android.support.v4.widget.SwipeRefreshLayout;
@@ -29,6 +31,8 @@ import android.view.MenuItem;
 import android.view.View;
 import android.widget.AdapterView;
 import android.widget.AdapterView.AdapterContextMenuInfo;
+import android.widget.TextView;
+import android.view.LayoutInflater;
 
 import com.owncloud.android.R;
 import com.owncloud.android.datamodel.FileDataStorageManager;
@@ -36,7 +40,7 @@ import com.owncloud.android.datamodel.OCFile;
 import com.owncloud.android.files.FileMenuFilter;
 import com.owncloud.android.lib.common.utils.Log_OC;
 import com.owncloud.android.ui.activity.FileDisplayActivity;
-import com.owncloud.android.ui.activity.MoveActivity;
+import com.owncloud.android.ui.activity.FolderPickerActivity;
 import com.owncloud.android.ui.activity.OnEnforceableRefreshListener;
 import com.owncloud.android.ui.adapter.FileListListAdapter;
 import com.owncloud.android.ui.dialog.ConfirmationDialogFragment;
@@ -70,6 +74,7 @@ public class OCFileListFragment extends ExtendedListFragment {
    
     private OCFile mFile = null;
     private FileListListAdapter mAdapter;
+    private View mFooterView;
     
     private OCFile mTargetFile;
 
@@ -112,24 +117,28 @@ public class OCFileListFragment extends ExtendedListFragment {
     public void onActivityCreated(Bundle savedInstanceState) {
         super.onActivityCreated(savedInstanceState);
         Log_OC.e(TAG, "onActivityCreated() start");
-        
+
         if (savedInstanceState != null) {
             mFile = savedInstanceState.getParcelable(KEY_FILE);
         }
-        
+
+        mFooterView = ((LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(
+                        R.layout.list_footer, null, false);
+        setFooterView(mFooterView);
+
         Bundle args = getArguments();
         boolean justFolders = (args == null) ? false : args.getBoolean(ARG_JUST_FOLDERS, false); 
         mAdapter = new FileListListAdapter(
                 justFolders,
                 getSherlockActivity(), 
                 mContainerActivity
-        );
+                );
         setListAdapter(mAdapter);
-        
+
         registerForContextMenu(getListView());
         getListView().setOnCreateContextMenuListener(this);
-  }
-    
+    }
+
     /**
      * Saves the current listed folder.
      */
@@ -320,10 +329,10 @@ public class OCFileListFragment extends ExtendedListFragment {
                 return true;
             }
             case R.id.action_move: {
-                Intent action = new Intent(getActivity(), MoveActivity.class);
+                Intent action = new Intent(getActivity(), FolderPickerActivity.class);
 
                 // Pass mTargetFile that contains info of selected file/folder
-                action.putExtra(MoveActivity.EXTRA_TARGET_FILE, mTargetFile);
+                action.putExtra(FolderPickerActivity.EXTRA_FILE, mTargetFile);
                 getActivity().startActivityForResult(action, FileDisplayActivity.ACTION_MOVE_FILES);
                 return true;
             }
@@ -382,9 +391,51 @@ public class OCFileListFragment extends ExtendedListFragment {
                 mList.setSelectionFromTop(0, 0);
             }
             mFile = directory;
+            
+            // Update Footer
+            TextView footerText = (TextView) mFooterView.findViewById(R.id.footerText);
+            Log_OC.d("footer", String.valueOf(System.currentTimeMillis()));
+            footerText.setText(generateFooterText(directory));
+            Log_OC.d("footer", String.valueOf(System.currentTimeMillis()));
         }
     }
     
+    private String generateFooterText(OCFile directory) {
+        Integer files = 0;
+        Integer folders = 0;
+
+        FileDataStorageManager storageManager = mContainerActivity.getStorageManager();
+        Vector<OCFile> mFiles = storageManager.getFolderContent(mFile);
+
+        for (OCFile ocFile : mFiles) {
+            if (ocFile.isFolder()) {
+                folders++;
+            } else {
+                files++;
+            }
+        }
+
+        String output = "";
+       
+        if (files > 0){
+            if (files == 1) {
+                output = output + files.toString() + " " + getResources().getString(R.string.file_list_file);
+            } else {
+                output = output + files.toString() + " " + getResources().getString(R.string.file_list_files);
+            }
+        }
+        if (folders > 0 && files > 0){
+            output = output + ", ";
+        }
+        if (folders == 1) {
+            output = output + folders.toString() + " " + getResources().getString(R.string.file_list_folder);
+        } else if (folders > 1) {
+            output = output + folders.toString() + " " + getResources().getString(R.string.file_list_folders);
+        }
+        
+        return output;
+    }
+    
     public void sortByName(boolean descending) {
         mAdapter.setSortOrder(FileListListAdapter.SORT_NAME, descending);
     }
index c06f341..1cee30e 100644 (file)
@@ -79,7 +79,9 @@ ViewPager.OnPageChangeListener, OnRemoteOperationListener {
     private static final int INITIAL_HIDE_DELAY = 0; // immediate hide
 
     private ExtendedViewPager mViewPager;
-    private PreviewImagePagerAdapter mPreviewImagePagerAdapter;    
+    private PreviewImagePagerAdapter mPreviewImagePagerAdapter;
+    private int mSavedPosition = 0;
+    private boolean mHasSavedPosition = false;
     
     private boolean mRequestWaitingForBinder;
     
@@ -146,7 +148,7 @@ ViewPager.OnPageChangeListener, OnRemoteOperationListener {
         }
         mPreviewImagePagerAdapter = new PreviewImagePagerAdapter(getSupportFragmentManager(), parentFolder, getAccount(), getStorageManager());
         mViewPager = (ExtendedViewPager) findViewById(R.id.fragmentPager);
-        int position = mPreviewImagePagerAdapter.getFilePosition(getFile());
+        int position = mHasSavedPosition ? mSavedPosition : mPreviewImagePagerAdapter.getFilePosition(getFile());
         position = (position >= 0) ? position : 0;
         mViewPager.setAdapter(mPreviewImagePagerAdapter); 
         mViewPager.setOnPageChangeListener(this);
@@ -378,6 +380,8 @@ ViewPager.OnPageChangeListener, OnRemoteOperationListener {
      */
     @Override
     public void onPageSelected(int position) {
+        mSavedPosition = position;
+        mHasSavedPosition = true;
         if (mDownloaderBinder == null) {
             mRequestWaitingForBinder = true;
             
index 4dd5c43..0995793 100644 (file)
@@ -53,6 +53,7 @@ import com.owncloud.android.lib.common.utils.Log_OC;
 import com.owncloud.android.ui.dialog.ConfirmationDialogFragment;
 import com.owncloud.android.ui.dialog.RemoveFileDialogFragment;
 import com.owncloud.android.ui.fragment.FileFragment;
+import com.owncloud.android.utils.BitmapUtils;
 import com.owncloud.android.utils.TouchImageViewCustom;
 
 
@@ -82,6 +83,8 @@ public class PreviewImageFragment extends FileFragment {
     private static final String TAG = PreviewImageFragment.class.getSimpleName();
 
     private boolean mIgnoreFirstSavedState;
+    
+    private LoadBitmapTask mLoadBitmapTask = null;
 
     
     /**
@@ -190,12 +193,22 @@ public class PreviewImageFragment extends FileFragment {
     public void onStart() {
         super.onStart();
         if (getFile() != null) {
-           BitmapLoader bl = new BitmapLoader(mImageView, mMessageView, mProgressWheel);
-           bl.execute(new String[]{getFile().getStoragePath()});
+           mLoadBitmapTask = new LoadBitmapTask(mImageView, mMessageView, mProgressWheel);
+           mLoadBitmapTask.execute(new String[]{getFile().getStoragePath()});
         }
     }
     
     
+    @Override
+    public void onStop() {
+        super.onStop();
+        if (mLoadBitmapTask != null) {
+            mLoadBitmapTask.cancel(true);
+            mLoadBitmapTask = null;
+        }
+        
+    }
+    
     /**
      * {@inheritDoc}
      */
@@ -329,7 +342,7 @@ public class PreviewImageFragment extends FileFragment {
     }
     
     
-    private class BitmapLoader extends AsyncTask<String, Void, Bitmap> {
+    private class LoadBitmapTask extends AsyncTask<String, Void, Bitmap> {
 
         /**
          * Weak reference to the target {@link ImageView} where the bitmap will be loaded into.
@@ -365,7 +378,7 @@ public class PreviewImageFragment extends FileFragment {
          * 
          * @param imageView     Target {@link ImageView} where the bitmap will be loaded into.
          */
-        public BitmapLoader(ImageViewCustom imageView, TextView messageView, ProgressBar progressWheel) {
+        public LoadBitmapTask(ImageViewCustom imageView, TextView messageView, ProgressBar progressWheel) {
             mImageViewRef = new WeakReference<ImageViewCustom>(imageView);
             mMessageViewRef = new WeakReference<TextView>(messageView);
             mProgressWheelRef = new WeakReference<ProgressBar>(progressWheel);
@@ -379,43 +392,65 @@ public class PreviewImageFragment extends FileFragment {
             String storagePath = params[0];
             try {
 
+                if (isCancelled()) return result;
+                
                 File picture = new File(storagePath);
 
                 if (picture != null) {
-                    //Decode file into a bitmap in real size for being able to make zoom on the image
+                    // Decode file into a bitmap in real size for being able to make zoom on 
+                    // the image
                     result = BitmapFactory.decodeStream(new FlushedInputStream
                             (new BufferedInputStream(new FileInputStream(picture))));
                 }
 
+                if (isCancelled()) return result;
+                
                 if (result == null) {
                     mErrorMessageId = R.string.preview_image_error_unknown_format;
                     Log_OC.e(TAG, "File could not be loaded as a bitmap: " + storagePath);
+                } else {
+                    // Rotate image, obeying exif tag.
+                    result = BitmapUtils.rotateImage(result, storagePath);
                 }
                 
             } catch (OutOfMemoryError e) {
                 Log_OC.e(TAG, "Out of memory occured for file " + storagePath, e);
 
-                // If out of memory error when loading image, try to load it scaled
+                if (isCancelled()) return result;
+                
+                // If out of memory error when loading or rotating image, try to load it scaled
                 result = loadScaledImage(storagePath);
 
                 if (result == null) {
                     mErrorMessageId = R.string.preview_image_error_unknown_format;
                     Log_OC.e(TAG, "File could not be loaded as a bitmap: " + storagePath);
+                } else {
+                    // Rotate scaled image, obeying exif tag
+                    result = BitmapUtils.rotateImage(result, storagePath);
                 }
                     
             } catch (NoSuchFieldError e) {
                 mErrorMessageId = R.string.common_error_unknown;
-                Log_OC.e(TAG, "Error from access to unexisting field despite protection; file " + storagePath, e);
+                Log_OC.e(TAG, "Error from access to unexisting field despite protection; file " 
+                                + storagePath, e);
                     
             } catch (Throwable t) {
                 mErrorMessageId = R.string.common_error_unknown;
                 Log_OC.e(TAG, "Unexpected error loading " + getFile().getStoragePath(), t);
                 
             }
+            
             return result;
         }
         
         @Override
+        protected void onCancelled(Bitmap result) {
+            if (result != null) {
+                result.recycle();
+            }
+        }
+
+        @Override
         protected void onPostExecute(Bitmap result) {
             hideProgressWheel();
             if (result != null) {
@@ -424,7 +459,7 @@ public class PreviewImageFragment extends FileFragment {
                 showErrorMessage();
             }
         }
-
+        
         @SuppressLint("InlinedApi")
         private void showLoadedImage(Bitmap result) {
             if (mImageViewRef != null) {
index 687b5a4..7036727 100644 (file)
  */
 package com.owncloud.android.utils;
 
+import com.owncloud.android.lib.common.utils.Log_OC;
+
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
+import android.graphics.Matrix;
 import android.graphics.BitmapFactory.Options;
+import android.media.ExifInterface;
 
 /**
  * Utility class with methods for decoding Bitmaps.
@@ -96,4 +100,75 @@ public class BitmapUtils {
         return inSampleSize;
     }
     
+    /**
+     * Rotate bitmap according to EXIF orientation. 
+     * Cf. http://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto/ 
+     * @param bitmap Bitmap to be rotated
+     * @param storagePath Path to source file of bitmap. Needed for EXIF information. 
+     * @return correctly EXIF-rotated bitmap
+     */
+    public static Bitmap rotateImage(Bitmap bitmap, String storagePath){
+        Bitmap resultBitmap = bitmap;
+
+        try
+        {
+            ExifInterface exifInterface = new ExifInterface(storagePath);
+            int orientation = exifInterface.getAttributeInt(ExifInterface.TAG_ORIENTATION, 1);
+
+            Matrix matrix = new Matrix();
+
+            // 1: nothing to do
+            
+            // 2
+            if (orientation == ExifInterface.ORIENTATION_FLIP_HORIZONTAL)
+            {
+                matrix.postScale(-1.0f, 1.0f);
+            }
+            // 3
+            else if (orientation == ExifInterface.ORIENTATION_ROTATE_180)
+            {
+                matrix.postRotate(180);
+            }
+            // 4
+            else if (orientation == ExifInterface.ORIENTATION_FLIP_VERTICAL)
+            {
+                matrix.postScale(1.0f, -1.0f);
+            }
+            // 5
+            else if (orientation == ExifInterface.ORIENTATION_TRANSPOSE)
+            {
+                matrix.postRotate(-90);
+                matrix.postScale(1.0f, -1.0f);
+            }
+            // 6
+            else if (orientation == ExifInterface.ORIENTATION_ROTATE_90)
+            {
+                matrix.postRotate(90);
+            }
+            // 7
+            else if (orientation == ExifInterface.ORIENTATION_TRANSVERSE)
+            {
+                matrix.postRotate(90);
+                matrix.postScale(1.0f, -1.0f);
+            }
+            // 8
+            else if (orientation == ExifInterface.ORIENTATION_ROTATE_270)
+            {
+                matrix.postRotate(270);
+            } 
+            
+            // Rotate the bitmap
+            resultBitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
+            if (resultBitmap != bitmap) {
+                bitmap.recycle();
+            }
+        }
+        catch (Exception exception)
+        {
+            Log_OC.e("BitmapUtil", "Could not rotate the image: " + storagePath);
+        }
+        return resultBitmap;
+    }
+    
+    
 }
index da81f53..a1afb89 100644 (file)
@@ -29,11 +29,11 @@ import java.util.Set;
 import android.annotation.TargetApi;\r
 import android.content.Context;\r
 import android.os.Build;\r
-import android.text.format.DateFormat;\r
 import android.text.format.DateUtils;\r
 \r
 import com.owncloud.android.MainApp;\r
 import com.owncloud.android.R;\r
+import com.owncloud.android.datamodel.OCFile;\r
 \r
 /**\r
  * A helper class for some string operations.\r
@@ -320,4 +320,17 @@ public class DisplayUtils {
         \r
         return dateString.toString().split(",")[0];
     }\r
+\r
+    /**\r
+     * Update the passed path removing the last "/" if it is not the root folder\r
+     * @param path\r
+     */\r
+    public static String getPathWithoutLastSlash(String path) {\r
+\r
+        // Remove last slash from path\r
+        if (path.length() > 1 && path.charAt(path.length()-1) == OCFile.PATH_SEPARATOR.charAt(0)) {\r
+            path = path.substring(0, path.length()-1);\r
+        }\r
+        return path;\r
+    }\r
 }\r
index 3895821..892a1ca 100644 (file)
@@ -81,6 +81,20 @@ public class FileStorageUtils {
         String value = uploadPath + OCFile.PATH_SEPARATOR +  (fileName == null ? "" : fileName);
         return value;
     }
+
+    /**
+     * Gets the composed path when video is or must be stored
+     * @param context
+     * @param fileName: video file name
+     * @return String: video file path composed
+     */
+    public static String getInstantVideoUploadFilePath(Context context, String fileName) {
+        SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context);
+        String uploadVideoPathdef = context.getString(R.string.instant_upload_path);
+        String uploadVideoPath = pref.getString("instant_video_upload_path", uploadVideoPathdef);
+        String value = uploadVideoPath + OCFile.PATH_SEPARATOR +  (fileName == null ? "" : fileName);
+        return value;
+    }
     
     public static String getParentPath(String remotePath) {
         String parentPath = new File(remotePath).getParent();
index 187bdf4..d0b8535 100644 (file)
Binary files a/third_party/android-support-library/android-support-v4.jar and b/third_party/android-support-library/android-support-v4.jar differ