Merge tag 'oc-android-1.9' into sdcard-save sdcard-save sd-android-1.9
authorPeter Henn <Peter.Henn@web.de>
Tue, 8 Dec 2015 00:13:26 +0000 (00:13 +0000)
committerPeter Henn <Peter.Henn@web.de>
Tue, 8 Dec 2015 00:13:26 +0000 (00:13 +0000)
Version 1.9: Release with expanded sharing
Resolved conflicts in:
src/com/owncloud/android/utils/FileStorageUtils.java

200 files changed:
.travis.yml
AndroidManifest.xml
CHANGELOG.md
build.gradle
oc_jb_workaround/AndroidManifest.xml
owncloud-android-library
res/drawable-hdpi/shared_via_link.png [new file with mode: 0644]
res/drawable-hdpi/shared_via_users.png [new file with mode: 0644]
res/drawable-hdpi/shared_with_me.png [deleted file]
res/drawable-hdpi/sharedlink.png [deleted file]
res/drawable-mdpi/shared_via_link.png [new file with mode: 0644]
res/drawable-mdpi/shared_via_users.png [new file with mode: 0644]
res/drawable-mdpi/shared_with_me.png [deleted file]
res/drawable-mdpi/sharedlink.png [deleted file]
res/drawable-xhdpi/shared_via_link.png [new file with mode: 0644]
res/drawable-xhdpi/shared_via_users.png [new file with mode: 0644]
res/drawable-xhdpi/shared_with_me.png [deleted file]
res/drawable-xhdpi/sharedlink.png [deleted file]
res/drawable/conflict_file_indicator.png [new file with mode: 0644]
res/drawable/synchronizing_file_indicator.png [new file with mode: 0644]
res/layout-land/account_setup.xml
res/layout/account_setup.xml
res/layout/grid_image.xml
res/layout/grid_item.xml
res/layout/list_item.xml
res/layout/search_users_groups_layout.xml [new file with mode: 0644]
res/layout/share_activity.xml [new file with mode: 0644]
res/layout/share_file_layout.xml [new file with mode: 0644]
res/layout/share_user_item.xml [new file with mode: 0644]
res/layout/ssl_untrusted_cert_layout.xml
res/menu/file_actions_menu.xml
res/values-af-rZA/strings.xml
res/values-ar/strings.xml
res/values-az/strings.xml
res/values-bg-rBG/strings.xml
res/values-bn-rBD/strings.xml
res/values-bn-rIN/strings.xml
res/values-br/strings.xml [new file with mode: 0644]
res/values-bs/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-rAT/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-fr/strings.xml
res/values-gl/strings.xml
res/values-he/strings.xml
res/values-hi/strings.xml
res/values-hr/strings.xml
res/values-hu-rHU/strings.xml
res/values-hy/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-ku-rIQ/strings.xml
res/values-lb/strings.xml
res/values-lo/strings.xml
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-ug/strings.xml
res/values-uk/strings.xml
res/values-ur-rPK/strings.xml
res/values-v21/styles.xml
res/values-vi/strings.xml
res/values-zh-rCN/strings.xml
res/values-zh-rHK/strings.xml
res/values-zh-rTW/strings.xml
res/values/colors.xml
res/values/strings.xml
res/values/styles.xml
res/xml/users_and_groups_searchable.xml [new file with mode: 0644]
src/com/owncloud/android/authentication/AccountUtils.java
src/com/owncloud/android/authentication/AuthenticatorActivity.java
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/db/ProviderMeta.java
src/com/owncloud/android/files/FileMenuFilter.java
src/com/owncloud/android/files/FileOperationsHelper.java
src/com/owncloud/android/files/services/FileDownloader.java
src/com/owncloud/android/files/services/FileUploader.java
src/com/owncloud/android/files/services/IndexedForest.java
src/com/owncloud/android/notifications/NotificationBuilderWithProgressBar.java
src/com/owncloud/android/operations/CreateShareOperation.java [deleted file]
src/com/owncloud/android/operations/CreateShareViaLinkOperation.java [new file with mode: 0644]
src/com/owncloud/android/operations/CreateShareWithShareeOperation.java [new file with mode: 0644]
src/com/owncloud/android/operations/DownloadFileOperation.java
src/com/owncloud/android/operations/GetCapabilitiesOperarion.java [new file with mode: 0644]
src/com/owncloud/android/operations/GetSharesForFileOperation.java
src/com/owncloud/android/operations/GetSharesOperation.java [deleted file]
src/com/owncloud/android/operations/RefreshFolderOperation.java
src/com/owncloud/android/operations/SynchronizeFileOperation.java
src/com/owncloud/android/operations/SynchronizeFolderOperation.java
src/com/owncloud/android/operations/UnshareLinkOperation.java [deleted file]
src/com/owncloud/android/operations/UnshareOperation.java [new file with mode: 0644]
src/com/owncloud/android/operations/UpdateShareViaLinkOperation.java [new file with mode: 0644]
src/com/owncloud/android/operations/UploadFileOperation.java
src/com/owncloud/android/operations/common/SyncOperation.java
src/com/owncloud/android/providers/FileContentProvider.java
src/com/owncloud/android/providers/UsersAndGroupsSearchProvider.java [new file with mode: 0644]
src/com/owncloud/android/services/OperationsService.java
src/com/owncloud/android/services/SyncFolderHandler.java
src/com/owncloud/android/syncadapter/FileSyncAdapter.java
src/com/owncloud/android/ui/activity/FileActivity.java
src/com/owncloud/android/ui/activity/FileDisplayActivity.java
src/com/owncloud/android/ui/activity/FolderPickerActivity.java
src/com/owncloud/android/ui/activity/ShareActivity.java [new file with mode: 0644]
src/com/owncloud/android/ui/activity/Uploader.java
src/com/owncloud/android/ui/adapter/FileListListAdapter.java
src/com/owncloud/android/ui/adapter/LocalFileListAdapter.java
src/com/owncloud/android/ui/adapter/ShareUserListAdapter.java [new file with mode: 0644]
src/com/owncloud/android/ui/adapter/X509CertificateViewAdapter.java
src/com/owncloud/android/ui/dialog/ExpirationDatePickerDialogFragment.java [new file with mode: 0644]
src/com/owncloud/android/ui/dialog/RemoveFileDialogFragment.java
src/com/owncloud/android/ui/dialog/ShareLinkToDialog.java
src/com/owncloud/android/ui/dialog/SharePasswordDialogFragment.java
src/com/owncloud/android/ui/fragment/FileDetailFragment.java
src/com/owncloud/android/ui/fragment/FileFragment.java
src/com/owncloud/android/ui/fragment/OCFileListFragment.java
src/com/owncloud/android/ui/fragment/SearchShareesFragment.java [new file with mode: 0644]
src/com/owncloud/android/ui/fragment/ShareFileFragment.java [new file with mode: 0644]
src/com/owncloud/android/ui/preview/PreviewImageActivity.java
src/com/owncloud/android/ui/preview/PreviewImageFragment.java
src/com/owncloud/android/ui/preview/PreviewMediaFragment.java
src/com/owncloud/android/ui/preview/PreviewTextFragment.java
src/com/owncloud/android/ui/preview/PreviewVideoActivity.java
src/com/owncloud/android/utils/DisplayUtils.java
src/com/owncloud/android/utils/ErrorMessageAdapter.java
src/com/owncloud/android/utils/FileStorageUtils.java
src/com/owncloud/android/utils/GetShareWithUsersAsyncTask.java [new file with mode: 0644]
src/com/owncloud/android/utils/MimetypeIconUtil.java
src/third_parties/daveKoeller/AlphanumComparator.java
user_manual/android_app.rst
user_manual/conf.py
user_manual/images/android-1.png [new file with mode: 0644]
user_manual/images/android-10.png [new file with mode: 0644]
user_manual/images/android-11.png [new file with mode: 0644]
user_manual/images/android-12.png [new file with mode: 0644]
user_manual/images/android-2.png [new file with mode: 0644]
user_manual/images/android-3.png [new file with mode: 0644]
user_manual/images/android-4.png [new file with mode: 0644]
user_manual/images/android-5.png [new file with mode: 0644]
user_manual/images/android-6.png [new file with mode: 0644]
user_manual/images/android-7.png [new file with mode: 0644]
user_manual/images/android-8.png [new file with mode: 0644]
user_manual/images/android-9.png [new file with mode: 0644]
user_manual/images/android-downloads.png [deleted file]
user_manual/images/android-file-list.png [deleted file]
user_manual/images/android-file-options.png [deleted file]
user_manual/images/android-file.png [deleted file]
user_manual/images/android-files-page.png [deleted file]
user_manual/images/android-first-screen.jpg [deleted file]
user_manual/images/android-help.png [deleted file]
user_manual/images/android-new-account.png [deleted file]
user_manual/images/android-settings.png [deleted file]
user_manual/images/android-ssl-cert.png [deleted file]
user_manual/images/android-upload.png [deleted file]

index 5f42267..0db9b1e 100644 (file)
@@ -1,3 +1,4 @@
+sudo: false
 language: android
 android:
   components:
index acb5f1d..d8eb6c8 100644 (file)
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="utf-8"?><!--
+<?xml version="1.0" encoding="utf-8"?>
+<!--
   ownCloud Android client application
 
   Copyright (C) 2012  Bartek Przybylski
 
   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- -->
-<manifest package="com.owncloud.android"
-    android:versionCode="10800000"
-    android:versionName="1.8.0" xmlns:android="http://schemas.android.com/apk/res/android">
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.owncloud.android"
+    android:versionCode="10900000"
+    android:versionName="1.9.0" >
+
+    <uses-sdk
+        android:minSdkVersion="14"
+        android:targetSdkVersion="22" />
 
     <uses-permission android:name="android.permission.GET_ACCOUNTS" />
     <uses-permission android:name="android.permission.USE_CREDENTIALS" />
     <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
     <uses-permission android:name="android.permission.BROADCAST_STICKY" />
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
-    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
-    <uses-permission android:name="android.permission.WAKE_LOCK"/>
-    
-    <uses-sdk
-        android:minSdkVersion="14"
-        android:targetSdkVersion="22" />
-
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
+    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
+    <uses-permission android:name="android.permission.WAKE_LOCK" />
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
 
     <application
         android:name=".MainApp"
         android:icon="@drawable/icon"
         android:label="@string/app_name"
-        android:theme="@style/Theme.ownCloud">
+        android:theme="@style/Theme.ownCloud" >
         <activity
             android:name=".ui.activity.FileDisplayActivity"
-            android:label="@string/app_name">
+            android:label="@string/app_name" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
+
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
-        <activity android:name=".ui.activity.UploadFilesActivity"></activity>
-        <activity android:name=".ui.activity.Uploader">
+        <activity android:name=".ui.activity.UploadFilesActivity" />
+        <activity android:name=".ui.activity.Uploader" >
             <intent-filter>
-                <action android:name="android.intent.action.SEND"></action>
+                <action android:name="android.intent.action.SEND" />
 
-                <category android:name="android.intent.category.DEFAULT"></category>
+                <category android:name="android.intent.category.DEFAULT" />
 
-                <data android:mimeType="*/*"></data>
+                <data android:mimeType="*/*" />
             </intent-filter>
             <intent-filter>
-                <action android:name="android.intent.action.SEND_MULTIPLE"></action>
+                <action android:name="android.intent.action.SEND_MULTIPLE" />
 
-                <category android:name="android.intent.category.DEFAULT"></category>
-
-                <data android:mimeType="*/*"></data>
+                <category android:name="android.intent.category.DEFAULT" />
 
+                <data android:mimeType="*/*" />
             </intent-filter>
         </activity>
         <activity
             android:name=".ui.activity.Preferences"
             android:theme="@style/Theme.ownCloud" >
         </activity>
-        <activity      
+        <activity
             android:name=".ui.preview.PreviewImageActivity"
-            android:theme="@style/Theme.ownCloud.Overlay"
-            />
-                       
-        <activity      
+            android:theme="@style/Theme.ownCloud.Overlay" />
+        <activity
             android:name=".ui.preview.PreviewVideoActivity"
             android:label="@string/app_name"
-            android:theme="@style/Theme.ownCloud.Fullscreen"></activity>
+            android:theme="@style/Theme.ownCloud.Fullscreen" />
 
         <service
             android:name=".authentication.AccountAuthenticatorService"
-            android:exported="true">
-            <intent-filter android:priority="100">
+            android:exported="true" >
+            <intent-filter android:priority="100" >
                 <action android:name="android.accounts.AccountAuthenticator" />
             </intent-filter>
 
@@ -98,7 +97,7 @@
         </service>
         <service
             android:name=".syncadapter.FileSyncService"
-            android:exported="true">
+            android:exported="true" >
             <intent-filter>
                 <action android:name="android.content.SyncAdapter" />
             </intent-filter>
             android:enabled="true"
             android:exported="false"
             android:label="@string/sync_string_files"
-            android:syncable="true"></provider>
+            android:syncable="true" />
+
+        <provider
+            android:name=".providers.UsersAndGroupsSearchProvider"
+            android:authorities="com.owncloud.android.providers.UsersAndGroupsSearchProvider"
+            android:enabled="true"
+            android:exported="false"
+            android:label="@string/search_users_and_groups_hint" />
 
         <activity
             android:name=".authentication.AuthenticatorActivity"
             android:exported="true"
-            android:theme="@style/Theme.ownCloud.noActionBar"
-            android:launchMode="singleTask">
+            android:launchMode="singleTask"
+            android:theme="@style/Theme.ownCloud.noActionBar" >
             <intent-filter>
                 <action android:name="android.intent.action.VIEW" />
 
             </intent-filter>
             <intent-filter>
                 <action android:name="com.owncloud.android.workaround.accounts.CREATE" />
+
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
         </activity>
         <service android:name=".media.MediaService" />
 
         <activity android:name=".ui.activity.PassCodeActivity" />
-        <activity android:name=".ui.activity.ConflictsResolveActivity"/>
-        <activity android:name=".ui.activity.GenericExplanationActivity"/>
-        <activity android:name=".ui.activity.ErrorsWhileCopyingHandlerActivity"/>
-        
-        <activity android:name=".ui.activity.LogHistoryActivity"/>
-        
-        <receiver android:name=".files.InstantUploadBroadcastReceiver">
+        <activity android:name=".ui.activity.ConflictsResolveActivity" />
+        <activity android:name=".ui.activity.GenericExplanationActivity" />
+        <activity android:name=".ui.activity.ErrorsWhileCopyingHandlerActivity" />
+        <activity android:name=".ui.activity.LogHistoryActivity" />
+
+        <receiver android:name=".files.InstantUploadBroadcastReceiver" >
             <intent-filter>
+
                 <!-- unofficially supported by many Android phones but not by HTC devices: -->
                 <action android:name="com.android.camera.NEW_PICTURE" />
                 <!-- officially supported since Android 4.0 (SDK 14, works even for HTC devices): -->
                 <action android:name="android.hardware.action.NEW_PICTURE" />
+
                 <data android:mimeType="image/*" />
             </intent-filter>
             <intent-filter>
                 <action android:name="android.hardware.action.NEW_VIDEO" />
+
                 <data android:mimeType="video/*" />
             </intent-filter>
             <intent-filter>
                 <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
             </intent-filter>
         </receiver>
-        <receiver android:name=".files.BootupBroadcastReceiver">
+        <receiver android:name=".files.BootupBroadcastReceiver" >
             <intent-filter>
                 <action android:name="android.intent.action.BOOT_COMPLETED" />
             </intent-filter>
         </receiver>
-        <service android:name=".services.observer.FileObserverService"/>
-        
-               <activity
-                       android:name=".ui.activity.CopyToClipboardActivity"
-                       android:label="@string/copy_link"
-                       android:icon="@drawable/copy_link"/>
 
-        <activity
-                       android:name=".ui.activity.FolderPickerActivity"
-                       android:label="@string/app_name"/>
+        <service android:name=".services.observer.FileObserverService" />
 
         <activity
-                       android:name=".ui.activity.UploadPathActivity"
-                       android:label="@string/app_name"/>
-        
+            android:name=".ui.activity.CopyToClipboardActivity"
+            android:icon="@drawable/copy_link"
+            android:label="@string/copy_link" />
+        <activity
+            android:name=".ui.activity.FolderPickerActivity"
+            android:label="@string/app_name" />
+        <activity
+            android:name=".ui.activity.UploadPathActivity"
+            android:label="@string/app_name" />
+        <activity
+            android:name=".ui.activity.ShareActivity"
+            android:label="@string/share_dialog_title"
+            android:theme="@style/Theme.ownCloud.Dialog"
+            android:launchMode="singleTop"
+            android:windowSoftInputMode="adjustResize" >
+            <intent-filter>
+                <action android:name="android.intent.action.SEARCH" />
+            </intent-filter>
+            <meta-data android:name="android.app.searchable"
+                       android:resource="@xml/users_and_groups_searchable"/>
+        </activity>
     </application>
 
 </manifest>
index 6934155..099a445 100644 (file)
@@ -1,3 +1,21 @@
+## 1.8.0 (September 2015)
+- New MATERIAL DESIGN theme
+- Updated FILE TYPE ICONS
+- Preview TXT files within the app
+- COPY files & folders
+- Preview the full file/folder name from the long press menu
+- Set a file as FAVORITE (kept-in-sync) from the CONTEXT MENU
+- Updated CONFLICT RESOLUTION dialog (wording)
+- Updated background for images with TRANSPARENCY in GALLERY
+- Hidden files will not enforce list view instead of GRID VIEW (folders from Picasa & others)
+- Security:
+  + Updated network stack with security fixes (Jackrabbit 2.10.1)
+- Bugs fixed:
+  + Fixed crash when ETag is lost
+  + Passcode creation not restarted on device rotation
+  + Recovered share icon shown on folders 'shared with me'
+  + User name added to subject when sending a share link through e-mail (fixed on SAMLed apps)
+
 ## 1.7.2 (July 2015)
 - New navigation drawer
 - Improved Passcode
index a0db018..d96997a 100644 (file)
@@ -20,8 +20,8 @@ repositories {
 
 dependencies {
     compile name: 'touch-image-view'
-    compile 'com.android.support:support-v4:22.2.1'
     compile project(':owncloud-android-library')
+    compile 'com.android.support:support-v4:22.2.1'
     compile 'com.jakewharton:disklrucache:2.0.2'
     compile 'com.android.support:appcompat-v7:22.2.1'
 }
@@ -58,7 +58,7 @@ android {
             abortOnError false
         }
     }
-    
+
     productFlavors {
     }
 
@@ -68,3 +68,7 @@ android {
 }
 
 
+
+
+
+
index 766cb0a..52face9 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="0100025"
-    android:versionName="1.0.25" >
+    android:versionCode="0100026"
+    android:versionName="1.0.26" >
 
     <uses-sdk
         android:minSdkVersion="16"
index 5985ba9..77c0d78 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 5985ba9a9fd9a208b2a09ee7809949874e0c3a97
+Subproject commit 77c0d785c97233e327cfdeba8365b5ab116934c3
diff --git a/res/drawable-hdpi/shared_via_link.png b/res/drawable-hdpi/shared_via_link.png
new file mode 100644 (file)
index 0000000..f4279f3
Binary files /dev/null and b/res/drawable-hdpi/shared_via_link.png differ
diff --git a/res/drawable-hdpi/shared_via_users.png b/res/drawable-hdpi/shared_via_users.png
new file mode 100644 (file)
index 0000000..9ec18ce
Binary files /dev/null and b/res/drawable-hdpi/shared_via_users.png differ
diff --git a/res/drawable-hdpi/shared_with_me.png b/res/drawable-hdpi/shared_with_me.png
deleted file mode 100644 (file)
index 9ec18ce..0000000
Binary files a/res/drawable-hdpi/shared_with_me.png and /dev/null differ
diff --git a/res/drawable-hdpi/sharedlink.png b/res/drawable-hdpi/sharedlink.png
deleted file mode 100644 (file)
index f4279f3..0000000
Binary files a/res/drawable-hdpi/sharedlink.png and /dev/null differ
diff --git a/res/drawable-mdpi/shared_via_link.png b/res/drawable-mdpi/shared_via_link.png
new file mode 100644 (file)
index 0000000..1d27294
Binary files /dev/null and b/res/drawable-mdpi/shared_via_link.png differ
diff --git a/res/drawable-mdpi/shared_via_users.png b/res/drawable-mdpi/shared_via_users.png
new file mode 100644 (file)
index 0000000..0b17c76
Binary files /dev/null and b/res/drawable-mdpi/shared_via_users.png differ
diff --git a/res/drawable-mdpi/shared_with_me.png b/res/drawable-mdpi/shared_with_me.png
deleted file mode 100644 (file)
index 0b17c76..0000000
Binary files a/res/drawable-mdpi/shared_with_me.png and /dev/null differ
diff --git a/res/drawable-mdpi/sharedlink.png b/res/drawable-mdpi/sharedlink.png
deleted file mode 100644 (file)
index 1d27294..0000000
Binary files a/res/drawable-mdpi/sharedlink.png and /dev/null differ
diff --git a/res/drawable-xhdpi/shared_via_link.png b/res/drawable-xhdpi/shared_via_link.png
new file mode 100644 (file)
index 0000000..11f8afa
Binary files /dev/null and b/res/drawable-xhdpi/shared_via_link.png differ
diff --git a/res/drawable-xhdpi/shared_via_users.png b/res/drawable-xhdpi/shared_via_users.png
new file mode 100644 (file)
index 0000000..ef7779c
Binary files /dev/null and b/res/drawable-xhdpi/shared_via_users.png differ
diff --git a/res/drawable-xhdpi/shared_with_me.png b/res/drawable-xhdpi/shared_with_me.png
deleted file mode 100644 (file)
index ef7779c..0000000
Binary files a/res/drawable-xhdpi/shared_with_me.png and /dev/null differ
diff --git a/res/drawable-xhdpi/sharedlink.png b/res/drawable-xhdpi/sharedlink.png
deleted file mode 100644 (file)
index 11f8afa..0000000
Binary files a/res/drawable-xhdpi/sharedlink.png and /dev/null differ
diff --git a/res/drawable/conflict_file_indicator.png b/res/drawable/conflict_file_indicator.png
new file mode 100644 (file)
index 0000000..fd580ca
Binary files /dev/null and b/res/drawable/conflict_file_indicator.png differ
diff --git a/res/drawable/synchronizing_file_indicator.png b/res/drawable/synchronizing_file_indicator.png
new file mode 100644 (file)
index 0000000..947cba7
Binary files /dev/null and b/res/drawable/synchronizing_file_indicator.png differ
index 477011d..347568e 100644 (file)
@@ -95,7 +95,6 @@
                                                android:inputType="textUri"\r
                                                android:drawablePadding="5dp"\r
                                                android:paddingRight="55dp"\r
-                                               android:textColor="@color/primary"\r
                                                android:textColorHint="@color/login_text_hint_color"\r
                                                android:contentDescription="@string/auth_host_address"\r
                                                >\r
                                        android:text="@string/oauth2_url_endpoint_auth"\r
                                        android:singleLine="true"\r
                                        android:inputType="textUri"\r
-                                       android:textColor="@color/primary"\r
                                        android:textColorHint="@color/login_text_hint_color"\r
                                        android:visibility="gone">\r
                                </EditText>            \r
                                        android:text="@string/oauth2_url_endpoint_access"\r
                                        android:singleLine="true"\r
                                        android:inputType="textUri"\r
-                                       android:textColor="@color/primary"\r
                                        android:textColorHint="@color/login_text_hint_color"\r
                                        android:visibility="gone">\r
                                        <requestFocus />\r
                                        android:ems="10"\r
                                        android:hint="@string/auth_username"\r
                                        android:inputType="textNoSuggestions"\r
-                                       android:textColor="@color/primary"\r
                                        android:textColorHint="@color/login_text_hint_color"\r
                                        android:contentDescription="@string/auth_username"\r
                                        />\r
                                        android:hint="@string/auth_password"\r
                                        android:inputType="textPassword"\r
                                        android:drawablePadding="5dp"\r
-                                       android:textColor="@color/primary"\r
                                        android:textColorHint="@color/login_text_hint_color"\r
                                        />\r
                        \r
index 876d834..3a8655f 100644 (file)
@@ -82,7 +82,6 @@
                                android:inputType="textUri"\r
                                android:drawablePadding="5dp"\r
                                android:paddingRight="55dp"\r
-                android:textColor="@color/primary"\r
                 android:textColorHint="@color/login_text_hint_color"\r
                                android:contentDescription="@string/auth_host_address"\r
                 >\r
             android:layout_height="wrap_content"\r
             android:ems="10"\r
                        android:enabled="false"\r
-            android:textColor="@color/primary"\r
             android:textColorHint="@color/login_text_hint_color"\r
             android:text="@string/oauth2_url_endpoint_auth"\r
             android:singleLine="true"\r
             android:text="@string/oauth2_url_endpoint_access"\r
             android:singleLine="true"\r
             android:inputType="textUri"\r
-            android:textColor="@color/primary"\r
             android:textColorHint="@color/login_text_hint_color"\r
             android:visibility="gone"/>\r
 \r
             android:ems="10"\r
             android:hint="@string/auth_username"\r
             android:inputType="textNoSuggestions"\r
-            android:textColor="@color/primary"\r
             android:textColorHint="@color/login_text_hint_color"\r
             android:contentDescription="@string/auth_username"\r
             />\r
                    android:ems="10"\r
                    android:hint="@string/auth_password"\r
                    android:inputType="textPassword"\r
-            android:textColor="@color/primary"\r
             android:textColorHint="@color/login_text_hint_color"\r
                    android:contentDescription="@string/auth_password"\r
             />\r
index 383c615..15a9baf 100644 (file)
             android:scaleType="centerCrop"\r
             android:src="@drawable/ic_menu_archive"/>\r
 \r
-        <LinearLayout\r
+        <ImageView\r
+            android:id="@+id/sharedIcon"\r
             android:layout_width="wrap_content"\r
             android:layout_height="wrap_content"\r
             android:layout_gravity="top|right"\r
-            android:orientation="vertical"\r
-            android:layout_margin="4dp">\r
-\r
-            <ImageView\r
-                android:id="@+id/sharedIcon"\r
-                android:layout_width="wrap_content"\r
-                android:layout_height="wrap_content"\r
-                android:layout_gravity="center"\r
-                android:layout_marginBottom="4dp"\r
-                android:src="@drawable/sharedlink" />\r
-\r
-            <ImageView\r
-                android:id="@+id/sharedWithMeIcon"\r
-                android:layout_width="wrap_content"\r
-                android:layout_height="wrap_content"\r
-                android:layout_gravity="center"\r
-                android:layout_marginTop="4dp"\r
-                android:src="@drawable/shared_with_me"\r
-                android:visibility="invisible" />\r
-        </LinearLayout>\r
+            android:layout_margin="4dp"\r
+            android:src="@drawable/shared_via_link" />\r
 \r
         <ImageView\r
             android:id="@+id/localFileIndicator"\r
index d0f3d0f..6bec560 100644 (file)
             android:layout_marginRight="10dp"\r
             android:src="@drawable/ic_menu_archive" />\r
 \r
-        <LinearLayout\r
+        <ImageView\r
+            android:id="@+id/sharedIcon"\r
             android:layout_width="wrap_content"\r
             android:layout_height="wrap_content"\r
+            android:layout_margin="4dp"\r
             android:layout_gravity="top|right"\r
-            android:orientation="vertical"\r
-            android:layout_margin="2dp">\r
-\r
-            <ImageView\r
-                android:id="@+id/sharedIcon"\r
-                android:layout_width="wrap_content"\r
-                android:layout_height="wrap_content"\r
-                android:layout_gravity="center"\r
-                android:layout_marginBottom="2dp"\r
-                android:src="@drawable/sharedlink" />\r
-\r
-            <ImageView\r
-                android:id="@+id/sharedWithMeIcon"\r
-                android:layout_width="wrap_content"\r
-                android:layout_height="wrap_content"\r
-                android:layout_gravity="center"\r
-                android:layout_marginTop="2dp"\r
-                android:src="@drawable/shared_with_me"\r
-                android:visibility="invisible" />\r
-        </LinearLayout>\r
+            android:src="@drawable/shared_via_link" />\r
 \r
         <ImageView\r
             android:id="@+id/localFileIndicator"\r
index be0b94e..076ed7b 100644 (file)
@@ -78,7 +78,7 @@
                 android:ellipsize="middle"\r
                 android:singleLine="true"\r
                 android:text="TextView"\r
-                android:textColor="#303030"\r
+                android:textColor="@color/textColor"\r
                 android:textSize="16dip" />\r
 \r
             <LinearLayout\r
 \r
         </LinearLayout>\r
 \r
-        <LinearLayout\r
-            android:layout_width="25dp"\r
-            android:layout_height="match_parent"\r
-            android:gravity="center_vertical"\r
-            android:orientation="vertical">\r
-\r
-            <ImageView\r
-                android:id="@+id/sharedIcon"\r
-                android:layout_width="wrap_content"\r
-                android:layout_height="wrap_content"\r
-                android:layout_gravity="center"\r
-                android:layout_marginLeft="4dp"\r
-                android:layout_marginBottom="4dp"\r
-                android:layout_marginRight="4dp"\r
-                android:src="@drawable/sharedlink" />\r
-\r
-            <ImageView\r
-                android:id="@+id/sharedWithMeIcon"\r
-                android:layout_width="wrap_content"\r
-                android:layout_height="wrap_content"\r
-                android:layout_gravity="center"\r
-                android:layout_marginLeft="4dp"\r
-                android:layout_marginRight="4dp"\r
-                android:layout_marginTop="4dp"\r
-                android:src="@drawable/shared_with_me"\r
-                android:visibility="invisible" />\r
-\r
-        </LinearLayout>\r
+        <ImageView\r
+            android:id="@+id/sharedIcon"\r
+            android:layout_width="wrap_content"\r
+            android:layout_height="wrap_content"\r
+            android:layout_gravity="center"\r
+            android:layout_marginTop="4dp"\r
+            android:layout_marginLeft="4dp"\r
+            android:layout_marginBottom="4dp"\r
+            android:layout_marginRight="4dp"\r
+            android:src="@drawable/shared_via_link" />\r
 \r
         <ImageView\r
             android:id="@+id/custom_checkbox"\r
diff --git a/res/layout/search_users_groups_layout.xml b/res/layout/search_users_groups_layout.xml
new file mode 100644 (file)
index 0000000..8eed34a
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ownCloud Android client application
+  Copyright (C) 2015 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/>.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical"
+    android:id="@+id/search_layout"
+    android:minWidth="200dp">
+
+    <SearchView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:id="@+id/searchView"
+        android:hint="@string/share_search"/>
+
+    <ListView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:id="@+id/searchUsersListView"
+        android:scrollbars="vertical"/>
+
+</LinearLayout>
diff --git a/res/layout/share_activity.xml b/res/layout/share_activity.xml
new file mode 100644 (file)
index 0000000..772b941
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ownCloud Android client application
+  Copyright (C) 2015 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/>.
+-->
+
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context="com.owncloud.android.ui.activity.ShareActivity">
+
+    <FrameLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:id="@+id/share_fragment_container">
+    </FrameLayout>
+
+</LinearLayout>
diff --git a/res/layout/share_file_layout.xml b/res/layout/share_file_layout.xml
new file mode 100644 (file)
index 0000000..27a6133
--- /dev/null
@@ -0,0 +1,241 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ownCloud Android client application
+  Copyright (C) 2015 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/>.
+-->
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+            xmlns:tools="http://schemas.android.com/tools"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            tools:context="com.owncloud.android.ui.fragment.ShareFileFragment"
+            android:id="@+id/shareScroll">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/background_material_light"
+        android:orientation="vertical"
+        >
+
+        <RelativeLayout
+            android:id="@+id/shareHeaderContainer"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="6dp"
+            android:layout_marginBottom="6dp"
+            android:background="@color/background_color">
+
+            <ImageView
+                android:id="@+id/shareFileIcon"
+                android:layout_width="@dimen/file_icon_size"
+                android:layout_height="@dimen/file_icon_size"
+                android:src="@drawable/file"
+                android:layout_marginLeft="12dp"
+                android:layout_marginRight="12dp"
+                android:layout_gravity="center_vertical"
+                android:layout_marginTop="12dp"
+                android:layout_marginBottom="12dp"/>
+
+            <TextView
+                android:id="@+id/shareFileName"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/placeholder_filename"
+                android:textSize="16sp"
+                android:layout_gravity="center_vertical"
+                android:layout_marginLeft="4dp"
+                android:layout_marginStart="4dp"
+                android:layout_marginRight="8dp"
+                android:layout_marginEnd="8dp"
+                android:layout_toRightOf="@+id/shareFileIcon"
+                android:layout_toEndOf="@+id/shareFileIcon"
+                android:singleLine="true"
+                android:ellipsize="middle"
+                android:layout_marginTop="12dp"/>
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textSize="12sp"
+                android:text="@string/placeholder_filesize"
+                android:id="@+id/shareFileSize"
+                android:layout_below="@+id/shareFileName"
+                android:layout_toRightOf="@+id/shareFileIcon"
+                android:layout_toEndOf="@+id/shareFileIcon"
+                android:layout_marginTop="4dp"
+                android:layout_marginLeft="4dp"
+                android:layout_marginStart="4dp"
+                android:layout_marginBottom="12dp"
+                android:layout_gravity="center_vertical"/>
+
+        </RelativeLayout>
+
+        <TextView
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:textSize="16sp"
+            android:text="@string/share_with_user_section_title"
+            android:id="@+id/shareWithUsersSectionTitle"
+            android:layout_gravity="start"
+            android:padding="8dp"
+            android:background="@color/actionbar_start_color"
+            android:textColor="@color/white"/>
+
+        <ListView
+            android:layout_width="match_parent"
+            android:layout_height="0dip"
+            android:id="@+id/shareUsersList"
+            android:visibility="gone"
+            android:scrollbars="vertical"
+            android:layout_weight="1"/>
+
+        <TextView
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:id="@+id/shareNoUsers"
+            android:text="@string/share_no_users"
+            android:textSize="12sp"
+            android:padding="12dp" />
+
+        <android.support.v7.widget.AppCompatButton
+            android:id="@+id/addUserButton"
+            style="@style/ownCloud.Button"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_horizontal"
+            android:text="@string/share_add_user_or_group"
+            android:contentDescription="shareAddUserButton"/>
+
+        <Switch
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:textSize="16sp"
+            android:text="@string/share_via_link_section_title"
+            android:id="@+id/shareViaLinkSectionSwitch"
+            android:layout_gravity="start"
+            android:padding="8dp"
+            android:background="@color/actionbar_start_color"
+            android:textColor="@color/white"/>
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:id="@+id/shareViaLinkExpirationSection"
+            >
+
+            <Switch
+                android:id="@+id/shareViaLinkExpirationSwitch"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentRight="true"
+                android:layout_alignParentEnd="true"
+                android:layout_centerInParent="true"
+                android:padding="8dp"
+                />
+
+            <TextView
+                android:id="@+id/shareViaLinkExpirationLabel"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentLeft="true"
+                android:layout_alignParentStart="true"
+                android:layout_toLeftOf="@id/shareViaLinkExpirationSwitch"
+                android:layout_toStartOf="@id/shareViaLinkExpirationSwitch"
+                android:paddingTop="8dp"
+                android:paddingLeft="8dp"
+                android:paddingRight="8dp"
+                android:text="@string/share_via_link_expiration_date_label"
+                android:textSize="16sp"
+                />
+
+            <TextView
+                android:id="@+id/shareViaLinkExpirationValue"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentLeft="true"
+                android:layout_alignParentStart="true"
+                android:layout_toLeftOf="@id/shareViaLinkExpirationSwitch"
+                android:layout_toStartOf="@id/shareViaLinkExpirationSwitch"
+                android:layout_below="@id/shareViaLinkExpirationLabel"
+                android:paddingLeft="8dp"
+                android:paddingRight="8dp"
+                android:paddingBottom="8dp"
+                android:textSize="12sp"
+                />
+
+        </RelativeLayout>
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:id="@+id/shareViaLinkPasswordSection"
+            >
+
+            <Switch
+                android:id="@+id/shareViaLinkPasswordSwitch"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentRight="true"
+                android:layout_alignParentEnd="true"
+                android:layout_centerInParent="true"
+                android:padding="8dp"
+            />
+
+            <TextView
+                android:id="@+id/shareViaLinkPasswordLabel"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentLeft="true"
+                android:layout_alignParentStart="true"
+                android:layout_toLeftOf="@id/shareViaLinkPasswordSwitch"
+                android:layout_toStartOf="@id/shareViaLinkPasswordSwitch"
+                android:paddingTop="8dp"
+                android:paddingLeft="8dp"
+                android:paddingRight="8dp"
+                android:text="@string/share_via_link_password_label"
+                android:textSize="16sp"
+                />
+
+            <TextView
+                android:id="@+id/shareViaLinkPasswordValue"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentLeft="true"
+                android:layout_alignParentStart="true"
+                android:layout_toLeftOf="@id/shareViaLinkPasswordSwitch"
+                android:layout_toStartOf="@id/shareViaLinkPasswordSwitch"
+                android:layout_below="@id/shareViaLinkPasswordLabel"
+                android:paddingLeft="8dp"
+                android:paddingRight="8dp"
+                android:paddingBottom="8dp"
+                android:text="@string/share_via_link_password_title"
+                android:textSize="12sp"
+                android:visibility="invisible"
+                />
+
+        </RelativeLayout>
+
+        <android.support.v7.widget.AppCompatButton
+            android:id="@+id/shareViaLinkGetLinkButton"
+            style="@style/ownCloud.Button"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_horizontal"
+            android:text="@string/share_get_public_link_button"
+            android:contentDescription="shareGetLinkButton"/>
+
+    </LinearLayout>
+
+</ScrollView>
\ No newline at end of file
diff --git a/res/layout/share_user_item.xml b/res/layout/share_user_item.xml
new file mode 100644 (file)
index 0000000..2bb8c28
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ownCloud Android client application
+  Copyright (C) 2015 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/>.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:weightSum="1"
+        android:longClickable="true">
+        <TextView
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_weight="0.9"
+            android:textSize="16dip"
+            android:text="@string/username"
+            android:id="@+id/userOrGroupName"
+            android:layout_margin="12dp"
+            android:textColor="@color/textColor"
+            android:singleLine="true"
+            android:ellipsize="middle"/>
+
+        <ImageView
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:layout_weight="0.1"
+            android:id="@+id/unshareButton"
+            android:src="@drawable/ic_cancel"
+            android:layout_marginRight="8dp"
+            android:layout_marginLeft="4dp"
+            android:layout_gravity="center_horizontal"/>
+    </LinearLayout>
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:background="@color/list_divider_background"></View>
+</LinearLayout>
index 8ef7b13..2f359f8 100644 (file)
                                    android:text=""
                                    android:textAppearance="?android:attr/textAppearanceSmall"
                                />
-                               
 
                                <TextView
                                android:id="@+id/label_signature"
                                android:text=""
                                android:textAppearance="?android:attr/textAppearanceSmall"
                        />
-                                                                                                                                                                                               
-                                                               
+
                                <TextView
-                               android:id="@+id/value_signature"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
+                                       android:id="@+id/label_certificate_fingerprint"
+                                       android:layout_width="wrap_content"
+                                       android:layout_height="wrap_content"
                                        android:paddingBottom="5dp"
-                               android:text=""
-                               android:textAppearance="?android:attr/textAppearanceSmall"
-                       />
+                                       android:text="@string/ssl_validator_label_certificate_fingerprint"
+                                       android:textAppearance="?android:attr/textAppearanceSmall"
+                               />
+
+                               <TextView
+                                       android:id="@+id/value_certificate_fingerprint"
+                                       android:layout_width="wrap_content"
+                                       android:layout_height="wrap_content"
+                                       android:paddingBottom="5dp"
+                                       android:text=""
+                                       android:textAppearance="?android:attr/textAppearanceSmall"
+                               />
                                
                </LinearLayout>
                
index 3e6f4cd..32134d3 100644 (file)
 
     <item
         android:id="@+id/action_share_file"
-        android:title="@string/action_share_file"
-        android:icon="@android:drawable/ic_menu_share"
-        android:orderInCategory="1" />
-    <item
-        android:id="@+id/action_unshare_file"
-        android:title="@string/action_unshare_file"
+        android:title="@string/action_share"
         android:icon="@android:drawable/ic_menu_share"
         android:orderInCategory="1" />
+
     <item
         android:id="@+id/action_open_file_with"
         android:title="@string/actionbar_open_with"
         android:icon="@drawable/ic_action_refresh"
         android:orderInCategory="1" />
     <item
-        android:id="@+id/action_cancel_download"
-        android:title="@string/common_cancel_download"
-        android:icon="@android:drawable/ic_menu_close_clear_cancel"
-        android:orderInCategory="1" />
-    <item
-        android:id="@+id/action_cancel_upload"
-        android:title="@string/common_cancel_upload"
+        android:id="@+id/action_cancel_sync"
+        android:title="@string/common_cancel_sync"
         android:icon="@android:drawable/ic_menu_close_clear_cancel"
         android:orderInCategory="1" />
     <item
index 7706aa7..96f97b8 100644 (file)
@@ -11,6 +11,7 @@
   <string name="auth_username">Gebruikersnaam</string>
   <string name="auth_password">Wagwoord</string>
   <string name="file_list_seconds_ago">sekondes gelede</string>
+  <string name="action_share">Deel</string>
   <string name="common_yes">Ja</string>
   <string name="common_no">Nee</string>
   <string name="common_ok">OK</string>
@@ -19,4 +20,6 @@
   <string name="activity_chooser_send_file_title">Stuur</string>
   <string name="empty"></string>
   <string name="folder_picker_choose_button_text">Kies</string>
+  <string name="share_via_link_expiration_date_label">Stel verval datum</string>
+  <string name="share_via_link_password_label">Beskerm met Wagwoord</string>
 </resources>
index be9f464..843b557 100644 (file)
   <string name="filedetails_created">انشئ في :</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">الغاء مشاركة الرابط</string>
+  <string name="action_share">شارك</string>
   <string name="common_yes">نعم</string>
   <string name="common_no">لا</string>
   <string name="common_ok">تم</string>
-  <string name="common_cancel_download">إلغاء التحميل</string>
-  <string name="common_cancel_upload">إلغاء الرفع</string>
   <string name="common_cancel">إلغاء</string>
   <string name="common_save_exit">حفظ + خروج</string>
   <string name="common_error">خطأ</string>
   <string name="folder_picker_choose_button_text">اختيار</string>
   <string name="prefs_category_security">الأمان</string>
   <string name="auth_host_address">عنوان الخادم</string>
+  <string name="share_dialog_title">مشاركة</string>
+  <string name="share_via_link_section_title">شارك الرابط</string>
+  <string name="share_via_link_expiration_date_label">تعيين تاريخ إنتهاء الصلاحية</string>
+  <string name="share_via_link_password_label">حماية كلمة السر</string>
+  <string name="share_search">البحث</string>
 </resources>
index ed93bc2..9312fc6 100644 (file)
   <string name="filedetails_created">Yaradıldı:</string>
   <string name="filedetails_modified">Dəyişdirildi:</string>
   <string name="filedetails_download">Yüklə</string>
-  <string name="filedetails_sync_file">Faylı yenilə</string>
   <string name="filedetails_renamed_in_upload_msg">Yüklənmə müddətində fayl buna %1$s yeniləndi</string>
-  <string name="action_share_file">Linki yayımla</string>
-  <string name="action_unshare_file">Link yayımlanmasını dayandır</string>
+  <string name="action_share">Paylaş</string>
   <string name="common_yes">Bəli</string>
   <string name="common_no">Xeyir</string>
   <string name="common_ok">Oldu</string>
-  <string name="common_cancel_download">Endirimi dayandır</string>
-  <string name="common_cancel_upload">Yüklənməni dayandır</string>
   <string name="common_cancel">Dayandır</string>
   <string name="common_save_exit">Saxla &amp; Çıx</string>
   <string name="common_error">Səhv</string>
@@ -288,7 +284,10 @@ inzibatçınızla əlaqə saxlayasınız.</string>
   <string name="prefs_category_instant_uploading">Anında yükləmələr</string>
   <string name="prefs_category_security">Təhlükəsizlik</string>
   <string name="prefs_instant_video_upload_path_title">Video ünvanını yüklə</string>
-  <string name="download_folder_failed_content">Qovluğun endirilməsinin %1$s hissəsi tamamlana bilməz </string>
+  <string name="subject_user_shared_with_you">%1$s paylaşdı \"%2$s\" sizinlə</string>
   <string name="auth_refresh_button">Qoşulmanı yenilə</string>
   <string name="auth_host_address">Server ünvanı</string>
+  <string name="share_dialog_title">Paylaşılır</string>
+  <string name="share_via_link_section_title">Linki yayımla</string>
+  <string name="share_search">Axtarış</string>
 </resources>
index 96334e4..d1e1c0c 100644 (file)
   <string name="filedetails_created">Създаден на:</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="list_layout">Списък с изгледи</string>
-  <string name="action_share_file">Връзка за споделяне</string>
-  <string name="action_unshare_file">Премахване връзка за споделяне</string>
+  <string name="action_share">Споделяне</string>
   <string name="common_yes">Да</string>
   <string name="common_no">Не</string>
   <string name="common_ok">ОК</string>
-  <string name="common_cancel_download">Отказване на тегленето</string>
-  <string name="common_cancel_upload">Отказване на качването</string>
   <string name="common_cancel">Отказ</string>
   <string name="common_save_exit">Запазване и изход</string>
   <string name="common_error">Грешка</string>
   <string name="prefs_category_instant_uploading">Незабавно качване</string>
   <string name="prefs_category_security">Сигурност</string>
   <string name="prefs_instant_video_upload_path_title">Качване на видео път</string>
-  <string name="download_folder_failed_content">Свалянето на директорията %1$s не може да бъде завършено</string>
   <string name="shared_subject_header">споделен</string>
   <string name="with_you_subject_header">с теб</string>
-  <string name="subject_token">%1$s споделен \"%2$s\" с теб</string>
+  <string name="subject_user_shared_with_you">%1$s споделен \"%2$s\" с теб</string>
   <string name="auth_refresh_button">Обнови връзката</string>
   <string name="auth_host_address">Адрес на сървъра</string>
   <string name="common_error_out_memory">Няма достатъчно памет</string>
   <string name="file_list__footer__files">%1$d файла</string>
   <string name="file_list__footer__files_and_folder">%1$d файла, 1 папка</string>
   <string name="file_list__footer__files_and_folders">%1$d файла, %2$d папки</string>
+  <string name="share_dialog_title">Споделяне</string>
+  <string name="share_via_link_section_title">Връзка за споделяне</string>
+  <string name="share_via_link_expiration_date_label">Задаване на дата на изтичане</string>
+  <string name="share_via_link_password_label">Защитено с парола</string>
+  <string name="share_search">Търсене</string>
 </resources>
index d5833d3..96d8f39 100644 (file)
   <string name="filedetails_created">তৈরীর নির্ঘন্টঃ</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">লিংক ছিনন করেন</string>
+  <string name="action_share">ভাগাভাগি কর</string>
   <string name="common_yes">হ্যাঁ</string>
   <string name="common_no">না</string>
   <string name="common_ok">তথাস্তু</string>
-  <string name="common_cancel_download">ডাউনলোড বাতিল করেন</string>
-  <string name="common_cancel_upload">আপলোড বাতিল কর</string>
   <string name="common_cancel">বাতিল</string>
   <string name="common_save_exit">সংরক্ষণ কর এবং &amp;প্রস্থান</string>
   <string name="common_error">সমস্যা</string>
   <string name="move_file_not_found">সরাতে ব্যার্থ হলো। ফাইলটি রয়েছে কিনা দেখুন।</string>
   <string name="prefs_category_security">নিরাপত্তা</string>
   <string name="auth_host_address">সার্ভার ঠিকানা</string>
+  <string name="share_dialog_title">ভাগাভাগিরত</string>
+  <string name="share_via_link_section_title">লিংক ভাগাভাগি করেন</string>
+  <string name="share_via_link_expiration_date_label">মেয়াদোত্তীর্ণ হওয়ার তারিখ নির্ধারণ করুন</string>
+  <string name="share_via_link_password_label">কূটশব্দ সুরক্ষিত</string>
+  <string name="share_search">অনুসন্ধান</string>
 </resources>
index d529561..d8eddb6 100644 (file)
   <string name="sync_string_files">ফাইলস</string>
   <string name="uploader_btn_new_folder_text">নতুন ফোল্ডার</string>
   <string name="filedetails_download">ডাউনলোড করুন</string>
+  <string name="action_share">শেয়ার</string>
   <string name="common_cancel">বাতিল করা</string>
   <string name="common_error">ভুল</string>
   <string name="uploader_info_dirname">ফোল্ডারের নাম</string>
   <string name="common_rename">পুনঃনামকরণ</string>
   <string name="common_remove">সরান</string>
   <string name="empty"></string>
+  <string name="share_search">অনুসন্ধান</string>
 </resources>
diff --git a/res/values-br/strings.xml b/res/values-br/strings.xml
new file mode 100644 (file)
index 0000000..37e6152
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<resources>
+  <!--TODO re-enable when server-side folder size calculation is available   
+       <item>Biggest - Smallest</item>-->
+  <!--TODO re-enable when "Accounts" is available in Navigation Drawer-->
+  <!--<string name="drawer_item_accounts">Accounts</string>-->
+  <!--TODO re-enable when "On Device" is available
+    <string name="drawer_item_on_device">On device</string>-->
+  <string name="empty"></string>
+</resources>
index 8c01ccc..569bff0 100644 (file)
   <string name="uploader_btn_upload_text">Učitaj</string>
   <string name="uploader_btn_new_folder_text">Novi direktorij</string>
   <string name="filedetails_download">Preuzmite</string>
-  <string name="action_share_file">Podijelite vezu</string>
+  <string name="action_share">Dijeli</string>
   <string name="common_yes">Da</string>
   <string name="common_no">Ne</string>
   <string name="common_ok">Ok</string>
-  <string name="common_cancel_upload">Prekini učitavanje</string>
   <string name="common_cancel">Odustani</string>
   <string name="common_error">Greška</string>
   <string name="common_error_unknown">Nepoznata greška</string>
@@ -39,4 +38,9 @@
   <string name="folder_picker_choose_button_text">Izaberite</string>
   <string name="prefs_category_security">Sigurnost</string>
   <string name="auth_host_address">Adresa servera</string>
+  <string name="share_dialog_title">Dijeljenje</string>
+  <string name="share_via_link_section_title">Podijelite vezu</string>
+  <string name="share_via_link_expiration_date_label">Postavite datum isteka</string>
+  <string name="share_via_link_password_label">Zaštitita lozinkom</string>
+  <string name="share_search">Potraži</string>
 </resources>
index 718efbf..211f1f7 100644 (file)
   <string name="filedetails_created">Creat:</string>
   <string name="filedetails_modified">Modificat:</string>
   <string name="filedetails_download">Baixa</string>
-  <string name="filedetails_sync_file">Actualitza el fitxer</string>
   <string name="filedetails_renamed_in_upload_msg">L\'arxiu s\'ha canviat de nom a %1$s durant la càrrega</string>
-  <string name="action_share_file">Enllaç de compartició</string>
-  <string name="action_unshare_file">Deixa de compartir l\'enllaç</string>
+  <string name="action_share">Comparteix</string>
   <string name="common_yes">Sí</string>
   <string name="common_no">No</string>
   <string name="common_ok">D\'acord</string>
-  <string name="common_cancel_download">Cancelar la descàrrega</string>
-  <string name="common_cancel_upload">Cancel·la la pujada</string>
   <string name="common_cancel">Cancel·la</string>
   <string name="common_save_exit">Desa &amp; Surt</string>
   <string name="common_error">Error</string>
   <string name="folder_picker_choose_button_text">Escull</string>
   <string name="prefs_category_security">Seguretat</string>
   <string name="auth_host_address">Adreça del servidor</string>
+  <string name="share_dialog_title">Compartir</string>
+  <string name="share_via_link_section_title">Comparteix l\'enllaç</string>
+  <string name="share_via_link_expiration_date_label">Estableix la data de venciment</string>
+  <string name="share_via_link_password_label">Protegir amb contrasenya</string>
+  <string name="share_search">Cerca</string>
 </resources>
index f702afa..44581ff 100644 (file)
@@ -71,6 +71,7 @@
   <string name="file_list_seconds_ago">před pár sekundami</string>
   <string name="file_list_empty">Žádný obsah. Nahrajte něco!</string>
   <string name="file_list_loading">Načítání...</string>
+  <string name="file_list_no_app_for_file_type">Nebyla nalezena aplikace pro tento typ souboru!</string>
   <string name="local_file_list_empty">V tomto adresáři nejsou žádné 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_created">Vytvořen:</string>
   <string name="filedetails_modified">Upraven:</string>
   <string name="filedetails_download">Stáhnout</string>
-  <string name="filedetails_sync_file">Obnovit soubor</string>
+  <string name="filedetails_sync_file">Synchronizovat</string>
   <string name="filedetails_renamed_in_upload_msg">Soubor byl v průběhu odesílání přejmenován na %1$s</string>
   <string name="list_layout">Náhled seznamu</string>
-  <string name="action_share_file">Sdílet odkaz</string>
-  <string name="action_unshare_file">Zrušit sdílení odkazu</string>
+  <string name="action_share">Sdílet</string>
   <string name="common_yes">Ano</string>
   <string name="common_no">Ne</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_download">Zrušit stahování</string>
-  <string name="common_cancel_upload">Zrušit odesílání</string>
+  <string name="common_cancel_sync">Zrušit synchronizaci</string>
   <string name="common_cancel">Zrušit</string>
   <string name="common_save_exit">Uložit a ukončit</string>
   <string name="common_error">Chyba</string>
   <string name="ssl_validator_label_validity_to">Pro:</string>
   <string name="ssl_validator_label_signature">Podpis:</string>
   <string name="ssl_validator_label_signature_algorithm">Alogritmus:</string>
+  <string name="digest_algorithm_not_available">Tento algoritmus není na vašem telefonu dostupný.</string>
+  <string name="ssl_validator_label_certificate_fingerprint">Otisk:</string>
+  <string name="certificate_load_problem">Došlo k problému s načtením certifikátu.</string>
   <string name="ssl_validator_null_cert">Certifikát nemohl být zobrazen.</string>
   <string name="ssl_validator_no_info_about_error">- Žádné informace o této chybě</string>
   <string name="placeholder_sentence">Zástupný text</string>
@@ -269,6 +271,8 @@ správce systému.</string>
   <string name="share_link_file_error">Při pokusu o sdílení tohoto souboru či složky nastala chyba</string>
   <string name="unshare_link_file_no_exist">Nelze ukončit sdílení. Zkontrolujte prosím že soubor existuje</string>
   <string name="unshare_link_file_error">Při pokusu o zrušení sdílení tohoto souboru či složky nastala chyba</string>
+  <string name="update_link_file_no_exist">Nelze aktulizovat. Ověřte že soubor existuje</string>
+  <string name="update_link_file_error">Došlo k chybě při pokusu aktualizovat sdílený odkaz</string>
   <string name="share_link_password_title">Zadejte heslo</string>
   <string name="share_link_empty_password">Musíte zadat heslo</string>
   <string name="activity_chooser_send_file_title">Odeslat</string>
@@ -285,6 +289,7 @@ správce systému.</string>
   <string name="forbidden_permissions_delete">smazat tento soubor</string>
   <string name="share_link_forbidden_permissions">sdílet tento soubor</string>
   <string name="unshare_link_forbidden_permissions">zrušit sdílení tohoto souboru</string>
+  <string name="update_link_forbidden_permissions">aktualizovat tento sdílený odkaz</string>
   <string name="forbidden_permissions_create">vytvořit tento soubor</string>
   <string name="uploader_upload_forbidden_permissions">nahrávat do tohoto adresáře</string>
   <string name="downloader_download_file_not_found">Tento soubor již není dostupný na serveru</string>
@@ -314,11 +319,11 @@ správce systému.</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>
-  <string name="download_folder_failed_content">Stažení adresáře %1$s nemohlo být dokončeno</string>
+  <string name="sync_folder_failed_content">Synchronizaci adresáře %1$s nelze dokončit</string>
   <string name="shared_subject_header">sdílené</string>
   <string name="with_you_subject_header">s vámi</string>
-  <string name="subject_token">%1$s s vámi sdílí \"%2$s\"</string>
-  <string name="saml_subject_token">\"%1$s\" ti byl nasdílen</string>
+  <string name="subject_user_shared_with_you">%1$s s vámi sdílí \"%2$s\"</string>
+  <string name="subject_shared_with_you">\"%1$s\" ti byl nasdílen</string>
   <string name="auth_refresh_button">Obnovit připojení</string>
   <string name="auth_host_address">Adresa serveru</string>
   <string name="common_error_out_memory">Nedostatek paměti</string>
@@ -331,4 +336,18 @@ správce systému.</string>
   <string name="file_list__footer__files">%1$d soubory(ů)</string>
   <string name="file_list__footer__files_and_folder">%1$d soubory(ů), 1 adresář</string>
   <string name="file_list__footer__files_and_folders">%1$d soubory(ů), %2$d adresáře(ů)</string>
+  <string name="share_dialog_title">Sdílení</string>
+  <string name="share_with_user_section_title">Sdílet s uživateli a skupinami</string>
+  <string name="share_no_users">Zatím nebyla s uživateli sdílena žádná data</string>
+  <string name="share_add_user_or_group">Přidat uživatele nebo skupinu</string>
+  <string name="share_via_link_section_title">Sdílet odkaz</string>
+  <string name="share_via_link_expiration_date_label">Nastavit datum vypršení platnosti</string>
+  <string name="share_via_link_password_label">Chránit heslem</string>
+  <string name="share_via_link_password_title">Zabezpečeno</string>
+  <string name="share_get_public_link_button">Vytvořit odkaz</string>
+  <string name="share_search">Hledat</string>
+  <string name="search_users_and_groups_hint">Prohledat uživatele a skupiny</string>
+  <string name="share_group_clarification">%1$s (skupina)</string>
+  <string name="share_sharee_unavailable">Omlouváme se, verze vašeho serveru neumožňuje v klientské aplikaci sdílení dat mezi uživateli.
+\nKontaktujte prosím svého administrátora</string>
 </resources>
index e7e46fe..5a47c64 100644 (file)
   <string name="filedetails_modified">Addaswyd:</string>
   <string name="filedetails_download">Llwytho i lawr</string>
   <string name="filedetails_renamed_in_upload_msg">Ailenwyd y ffeil i %1$s wrth lwytho i fyny</string>
+  <string name="action_share">Rhannu</string>
   <string name="common_yes">Ie</string>
   <string name="common_no">Na</string>
   <string name="common_ok">Iawn</string>
-  <string name="common_cancel_download">Diddymu llwytho i lawr</string>
-  <string name="common_cancel_upload">Diddymu llwytho i fyny</string>
   <string name="common_cancel">Diddymu</string>
   <string name="common_save_exit">Cadw &amp; Gadael</string>
   <string name="common_error">Gwall</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">Cyfrifon</string>
   <string name="folder_picker_choose_button_text">Dewisiwch</string>
+  <string name="share_via_link_expiration_date_label">Gosod dyddiad dod i ben</string>
+  <string name="share_via_link_password_label">Diogelu cyfrinair</string>
+  <string name="share_search">Chwilio</string>
 </resources>
index 80a6032..3e10259 100644 (file)
   <string name="filedetails_created">Oprettet:</string>
   <string name="filedetails_modified">Ændret:</string>
   <string name="filedetails_download">Hent</string>
-  <string name="filedetails_sync_file">Genopfrisk fil</string>
   <string name="filedetails_renamed_in_upload_msg">Filen blev omdøbt til %1$s under upload</string>
   <string name="list_layout">Listevisning</string>
-  <string name="action_share_file">Del link</string>
-  <string name="action_unshare_file">Ophæv deling</string>
+  <string name="action_share">Del</string>
   <string name="common_yes">Ja</string>
   <string name="common_no">Nej</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_download">Afbryd download</string>
-  <string name="common_cancel_upload">Fortryd upload</string>
   <string name="common_cancel">Annuller</string>
   <string name="common_save_exit">Gem &amp; Afslut</string>
   <string name="common_error">Fejl</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>
-  <string name="download_folder_failed_content">Download af %1$s mappe kunne ikke fuldføres</string>
   <string name="shared_subject_header">delt</string>
   <string name="with_you_subject_header">med dig</string>
-  <string name="subject_token">%1$s delte \"%2$s\" med dig</string>
-  <string name="saml_subject_token">\"%1$s\" er blevet delt med dig</string>
+  <string name="subject_user_shared_with_you">%1$s delte \"%2$s\" med dig</string>
+  <string name="subject_shared_with_you">\"%1$s\" er blevet delt med dig</string>
   <string name="auth_refresh_button">Genopfrisk forbindelsen</string>
   <string name="auth_host_address">Serveradresse</string>
   <string name="common_error_out_memory">Ikke tilstrækkelig hukommelse</string>
   <string name="file_list__footer__files">%1$d filer</string>
   <string name="file_list__footer__files_and_folder">%1$d filer, 1 mape</string>
   <string name="file_list__footer__files_and_folders">%1$d filer, %2$d mapper</string>
+  <string name="share_dialog_title">Deling</string>
+  <string name="share_via_link_section_title">Del link</string>
+  <string name="share_via_link_expiration_date_label">Vælg udløbsdato</string>
+  <string name="share_via_link_password_label">Beskyt med adgangskode</string>
+  <string name="share_search">Søg</string>
 </resources>
index a99ab89..98dcaff 100644 (file)
   <string name="filedetails_created">Erstellt am:</string>
   <string name="filedetails_modified">Verändert am:</string>
   <string name="filedetails_download">Herunterladen</string>
-  <string name="filedetails_sync_file">Datei neu laden</string>
-  <string name="action_share_file">Link teilen</string>
-  <string name="action_unshare_file">Link nicht mehr teilen</string>
+  <string name="action_share">Freigeben</string>
   <string name="common_yes">Ja</string>
   <string name="common_no">Nein</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_download">Herunterladen abbrechen</string>
-  <string name="common_cancel_upload">Hochladen abbrechen</string>
   <string name="common_cancel">Abbrechen</string>
   <string name="common_save_exit">Speichern &amp; Schließen</string>
   <string name="common_error">Fehler</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">Konten</string>
   <string name="auth_host_address">Adresse des Servers</string>
+  <string name="share_via_link_section_title">Link teilen</string>
 </resources>
index 7fe556b..e098aff 100644 (file)
@@ -71,6 +71,7 @@
   <string name="file_list_seconds_ago">Gerade eben</string>
   <string name="file_list_empty">Alles leer. Laden Sie etwas hoch!</string>
   <string name="file_list_loading">Lade…</string>
+  <string name="file_list_no_app_for_file_type">Es wurde keine App für die Datei gefunden!</string>
   <string name="local_file_list_empty">Es befinden sich keine Dateien in diesem Ordner.</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_created">Erstellt:</string>
   <string name="filedetails_modified">Geändert:</string>
   <string name="filedetails_download">Herunterladen</string>
-  <string name="filedetails_sync_file">Datei aktualisieren</string>
+  <string name="filedetails_sync_file">syncronisieren</string>
   <string name="filedetails_renamed_in_upload_msg">Datei wurde wärend des Uploads zu %1$s umbenannt</string>
   <string name="list_layout">Listen-Layout</string>
-  <string name="action_share_file">Link teilen</string>
-  <string name="action_unshare_file">Link nicht mehr teilen</string>
+  <string name="action_share">Share</string>
   <string name="common_yes">Ja</string>
   <string name="common_no">Nein</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_download">Download abbrechen</string>
-  <string name="common_cancel_upload">Upload abbrechen</string>
+  <string name="common_cancel_sync">Synchronisation beenden</string>
   <string name="common_cancel">Abbrechen</string>
   <string name="common_save_exit">Speichern &amp; Schließen</string>
   <string name="common_error">Fehler</string>
   <string name="confirmation_remove_folder_alert">Möchten Sie wirklich %1$s und dessen Inhalte entfernen?</string>
   <string name="confirmation_remove_local">Nur lokal</string>
   <string name="confirmation_remove_folder_local">Nur lokal</string>
+  <string name="confirmation_remove_remote">Vom Server</string>
   <string name="remove_success_msg">Erfolgreich gelöscht</string>
   <string name="remove_fail_msg">Der Löschvorgang konnte nicht beendet werden</string>
   <string name="rename_dialog_title">Geben Sie einen neuen Namen ein</string>
   <string name="conflict_title">Dateikonflikt</string>
   <string name="conflict_message">Welche Datei möchtest du behalten? Wenn du beide Versionen auswählst, wird der lokalen Datei eine Zahl am Ende Ihres Dateiname angehangen.</string>
   <string name="conflict_keep_both">Beide behalten</string>
+  <string name="conflict_use_local_version">lokale Version</string>
+  <string name="conflict_use_server_version">Server Version</string>
   <string name="preview_image_description">Bildvorschau</string>
   <string name="preview_image_error_unknown_format">Dieses Bild kann nicht angezeigt werden</string>
   <string name="error__upload__local_file_not_copied">%1$s konnte nicht in den lokalen %2$s Ordner kopiert werden</string>
   <string name="move_file_error">Es ist ein Fehler beim Verschieben dieser Datei oder dieses Ordners aufgetreten.</string>
   <string name="forbidden_permissions_move">um diese Datei zu verschieben</string>
   <string name="copy_file_invalid_overwrite">Die Datei ist bereits im Zielordner vorhanden</string>
+  <string name="forbidden_permissions_copy">um diese Datei zu kopieren</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>
-  <string name="download_folder_failed_content">Herunterladen des %1$s - Ordners konnte nicht abgeschlossen werden</string>
   <string name="shared_subject_header">geteilt</string>
   <string name="with_you_subject_header">Mit Ihnen</string>
-  <string name="subject_token">%1$s hat \"%2$s\" mit Ihnen geteilt</string>
-  <string name="saml_subject_token">\"%1$s\" wurde mit dir geteilt</string>
+  <string name="subject_user_shared_with_you">%1$s hat \"%2$s\" mit Ihnen geteilt</string>
+  <string name="subject_shared_with_you">\"%1$s\" wurde mit dir geteilt</string>
   <string name="auth_refresh_button">Verbindung aktualisieren</string>
   <string name="auth_host_address">Serveradresse</string>
   <string name="common_error_out_memory">Nicht genügend Speicher</string>
   <string name="file_list__footer__files">%1$d Dateien</string>
   <string name="file_list__footer__files_and_folder">%1$d Dateien, 1 Ordner</string>
   <string name="file_list__footer__files_and_folders">%1$d Dateien, %2$d Ordner</string>
+  <string name="share_dialog_title">Teilen</string>
+  <string name="share_with_user_section_title">Mit Benutzern und Gruppen teilen</string>
+  <string name="share_no_users">Bis jetzt hast du noch keine Dateien mit anderen geteilt</string>
+  <string name="share_add_user_or_group">Benutzer oder Gruppe hinzufügen</string>
+  <string name="share_via_link_section_title">Link teilen</string>
+  <string name="share_via_link_expiration_date_label">Ein Ablaufdatum setzen</string>
+  <string name="share_via_link_password_label">Passwortschutz</string>
+  <string name="share_get_public_link_button">Link erstellen</string>
+  <string name="share_search">Suche</string>
+  <string name="search_users_and_groups_hint">Nach Benutzern und Gruppen suchen</string>
+  <string name="share_group_clarification">%1$s (group)</string>
 </resources>
index 8a34aeb..8763cf4 100644 (file)
@@ -71,6 +71,7 @@
   <string name="file_list_seconds_ago">Gerade eben</string>
   <string name="file_list_empty">Alles leer. Lade etwas hoch!</string>
   <string name="file_list_loading">Lade…</string>
+  <string name="file_list_no_app_for_file_type">Es wurden keine Apps für den Dateityp gefunden!</string>
   <string name="local_file_list_empty">Es befinden sich keine Dateien in diesem Ordner.</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_created">Erstellt:</string>
   <string name="filedetails_modified">Geändert:</string>
   <string name="filedetails_download">Herunterladen</string>
-  <string name="filedetails_sync_file">Datei aktualisieren</string>
+  <string name="filedetails_sync_file">Synchronisation</string>
   <string name="filedetails_renamed_in_upload_msg">Datei wurde wärend des Uploads zu %1$s umbenannt</string>
   <string name="list_layout">Listen-Layout</string>
-  <string name="action_share_file">Link teilen</string>
-  <string name="action_unshare_file">Link nicht mehr freigeben</string>
+  <string name="action_share">Teilen</string>
   <string name="common_yes">Ja</string>
   <string name="common_no">Nein</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_download">Download abbrechen</string>
-  <string name="common_cancel_upload">Upload abbrechen</string>
+  <string name="common_cancel_sync">Synchronisation abbrechen</string>
   <string name="common_cancel">Abbrechen</string>
   <string name="common_save_exit">Speichern &amp; schließen</string>
   <string name="common_error">Fehler</string>
   <string name="confirmation_remove_folder_alert">Möchtest Du wirklich %1$s und dessen Inhalte entfernen?</string>
   <string name="confirmation_remove_local">Nur lokal</string>
   <string name="confirmation_remove_folder_local">Nur lokal</string>
+  <string name="confirmation_remove_remote">Vom Server</string>
+  <string name="confirmation_remove_remote_and_local">Remote &amp; lokal</string>
   <string name="remove_success_msg">Erfolgreich gelöscht</string>
   <string name="remove_fail_msg">Der Löschvorgang konnte nicht beendet werden</string>
   <string name="rename_dialog_title">Gib einen neuen Namen ein</string>
   <string name="ssl_validator_label_validity_to">Bis:</string>
   <string name="ssl_validator_label_signature">Signatur:</string>
   <string name="ssl_validator_label_signature_algorithm">Algorithmus:</string>
+  <string name="ssl_validator_label_certificate_fingerprint">Fingerabdruck:</string>
+  <string name="certificate_load_problem">Beim Laden des Zertifikats ist ein Fehler aufgetreten.</string>
   <string name="ssl_validator_null_cert">Das Zertifikat konnte nicht gezeigt werden.</string>
   <string name="ssl_validator_no_info_about_error">- Keine Informationen über den Fehler</string>
   <string name="placeholder_sentence">Dies ist ein Platzhalter</string>
   <string name="conflict_title">Dateikonfilikt</string>
   <string name="conflict_message">Welche Datei möchtest du behalten? Wenn du beide Versionen auswählst, wird der lokalen Datei eine Zahl am Ende Ihres Dateiname angehangen.</string>
   <string name="conflict_keep_both">Beide behalten</string>
+  <string name="conflict_use_local_version">Lokale Version</string>
+  <string name="conflict_use_server_version">Serverversion</string>
   <string name="preview_image_description">Bildvorschau</string>
   <string name="preview_image_error_unknown_format">Dieses Bild kann nicht angezeigt werden</string>
   <string name="error__upload__local_file_not_copied">%1$s konnte nicht in den lokalen %2$s Ordner kopiert werden</string>
   <string name="move_file_invalid_overwrite">Die Datei ist bereits im Zielordner vorhanden</string>
   <string name="move_file_error">Es ist ein Fehler beim Verschieben der Datei oder des Ordners aufgetreten.</string>
   <string name="forbidden_permissions_move">um diese Datei zu verschieben</string>
+  <string name="copy_file_not_found">Kopieren nicht möglich. Prüfe, dass die Datei existiert</string>
+  <string name="copy_file_invalid_into_descendent">Es ist nicht möglich, einen Ordner in einen seiner Unterordner zu kopieren</string>
   <string name="copy_file_invalid_overwrite">Die Datei existiert bereits im Zielverzeichnis</string>
+  <string name="copy_file_error">Es ist ein Fehler beim Kopieren der Datei oder des Ordners aufgetreten.</string>
+  <string name="forbidden_permissions_copy">diese Datei zu kopieren</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>
-  <string name="download_folder_failed_content">Herunterladen des %1$s - Ordners konnte nicht abgeschlossen werden</string>
   <string name="shared_subject_header">geteilt</string>
   <string name="with_you_subject_header">Mit Dir</string>
-  <string name="subject_token">%1$s hat \"%2$s\" mit Dir geteilt</string>
-  <string name="saml_subject_token">\"%1$s\" wurde mit dir geteilt</string>
+  <string name="subject_user_shared_with_you">%1$s hat \"%2$s\" mit Dir geteilt</string>
+  <string name="subject_shared_with_you">\"%1$s\" wurde mit dir geteilt</string>
   <string name="auth_refresh_button">Verbindung aktualisieren</string>
   <string name="auth_host_address">Serveradresse</string>
   <string name="common_error_out_memory">Nicht genügend Speicher</string>
   <string name="file_list__footer__files">%1$d Dateien</string>
   <string name="file_list__footer__files_and_folder">%1$d Dateien, 1 Ordner</string>
   <string name="file_list__footer__files_and_folders">%1$d Dateien, %2$d Ordner</string>
+  <string name="share_dialog_title">Teilen</string>
+  <string name="share_no_users">Es wurden noch keine Dateien mit Benutzern geteilt</string>
+  <string name="share_add_user_or_group">Benutzer oder Gruppe hinzufügen</string>
+  <string name="share_via_link_section_title">Link teilen</string>
+  <string name="share_via_link_expiration_date_label">Setze ein Ablaufdatum</string>
+  <string name="share_via_link_password_label">Passwortschutz</string>
+  <string name="share_search">Suche</string>
 </resources>
index 434d5fb..72ac9cc 100644 (file)
@@ -71,6 +71,7 @@
   <string name="file_list_seconds_ago">δευτερόλεπτα πριν</string>
   <string name="file_list_empty">Δεν υπάρχει τίποτα εδώ. Μεταφορτώστε κάτι!</string>
   <string name="file_list_loading">Φόρτωση...</string>
+  <string name="file_list_no_app_for_file_type">Δεν βρέθηκε εφαρμογή για αυτόν τον τύπο αρχείου</string>
   <string name="local_file_list_empty">Δεν υπάρχουν αρχεία σε αυτό τον φάκελο.</string>
   <string name="filedetails_select_file">Αγγίξτε κάποιο αρχείο για να προβάλετε περισσότερες πληροφορίες.</string>
   <string name="filedetails_size">Μέγεθος:</string>
   <string name="filedetails_created">Δημιουργήθηκε:</string>
   <string name="filedetails_modified">Τροποποιήθηκε:</string>
   <string name="filedetails_download">Λήψη</string>
-  <string name="filedetails_sync_file">Î\91νανέÏ\89Ï\83η Î±Ï\81Ï\87είοÏ\85</string>
+  <string name="filedetails_sync_file">ΣÏ\85γÏ\87Ï\81ονιÏ\83μÏ\8cÏ\82</string>
   <string name="filedetails_renamed_in_upload_msg">Το αρχείο μετονομάστηκε σε %1$s κατά τη μεταφόρτωση</string>
   <string name="list_layout">Διάταξη Λίστας</string>
-  <string name="action_share_file">Διαμοιρασμός συνδέσμου</string>
-  <string name="action_unshare_file">Ακύρωση διαμοιρασμού συνδέσμου</string>
+  <string name="action_share">Διαμοιράστε</string>
   <string name="common_yes">Ναι</string>
   <string name="common_no">Όχι</string>
   <string name="common_ok">ΟΚ</string>
-  <string name="common_cancel_download">Ακύρωση λήψης</string>
-  <string name="common_cancel_upload">Ακύρωση μεταφόρτωσης</string>
+  <string name="common_cancel_sync">Ακύρωση συγχρονισμού</string>
   <string name="common_cancel">Άκυρο</string>
   <string name="common_save_exit">Αποθήκευση &amp; Έξοδος</string>
   <string name="common_error">Σφάλμα</string>
   <string name="ssl_validator_label_validity_to">Μέχρι:</string>
   <string name="ssl_validator_label_signature">Υπογραφή:</string>
   <string name="ssl_validator_label_signature_algorithm">Αλγόριθμος:</string>
+  <string name="digest_algorithm_not_available">Ο αλγόριθμος digest δεν είναι διαθέσιμος στο τηλέφωνό σας.</string>
+  <string name="ssl_validator_label_certificate_fingerprint">Ψηφιακό αποτύπωμα:</string>
+  <string name="certificate_load_problem">Πρόβλημα φόρτωσης του πιστοποιητικού.</string>
   <string name="ssl_validator_null_cert">Δεν μπορεί να εμφανιστεί το πιστοποιητικό.</string>
   <string name="ssl_validator_no_info_about_error">- Καμμία πληροφορία σχετικά με το σφάλμα</string>
   <string name="placeholder_sentence">Αυτό είναι ένα σημείο κράτησης θέσης</string>
   <string name="prefs_category_instant_uploading">Στιγμιαίες Μεταφορτώσεις</string>
   <string name="prefs_category_security">Ασφάλεια</string>
   <string name="prefs_instant_video_upload_path_title">Διαδρομή Μεταφόρτωσης Βίντεο</string>
-  <string name="download_folder_failed_content">Η λήψη του φακέλου %1$s δεν ολοκληρώθηκε με επιτυχία.</string>
+  <string name="sync_folder_failed_content">Ο συγχρονισμός του φακέλου %1$s δεν μπόρεσε να ολοκληρωθεί</string>
   <string name="shared_subject_header">διαμοιρασμένα</string>
   <string name="with_you_subject_header">με εσάς</string>
-  <string name="subject_token">Ο %1$s διαμοιράστηκε το \"%2$s\" με εσάς</string>
-  <string name="saml_subject_token">\"%1$s\" μοιράστηκε μαζί σας</string>
+  <string name="subject_user_shared_with_you">Ο %1$s διαμοιράστηκε το \"%2$s\" με εσάς</string>
+  <string name="subject_shared_with_you">\"%1$s\" μοιράστηκε μαζί σας</string>
   <string name="auth_refresh_button">Ανανέωση σύνδεσης</string>
   <string name="auth_host_address">Διεύθυνση διακομιστή</string>
   <string name="common_error_out_memory">Δεν υπάρχει αρκετή μνήμη</string>
   <string name="file_list__footer__files">%1$d αρχεία</string>
   <string name="file_list__footer__files_and_folder">%1$d αρχεία, 1 φάκελος</string>
   <string name="file_list__footer__files_and_folders">%1$d αρχεία, %2$d φάκελοι</string>
+  <string name="share_dialog_title">Διαμοιρασμός</string>
+  <string name="share_no_users">Δεν έχουν διαμοιραστεί ακόμα δεδομένα με τους χρήστες</string>
+  <string name="share_add_user_or_group">Προσθήκη χρήστη ή ομάδας</string>
+  <string name="share_via_link_section_title">Διαμοιρασμός συνδέσμου</string>
+  <string name="share_via_link_expiration_date_label">Ορισμός ημ. λήξης</string>
+  <string name="share_via_link_password_label">Προστασία συνθηματικού</string>
+  <string name="share_search">Αναζήτηση</string>
+  <string name="search_users_and_groups_hint">Αναζήτηση χρηστών και ομάδων</string>
+  <string name="share_group_clarification">%1$s (ομάδα)</string>
+  <string name="share_sharee_unavailable">Δεν επιτρέπεται ο διαμοιρασμός μεταξύ χρηστών μέσω εφαρμογής, σε αυτή την έκδοση.
+\nΕπικοινωνήστε με το διαχειριστή του συστήματος</string>
 </resources>
index f0c7acd..78a69c0 100644 (file)
   <string name="filedetails_created">Created:</string>
   <string name="filedetails_modified">Modified:</string>
   <string name="filedetails_download">Download</string>
-  <string name="filedetails_sync_file">Refresh file</string>
   <string name="filedetails_renamed_in_upload_msg">File was renamed to %1$s during upload</string>
-  <string name="action_share_file">Share link</string>
-  <string name="action_unshare_file">Unshare link</string>
+  <string name="action_share">Share</string>
   <string name="common_yes">Yes</string>
   <string name="common_no">No</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_download">Cancel download</string>
-  <string name="common_cancel_upload">Cancel upload</string>
   <string name="common_cancel">Cancel</string>
   <string name="common_save_exit">Save &amp; Exit</string>
   <string name="common_error">Error</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="download_folder_failed_content">Download of %1$s folder could not be completed</string>
+  <string name="subject_user_shared_with_you">%1$s shared \"%2$s\" with you</string>
   <string name="auth_refresh_button">Refresh connection</string>
   <string name="auth_host_address">Server address</string>
   <string name="common_error_out_memory">Not enough memory</string>
+  <string name="share_dialog_title">Sharing</string>
+  <string name="share_via_link_section_title">Share link</string>
+  <string name="share_via_link_expiration_date_label">Set expiration date</string>
+  <string name="share_via_link_password_label">Password protect</string>
+  <string name="share_search">Search</string>
 </resources>
index daf7c1f..3b6d4fb 100644 (file)
   <string name="filedetails_modified">Modifita je:</string>
   <string name="filedetails_download">Elŝuti</string>
   <string name="filedetails_renamed_in_upload_msg">La dosiero alinomiĝis al %1$s dum alŝuto</string>
-  <string name="action_share_file">Konhavigi ligilon</string>
-  <string name="action_unshare_file">Malkunhavigi ligilon</string>
+  <string name="action_share">Kunhavigi</string>
   <string name="common_yes">Jes</string>
   <string name="common_no">Ne</string>
   <string name="common_ok">Akcepti</string>
-  <string name="common_cancel_download">Nuligi elŝuton</string>
-  <string name="common_cancel_upload">Nuligi alŝuton</string>
   <string name="common_cancel">Nuligi</string>
   <string name="common_save_exit">Konservi kaj forlasi</string>
   <string name="common_error">Eraro</string>
   <string name="copy_file_invalid_overwrite">La dosiero jam ekzistas en la cela dosierujo</string>
   <string name="prefs_category_security">Sekuro</string>
   <string name="auth_host_address">Servila adreso</string>
+  <string name="file_list__footer__file">1 dosiero</string>
+  <string name="file_list__footer__files">%1$d dosieroj</string>
+  <string name="share_dialog_title">Kunhavigo</string>
+  <string name="share_via_link_section_title">Kunhavigi ligilon</string>
+  <string name="share_via_link_expiration_date_label">Agordi limdaton</string>
+  <string name="share_via_link_password_label">Protekti per pasvorto</string>
+  <string name="share_search">Serĉi</string>
 </resources>
index f159bce..53148fb 100644 (file)
@@ -21,6 +21,7 @@
        <item>Biggest - Smallest</item>-->
   <!--TODO re-enable when "Accounts" is available in Navigation Drawer-->
   <!--<string name="drawer_item_accounts">Accounts</string>-->
+  <string name="drawer_item_all_files">Todos los archivos</string>
   <!--TODO re-enable when "On Device" is available
     <string name="drawer_item_on_device">On device</string>-->
   <string name="drawer_open">Abrir</string>
   <string name="filedetails_created">Creado:</string>
   <string name="filedetails_modified">Modificado:</string>
   <string name="filedetails_download">Descargar</string>
-  <string name="filedetails_sync_file">Actualizar archivo</string>
   <string name="filedetails_renamed_in_upload_msg">El archivo fue renombrado como %1$s durante la subida</string>
-  <string name="action_share_file">Compartir vínculo</string>
-  <string name="action_unshare_file">Dejar de compartir vínculo</string>
+  <string name="action_share">Compartir</string>
   <string name="common_yes">Sí</string>
   <string name="common_no">No</string>
   <string name="common_ok">Aceptar</string>
-  <string name="common_cancel_download">Cancelar descarga</string>
-  <string name="common_cancel_upload">Cancelar subida</string>
   <string name="common_cancel">Cancelar</string>
   <string name="common_save_exit">Guardar y salir</string>
   <string name="common_error">Error</string>
   <string name="prefs_category_instant_uploading">Subida Instantánea </string>
   <string name="prefs_category_security">Seguridad</string>
   <string name="prefs_instant_video_upload_path_title">Dirección de subida del video</string>
-  <string name="download_folder_failed_content">La descarga de la carpeta %1$s no pudo ser completada</string>
   <string name="auth_host_address">Dirección del servidor</string>
+  <string name="share_dialog_title">Compartiendo</string>
+  <string name="share_via_link_section_title">Compartir vínculo</string>
+  <string name="share_via_link_expiration_date_label">Asignar fecha de vencimiento</string>
+  <string name="share_via_link_password_label">Proteger con contraseña </string>
+  <string name="share_search">Buscar</string>
 </resources>
index e4288f1..dc3a7c8 100644 (file)
   <string name="filedetails_created">Creado:</string>
   <string name="filedetails_modified">Modificado:</string>
   <string name="filedetails_download">Descargar</string>
-  <string name="filedetails_sync_file">refrescar archivo</string>
   <string name="filedetails_renamed_in_upload_msg">El archivo fue renombrado a %1$s durante la subida</string>
+  <string name="action_share">Compartir</string>
   <string name="common_yes">Si</string>
   <string name="common_no">No</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_download">cancelar bajada</string>
-  <string name="common_cancel_upload">cancelar subida</string>
   <string name="common_cancel">Cancelar</string>
   <string name="common_save_exit">Guardar&amp;Salir</string>
   <string name="common_error">Error</string>
index 8473333..2a287bc 100644 (file)
@@ -17,6 +17,7 @@
   <!--<string name="drawer_item_accounts">Accounts</string>-->
   <!--TODO re-enable when "On Device" is available
     <string name="drawer_item_on_device">On device</string>-->
+  <string name="drawer_item_settings">Ajustes</string>
   <string name="drawer_open">Abrir</string>
   <string name="prefs_category_general">General</string>
   <string name="prefs_category_more">Más</string>
   <string name="filedetails_created">Creado:</string>
   <string name="filedetails_modified">Modificado:</string>
   <string name="filedetails_download">Descargar</string>
-  <string name="filedetails_sync_file">Actualizar archivo</string>
   <string name="filedetails_renamed_in_upload_msg">El archivo fue renombrado como %1$s durante la subida</string>
-  <string name="action_share_file">Enlace compartido</string>
+  <string name="action_share">Compartir</string>
   <string name="common_yes">Sí</string>
   <string name="common_no">No</string>
   <string name="common_ok">Aceptar</string>
-  <string name="common_cancel_download">Cancelar descarga</string>
-  <string name="common_cancel_upload">Cancelar subida</string>
   <string name="common_cancel">Cancelar</string>
   <string name="common_save_exit">Guardar &amp; Salir</string>
   <string name="common_error">Error</string>
   <string name="folder_picker_choose_button_text">Seleccionar</string>
   <string name="prefs_category_security">Seguridad</string>
   <string name="auth_host_address">Dirección del servidor</string>
+  <string name="share_dialog_title">Compartiendo</string>
+  <string name="share_via_link_section_title">Enlace compartido</string>
+  <string name="share_via_link_expiration_date_label">Establecer fecha de caducidad</string>
+  <string name="share_via_link_password_label">Protección con contraseña</string>
+  <string name="share_search">Buscar</string>
 </resources>
index 1796c4a..0e2a9bf 100644 (file)
@@ -71,6 +71,7 @@
   <string name="file_list_seconds_ago">hace segundos</string>
   <string name="file_list_empty">No hay nada aquí. ¡Suba algo!</string>
   <string name="file_list_loading">Cargando...</string>
+  <string name="file_list_no_app_for_file_type">¡No se encontró una aplicación para el tipo de archivo!</string>
   <string name="local_file_list_empty">No hay archivos en esta carpeta.</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_created">Creado:</string>
   <string name="filedetails_modified">Modificado:</string>
   <string name="filedetails_download">Descargar</string>
-  <string name="filedetails_sync_file">Actualizar archivo</string>
+  <string name="filedetails_sync_file">Sincronizar</string>
   <string name="filedetails_renamed_in_upload_msg">El fichero fue renombrado como %1$s durante la subida</string>
   <string name="list_layout">Diseño de lista</string>
-  <string name="action_share_file">Compartir con enlace</string>
-  <string name="action_unshare_file">Dejar de compartir</string>
+  <string name="action_share">Compartir</string>
   <string name="common_yes">Sí</string>
   <string name="common_no">No</string>
   <string name="common_ok">Aceptar</string>
-  <string name="common_cancel_download">Cancelar descarga</string>
-  <string name="common_cancel_upload">Cancelar subida</string>
+  <string name="common_cancel_sync">Cancelar sincronización</string>
   <string name="common_cancel">Cancelar</string>
   <string name="common_save_exit">Guardar &amp; Salir</string>
   <string name="common_error">Error</string>
   <string name="pass_code_configure_your_pass_code_explanation">La contraseña será requerida cada vez que la aplicación sea iniciada</string>
   <string name="pass_code_reenter_your_pass_code">Reintroduzca la contraseña, por favor.</string>
   <string name="pass_code_remove_your_pass_code">Borre su contraseña</string>
-  <string name="pass_code_mismatch">Las contraseñas no son identicas</string>
-  <string name="pass_code_wrong">Contraseña incorrecta</string>
-  <string name="pass_code_removed">Contraseña borrada</string>
+  <string name="pass_code_mismatch">Los códigos de acceso no son idénticos</string>
+  <string name="pass_code_wrong">Código de acceso incorrecto</string>
+  <string name="pass_code_removed">Código de acceso borrado</string>
   <string name="pass_code_stored">Contraseña almacenada</string>
   <string name="media_notif_ticker">Reproductor de música %1$s</string>
   <string name="media_state_playing">%1$s (reproduciendo)</string>
   <string name="ssl_validator_label_validity_to">A:</string>
   <string name="ssl_validator_label_signature">Firma:</string>
   <string name="ssl_validator_label_signature_algorithm">Algoritmo:</string>
+  <string name="digest_algorithm_not_available">Este algoritmo no está disponible en tu teléfono.</string>
+  <string name="ssl_validator_label_certificate_fingerprint">Firma:</string>
+  <string name="certificate_load_problem">Existe un problema al cargar el certificado.</string>
   <string name="ssl_validator_null_cert">No se ha podido mostrar el certificado</string>
   <string name="ssl_validator_no_info_about_error">- No hay información acerca del error</string>
   <string name="placeholder_sentence">Esto es un marcador de posición</string>
   <string name="share_link_file_error">Ocurrió un error al tratar de compartir este archivo o carpeta</string>
   <string name="unshare_link_file_no_exist">No se puede dejar de compartir. Revise si el archivo existe</string>
   <string name="unshare_link_file_error">Ocurrió un error al tratar de ya no compartir este archivo o carpeta</string>
+  <string name="update_link_file_no_exist">No se puede actualizar. Revise si el archivo existe</string>
+  <string name="update_link_file_error">Se produjo un error al tratar de actualizar el enlace compartido</string>
   <string name="share_link_password_title">Introduzca una contraseña</string>
   <string name="share_link_empty_password">Debe introducir una contraseña</string>
   <string name="activity_chooser_send_file_title">Enviar</string>
   <string name="forbidden_permissions_delete">para eliminar este archivo</string>
   <string name="share_link_forbidden_permissions">para compartir este archivo</string>
   <string name="unshare_link_forbidden_permissions">para dejar de compartir este archivo</string>
+  <string name="update_link_forbidden_permissions">para actualizar este enlace compartido</string>
   <string name="forbidden_permissions_create">para crear el archivo</string>
   <string name="uploader_upload_forbidden_permissions">para subir archivos a esta carpeta</string>
   <string name="downloader_download_file_not_found">Este archivo ya no se encuentra en el servidor</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">Guardar videos subidos en la carpeta:</string>
-  <string name="download_folder_failed_content">La descarga de la carpeta %1$s no ha podido ser completada</string>
+  <string name="sync_folder_failed_content">La sincronización de la carpeta %1$s no se pudo completar</string>
   <string name="shared_subject_header">compartido</string>
   <string name="with_you_subject_header">con usted</string>
-  <string name="subject_token">%1$s compartió \"%2$s\" conmigo</string>
-  <string name="saml_subject_token">\"%1$s\" ha sido compartido con usted.</string>
+  <string name="subject_user_shared_with_you">%1$s compartió \"%2$s\" conmigo</string>
+  <string name="subject_shared_with_you">\"%1$s\" ha sido compartido con usted.</string>
   <string name="auth_refresh_button">Refrescar la conexión</string>
   <string name="auth_host_address">Dirección del servidor</string>
   <string name="common_error_out_memory">No hay suficiente memoria</string>
   <string name="file_list__footer__files">%1$d archivos</string>
   <string name="file_list__footer__files_and_folder">%1$d archivos, 1 carpeta</string>
   <string name="file_list__footer__files_and_folders">%1$d archivos, %2$d carpetas</string>
+  <string name="share_dialog_title">Compartiendo</string>
+  <string name="share_with_user_section_title">Compartir con usuarios y grupos</string>
+  <string name="share_no_users">Aún no se ha compartido con ningún usuario.</string>
+  <string name="share_add_user_or_group">Añadir usuario o grupo</string>
+  <string name="share_via_link_section_title">Compartir enlace</string>
+  <string name="share_via_link_expiration_date_label">Establecer fecha de caducidad</string>
+  <string name="share_via_link_password_label">Protección con contraseña</string>
+  <string name="share_via_link_password_title">Asegurado</string>
+  <string name="share_get_public_link_button">coger enlace</string>
+  <string name="share_search">Buscar</string>
+  <string name="search_users_and_groups_hint">Buscar usuarios y grupos</string>
+  <string name="share_group_clarification">%1$s (grupo)</string>
+  <string name="share_sharee_unavailable">Lo siento, compartir no está disponible en su servidor.\nPor favor, contacte con su administrador</string>
 </resources>
index a4841a4..e36a1fb 100644 (file)
   <string name="filedetails_created">Loodud:</string>
   <string name="filedetails_modified">Muudetud:</string>
   <string name="filedetails_download">Lae alla</string>
-  <string name="filedetails_sync_file">Värskenda faili</string>
   <string name="filedetails_renamed_in_upload_msg">Fail nimetati üleslaadimise käigus ümber %1$ </string>
   <string name="list_layout">Nimekirja paigutus</string>
-  <string name="action_share_file">Jaga linki</string>
-  <string name="action_unshare_file">Tühista lingi jagamine</string>
+  <string name="action_share">Jaga</string>
   <string name="common_yes">Jah</string>
   <string name="common_no">Ei</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_download">Tühista allalaadimine</string>
-  <string name="common_cancel_upload">Tühista üleslaadimine</string>
   <string name="common_cancel">Loobu</string>
   <string name="common_save_exit">Salvesta &amp; Välju</string>
   <string name="common_error">Viga</string>
@@ -319,11 +315,10 @@ Allpool on loend kohalikest failidest ning serveris asuvatest failidest %5$s, mi
   <string name="prefs_category_instant_uploading">Kohesed üleslaadimised</string>
   <string name="prefs_category_security">Turvalisus</string>
   <string name="prefs_instant_video_upload_path_title">Video üleslaadimise asukoht</string>
-  <string name="download_folder_failed_content">Kausta %1$s  allalaadimine ei õnnestunud</string>
   <string name="shared_subject_header">jagatud</string>
   <string name="with_you_subject_header">sinuga</string>
-  <string name="subject_token">%1$s jagas sinuga \"%2$s\"</string>
-  <string name="saml_subject_token">\"%1$s\" on sinuga jagatud</string>
+  <string name="subject_user_shared_with_you">%1$s jagas sinuga \"%2$s\"</string>
+  <string name="subject_shared_with_you">\"%1$s\" on sinuga jagatud</string>
   <string name="auth_refresh_button">Värskenda ühendust</string>
   <string name="auth_host_address">Serveri aadress</string>
   <string name="common_error_out_memory">Mälu pole piisavalt</string>
@@ -336,4 +331,9 @@ Allpool on loend kohalikest failidest ning serveris asuvatest failidest %5$s, mi
   <string name="file_list__footer__files">%1$d faili</string>
   <string name="file_list__footer__files_and_folder">%1$d faili, 1 kaust</string>
   <string name="file_list__footer__files_and_folders">%1$d faili, %2$d kausta</string>
+  <string name="share_dialog_title">Jagamine</string>
+  <string name="share_via_link_section_title">Jaga linki</string>
+  <string name="share_via_link_expiration_date_label">Määra aegumise kuupäev</string>
+  <string name="share_via_link_password_label">Parooliga kaitstud</string>
+  <string name="share_search">Otsi</string>
 </resources>
index a532d2c..a5e49fb 100644 (file)
   <string name="filedetails_created">Sortuta:</string>
   <string name="filedetails_modified">Aldatuta:</string>
   <string name="filedetails_download">Deskargatu</string>
-  <string name="filedetails_sync_file">Freskatu fitxaegia</string>
   <string name="filedetails_renamed_in_upload_msg">Fitxategiaren izena %1$sra aldatu da igotzean</string>
-  <string name="action_share_file">Elkarbanatu lotura</string>
-  <string name="action_unshare_file">Lotura partekatzeari utzi</string>
+  <string name="action_share">Partekatu</string>
   <string name="common_yes">Bai</string>
   <string name="common_no">Ez</string>
   <string name="common_ok">Ados</string>
-  <string name="common_cancel_download">Utzi deskarga bertan behera </string>
-  <string name="common_cancel_upload">Ezeztatu igoera</string>
   <string name="common_cancel">Ezeztatu</string>
   <string name="common_save_exit">Gorde eta Irten</string>
   <string name="common_error">Errorea</string>
@@ -278,6 +274,10 @@ Mesedez, baimendu berriz</string>
   <string name="prefs_category_instant_uploading">Berehalako Igoerak</string>
   <string name="prefs_category_security">Segurtasuna</string>
   <string name="prefs_instant_video_upload_path_title">Bideo Igoera Bidea</string>
-  <string name="download_folder_failed_content">%1$s karpetaren deskarga ezin izan da burutu</string>
   <string name="auth_host_address">Zerbitzariaren helbidea</string>
+  <string name="share_dialog_title">Partekatzea</string>
+  <string name="share_via_link_section_title">Elkarbanatu lotura</string>
+  <string name="share_via_link_expiration_date_label">Ezarri muga data</string>
+  <string name="share_via_link_password_label">Babestu pasahitzarekin</string>
+  <string name="share_search">Bilatu</string>
 </resources>
index a84969f..8dab96b 100644 (file)
   <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>
   <!--TODO re-enable when server-side folder size calculation is available   
        <item>Biggest - Smallest</item>-->
   <!--TODO re-enable when "Accounts" is available in Navigation Drawer-->
   <!--<string name="drawer_item_accounts">Accounts</string>-->
+  <string name="drawer_item_all_files">تمامی فایل‌ها</string>
   <!--TODO re-enable when "On Device" is available
     <string name="drawer_item_on_device">On device</string>-->
+  <string name="drawer_item_settings">تنظیمات</string>
+  <string name="drawer_item_logs">لاگ‌ها</string>
+  <string name="drawer_close">بستن</string>
   <string name="drawer_open">باز کردن</string>
   <string name="prefs_category_general">عمومی</string>
   <string name="prefs_category_more">بیش‌تر</string>
   <string name="prefs_accounts">حساب‌ها</string>
   <string name="prefs_manage_accounts">مدیریت حسابها</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_summary">آپلود فوری ویدئو‌های گرفته شده توسط دوربین</string>
   <string name="prefs_log_title">فعال کردن ورود</string>
   <string name="prefs_log_summary">این برای مشکلات ورود استفاده شده است.</string>
   <string name="prefs_log_title_history">تاریخچه ورود</string>
@@ -52,6 +62,7 @@
   <string name="uploader_info_uploading">در حال بارگزاری</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="filedetails_size">اندازه</string>
   <string name="filedetails_created">ایجاد شده توسط:</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">لغو اشتراک گذاشتن لینک</string>
+  <string name="action_share">اشتراک‌گذاری</string>
   <string name="common_yes">بله</string>
   <string name="common_no">نه</string>
   <string name="common_ok">باشه</string>
-  <string name="common_cancel_download">قطع دانلود</string>
-  <string name="common_cancel_upload">متوقف کردن بار گذاری</string>
   <string name="common_cancel">منصرف شدن</string>
   <string name="common_save_exit">ذخیره سازی و خروج</string>
   <string name="common_error">خطا</string>
@@ -85,6 +92,7 @@
   <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$s نتوانست به طور کامل انجام شود</string>
+  <string name="uploader_upload_failed_credentials_error">آپلود ناموفق، لازم است دوباره وارد شوید</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_failed_ticker">بارگیری ناموفق بود</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_conflicts_in_favourites_ticker">ناسازگاری ها یافت شدند</string>
   <string name="sync_fail_in_favourites_ticker">همگام سازی پرونده ها ناموفق بود.</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">%1$d fفایل از %2$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="foreign_files_local_text">محلی: %1$s</string>
   <string name="foreign_files_remote_text">دور از دسترس:  %1$s</string>
+  <string name="pass_code_enter_pass_code">لطفا رمز خود را وارد کنید</string>
+  <string name="pass_code_configure_your_pass_code">رمز خود را وارد کنید</string>
+  <string name="pass_code_reenter_your_pass_code">رمز خود را مجددا وارد کنید</string>
+  <string name="pass_code_remove_your_pass_code">رمز خود را حذف کنید</string>
+  <string name="pass_code_mismatch">رمزهای وارد شده یکسان نیستند</string>
+  <string name="pass_code_wrong">رمز نادرست</string>
+  <string name="pass_code_removed">رمز حذف شد</string>
+  <string name="pass_code_stored">رمز ذخیره شد</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="auth_no_net_conn_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_account_not_new">یک اکانت با همین نام کاربری و سرور بر روی این دستگاه موجود می‌باشد.</string>
   <string name="auth_account_not_the_same">نام کاربری وارد شده با نام کاربری این اکانت مطابقت ندارد</string>
   <string name="auth_connecting_auth_server">اتصال به سرور احراز هویت...</string>
   <string name="auth_unsupported_auth_method">سرور این نوع احراز هویت را پشتیبانی نمی‌کند</string>
   <string name="auth_unsupported_multiaccount">%1$s چند اکانته بودن را پشتیبانی نمی‌کند</string>
+  <string name="favorite">برگزیده</string>
   <string name="common_rename">تغییرنام</string>
   <string name="common_remove">حذف</string>
+  <string name="confirmation_remove_alert">آیا واقعا می‌خواهید %1$s حذف شود ؟</string>
+  <string name="confirmation_remove_folder_alert">آیا واقعا می‌خواهید %1$s و محتوای درون آن حذف شود ؟</string>
   <string name="confirmation_remove_local">فقط محلی</string>
   <string name="confirmation_remove_folder_local">فقط محلی</string>
+  <string name="confirmation_remove_remote">از سرور</string>
   <string name="remove_success_msg">حذف با موفقیت انجام شد</string>
   <string name="remove_fail_msg">حذف نا موفق بود</string>
   <string name="rename_dialog_title">نام جدید وارد کنید</string>
   <string name="rename_server_fail_msg">نامگذاری نمی تواند به طور کامل انجام شود</string>
   <string name="sync_file_fail_msg">پرونده های دور از دسترس نمی توانند بررسی شوند.</string>
   <string name="sync_file_nothing_to_do_msg">محتوای فایل قبلا همگام شده</string>
+  <string name="create_dir_fail_msg">پوشه نتوانست ایجاد شود</string>
   <string name="filename_forbidden_characters">کاراکترهای ممنوع: / \\ &lt; &gt; : \" | ? *</string>
+  <string name="filename_forbidden_charaters_from_server">نام فایل دارای حداقل یک کاراکتر نامعتبر است</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="activity_chooser_title">ارسال لینک به ...</string>
+  <string name="wait_for_tmp_copy_from_private_storage">کپی کردن فایل از حافظه خصوصی</string>
   <string name="oauth_check_onoff">ورود با oAuth2   </string>
   <string name="oauth_login_connection">اتصال به سرور oAuth2 ...</string>
   <string name="ssl_validator_header">هویت این سایت نمی تواند تایید شود</string>
   <string name="instant_upload_on_wifi">تصاویر را فقط از طریق wifi بارگذاری کن</string>
   <string name="instant_video_upload_on_wifi">آپلود ویدیو فقط از طریق WiFi</string>
   <string name="instant_upload_path">آپلود فوری</string>
+  <string name="conflict_title">تضاد در فایل</string>
+  <string name="conflict_message">کدام فایل را می‌خواهید نگه دارید ؟ اگر هردو نسخه را میخواهید، یک عدد به اول نام فایل محلی اضافه خواهد شد.</string>
   <string name="conflict_keep_both">نگهداشتن هر دو</string>
+  <string name="conflict_use_local_version">نسخه‌ی محلی</string>
+  <string name="conflict_use_server_version">نسخه سرور</string>
   <string name="preview_image_description">پیش نمایش تصویر</string>
   <string name="preview_image_error_unknown_format">نمایش این عکس امکانپذیر نمی باشد</string>
+  <string name="error__upload__local_file_not_copied">کپی %1$s به پوشه محلی %2$s امکان پذیر نیست</string>
+  <string name="prefs_instant_upload_path_title">مسیر آپلود</string>
   <string name="share_link_file_error">در حین اشتراک گذاری این فایل یا پوشه خطایی رخ داده است</string>
   <string name="unshare_link_file_error">در حین حذف اشتراک گذاری این فایل یا پوشه خطایی رخ داده است</string>
+  <string name="share_link_password_title">یک رمزعبور را وارد کنید</string>
+  <string name="share_link_empty_password">شما باید یک رمزعبور را وارد کنید</string>
   <string name="activity_chooser_send_file_title">ارسال</string>
+  <string name="copy_link">کپی کردن لینک</string>
   <string name="clipboard_text_copied">کپی به کلیپ بورد</string>
   <string name="network_host_not_available">تکمیل عملیات امکانپذیر نمی باشد، سرور در دسترس نمی باشد</string>
   <string name="empty"></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">اشتراک‌گذاری این فایل</string>
+  <string name="unshare_link_forbidden_permissions">حذف اشتراک‌گذاری این فایل</string>
   <string name="forbidden_permissions_create">برای ایجاد این فایل</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="actionbar_logger">لاگ‌ها</string>
+  <string name="log_send_history_button">تاریخچه‌ی ارسال</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="folder_picker_choose_button_text">انتخاب کردن</string>
+  <string name="move_file_not_found">امکان انتقال وجود ندارد، لطفا وجود فایل را بررسی کنید</string>
+  <string name="move_file_invalid_overwrite">این فایل هم‌اکنون در پوشه‌‎ی مقصد وجود دارد</string>
+  <string name="move_file_error">خطایی در زمان تلاش برای انتقال این فایل یا پوشه رخ داده است</string>
+  <string name="forbidden_permissions_move">انتقال این فایل</string>
+  <string name="copy_file_not_found">امکان کپی وجود ندارد، لطفا وجود فایل را بررسی کنید</string>
+  <string name="copy_file_invalid_overwrite">این فایل هم‌اکنون در پوشه‌‎ی مقصد وجود دارد</string>
+  <string name="copy_file_error">یک خطا در زمان تلاش برای کپی این فایل یا شاخه رخ داد</string>
+  <string name="forbidden_permissions_copy">کپی این فایل</string>
+  <string name="prefs_category_instant_uploading">آپلودهای فوری</string>
   <string name="prefs_category_security">امنیت</string>
+  <string name="prefs_instant_video_upload_path_title">مسیر آپلود ویدئو</string>
+  <string name="shared_subject_header">به اشتراک گذاشته شد</string>
+  <string name="with_you_subject_header">با تو</string>
+  <string name="subject_user_shared_with_you">\"%2$s\" توسط %1$s با شما به اشتراک گذاشته شد</string>
+  <string name="subject_shared_with_you">\"%1$s\" با شما به اشتراک گذاشته شد</string>
+  <string name="auth_refresh_button">بروزرسانی ارتباط</string>
   <string name="auth_host_address">آدرس سرور</string>
+  <string name="common_error_out_memory">حافظه کافی وجود ندارد</string>
+  <string name="username">نام کاربری</string>
+  <string name="file_list__footer__folder">1 پوشه</string>
+  <string name="file_list__footer__folders">%1$d پوشه</string>
+  <string name="file_list__footer__file">1 فایل</string>
+  <string name="file_list__footer__file_and_folder">1 فایل، 1 پوشه</string>
+  <string name="file_list__footer__file_and_folders">1 فایل، %1$d پوشه</string>
+  <string name="file_list__footer__files">%1$d  فایل</string>
+  <string name="file_list__footer__files_and_folder">%1$d فایل، 1 پوشه</string>
+  <string name="file_list__footer__files_and_folders">%1$d فایل, %2$d پوشه</string>
+  <string name="share_dialog_title">اشتراک گذاری</string>
+  <string name="share_via_link_section_title">اشتراک گذاشتن لینک</string>
+  <string name="share_via_link_expiration_date_label">تنظیم تاریخ انقضا</string>
+  <string name="share_via_link_password_label">نگهداری کردن رمز عبور</string>
+  <string name="share_search">جست‌و‌جو</string>
 </resources>
index 41d3937..f34fce2 100644 (file)
@@ -71,6 +71,7 @@
   <string name="file_list_seconds_ago">sekuntia sitten</string>
   <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="file_list_no_app_for_file_type">Tälle tiedostotyypille ei löytynyt sovellusta!</string>
   <string name="local_file_list_empty">Tässä kansiossa ei ole tiedostoja</string>
   <string name="filedetails_select_file">Napauta tiedostoa nähdäksesi lisätietoja.</string>
   <string name="filedetails_size">Koko:</string>
   <string name="filedetails_created">Luotu:</string>
   <string name="filedetails_modified">Muokattu:</string>
   <string name="filedetails_download">Lataa</string>
-  <string name="filedetails_sync_file">Päivitä tiedosto</string>
+  <string name="filedetails_sync_file">Synkronoi</string>
   <string name="filedetails_renamed_in_upload_msg">Tiedoston nimeksi muutettiin %1$s siirron yhteydessä</string>
   <string name="list_layout">Luettelon asettelu</string>
-  <string name="action_share_file">Jaa linkki</string>
-  <string name="action_unshare_file">Poista linkin jako</string>
+  <string name="action_share">Jaa</string>
   <string name="common_yes">Kyllä</string>
   <string name="common_no">Ei</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_download">Peru lataus</string>
-  <string name="common_cancel_upload">Peru lähetys</string>
+  <string name="common_cancel_sync">Peru synkronointi</string>
   <string name="common_cancel">Peru</string>
   <string name="common_save_exit">Tallenna ja poistu</string>
   <string name="common_error">Virhe</string>
   <string name="ssl_validator_label_validity_to">Päättyen:</string>
   <string name="ssl_validator_label_signature">Allekirjoitus:</string>
   <string name="ssl_validator_label_signature_algorithm">Algoritmi:</string>
+  <string name="ssl_validator_label_certificate_fingerprint">Sormenjälki:</string>
+  <string name="certificate_load_problem">Varmennetta ladatessa ilmeni ongelmia.</string>
   <string name="ssl_validator_null_cert">Varmennetta ei voi näyttää.</string>
   <string name="ssl_validator_no_info_about_error">- Ei lisätietoja virheestä</string>
   <string name="placeholder_filetype">PNG-kuva</string>
   <string name="copy_file_error">Tätä tiedostoa tai kansiota kopioitaessa tapahtui virhe</string>
   <string name="prefs_category_instant_uploading">Välittömät lähetykset</string>
   <string name="prefs_category_security">Tietoturva</string>
+  <string name="prefs_instant_video_upload_path_title">Videoiden lähetyspolku</string>
+  <string name="sync_folder_failed_content">Kansion %1$s synkronointia ei voitu suorittaa kokonaan</string>
   <string name="shared_subject_header">jaettu</string>
   <string name="with_you_subject_header">kanssasi</string>
-  <string name="subject_token">%1$s jakoi kohteen \"%2$s\" kanssasi</string>
-  <string name="saml_subject_token">\"%1$s\" on jaettu kanssasi</string>
+  <string name="subject_user_shared_with_you">%1$s jakoi kohteen \"%2$s\" kanssasi</string>
+  <string name="subject_shared_with_you">\"%1$s\" on jaettu kanssasi</string>
   <string name="auth_refresh_button">Päivitä yhteys</string>
   <string name="auth_host_address">Palvelimen osoite</string>
   <string name="common_error_out_memory">Muistia ei ole riittävästi</string>
   <string name="file_list__footer__files">%1$d tiedostoa</string>
   <string name="file_list__footer__files_and_folder">%1$d tiedostoa, 1 kansio</string>
   <string name="file_list__footer__files_and_folders">%1$d tiedostoa, %2$d kansiota</string>
+  <string name="share_dialog_title">Jakaminen</string>
+  <string name="share_with_user_section_title">Jaa käyttäjien ja ryhmien kanssa</string>
+  <string name="share_add_user_or_group">Lisää käyttäjä tai ryhmä</string>
+  <string name="share_via_link_section_title">Jaa linkki</string>
+  <string name="share_via_link_expiration_date_label">Aseta päättymispäivä</string>
+  <string name="share_via_link_password_label">Suojaa salasanalla</string>
+  <string name="share_search">Etsi</string>
+  <string name="search_users_and_groups_hint">Etsi käyttäjiä ja ryhmiä</string>
+  <string name="share_group_clarification">%1$s (ryhmä)</string>
 </resources>
index 4a4111b..2d00051 100644 (file)
@@ -72,23 +72,22 @@ Téléchargez-le ici : %2$s</string>
   <string name="file_list_seconds_ago">il y a quelques secondes</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="file_list_no_app_for_file_type">Aucune app trouvée pour ce type de fichier !</string>
   <string name="local_file_list_empty">Aucun fichier n\'est présent dans ce dossier.</string>
-  <string name="filedetails_select_file">Appuyez sur un fichier pour afficher les informations supplémentaires</string>
+  <string name="filedetails_select_file">Sélectionnez un fichier pour afficher des informations supplémentaires</string>
   <string name="filedetails_size">Taille :</string>
   <string name="filedetails_type">Type :</string>
   <string name="filedetails_created">Créé le :</string>
   <string name="filedetails_modified">Modifié le :</string>
   <string name="filedetails_download">Télécharger</string>
-  <string name="filedetails_sync_file">Actualiser le fichier</string>
+  <string name="filedetails_sync_file">Synchroniser</string>
   <string name="filedetails_renamed_in_upload_msg">Le fichier a été renommé en %s pendant le téléversement</string>
   <string name="list_layout">Affichage en liste</string>
-  <string name="action_share_file">Partager le lien</string>
-  <string name="action_unshare_file">Ne plus partager ce lien</string>
+  <string name="action_share">Partage</string>
   <string name="common_yes">Oui</string>
   <string name="common_no">Non</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_download">Annuler le téléchargement</string>
-  <string name="common_cancel_upload">Annuler le téléversement</string>
+  <string name="common_cancel_sync">Annuler la synchronisation</string>
   <string name="common_cancel">Annuler</string>
   <string name="common_save_exit">Sauvegarder &amp; Quitter</string>
   <string name="common_error">Erreur</string>
@@ -200,7 +199,7 @@ Ci-dessous la liste des fichiers locaux, et les fichiers distants dans %5$s auxq
   <string name="auth_can_not_auth_against_server">Impossible de s\'authentifier sur ce serveur</string>
   <string name="auth_account_does_not_exist">Le compte n\'existe pas encore sur ce périphérique</string>
   <string name="favorite">Ajouter aux favoris</string>
-  <string name="unfavorite">Supprimer des favoris</string>
+  <string name="unfavorite">Retirer des favoris</string>
   <string name="common_rename">Renommer</string>
   <string name="common_remove">Supprimer</string>
   <string name="confirmation_remove_alert">Voulez-vous vraiment supprimer %1$s ?</string>
@@ -249,6 +248,9 @@ Ci-dessous la liste des fichiers locaux, et les fichiers distants dans %5$s auxq
   <string name="ssl_validator_label_validity_to">Au :</string>
   <string name="ssl_validator_label_signature">Signature :</string>
   <string name="ssl_validator_label_signature_algorithm">Algorithme :</string>
+  <string name="digest_algorithm_not_available">Cet algorithme de hachage n\'est pas disponible sur votre téléphone.</string>
+  <string name="ssl_validator_label_certificate_fingerprint">Empreinte numérique :</string>
+  <string name="certificate_load_problem">Le chargement du certificat pose problème.</string>
   <string name="ssl_validator_null_cert">Impossible d\'afficher le certificat.</string>
   <string name="ssl_validator_no_info_about_error">- Aucune information sur l\'erreur</string>
   <string name="placeholder_sentence">Ceci est un espace réservé</string>
@@ -274,12 +276,14 @@ Ci-dessous la liste des fichiers locaux, et les fichiers distants dans %5$s auxq
   <string name="share_link_file_error">Une erreur est survenue lors de la tentative de partage de ce fichier ou répertoire</string>
   <string name="unshare_link_file_no_exist">Impossible de supprimer le partage. Vérifiez que le fichier est bien présent</string>
   <string name="unshare_link_file_error">Une erreur est survenue lors de la tentative d’annulation du partage de ce fichier ou répertoire</string>
+  <string name="update_link_file_no_exist">Actualisation impossible. Veuillez vérifier si ce fichier existe</string>
+  <string name="update_link_file_error">Une erreur est survenue lors de la tentative de rafraîchissement du lien partagé</string>
   <string name="share_link_password_title">Saisissez un mot de passe</string>
   <string name="share_link_empty_password">Vous devez saisir un mot de passe</string>
   <string name="activity_chooser_send_file_title">Envoyer</string>
   <string name="copy_link">Copier le lien</string>
   <string name="clipboard_text_copied">Copié dans le presse-papier</string>
-  <string name="error_cant_bind_to_operations_service">Erreur critique : impossible de réaliser des opérations</string>
+  <string name="error_cant_bind_to_operations_service">Erreur critique : impossible de réaliser les opérations</string>
   <string name="network_error_socket_exception">Une erreur est survenue pendant la connexion au serveur.</string>
   <string name="network_error_socket_timeout_exception">Une erreur est survenue pendant l\'attente du serveur. L\'opération n\'a pas pu être effectuée</string>
   <string name="network_error_connect_timeout_exception">Une erreur est survenue pendant l\'attente du serveur. L\'opération n\'a pas pu être effectuée</string>
@@ -290,6 +294,7 @@ Ci-dessous la liste des fichiers locaux, et les fichiers distants dans %5$s auxq
   <string name="forbidden_permissions_delete">d’effacer ce fichier</string>
   <string name="share_link_forbidden_permissions">afin de partager ce fichier</string>
   <string name="unshare_link_forbidden_permissions">afin de ne plus partager ce fichier</string>
+  <string name="update_link_forbidden_permissions">pour mettre à jour ce lien partagé</string>
   <string name="forbidden_permissions_create">de créer ce fichier</string>
   <string name="uploader_upload_forbidden_permissions">afin d’importer dans ce répertoire</string>
   <string name="downloader_download_file_not_found">Ce fichier n’est plus disponible sur le serveur</string>
@@ -298,7 +303,7 @@ Ci-dessous la liste des fichiers locaux, et les fichiers distants dans %5$s auxq
   <string name="auth_redirect_non_secure_connection_title">Le connexion sécurisée est redirigée vers 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_send_no_mail_app">Aucune application trouvée pour l\'envoi de journaux. Installer une application de courriel !</string>
+  <string name="log_send_no_mail_app">Aucune application trouvée pour l\'envoi de logs. Installer une application de courriel !</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>
@@ -319,11 +324,11 @@ Ci-dessous la liste des fichiers locaux, et les fichiers distants dans %5$s auxq
   <string name="prefs_category_instant_uploading">Téléversement immédiat</string>
   <string name="prefs_category_security">Sécurité</string>
   <string name="prefs_instant_video_upload_path_title">Répertoire de téléversement des vidéos</string>
-  <string name="download_folder_failed_content">Le téléchargement du dossier %1$s n\'a pas pu être achevé</string>
+  <string name="sync_folder_failed_content">La synchronisation du dossier %1$s n\'a pas pu être terminée</string>
   <string name="shared_subject_header">a partagé</string>
   <string name="with_you_subject_header">avec vous</string>
-  <string name="subject_token">%1$s a partagé \"%2$s\" avec vous</string>
-  <string name="saml_subject_token">\"%1$s\" a été partagé avec vous</string>
+  <string name="subject_user_shared_with_you">%1$s a partagé \"%2$s\" avec vous</string>
+  <string name="subject_shared_with_you">\"%1$s\" a été partagé avec vous</string>
   <string name="auth_refresh_button">Actualiser la connexion</string>
   <string name="auth_host_address">Adresse du serveur</string>
   <string name="common_error_out_memory">Mémoire insuffisante</string>
@@ -336,4 +341,18 @@ Ci-dessous la liste des fichiers locaux, et les fichiers distants dans %5$s auxq
   <string name="file_list__footer__files">%1$d fichiers</string>
   <string name="file_list__footer__files_and_folder">%1$d fichiers, 1 dossier</string>
   <string name="file_list__footer__files_and_folders">%1$d fichiers, %2$d dossiers</string>
+  <string name="share_dialog_title">Partage</string>
+  <string name="share_with_user_section_title">Partager avec des utilisateurs et des groupes</string>
+  <string name="share_no_users">Aucune donnée partagée avec des utilisateurs pour le moment</string>
+  <string name="share_add_user_or_group">Ajouter un Utilisateur ou un Groupe</string>
+  <string name="share_via_link_section_title">Partager par lien public</string>
+  <string name="share_via_link_expiration_date_label">Spécifier une date d\'expiration</string>
+  <string name="share_via_link_password_label">Protéger par un mot de passe</string>
+  <string name="share_via_link_password_title">Sécurisé</string>
+  <string name="share_get_public_link_button">Obtenir le lien</string>
+  <string name="share_search">Rechercher</string>
+  <string name="search_users_and_groups_hint">Chercher parmi les utilisateurs et groupes</string>
+  <string name="share_group_clarification">%1$s (groupe)</string>
+  <string name="share_sharee_unavailable">Désolé, la version du serveur ne permet pas aux applications d\'initier des partage avec d\'autres utilisateurs.
+\nVeuillez contacter votre administrateur</string>
 </resources>
index 51aa4a4..9a41859 100644 (file)
@@ -72,6 +72,7 @@ Descárgueo de aquí: %2$s</string>
   <string name="file_list_seconds_ago">segundos atrás</string>
   <string name="file_list_empty">Aquí non hai nada. Envíe algo!</string>
   <string name="file_list_loading">Cargando...</string>
+  <string name="file_list_no_app_for_file_type">Non se atopou un App para este tipo de ficheiro!</string>
   <string name="local_file_list_empty">Non hai ficheiros neste cartafol.</string>
   <string name="filedetails_select_file">Prema nun ficheiro para que amose a información adicional.</string>
   <string name="filedetails_size">Tamaño:</string>
@@ -79,16 +80,14 @@ Descárgueo de aquí: %2$s</string>
   <string name="filedetails_created">Creado:</string>
   <string name="filedetails_modified">Modificado:</string>
   <string name="filedetails_download">Descargar</string>
-  <string name="filedetails_sync_file">Actualizar o ficheiro</string>
+  <string name="filedetails_sync_file">Sincronizar</string>
   <string name="filedetails_renamed_in_upload_msg">O ficheiro foi renomeado a %1$s durante o envío</string>
   <string name="list_layout">Deseño da lista</string>
-  <string name="action_share_file">Ligazón para compartir</string>
-  <string name="action_unshare_file">Deixar de compartir a ligazón</string>
+  <string name="action_share">Compartir</string>
   <string name="common_yes">Si</string>
   <string name="common_no">Non</string>
   <string name="common_ok">Aceptar</string>
-  <string name="common_cancel_download">Cancelar a descarga</string>
-  <string name="common_cancel_upload">Cancelar o envío</string>
+  <string name="common_cancel_sync">Parar a sincronización</string>
   <string name="common_cancel">Cancelar</string>
   <string name="common_save_exit">Gardar e saír</string>
   <string name="common_error">Erro</string>
@@ -203,6 +202,7 @@ Descárgueo de aquí: %2$s</string>
   <string name="confirmation_remove_folder_alert">Confirma que quere retirar %1$s e o seu contido?</string>
   <string name="confirmation_remove_local">Só local</string>
   <string name="confirmation_remove_folder_local">Só local</string>
+  <string name="confirmation_remove_remote">Desde servidor</string>
   <string name="confirmation_remove_remote_and_local">Remoto e local</string>
   <string name="remove_success_msg">Retirado correctamente</string>
   <string name="remove_fail_msg">Non foi posíbel retiralo</string>
@@ -307,15 +307,19 @@ Descárgueo de aquí: %2$s</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="copy_file_not_found">Non se puido copiar. Por favor comprobe que o ficheiro existe</string>
+  <string name="copy_file_invalid_into_descendent">Non é posible copiar un cartafol nun descendente seu</string>
   <string name="copy_file_invalid_overwrite">Este ficheiro xa existe no cartafol de destino</string>
+  <string name="copy_file_error">Oconteceu un erro mentras se intentaba copiar este ficheiro ou cartafol</string>
+  <string name="forbidden_permissions_copy">copiar este ficheiro</string>
   <string name="prefs_category_instant_uploading">Envío instantáneo</string>
   <string name="prefs_category_security">Seguridade</string>
   <string name="prefs_instant_video_upload_path_title">Enviar a ruta do vídeo</string>
-  <string name="download_folder_failed_content">Non foi posíbel completar a descarga do cartafol %1$s</string>
+  <string name="sync_folder_failed_content">A sincronización do cartafol %1$s non se completou</string>
   <string name="shared_subject_header">compartido</string>
   <string name="with_you_subject_header">con vostede</string>
-  <string name="subject_token">%1$s compartiu «%2$s» con vostede</string>
-  <string name="saml_subject_token">«%1$s» foi compartido con vostede</string>
+  <string name="subject_user_shared_with_you">%1$s compartiu «%2$s» con vostede</string>
+  <string name="subject_shared_with_you">«%1$s» foi compartido con vostede</string>
   <string name="auth_refresh_button">Actualizar a conexión</string>
   <string name="auth_host_address">Enderezo do servidor</string>
   <string name="common_error_out_memory">Non hai memoria abondo</string>
@@ -328,4 +332,15 @@ Descárgueo de aquí: %2$s</string>
   <string name="file_list__footer__files">%1$d ficheiros</string>
   <string name="file_list__footer__files_and_folder">%1$d ficheiros, 1 cartafol</string>
   <string name="file_list__footer__files_and_folders">%1$d ficheiros, %2$d cartafoles</string>
+  <string name="share_dialog_title">Compartindo</string>
+  <string name="share_no_users">Aínda non hai datos compartidos con usuarios</string>
+  <string name="share_add_user_or_group">Engadir Usuario ou Grupo</string>
+  <string name="share_via_link_section_title">Ligazón para compartir</string>
+  <string name="share_via_link_expiration_date_label">Definir a data de caducidade</string>
+  <string name="share_via_link_password_label">Protexido con contrasinal</string>
+  <string name="share_search">Buscar</string>
+  <string name="search_users_and_groups_hint">Buscar usuarios e grupos</string>
+  <string name="share_group_clarification">%1$s (grupo)</string>
+  <string name="share_sharee_unavailable">Sentímolo, pero a versión do seu servidor non permite compartir con usuarios desde o cliente.
+\nPor favor contacte co seu administrador</string>
 </resources>
index 1a62cc2..62e34fc 100644 (file)
   <string name="filedetails_created">מועד היצירה:</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">ביטול קישור לשיתוף</string>
+  <string name="action_share">שיתוף</string>
   <string name="common_yes">כן</string>
   <string name="common_no">לא</string>
   <string name="common_ok">אישור</string>
-  <string name="common_cancel_download">ביטול ההורדה</string>
-  <string name="common_cancel_upload">ביטול ההעלאה</string>
   <string name="common_cancel">ביטול</string>
   <string name="common_save_exit">לשמור ולצאת</string>
   <string name="common_error">שגיאה</string>
   <string name="folder_picker_choose_button_text">בחירה</string>
   <string name="prefs_category_security">אבטחה</string>
   <string name="auth_host_address">כתובת שרת</string>
+  <string name="share_dialog_title">שיתוף</string>
+  <string name="share_via_link_section_title">קישור לשיתוף</string>
+  <string name="share_via_link_expiration_date_label">הגדרת תאריך תפוגה</string>
+  <string name="share_via_link_password_label">הגנה בססמה</string>
+  <string name="share_search">חיפוש</string>
 </resources>
index feb62ce..ae1a5d7 100644 (file)
@@ -28,6 +28,7 @@
   <string name="setup_btn_connect">जुड़ें </string>
   <string name="uploader_btn_upload_text">अपलोड </string>
   <string name="uploader_btn_new_folder_text">नया फ़ोल्डर</string>
+  <string name="action_share">साझा करें</string>
   <string name="common_cancel">रद्द करें </string>
   <string name="common_error">त्रुटि</string>
   <string name="ssl_validator_btn_details_see">विवरण </string>
index 12e7ef4..7e42269 100644 (file)
   <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="filedetails_download">Preuzimanje</string>
-  <string name="action_share_file">Podijelite vezu</string>
+  <string name="action_share">Dijeljenje</string>
   <string name="common_yes">Da</string>
   <string name="common_no">Ne</string>
   <string name="common_ok">U redu</string>
-  <string name="common_cancel_upload">Prekini upload</string>
   <string name="common_cancel">Odustani</string>
   <string name="common_error">Greška</string>
   <string name="common_error_unknown">Nepoznata pogreška</string>
@@ -66,4 +65,9 @@
   <string name="folder_picker_choose_button_text">Odaberite</string>
   <string name="prefs_category_security">Sigurnost</string>
   <string name="auth_host_address">Adresa poslužitelja</string>
+  <string name="share_dialog_title">Dijeljenje zajedničkih resursa</string>
+  <string name="share_via_link_section_title">Podijelite vezu</string>
+  <string name="share_via_link_expiration_date_label">Odredite datum isteka</string>
+  <string name="share_via_link_password_label">Zaštititi lozinkom</string>
+  <string name="share_search">pretraži</string>
 </resources>
index b8bae64..47db4e4 100644 (file)
   <string name="actionbar_settings">Beállítások</string>
   <string name="actionbar_see_details">Részletek</string>
   <string name="actionbar_send_file">Küldjük el</string>
+  <string name="actionbar_sort">Rendezés</string>
+  <string name="actionbar_sort_title">Rendezés elve</string>
+  <string-array name="actionbar_sortby">
+    <item>A-Z</item>
+    <item>Újabb - régebbi</item>
+  </string-array>
   <!--TODO re-enable when server-side folder size calculation is available   
        <item>Biggest - Smallest</item>-->
   <!--TODO re-enable when "Accounts" is available in Navigation Drawer-->
   <!--<string name="drawer_item_accounts">Accounts</string>-->
+  <string name="drawer_item_all_files">Összes fájl</string>
   <!--TODO re-enable when "On Device" is available
     <string name="drawer_item_on_device">On device</string>-->
   <string name="drawer_item_settings">Beállítások</string>
+  <string name="drawer_item_logs">Naplófájlok</string>
+  <string name="drawer_close">Bezárás</string>
   <string name="drawer_open">Megnyitás</string>
   <string name="prefs_category_general">Általános</string>
   <string name="prefs_category_more">Több</string>
@@ -36,6 +45,7 @@
   <string name="prefs_recommend">Ajánlja egy barátjának</string>
   <string name="prefs_feedback">Visszajelzés</string>
   <string name="prefs_imprint">Impresszum</string>
+  <string name="prefs_remember_last_share_location">Emlékezzen a megosztás helyére</string>
   <string name="recommend_subject">Próbálja ki %1$s-t az okostelefonján!</string>
   <string name="auth_check_server">Szerver állapot ellenörzés</string>
   <string name="auth_host_url">Kiszolgáló címe https://...</string>
@@ -57,6 +67,7 @@
   <string name="uploader_info_uploading">Feltöltés</string>
   <string name="file_list_seconds_ago">pár másodperce</string>
   <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="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_created">Készült:</string>
   <string name="filedetails_modified">Módosítva:</string>
   <string name="filedetails_download">Letöltés</string>
-  <string name="filedetails_sync_file">File frissítése</string>
+  <string name="filedetails_sync_file">Szinkronizálás</string>
   <string name="filedetails_renamed_in_upload_msg">A feltöltés során az állmányt erre neveztük át: %1$s</string>
-  <string name="action_share_file">Megosztás hivatkozással</string>
-  <string name="action_unshare_file">Megosztás visszavonása</string>
+  <string name="list_layout">Lista Elrendezés</string>
+  <string name="action_share">Megosztás</string>
   <string name="common_yes">Igen</string>
   <string name="common_no">Nem</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_download">A letöltés megszakítása</string>
-  <string name="common_cancel_upload">A feltöltés megszakítása</string>
+  <string name="common_cancel_sync">Szinkronizálás megállítása</string>
   <string name="common_cancel">Mégsem</string>
   <string name="common_save_exit">Mentés &amp; Kilépés</string>
   <string name="common_error">Hiba</string>
   <string name="auth_no_net_conn_title">Nincs hálózati kapcsolat</string>
   <string name="auth_nossl_plain_ok_title">Nem érhető el biztonságos kapcsolat.</string>
   <string name="auth_connection_established">A kapcsolat létrejött</string>
+  <string name="auth_testing_connection">Kapcsolat ellenőrzése</string>
   <string name="auth_not_configured_title">Hibás a kiszolgáló beállítása</string>
   <string name="auth_account_not_new">Egy bejelentkezési beállítás már létezik ugyanehhez a kiszolgálóhoz és felhasználóhoz</string>
   <string name="auth_account_not_the_same">A megadott felhasználó nem azonos ezzel a belépési jogosultsággal</string>
   <string name="sync_file_nothing_to_do_msg">Az állományok már szinkonizálva vannak</string>
   <string name="create_dir_fail_msg">A könyvtárt nem lehet létrehozni</string>
   <string name="filename_forbidden_characters">Nem megendedett karakterek: / \\ &lt; &gt; : \" | ? *</string>
+  <string name="filename_forbidden_charaters_from_server">A fájlnév legalább egy érvénytelen karaktert tartalmaz!</string>
   <string name="filename_empty">A fájl név nem lehet üres</string>
   <string name="wait_a_moment">Egy pillanat...</string>
   <string name="filedisplay_unexpected_bad_get_content">Váratlan hiba; válassza ki a fájlt más programból</string>
   <string name="instant_video_upload_on_wifi">Videó feltöltés csak WIFI-vel</string>
   <string name="instant_upload_path">/InstantUpload</string>
   <string name="conflict_keep_both">Mindkettő megtartása</string>
+  <string name="conflict_use_local_version">helyi verzió</string>
+  <string name="conflict_use_server_version">szerver verzió</string>
   <string name="preview_image_description">Előnézeti kép</string>
   <string name="preview_image_error_unknown_format">Ez a kép nem jeleníthető meg</string>
   <string name="error__upload__local_file_not_copied">%1$s nem lehet másolni a %2$s helyi könyvtárba</string>
+  <string name="prefs_instant_upload_path_title">Feltöltési Elérési Út</string>
   <string name="share_link_file_error">Hiba lépett fel a mappa megosztásakor</string>
   <string name="unshare_link_file_error">Hiba lépett fel a mappa megosztásának visszavonásakor</string>
+  <string name="share_link_password_title">Jelszó beírása</string>
   <string name="activity_chooser_send_file_title">Küldjük el</string>
   <string name="copy_link">Link másolása</string>
   <string name="clipboard_text_copied">Bemásolva a vágólapra</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>
+  <string name="shared_subject_header">megosztva</string>
+  <string name="with_you_subject_header">veled</string>
   <string name="auth_host_address">A kiszolgáló címe</string>
+  <string name="common_error_out_memory">Nincs elég memória</string>
+  <string name="username">Felhasználónév</string>
+  <string name="file_list__footer__folder">1 könyvtár</string>
+  <string name="file_list__footer__folders">%1$d könyvtár</string>
+  <string name="file_list__footer__file">1 fájl</string>
+  <string name="file_list__footer__file_and_folder">1 fájl, 1 könyvtár</string>
+  <string name="file_list__footer__file_and_folders">1 fájl, %1$d könyvtár</string>
+  <string name="file_list__footer__files">%1$d fájl</string>
+  <string name="file_list__footer__files_and_folder">%1$d fájl, 1 könyvtár</string>
+  <string name="file_list__footer__files_and_folders">%1$d fájl, %2$d könyvtár</string>
+  <string name="share_dialog_title">Megosztás</string>
+  <string name="share_via_link_section_title">Megosztás hivatkozással</string>
+  <string name="share_via_link_expiration_date_label">Legyen lejárati idő</string>
+  <string name="share_via_link_password_label">Jelszóval is védem</string>
+  <string name="share_search">Keresés</string>
 </resources>
index 4adc364..1debd95 100644 (file)
@@ -1,11 +1,46 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <resources>
+  <string name="about_version">տարբերակ %1$s</string>
+  <string name="actionbar_upload_files">Ֆայլեր</string>
+  <string name="actionbar_mkdir">Նոր պանակ</string>
+  <string name="actionbar_send_file">Ուղարկել</string>
   <!--TODO re-enable when server-side folder size calculation is available   
        <item>Biggest - Smallest</item>-->
   <!--TODO re-enable when "Accounts" is available in Navigation Drawer-->
   <!--<string name="drawer_item_accounts">Accounts</string>-->
+  <string name="drawer_item_all_files">Բոլոր ֆայլերը</string>
   <!--TODO re-enable when "On Device" is available
     <string name="drawer_item_on_device">On device</string>-->
+  <string name="drawer_close">Փակել</string>
+  <string name="drawer_open">Բացել</string>
+  <string name="auth_username">Օգտանուն</string>
+  <string name="auth_password">Գաղտնաբառ</string>
+  <string name="sync_string_files">Ֆայլեր</string>
+  <string name="uploader_btn_new_folder_text">Նոր պանակ</string>
+  <string name="file_list_seconds_ago">վրկ. առաջ</string>
+  <string name="filedetails_size">Չափս.</string>
   <string name="filedetails_download">Բեռնել</string>
+  <string name="action_share">Կիսվել</string>
+  <string name="common_yes">Այո</string>
+  <string name="common_no">Ոչ</string>
+  <string name="common_cancel">Չեղարկել</string>
+  <string name="common_error">Սխալ</string>
+  <string name="uploader_info_dirname">Պանակի անուն</string>
+  <string name="common_rename">Վերանվանել</string>
+  <string name="ssl_validator_label_C">Երկիր.</string>
+  <string name="ssl_validator_label_validity_from">Ումից.</string>
+  <string name="ssl_validator_label_validity_to">Ում.</string>
+  <string name="placeholder_filesize">389 ԿԲ</string>
+  <string name="activity_chooser_send_file_title">Ուղարկել</string>
   <string name="empty"></string>
+  <string name="username">Օգտանուն</string>
+  <string name="file_list__footer__folder">1 պանակ</string>
+  <string name="file_list__footer__folders">%1$d պանակ</string>
+  <string name="file_list__footer__file">1 ֆայլ</string>
+  <string name="file_list__footer__file_and_folder">1 ֆայլ, 1 պանակ</string>
+  <string name="file_list__footer__file_and_folders">1 ֆայլ, %1$d պանակ</string>
+  <string name="file_list__footer__files">%1$d ֆայլ</string>
+  <string name="file_list__footer__files_and_folder">%1$d ֆայլ, 1 պանակ</string>
+  <string name="file_list__footer__files_and_folders">%1$d ֆայլ, %2$d պանակ</string>
+  <string name="share_via_link_section_title">Կիսվել հղմամբ</string>
 </resources>
index efb3d3d..402b64a 100644 (file)
   <string name="filedetails_size">Dimension:</string>
   <string name="filedetails_type">Typo:</string>
   <string name="filedetails_download">Discargar</string>
-  <string name="action_share_file">Compartir ligamine</string>
+  <string name="action_share">Compartir</string>
   <string name="common_yes">Si</string>
   <string name="common_no">No</string>
   <string name="common_ok">Ok</string>
-  <string name="common_cancel_download">Cancellar discarga</string>
   <string name="common_cancel">Cancellar</string>
   <string name="common_error">Error</string>
   <string name="common_error_unknown">Error Incognite</string>
+  <string name="about_title">A proposito</string>
   <string name="change_password">Cambiar contrasigno</string>
   <string name="delete_account">Deler conto</string>
   <string name="uploader_info_dirname">Nomine de dossier</string>
@@ -45,4 +45,8 @@
   <string name="prefs_category_accounts">Contos</string>
   <string name="saml_authentication_wrong_pass">Contrasigno errate</string>
   <string name="folder_picker_choose_button_text">Seliger</string>
+  <string name="share_via_link_section_title">Compartir ligamine</string>
+  <string name="share_via_link_expiration_date_label">Fixa data de expiration</string>
+  <string name="share_via_link_password_label">Protegite per contrasigno</string>
+  <string name="share_search">Cercar</string>
 </resources>
index 76fa404..03b6c8a 100644 (file)
@@ -4,7 +4,7 @@
   <string name="about_version">versi %1$s</string>
   <string name="actionbar_sync">Segarkan akun</string>
   <string name="actionbar_upload">Unggah</string>
-  <string name="actionbar_upload_from_apps">Konten dari apl lain</string>
+  <string name="actionbar_upload_from_apps">Konten dari aplikasi lain</string>
   <string name="actionbar_upload_files">Berkas</string>
   <string name="actionbar_open_with">Buka dengan</string>
   <string name="actionbar_mkdir">Folder baru</string>
@@ -71,6 +71,7 @@
   <string name="file_list_seconds_ago">beberapa detik yang lalu</string>
   <string name="file_list_empty">Tidak ada apa-apa di sini. Unggah sesuatu!</string>
   <string name="file_list_loading">Memuat...</string>
+  <string name="file_list_no_app_for_file_type">Aplikasi tidak ditemukan untuk tipe berkas ini!</string>
   <string name="local_file_list_empty">Tidak ada satupun berkas dalam folder ini.</string>
   <string name="filedetails_select_file">Sentuh pada berkas untuk menampilkan informasi tambahan</string>
   <string name="filedetails_size">Ukuran:</string>
   <string name="filedetails_created">Dibuat:</string>
   <string name="filedetails_modified">Diubah:</string>
   <string name="filedetails_download">Unduh</string>
-  <string name="filedetails_sync_file">Segarkan berkas</string>
   <string name="filedetails_renamed_in_upload_msg">Berkas diubah namanya menjadi %1$s saat pengunggahan</string>
   <string name="list_layout">Daftar Tata Letak</string>
-  <string name="action_share_file">Bagikan tautan</string>
-  <string name="action_unshare_file">Batal bagikan tautan</string>
+  <string name="action_share">Bagikan</string>
   <string name="common_yes">Ya</string>
   <string name="common_no">Tidak</string>
   <string name="common_ok">Oke</string>
-  <string name="common_cancel_download">Batal mengunduh</string>
-  <string name="common_cancel_upload">Batal mengunggah</string>
   <string name="common_cancel">Batal</string>
   <string name="common_save_exit">Simpan &amp; Keluar</string>
   <string name="common_error">Kesalahan</string>
   <string name="common_loading">Memuat ...</string>
-  <string name="common_error_unknown">Galat tidak diketahui</string>
+  <string name="common_error_unknown">Kesalahan tidak diketahui</string>
   <string name="about_title">Tentang</string>
   <string name="change_password">Ubah sandi</string>
   <string name="delete_account">Hapus akun</string>
   <string name="foreign_files_success">Semua berkas sudah dipindahkan</string>
   <string name="foreign_files_fail">Beberapa berkas tidak dapat dipindahkan</string>
   <string name="foreign_files_local_text">Lokal: %1$s</string>
-  <string name="foreign_files_remote_text">Jauh: %1$s</string>
+  <string name="foreign_files_remote_text">Remote: %1$s</string>
   <string name="upload_query_move_foreign_files">Ruang tidak cukup untuk menyalin berkas terpilih kedalam folder %1$s. Apakah Anda ingin memindahkannya saja?</string>
   <string name="pass_code_enter_pass_code">Silakan masukkan kode sandi Anda</string>
   <string name="pass_code_configure_your_pass_code">Masukkan kode sandi Anda</string>
   <string name="media_event_done">%1$s pemutaran selesai</string>
   <string name="media_err_nothing_to_play">Tidak ditemukan berkas media</string>
   <string name="media_err_no_account">Tidak ada akun yang diberikan</string>
-  <string name="media_err_not_in_owncloud">Brkas tidak didalam akun yang sah</string>
+  <string name="media_err_not_in_owncloud">Berkas tidak didalam akun yang sah</string>
   <string name="media_err_unsupported">Kodek media tidak didukung</string>
   <string name="media_err_io">Berkas media tidak dapat dibaca</string>
   <string name="media_err_malformed">Berkas media tidak di enkode dengan benar</string>
   <string name="prefs_category_instant_uploading">Unggah Cepat</string>
   <string name="prefs_category_security">Keamanan</string>
   <string name="prefs_instant_video_upload_path_title">Unggah Lokasi Video</string>
-  <string name="download_folder_failed_content">Mengunduh folder %1$s  tidak selesai</string>
   <string name="shared_subject_header">dibagikan</string>
   <string name="with_you_subject_header">kepada Anda</string>
-  <string name="subject_token">%1$s dibagikan \"%2$s\" kepada Anda</string>
-  <string name="saml_subject_token">\"%1$s\" telah membagikan dengan Anda</string>
+  <string name="subject_user_shared_with_you">%1$s dibagikan \"%2$s\" kepada Anda</string>
+  <string name="subject_shared_with_you">\"%1$s\" telah membagikan dengan Anda</string>
   <string name="auth_refresh_button">Menyegarkan sambungan</string>
   <string name="auth_host_address">Alamat server</string>
   <string name="common_error_out_memory">Memori tidak cukup</string>
   <string name="file_list__footer__files">%1$d berkas</string>
   <string name="file_list__footer__files_and_folder">%1$d berkas, 1 folder</string>
   <string name="file_list__footer__files_and_folders">%1$d berkas, %2$d folder</string>
+  <string name="share_dialog_title">Berbagi</string>
+  <string name="share_no_users">Tidak ada data yang dibagikan dengan pengguna</string>
+  <string name="share_add_user_or_group">Tambah Pengguna atau Grup</string>
+  <string name="share_via_link_section_title">Bagikan tautan</string>
+  <string name="share_via_link_expiration_date_label">Atur tanggal kedaluwarsa</string>
+  <string name="share_via_link_password_label">Lindungi dengan sandi</string>
+  <string name="share_search">Cari</string>
 </resources>
index 2d50d6f..3e89b52 100644 (file)
   <string name="file_list_seconds_ago">sek.</string>
   <string name="file_list_empty">Ekkert hér. Settu eitthvað inn!</string>
   <string name="filedetails_download">Niðurhal</string>
-  <string name="action_share_file">Deila hlekk</string>
+  <string name="action_share">Deila</string>
   <string name="common_yes">Já</string>
   <string name="common_no">Nei</string>
   <string name="common_ok">Í lagi</string>
-  <string name="common_cancel_upload">Hætta við innsendingu</string>
   <string name="common_cancel">Hætta við</string>
   <string name="common_error"><strong>Villa</strong></string>
   <string name="change_password">Breyta lykilorði</string>
@@ -36,4 +35,8 @@
   <string name="actionbar_move">Færa</string>
   <string name="folder_picker_choose_button_text">Veldu</string>
   <string name="auth_host_address">Host nafn netþjóns</string>
+  <string name="share_via_link_section_title">Deila hlekk</string>
+  <string name="share_via_link_expiration_date_label">Setja gildistíma</string>
+  <string name="share_via_link_password_label">Verja með lykilorði</string>
+  <string name="share_search">Leita</string>
 </resources>
index 874bbe6..e0fd464 100644 (file)
@@ -71,6 +71,7 @@
   <string name="file_list_seconds_ago">secondi fa</string>
   <string name="file_list_empty">Non c\'è niente qui. Carica qualcosa!</string>
   <string name="file_list_loading">Caricamento in corso...</string>
+  <string name="file_list_no_app_for_file_type">Nessuna applicazione trovata per il tipo di file.</string>
   <string name="local_file_list_empty">Non ci sono file in questa cartella.</string>
   <string name="filedetails_select_file">Tocca un file per visualizzare informazioni aggiuntive.</string>
   <string name="filedetails_size">Dimensione:</string>
   <string name="filedetails_created">Creato:</string>
   <string name="filedetails_modified">Modificato:</string>
   <string name="filedetails_download">Scarica</string>
-  <string name="filedetails_sync_file">Aggiorna file</string>
+  <string name="filedetails_sync_file">Sincronizza</string>
   <string name="filedetails_renamed_in_upload_msg">Il file è stato rinominato in %1$s durante il caricamento</string>
   <string name="list_layout">Struttura elenco</string>
-  <string name="action_share_file">Condividi collegamento</string>
-  <string name="action_unshare_file">Rimuovi condivisione collegamento</string>
+  <string name="action_share">Condividi</string>
   <string name="common_yes">Sì</string>
   <string name="common_no">No</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_download">Annulla lo scaricamento</string>
-  <string name="common_cancel_upload">Annulla caricamento</string>
+  <string name="common_cancel_sync">Annulla sincronizzazione</string>
   <string name="common_cancel">Annulla</string>
   <string name="common_save_exit">Salva ed esci</string>
   <string name="common_error">Errore</string>
   <string name="ssl_validator_label_validity_to">A:</string>
   <string name="ssl_validator_label_signature">Firma:</string>
   <string name="ssl_validator_label_signature_algorithm">Algoritmo:</string>
+  <string name="digest_algorithm_not_available">Questo algoritmo digest non è disponibile sul tuo telefono.</string>
+  <string name="ssl_validator_label_certificate_fingerprint">Impronta digitale:</string>
+  <string name="certificate_load_problem">Si è verificato un problema durante il caricamento del certificato.</string>
   <string name="ssl_validator_null_cert">Il certificato non può essere mostrato.</string>
   <string name="ssl_validator_no_info_about_error">- Nessuna informazione sull\'errore</string>
   <string name="placeholder_sentence">Questo è un segnaposto</string>
   <string name="share_link_file_error">Si è verificato un errore durante il tentativo di condivisione del file o della cartella</string>
   <string name="unshare_link_file_no_exist">Impossibile rimuovere dalla condivisione. Assicurati che il file esista</string>
   <string name="unshare_link_file_error">Si è verificato un errore durante il tentativo di rimuovere la condivisione del file o della cartella</string>
+  <string name="update_link_file_no_exist">Impossibile aggiornare. Assicurati che il file esista</string>
+  <string name="update_link_file_error">Si è verificato un errore durante il tentativo di aggiornare il collegamento condiviso</string>
   <string name="share_link_password_title">Digita una password</string>
   <string name="share_link_empty_password">Devi digitare una password</string>
   <string name="activity_chooser_send_file_title">Invia</string>
   <string name="forbidden_permissions_delete">per eliminare questo file</string>
   <string name="share_link_forbidden_permissions">per condividere questo file</string>
   <string name="unshare_link_forbidden_permissions">per rimuovere la condivisione di questo file</string>
+  <string name="update_link_forbidden_permissions">per aggiornare questo collegamento condiviso</string>
   <string name="forbidden_permissions_create">per creare il file</string>
   <string name="uploader_upload_forbidden_permissions">per caricare in questa cartella</string>
   <string name="downloader_download_file_not_found">Il file non è più disponibile sul server</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>
-  <string name="download_folder_failed_content">Lo scaricamento della cartella %1$s non può essere completato</string>
+  <string name="sync_folder_failed_content">La sincronizzazione della cartella %1$s non può essere completata</string>
   <string name="shared_subject_header">condiviso</string>
   <string name="with_you_subject_header">con te</string>
-  <string name="subject_token">%1$s ha condiviso \"%2$s\" con te</string>
-  <string name="saml_subject_token">\"%1$s\" è stato condiviso con te</string>
+  <string name="subject_user_shared_with_you">%1$s ha condiviso \"%2$s\" con te</string>
+  <string name="subject_shared_with_you">\"%1$s\" è stato condiviso con te</string>
   <string name="auth_refresh_button">Aggiorna la connessione</string>
   <string name="auth_host_address">Indirizzo del server</string>
   <string name="common_error_out_memory">Memoria insufficiente</string>
   <string name="file_list__footer__files">%1$d file</string>
   <string name="file_list__footer__files_and_folder">%1$d file, 1 cartella</string>
   <string name="file_list__footer__files_and_folders">%1$d file, %2$d cartelle</string>
+  <string name="share_dialog_title">Condivisione</string>
+  <string name="share_with_user_section_title">Condividi con utenti e gruppi</string>
+  <string name="share_no_users">Ancora nessun dato condiviso con gli utenti </string>
+  <string name="share_add_user_or_group">Aggiungi utente o gruppo</string>
+  <string name="share_via_link_section_title">Condividi collegamento</string>
+  <string name="share_via_link_expiration_date_label">Imposta data di scadenza</string>
+  <string name="share_via_link_password_label">Proteggi con password</string>
+  <string name="share_via_link_password_title">Protetto</string>
+  <string name="share_get_public_link_button">Ottieni collegamento</string>
+  <string name="share_search">Cerca</string>
+  <string name="search_users_and_groups_hint">Cerca utenti e gruppi</string>
+  <string name="share_group_clarification">%1$s (gruppo)</string>
+  <string name="share_sharee_unavailable">Spiacenti, la versione del tuo server non consente la condivisione con utenti dai client.
+\nContatta il tuo amministratore.</string>
 </resources>
index b51e644..1982a56 100644 (file)
@@ -72,6 +72,7 @@
   <string name="file_list_seconds_ago">数秒前</string>
   <string name="file_list_empty">ここには何もありません。何かアップロードしてください。</string>
   <string name="file_list_loading">読込中...</string>
+  <string name="file_list_no_app_for_file_type">この種類のファイルに対応するアプリはありません!</string>
   <string name="local_file_list_empty">このフォルダーにはファイルがありません。</string>
   <string name="filedetails_select_file">ファイルをタップすると追加情報が表示されます。</string>
   <string name="filedetails_size">サイズ:</string>
   <string name="filedetails_sync_file">ファイルを同期</string>
   <string name="filedetails_renamed_in_upload_msg">アップロード中にファイル名を %1$s に変更しました</string>
   <string name="list_layout">リストレイアウト</string>
-  <string name="action_share_file">URLで共有</string>
-  <string name="action_unshare_file">未共有のリンク</string>
+  <string name="action_share">共有</string>
   <string name="common_yes">はい</string>
   <string name="common_no">いいえ</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_download">ダウンロードをキャンセル</string>
-  <string name="common_cancel_upload">アップロードをキャンセル</string>
+  <string name="common_cancel_sync">同期をキャンセル</string>
   <string name="common_cancel">キャンセル</string>
   <string name="common_save_exit">保存して終了</string>
   <string name="common_error">エラー</string>
   <string name="confirmation_remove_folder_alert">本当に %1$s およびそのコンテンツを削除してもよろしいですか?</string>
   <string name="confirmation_remove_local">ローカルのみ</string>
   <string name="confirmation_remove_folder_local">ローカルのみ</string>
+  <string name="confirmation_remove_remote">サーバーから</string>
+  <string name="confirmation_remove_remote_and_local">リモートとローカルの両方</string>
   <string name="remove_success_msg">削除に成功しました</string>
   <string name="remove_fail_msg">削除を完了できませんでした</string>
   <string name="rename_dialog_title">新しい名前を入力</string>
   <string name="ssl_validator_label_validity_to">先:</string>
   <string name="ssl_validator_label_signature">署名:</string>
   <string name="ssl_validator_label_signature_algorithm">アルゴリズム:</string>
+  <string name="digest_algorithm_not_available">このスマートフォンでは、ダイジェストアルゴリズムが利用できません。</string>
+  <string name="ssl_validator_label_certificate_fingerprint">フィンガープリント:</string>
+  <string name="certificate_load_problem">証明書の読み込みに問題がありました。</string>
   <string name="ssl_validator_null_cert">証明書が表示できません。</string>
   <string name="ssl_validator_no_info_about_error">-エラーについての詳細情報はありません</string>
   <string name="placeholder_sentence">これはプレースホルダです</string>
   <string name="conflict_title">ファイルが競合</string>
   <string name="conflict_message">どちらのファイルを保存したいですか?両方のバージョンを選択した場合は、ファイル名の後ろに数字を追加したファイルのコピーを作成します。</string>
   <string name="conflict_keep_both">両方を保持</string>
+  <string name="conflict_use_local_version">ローカルのもの</string>
+  <string name="conflict_use_server_version">サーバーのもの</string>
   <string name="preview_image_description">イメージプレビュー</string>
   <string name="preview_image_error_unknown_format">この画像は表示できません</string>
   <string name="error__upload__local_file_not_copied">%1$s は、ローカルフォルダー %2$s  にコピーできませんでした。</string>
   <string name="share_link_file_error">このファイルまたはフォルダーを共有する際にエラーが発生しました</string>
   <string name="unshare_link_file_no_exist">共有を解除できません。ファイルがあるか確認してください。</string>
   <string name="unshare_link_file_error">このファイルまたはフォルダーの共有を解除する際にエラーが発生しました</string>
+  <string name="update_link_file_no_exist">更新できません。ファイルがあるか確認してください。</string>
+  <string name="update_link_file_error">共有リンクを更新する際にエラーが発生しました</string>
   <string name="share_link_password_title">パスワードを入力</string>
   <string name="share_link_empty_password">パスワードを入力しなければなりません</string>
   <string name="activity_chooser_send_file_title">送信</string>
   <string name="forbidden_permissions_delete">ファイルを削除</string>
   <string name="share_link_forbidden_permissions">ファイルを共有</string>
   <string name="unshare_link_forbidden_permissions">ファイルの共有を解除</string>
+  <string name="update_link_forbidden_permissions">この共有リンクを更新</string>
   <string name="forbidden_permissions_create">ファイルを作成</string>
   <string name="uploader_upload_forbidden_permissions">フォルダーをアップロード</string>
   <string name="downloader_download_file_not_found">ファイルはサーバー上で利用できません</string>
   <string name="move_file_invalid_overwrite">そのファイルは宛先フォルダーにすでに存在します。</string>
   <string name="move_file_error">このファイルまたはフォルダーを移動する際にエラーが発生しました</string>
   <string name="forbidden_permissions_move">このファイルを移動</string>
+  <string name="copy_file_not_found">コピーできません。ファイルがあるか確認してください。</string>
+  <string name="copy_file_invalid_into_descendent">フォルダーを子フォルダーへコピーすることはできません。</string>
   <string name="copy_file_invalid_overwrite">そのファイルは宛先フォルダーにすでに存在します。</string>
+  <string name="copy_file_error">このファイルまたはフォルダーをコピーする際にエラーが発生しました</string>
+  <string name="forbidden_permissions_copy">このファイルをコピー</string>
   <string name="prefs_category_instant_uploading">自動アップロード</string>
   <string name="prefs_category_security">セキュリティ</string>
   <string name="prefs_instant_video_upload_path_title">動画のアップロードパス</string>
-  <string name="download_folder_failed_content">%1$s フォルダーのダウンロードが完了しませんでした</string>
+  <string name="sync_folder_failed_content">%1$s フォルダーの同期が完了しませんでした。</string>
   <string name="shared_subject_header">共有中</string>
   <string name="with_you_subject_header">あなたと</string>
-  <string name="subject_token">%1$s は \"%2$s\" をあなたと共有しました</string>
-  <string name="saml_subject_token">\"%1$s\" があなたと共有しました</string>
+  <string name="subject_user_shared_with_you">%1$s は \"%2$s\" をあなたと共有しました</string>
+  <string name="subject_shared_with_you">\"%1$s\" があなたと共有しました</string>
   <string name="auth_refresh_button">再接続中</string>
   <string name="auth_host_address">サーバーアドレス</string>
   <string name="common_error_out_memory">十分なメモリがありません</string>
   <string name="file_list__footer__files">%1$d ファイル</string>
   <string name="file_list__footer__files_and_folder">%1$d ファイル、1 フォルダー</string>
   <string name="file_list__footer__files_and_folders">%1$d ファイル、%2$d フォルダー</string>
+  <string name="share_dialog_title">共有</string>
+  <string name="share_with_user_section_title">ユーザーとグループで共有</string>
+  <string name="share_no_users">ユーザーと共有されているデータはありません</string>
+  <string name="share_add_user_or_group">ユーザーまたはグループを追加</string>
+  <string name="share_via_link_section_title">URLで共有</string>
+  <string name="share_via_link_expiration_date_label">有効期限を設定</string>
+  <string name="share_via_link_password_label">パスワード保護を有効化</string>
+  <string name="share_via_link_password_title">セキュア</string>
+  <string name="share_get_public_link_button">リンクを取得</string>
+  <string name="share_search">検索</string>
+  <string name="search_users_and_groups_hint">ユーザーとグループを検索</string>
+  <string name="share_group_clarification">%1$s (グループ)</string>
+  <string name="share_sharee_unavailable">申し訳ありませんが、このサーバーのバージョンではこのクライアントアプリ上で他のユーザーと共有することができません。
+        \n管理者に相談してしてください。</string>
 </resources>
index 0d7d860..acdeb62 100644 (file)
   <string name="filedetails_modified">მოდიფიცირებულია:</string>
   <string name="filedetails_download">ჩამოტვირთვა</string>
   <string name="filedetails_renamed_in_upload_msg">ფაილ %1$s–ზე გადარქმეულ იქნა სახელი ატვირთვის დროს</string>
+  <string name="action_share">გაზიარება</string>
   <string name="common_yes">კი</string>
   <string name="common_no">არა</string>
   <string name="common_ok">დიახ</string>
-  <string name="common_cancel_download">ჩამოტვირთვის შეჩერება</string>
-  <string name="common_cancel_upload">ატვირთვის გაუქმება</string>
   <string name="common_cancel">გაუქმება</string>
   <string name="common_save_exit">შენახვა &amp;გამოსვლა</string>
   <string name="common_error">შეცდომა</string>
   <string name="folder_picker_choose_button_text">არჩევა</string>
   <string name="prefs_category_security">უსაფრთხოება</string>
   <string name="auth_host_address">სერვერის მისამართი</string>
+  <string name="share_dialog_title">გაზიარება</string>
+  <string name="share_via_link_expiration_date_label">მიუთითე ვადის გასვლის დრო</string>
+  <string name="share_via_link_password_label">პაროლით დაცვა</string>
+  <string name="share_search">ძებნა</string>
 </resources>
index 68b3921..ece7d32 100644 (file)
   <string name="filedetails_created">បាន​បង្កើត៖</string>
   <string name="filedetails_modified">បាន​កែ​សម្រួល៖</string>
   <string name="filedetails_download">ទាញយក</string>
+  <string name="action_share">ចែក​រំលែក</string>
   <string name="common_yes">ព្រម</string>
   <string name="common_no">ទេ</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_download">បោះបង់ការទាញយក</string>
-  <string name="common_cancel_upload">បោះបង់​ការ​ផ្ទុកឡើង</string>
   <string name="common_cancel">លើកលែង</string>
   <string name="common_save_exit">រក្សាទុក &amp; ចាកចេញ</string>
   <string name="common_error">កំហុស</string>
   <string name="folder_picker_choose_button_text">ជ្រើស</string>
   <string name="prefs_category_security">សុវត្ថិភាព</string>
   <string name="auth_host_address">អាសយដ្ឋាន​ម៉ាស៊ីន​បម្រើ</string>
+  <string name="share_dialog_title">ការ​ចែក​រំលែក</string>
+  <string name="share_via_link_expiration_date_label">កំណត់​ពេល​ផុត​កំណត់</string>
+  <string name="share_via_link_password_label">ការ​ពារ​ដោយ​ពាក្យ​សម្ងាត់</string>
+  <string name="share_search">ស្វែង​រក</string>
 </resources>
index ef5e51c..52476d5 100644 (file)
   <string name="uploader_btn_upload_text">ಪೇರಿಸು</string>
   <string name="uploader_btn_new_folder_text">ಹೊಸ ಕಡತಕೋಶ</string>
   <string name="filedetails_download">ಪ್ರತಿಯನ್ನು ಸ್ಥಳೀಯವಾಗಿ ಉಳಿಸಿಕೊಳ್ಳಿ</string>
-  <string name="action_share_file">ಸಂಪರ್ಕ ಕೊಂಡಿಯನ್ನು  ಹಂಚಿಕೊಳ್ಳಬಹುದು</string>
+  <string name="action_share">ಹಂಚಿಕೊಳ್ಳಿ</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>
@@ -40,4 +39,9 @@
   <string name="folder_picker_choose_button_text">ಆಯ್ಕೆ</string>
   <string name="prefs_category_security">ಭದ್ರತೆ</string>
   <string name="auth_host_address">ಪರಿಚಾರಕ ಗಣಕಯಂತ್ರದ ವಿಳಾಸ</string>
+  <string name="share_dialog_title">ಹಂಚಿಕೆ</string>
+  <string name="share_via_link_section_title">ಸಂಪರ್ಕ ಕೊಂಡಿಯನ್ನು  ಹಂಚಿಕೊಳ್ಳಬಹುದು</string>
+  <string name="share_via_link_expiration_date_label">ಮುಕ್ತಾಯ ದಿನಾಂಕವನ್ನು ನಿರ್ದರಿಸಿ</string>
+  <string name="share_via_link_password_label">ಗುಪ್ತಪದ ರಕ್ಷಿಸಿಕೂಳ್ಲಿ</string>
+  <string name="share_search">ಹುಡುಕು</string>
 </resources>
index d3a813a..5c8ed76 100644 (file)
@@ -71,6 +71,7 @@
   <string name="file_list_seconds_ago">초 지남</string>
   <string name="file_list_empty">내용이 없습니다. 업로드할 수 있습니다!</string>
   <string name="file_list_loading">불러오는 중...</string>
+  <string name="file_list_no_app_for_file_type">파일 형식을 열 수 있는 앱이 없습니다!</string>
   <string name="local_file_list_empty">이 폴더에 파일이 없습니다.</string>
   <string name="filedetails_select_file">파일을 누르면 추가 정보가 표시됩니다.</string>
   <string name="filedetails_size">크기:</string>
   <string name="filedetails_created">만든 날짜:</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="list_layout">목록 레이아웃</string>
-  <string name="action_share_file">링크 공유</string>
-  <string name="action_unshare_file">링크 공유 해제</string>
+  <string name="action_share">공유</string>
   <string name="common_yes">예</string>
   <string name="common_no">아니요</string>
   <string name="common_ok">확인</string>
-  <string name="common_cancel_download">다운로드 취소</string>
-  <string name="common_cancel_upload">업로드 취소</string>
   <string name="common_cancel">취소</string>
   <string name="common_save_exit">저장하고 끝내기</string>
   <string name="common_error">오류</string>
   <string name="confirmation_remove_folder_alert">%1$s 및 포함된 내용을 삭제하시겠습니까?</string>
   <string name="confirmation_remove_local">로컬만</string>
   <string name="confirmation_remove_folder_local">로컬만</string>
+  <string name="confirmation_remove_remote">서버만</string>
+  <string name="confirmation_remove_remote_and_local">서버와 로컬 모두</string>
   <string name="remove_success_msg">성공적으로 삭제함</string>
   <string name="remove_fail_msg">삭제할 수 없음</string>
   <string name="rename_dialog_title">새 이름 입력</string>
   <string name="placeholder_sentence">이것은 자리 비움자입니다</string>
   <string name="placeholder_filename">placeholder.txt</string>
   <string name="placeholder_filetype">PNG 그림</string>
-  <string name="placeholder_filesize">389 KB</string>
-  <string name="placeholder_timestamp">2012/05/18 12:23 PM</string>
+  <string name="placeholder_filesize">389KB</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">Wi-Fi 사용 중일때만 사진 업로드</string>
   <string name="instant_video_upload_on_wifi">Wi-Fi 사용 중일때만 동영상 업로드</string>
   <string name="instant_upload_path">/InstantUpload</string>
+  <string name="conflict_title">파일 충돌</string>
+  <string name="conflict_message">어떤 파일을 유지하시겠습니까? 두 버전을 모두 선택하면 로컬 파일 이름 뒤에 번호가 추가됩니다.</string>
   <string name="conflict_keep_both">모두 저장</string>
+  <string name="conflict_use_local_version">로컬 버전</string>
+  <string name="conflict_use_server_version">서버 버전</string>
   <string name="preview_image_description">사진 미리 보기</string>
   <string name="preview_image_error_unknown_format">이 사진을 미리 볼 수 없습니다</string>
   <string name="error__upload__local_file_not_copied">%1$s을(를) 로컬 폴더 %2$s(으)로 복사할 수 없습니다</string>
   <string name="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_send_no_mail_app">로그를 보낼 앱이 없습니다. 메일 앱을 설치하십시오!</string>
   <string name="move_file_invalid_overwrite">파일이 이미 대상 폴더에 존재합니다</string>
   <string name="move_file_error">이 파일이나 폴더를 이동하는 중 오류가 발생하였습니다</string>
   <string name="forbidden_permissions_move">이 파일을 이동할</string>
+  <string name="copy_file_not_found">복사할 수 없습니다. 파일이 존재하는 지 확인하십시오</string>
+  <string name="copy_file_invalid_into_descendent">폴더를 하위 폴더 아래로 복사할 수 없습니다</string>
   <string name="copy_file_invalid_overwrite">파일이 이미 대상 폴더에 존재합니다</string>
+  <string name="copy_file_error">이 파일이나 폴더를 복사할 수 없습니다.</string>
+  <string name="forbidden_permissions_copy">이 파일을 복사할</string>
   <string name="prefs_category_instant_uploading">즉시 업로드</string>
   <string name="prefs_category_security">보안</string>
   <string name="prefs_instant_video_upload_path_title">동영상 업로드 경로</string>
-  <string name="download_folder_failed_content">폴더 %1$s을(를) 다운로드할 수 없음</string>
   <string name="shared_subject_header">공유됨</string>
   <string name="with_you_subject_header">여러분과</string>
-  <string name="subject_token">%1$s 님이 \"%2$s\" 항목을 여러분과 공유하였습니다</string>
+  <string name="subject_user_shared_with_you">%1$s 님이 \"%2$s\" 항목을 여러분과 공유하였습니다</string>
+  <string name="subject_shared_with_you">\"%1$s\"을(를) 여러분과 공유하였습니다</string>
   <string name="auth_refresh_button">연결 새로 고침</string>
   <string name="auth_host_address">서버 주소</string>
   <string name="common_error_out_memory">메모리 부족</string>
   <string name="file_list__footer__files">파일 %1$d개</string>
   <string name="file_list__footer__files_and_folder">파일 %1$d개, 폴더 1개</string>
   <string name="file_list__footer__files_and_folders">파일 %1$d개, 폴더 %2$d개</string>
+  <string name="share_dialog_title">공유</string>
+  <string name="share_no_users">No data shared with users yet</string>
+  <string name="share_add_user_or_group">Add User or Group</string>
+  <string name="share_via_link_section_title">링크 공유</string>
+  <string name="share_via_link_expiration_date_label">만료 날짜 설정</string>
+  <string name="share_via_link_password_label">암호 보호</string>
+  <string name="share_search">검색</string>
 </resources>
index af1edac..c40728b 100644 (file)
@@ -27,6 +27,7 @@
   <string name="filedetails_created">درووستبووە:</string>
   <string name="filedetails_modified">گۆردراو:</string>
   <string name="filedetails_download">داگرتن</string>
+  <string name="action_share">هاوبەشی کردن</string>
   <string name="common_yes">بەڵێ</string>
   <string name="common_no">نەخێر</string>
   <string name="common_ok">باشە</string>
@@ -37,4 +38,5 @@
   <string name="empty"></string>
   <string name="prefs_category_accounts">هەژمارەکان</string>
   <string name="auth_host_address">ناونیشانی ڕاژه</string>
+  <string name="share_search">بگەڕێ</string>
 </resources>
index 80ccbff..38b973f 100644 (file)
   <string name="filedetails_created">Erstallt:</string>
   <string name="filedetails_modified">Geännert:</string>
   <string name="filedetails_download">Eroflueden</string>
-  <string name="filedetails_sync_file">Fichier opfrëschen</string>
-  <string name="action_share_file">Link deelen</string>
+  <string name="action_share">Deelen</string>
   <string name="common_yes">Jo</string>
   <string name="common_no">Nee</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_download">Eroflueden ofbriechen</string>
-  <string name="common_cancel_upload">Eroplueden ofbriechen</string>
   <string name="common_cancel">Ofbriechen</string>
   <string name="common_save_exit">Späicheren an Zoumaachen</string>
   <string name="common_error">Feeler</string>
   <string name="prefs_category_instant_uploading">Direkt eropgeluede Fichieren</string>
   <string name="prefs_category_security">Sécherheet</string>
   <string name="prefs_instant_video_upload_path_title">Pad fir d\'Eropluede vun de Videoen</string>
-  <string name="download_folder_failed_content">D\'Erofluede vum %1$s-Dossier konnt net ofgeschloss ginn</string>
+  <string name="subject_user_shared_with_you">%1$s huet \"%2$s\" mat dir gedeelt</string>
   <string name="auth_refresh_button">Connectioun opfrëschen</string>
   <string name="auth_host_address">Server-Adress</string>
+  <string name="share_via_link_section_title">Link deelen</string>
+  <string name="share_via_link_expiration_date_label">Verfallsdatum setzen</string>
+  <string name="share_via_link_password_label">Passwuertgeschützt</string>
+  <string name="share_search">Sichen</string>
 </resources>
index fe17441..87c1a8b 100644 (file)
@@ -8,4 +8,5 @@
     <string name="drawer_item_on_device">On device</string>-->
   <string name="common_error_unknown">ຂໍ້ຜິດພາດທີ່ບໍ່ຮູ້ສາເຫດ</string>
   <string name="empty"></string>
+  <string name="share_dialog_title">ການແບ່ງປັນ</string>
 </resources>
index 9d3643f..40fd126 100644 (file)
        <item>Biggest - Smallest</item>-->
   <!--TODO re-enable when "Accounts" is available in Navigation Drawer-->
   <!--<string name="drawer_item_accounts">Accounts</string>-->
+  <string name="drawer_item_all_files">Visi failai</string>
   <!--TODO re-enable when "On Device" is available
     <string name="drawer_item_on_device">On device</string>-->
   <string name="drawer_item_settings">Parinktys</string>
+  <string name="drawer_item_logs">Žurnalai</string>
+  <string name="drawer_close">Užverti</string>
   <string name="drawer_open">Atverti</string>
   <string name="prefs_category_general">Bendras</string>
   <string name="prefs_category_more">Daugiau</string>
   <string name="prefs_accounts">Paskyros</string>
   <string name="prefs_manage_accounts">Tvarkyti paskyras</string>
+  <string name="prefs_passcode">Užrakto kodas</string>
   <string name="prefs_instant_upload">Momentiniai nuotraukų įkėlimai</string>
   <string name="prefs_instant_upload_summary">Iš karto nusiųsti nufotografuotas nuotraukas</string>
   <string name="prefs_instant_video_upload">Momentiniai video įkėlimai</string>
@@ -45,6 +49,7 @@
   <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="recommend_text">Noriu pakviesti tave naudotis %1$s išmaniajame telefone!\nParsisiųks čia: %2$s</string>
   <string name="auth_check_server">Patikrinti Serverį</string>
   <string name="auth_host_url">Serverio adresas </string>
   <string name="auth_username">Prisijungimo vardas</string>
@@ -65,6 +70,8 @@
   <string name="uploader_info_uploading">Išsiunčiama</string>
   <string name="file_list_seconds_ago">prieš sekundę</string>
   <string name="file_list_empty">Čia tuščia. Įkelkite ką nors!</string>
+  <string name="file_list_loading">Įkeliama...</string>
+  <string name="file_list_no_app_for_file_type">Nėra programėlės šiam failo tipui!</string>
   <string name="local_file_list_empty">Šiame aplanke nėra failų.</string>
   <string name="filedetails_select_file">Palieskite failą, kad parodyti papildomą informaciją.</string>
   <string name="filedetails_size">Dydis:</string>
   <string name="filedetails_created">Sukurta:</string>
   <string name="filedetails_modified">Modifikuota:</string>
   <string name="filedetails_download">Atsisiųsti</string>
-  <string name="filedetails_sync_file">Atnaujinti failą</string>
+  <string name="filedetails_sync_file">Sinchronizuojama</string>
   <string name="filedetails_renamed_in_upload_msg">Įkėlimo metu failas buvo pervadintas į %1$s</string>
-  <string name="action_share_file">Dalintis nuoroda</string>
-  <string name="action_unshare_file">Nebesidalinti nuoroda</string>
+  <string name="list_layout">Sąrašo išdėstymas</string>
+  <string name="action_share">Dalintis</string>
   <string name="common_yes">Taip</string>
   <string name="common_no">Ne</string>
   <string name="common_ok">Gerai</string>
-  <string name="common_cancel_download">Atšaukti parsiuntimą</string>
-  <string name="common_cancel_upload">Atšaukti siuntimą</string>
+  <string name="common_cancel_sync">Atšaukti sinchronizavimą</string>
   <string name="common_cancel">Atšaukti</string>
   <string name="common_save_exit">Išsaugoti ir Išeiti</string>
   <string name="common_error">Klaida</string>
   <string name="uploader_info_dirname">Katalogo pavadinimas</string>
   <string name="uploader_upload_in_progress_ticker">Įkeliama ...</string>
   <string name="uploader_upload_in_progress_content">%1$d%% Siunčiama %2$s</string>
-  <string name="uploader_upload_succeeded_ticker">Nusiuntimas pavyko</string>
+  <string name="uploader_upload_succeeded_ticker">Įkėlimas pavyko</string>
   <string name="uploader_upload_succeeded_content_single">%1$s buvo sėkmingai nusiųstas</string>
   <string name="uploader_upload_failed_ticker">Nusiuntimas nepavyko</string>
   <string name="uploader_upload_failed_content_single">Nepavyko baigti %1$s nusiuntimo</string>
   <string name="sync_fail_content">%1$s sinchronizacija nepavyko</string>
   <string name="sync_fail_content_unauthorized">Netinkamas slaptažodis %1$s</string>
   <string name="sync_conflicts_in_favourites_ticker">Rastas konfliktas</string>
+  <string name="sync_conflicts_in_favourites_content">%1$d sinchronizuojami failai nebuvo susinchronizuoti</string>
+  <string name="sync_fail_in_favourites_ticker">Sinchronizuojamų failų klaida</string>
   <string name="sync_fail_in_favourites_content">Nepavyko sinchronizuoti %1$d failų turinio (%2$d konfliktų)</string>
   <string name="sync_foreign_files_forgotten_ticker">Keli vietiniai failai buvo užmiršti</string>
+  <string name="sync_foreign_files_forgotten_content">%1$d failai iš %2$s aplanko negali būti nukopijuoti</string>
+  <string name="sync_foreign_files_forgotten_explanation">Iki 1.3.16 versijos, iš šio įrenginio įkelti failai nukopijuoti į vietinį %1$s aplanką, siekiant išvengti duomenų praradimo kai vienas failas sinchronizuojamas su keletu įrenginių.\n\nTodėl visi failai įkelti su ankstesne versija nukopijuoti į %2$s aplanką. Dėja kopijavimas nepavuko dėl klaidos sinchronizuojant paskyrą. Galita palikti failus ir pašalinti ryšį su %3$s, arba perkelti failą(us) į %1$s aplanką ir palikti ryšį su %4$s.\n\nŽemiau pateikti vietiniai failai ir aplankas(ai), bei nutolę failai susieti per  %5$s.</string>
   <string name="sync_current_folder_was_removed">Aplankas %1$s nebeegzistuoja</string>
   <string name="foreign_files_move">Perkelti visus</string>
   <string name="foreign_files_success">Visi failai buvo perkelti</string>
   <string name="foreign_files_fail">Kai kurių failų negalima perkelti</string>
   <string name="foreign_files_local_text">Vietinis: %1$s</string>
   <string name="foreign_files_remote_text">Nuotolinis: %1$s</string>
+  <string name="upload_query_move_foreign_files">Pasirinktiems failams nepakanka vietos %1$s aplanke. Gal juos perkelti?</string>
+  <string name="pass_code_enter_pass_code">Prašau įterpti užraktą</string>
+  <string name="pass_code_configure_your_pass_code">Įveskite užraktą</string>
+  <string name="pass_code_configure_your_pass_code_explanation">Kiekvieną kartą paleidus programėle bus reikalaujamas užraktas</string>
+  <string name="pass_code_reenter_your_pass_code">Prašau pakartoti užraką</string>
+  <string name="pass_code_remove_your_pass_code">Užrakto pašalinimas</string>
+  <string name="pass_code_mismatch">Nesutampa užraktas</string>
+  <string name="pass_code_wrong">Neteisingas užraktas</string>
+  <string name="pass_code_removed">Užraktas pašalintas</string>
+  <string name="pass_code_stored">Užraktas išsaugotas</string>
   <string name="media_notif_ticker">%1$s muzikos grotuvas</string>
   <string name="media_state_playing">%1$s (grojama)</string>
   <string name="media_state_loading">%1$s (įkeliama)</string>
   <string name="auth_no_net_conn_title">Nėra tinklo ryšio</string>
   <string name="auth_nossl_plain_ok_title">Saugus prisijungimas negalimas.</string>
   <string name="auth_connection_established">Ryšys užmegztas</string>
+  <string name="auth_testing_connection">Bandomas sujungimas</string>
   <string name="auth_not_configured_title">Sugadinta serverio konfigūracija</string>
   <string name="auth_account_not_new">To paties vartotojo ir serverio paskyra jau egzistuoja šiame įrenginyje</string>
+  <string name="auth_account_not_the_same">Įvestas vartotojas neatitinka šios paskyros vartotojo</string>
   <string name="auth_unknown_error_title">Įvyko nežinoma klaida!</string>
   <string name="auth_unknown_host_title">Nepavyko rasti mazgo</string>
   <string name="auth_incorrect_path_title">Šis serveris netinkamas</string>
   <string name="auth_connecting_auth_server">Jungiamasi prie autentikacijos serverio...</string>
   <string name="auth_unsupported_auth_method">Serveris nepalaiko šio autentikacijos metodo</string>
   <string name="auth_unsupported_multiaccount">%1$s nepalaiko kelių paskyrų iš karto</string>
+  <string name="auth_fail_get_user_name">Serveris negražina tinkamo vartotojo ID, susisiekite su administratoriumi</string>
   <string name="auth_can_not_auth_against_server">Jungiamasi prie autentikacijos serverio...</string>
+  <string name="auth_account_does_not_exist">Paskyra neegzistuoja įrenginyje</string>
   <string name="favorite">Mėgiamas</string>
+  <string name="unfavorite">Nebemėgti</string>
   <string name="common_rename">Pervadinti</string>
   <string name="common_remove">Pašalinti</string>
   <string name="confirmation_remove_alert">Ar tikrai norite pašalinti %1$s?</string>
   <string name="confirmation_remove_folder_alert">Ar tikrai norite pašalinti %1$s ir ten esantį turinį?</string>
   <string name="confirmation_remove_local">Tik vietiniai</string>
   <string name="confirmation_remove_folder_local">Tik vietiniai</string>
+  <string name="confirmation_remove_remote">Iš serverio</string>
+  <string name="confirmation_remove_remote_and_local">Išorinis &amp; vietinis</string>
   <string name="remove_success_msg">Pašalinta sėkmingai</string>
   <string name="remove_fail_msg">Pašalinti nepavyko</string>
   <string name="rename_dialog_title">Įveskite naują pavadinimą</string>
   <string name="sync_file_nothing_to_do_msg">Failo turinys jau sunchronizuotas</string>
   <string name="create_dir_fail_msg">Aplanko sukurti nepavyko</string>
   <string name="filename_forbidden_characters">Neleistini simboliai: / \\ &lt; &gt; : \" | ? *</string>
+  <string name="filename_forbidden_charaters_from_server">Failo vardas sudarytas iš neleistinų simbolių</string>
   <string name="filename_empty">Failo pavadinimas negali būti tuščias</string>
   <string name="wait_a_moment">Truputį palaukite</string>
   <string name="filedisplay_unexpected_bad_get_content">Netikėta problema ; prašome pasirinkti failą iš kitos programėlės</string>
   <string name="filedisplay_no_file_selected">Joks failas nebuvo pasirinktas</string>
   <string name="activity_chooser_title">Siųsti nuorodą asmeniui ...</string>
+  <string name="wait_for_tmp_copy_from_private_storage">Kopijuoti failą iš privačios talpyklos</string>
   <string name="oauth_check_onoff">Prisijungti naudojant oAuth2</string>
   <string name="oauth_login_connection">Jungiamasi prie oAuth2 serverio...</string>
   <string name="ssl_validator_header">Serverio tapatybė negali būti patikrinta</string>
   <string name="ssl_validator_label_validity_to">Iki:</string>
   <string name="ssl_validator_label_signature">Parašas:</string>
   <string name="ssl_validator_label_signature_algorithm">Algoritmas:</string>
+  <string name="digest_algorithm_not_available">Tavo telefonas nepalaiko digest algoritmo.</string>
+  <string name="ssl_validator_label_certificate_fingerprint">Kontrolinis kodas:</string>
+  <string name="certificate_load_problem">Klaida įkeliant sertifikatą.</string>
   <string name="ssl_validator_null_cert">Sertifikatas negali būti parodytas.</string>
   <string name="ssl_validator_no_info_about_error">- Nėra informacijos apie klaidą</string>
+  <string name="placeholder_sentence">Rezervas</string>
+  <string name="placeholder_filename">rezervas.txt</string>
   <string name="placeholder_filetype">PNG paveikslėlis</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">Įkelti nuotraukas tik kai prisijungiama per WiFi</string>
   <string name="instant_video_upload_on_wifi">Įkelti video tik per WiFi</string>
+  <string name="instant_upload_path">/InstantUpload</string>
+  <string name="conflict_title">Failų konfliktas</string>
+  <string name="conflict_message">Kuriuos failus palikti? Jei pažymėsite abi versijas, vietinis failas bus pervadintas, pridedant skaičių prie pavadinimo.</string>
   <string name="conflict_keep_both">Palikti abu</string>
+  <string name="conflict_use_local_version">Vietinė versija</string>
+  <string name="conflict_use_server_version">Versija serveryje</string>
   <string name="preview_image_description">Paveikslėlio peržiūra</string>
   <string name="preview_image_error_unknown_format">Neįmanoma parodyti šio paveikslėlio</string>
+  <string name="error__upload__local_file_not_copied">%1$s negali būti nukopijuota į %2$s vietinį katalogą</string>
+  <string name="prefs_instant_upload_path_title">Įkėlimo kelias</string>
+  <string name="share_link_no_support_share_api">Atsiprašome, bet serveris nepalaiko dalijimosi. Susisiekite su administratoriumi.</string>
+  <string name="share_link_file_no_exist">Nepavyko pasidalinti. Patikrinkite ar failas egzistuoja</string>
   <string name="share_link_file_error">Įvyko klaida bandant dalinti šį failą ar aplanką</string>
+  <string name="unshare_link_file_no_exist">Nepavyksta nebedalinti. Patikrinkite ar failas egzistuoja</string>
   <string name="unshare_link_file_error">Įvyko klaida bandant nebedalinti šio failu ar aplanku</string>
+  <string name="update_link_file_no_exist">Nepavyko atnaujinti. Prašau patikrinti ar failas egzistuoja</string>
+  <string name="update_link_file_error">Klaida atnaujinant dalijimosi nuorodą</string>
+  <string name="share_link_password_title">Įveskite slaptažodį</string>
+  <string name="share_link_empty_password">Slaptažodis privalomas</string>
   <string name="activity_chooser_send_file_title">Siųsti</string>
   <string name="copy_link">Kopijuoti nuorodą</string>
   <string name="clipboard_text_copied">Nukopijuota į talpyklę</string>
+  <string name="error_cant_bind_to_operations_service">Kritinė klaida: negalima įvykdyti operacijos</string>
+  <string name="network_error_socket_exception">Klaida prisijungiant prie serverio.</string>
+  <string name="network_error_socket_timeout_exception">Klaida prisijungiant prie serverio, operacija neįvykdyta</string>
+  <string name="network_error_connect_timeout_exception">Klaida prisijungiant prie serverio, operacija neįvykdyta</string>
+  <string name="network_host_not_available">Serveris nepasiekiamas, operacija negali būti atlikta</string>
   <string name="empty"></string>
+  <string name="forbidden_permissions">Neturite leidimo %s</string>
+  <string name="forbidden_permissions_rename">pervadinti failo</string>
+  <string name="forbidden_permissions_delete">ištrinti failo</string>
+  <string name="share_link_forbidden_permissions">dalintis failu</string>
+  <string name="unshare_link_forbidden_permissions">nebesidalinti failu</string>
+  <string name="update_link_forbidden_permissions">atnaujinti dalijimosi nuorodą</string>
+  <string name="forbidden_permissions_create">sukurti failą</string>
+  <string name="uploader_upload_forbidden_permissions">įkelti į aplanką</string>
+  <string name="downloader_download_file_not_found">Failas neegzistuoja serveryje</string>
   <string name="prefs_category_accounts">Paskyros</string>
+  <string name="prefs_add_account">Pridėti paskyrą</string>
+  <string name="auth_redirect_non_secure_connection_title">Saugus sujungimas nukreiptas per nesaugų kelią</string>
+  <string name="actionbar_logger">Žurnalai</string>
+  <string name="log_send_history_button">Siųsti istoriją</string>
+  <string name="log_send_no_mail_app">Žurnalų siuntimui nėra programėlės. Įdiekite pašto programėlę!</string>
+  <string name="log_send_mail_subject">%1$s Android žurnalai</string>
+  <string name="log_progress_dialog_text">Įkeliama...</string>
+  <string name="saml_authentication_required_text">Reikalinga autentikacija</string>
   <string name="saml_authentication_wrong_pass">Neteisingas slaptažodis</string>
+  <string name="actionbar_move">perkelti</string>
+  <string name="file_list_empty_moving">Nieko nėra. Galite pridėti aplanką!</string>
   <string name="folder_picker_choose_button_text">Pasirinkite</string>
+  <string name="move_file_not_found">Negalima perkelti. Prašau patikrinti ar failas egzistuoja</string>
+  <string name="move_file_invalid_into_descendent">Neįmanoma perkelti aplanko į poaplankį</string>
+  <string name="move_file_invalid_overwrite">Failas aplanke jau egzistuoja</string>
+  <string name="move_file_error">Klaida perkeliant failą ar aplanką</string>
+  <string name="forbidden_permissions_move">perkelti šį failą</string>
+  <string name="copy_file_not_found">Nepavyko nukopijuoti. Patikrinkite ar failas egzistuoja</string>
+  <string name="copy_file_invalid_into_descendent">Neįmanoma nukopijuoti aplanko į poaplankį</string>
+  <string name="copy_file_invalid_overwrite">Failas aplanke jau egzistuoja</string>
+  <string name="copy_file_error">Klaida kopijuojant failą ar aplanką</string>
+  <string name="forbidden_permissions_copy">kopijuoti failo</string>
+  <string name="prefs_category_instant_uploading">Momentinis įkėlimas</string>
   <string name="prefs_category_security">Saugumas</string>
+  <string name="prefs_instant_video_upload_path_title">Vaizdo įrašų įkėlimo kelias</string>
+  <string name="sync_folder_failed_content">%1$s sinchronizavimas negali būti užbaigtas.</string>
+  <string name="shared_subject_header">Dalinamasi</string>
+  <string name="with_you_subject_header">su jumis</string>
+  <string name="subject_user_shared_with_you">%1$s dalinamasi \"%2$s\" su jumis</string>
+  <string name="subject_shared_with_you">\"%1$s\" dalinamasi su jumis</string>
+  <string name="auth_refresh_button">Atnaujinti sujungimą</string>
   <string name="auth_host_address">Serverio adresas</string>
+  <string name="common_error_out_memory">Nepakanka atminties</string>
+  <string name="username">Prisijungimo vardas</string>
+  <string name="file_list__footer__folder">1 aplankalas</string>
+  <string name="file_list__footer__folders">%1$d aplankalai</string>
+  <string name="file_list__footer__file">1 failas</string>
+  <string name="file_list__footer__file_and_folder">1 failas, 1 aplankalas</string>
+  <string name="file_list__footer__file_and_folders">1 failas, %1$d aplankai</string>
+  <string name="file_list__footer__files">%1$d failai</string>
+  <string name="file_list__footer__files_and_folder">%1$d failai, 1 aplankas</string>
+  <string name="file_list__footer__files_and_folders">%1$d failai, %2$d aplankai</string>
+  <string name="share_dialog_title">Dalijimasis</string>
+  <string name="share_with_user_section_title">Dalintis su vartotojais ar grupėmis</string>
+  <string name="share_no_users">Su vartotojais niekuo nesidalinama</string>
+  <string name="share_add_user_or_group">Pridėti vartotoją ar grupę</string>
+  <string name="share_via_link_section_title">Dalintis nuoroda</string>
+  <string name="share_via_link_expiration_date_label">Nustatykite galiojimo laiką</string>
+  <string name="share_via_link_password_label">Apsaugotas slaptažodžiu</string>
+  <string name="share_via_link_password_title">Apsaugota</string>
+  <string name="share_get_public_link_button">Gauti nuorodą</string>
+  <string name="share_search">Ieškoti</string>
+  <string name="search_users_and_groups_hint">Surasti vartotoją ar grupę</string>
+  <string name="share_group_clarification">%1$s (grupė)</string>
+  <string name="share_sharee_unavailable">Serveris nepalaiko dalinimosi su vartotojais kliente.
+\nSusisiekite su administratoriumi.</string>
 </resources>
index ea13b1b..0b2930d 100644 (file)
        <item>Biggest - Smallest</item>-->
   <!--TODO re-enable when "Accounts" is available in Navigation Drawer-->
   <!--<string name="drawer_item_accounts">Accounts</string>-->
+  <string name="drawer_item_all_files">Visas datnes</string>
   <!--TODO re-enable when "On Device" is available
     <string name="drawer_item_on_device">On device</string>-->
+  <string name="drawer_item_settings">Iestatījumi</string>
+  <string name="drawer_close">Aizvērt</string>
   <string name="drawer_open">Atvērt</string>
   <string name="prefs_category_general">Vispārīgi</string>
   <string name="prefs_category_more">Vairāk</string>
@@ -40,6 +43,8 @@
   <string name="prefs_help">Palīdzība</string>
   <string name="prefs_recommend">Ieteikt draugam</string>
   <string name="prefs_feedback">Atsauksmes</string>
+  <string name="recommend_subject">Izmēģini %1$s uz savu viedtālruni!</string>
+  <string name="auth_check_server">Pārbaudīt serveri</string>
   <string name="auth_username">Lietotājvārds</string>
   <string name="auth_password">Parole</string>
   <string name="sync_string_files">Datnes</string>
@@ -56,6 +61,7 @@
   <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_loading">Ielādē…</string>
   <string name="local_file_list_empty">Šajā mapē nav failu</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_created">Izveidota:</string>
   <string name="filedetails_modified">Modificēta:</string>
   <string name="filedetails_download">Lejupielādēt</string>
-  <string name="filedetails_sync_file">Atsvaidzināt failu</string>
   <string name="filedetails_renamed_in_upload_msg">Datne tika pārsaukta uz %1$s augšupielādes laikā</string>
+  <string name="action_share">Dalīties</string>
   <string name="common_yes">Jā</string>
   <string name="common_no">Nē</string>
   <string name="common_ok">Labi</string>
-  <string name="common_cancel_download">Atcelt lejupielādi</string>
-  <string name="common_cancel_upload">Atcelt augšupielādi</string>
   <string name="common_cancel">Atcelt</string>
   <string name="common_save_exit">Saglabāt un iziet</string>
   <string name="common_error">Kļūda</string>
   <string name="common_remove">Izņemt</string>
   <string name="confirmation_remove_local">Tikai lokālos</string>
   <string name="confirmation_remove_folder_local">Tikai lokālos</string>
+  <string name="confirmation_remove_remote">No servera</string>
   <string name="remove_success_msg">Veiksmīgi izņemts</string>
   <string name="remove_fail_msg">Neizdevās izņemt</string>
   <string name="rename_dialog_title">Ievadīt jaunu nosaukumu</string>
   <string name="rename_server_fail_msg">Nevarēja pabeigt pārsaukšanu</string>
   <string name="sync_file_fail_msg">Nevarēja atzīmēt attālinātas datnes</string>
   <string name="sync_file_nothing_to_do_msg">Datnes saturs jau ir sinhronizēts</string>
+  <string name="create_dir_fail_msg">Mapi nevarēja izveidot</string>
   <string name="wait_a_moment">Uzgaidīt brīdi</string>
   <string name="filedisplay_unexpected_bad_get_content">Negaidīta problēma; lūdzu, izvēlieties datni no citas lietotnes</string>
   <string name="filedisplay_no_file_selected">Netika izvēlēta neviena datne</string>
   <string name="ssl_validator_label_validity_to">Kam:</string>
   <string name="ssl_validator_label_signature">Paraksts:</string>
   <string name="ssl_validator_label_signature_algorithm">Algoritms:</string>
+  <string name="placeholder_filetype">PNG attēls</string>
   <string name="instant_upload_on_wifi">Attēlus augšupielādēt tikai caur WiFi</string>
   <string name="instant_upload_path">/TūlītējaAugšupielāde</string>
   <string name="conflict_keep_both">Paturēt abas</string>
+  <string name="preview_image_error_unknown_format">Šo attēlu nevar attēlot</string>
+  <string name="share_link_password_title">Ievadiet paroli</string>
+  <string name="share_link_empty_password">Jums ir jāievada paroli</string>
   <string name="activity_chooser_send_file_title">Sūtīt</string>
+  <string name="copy_link">Kopēt saiti</string>
   <string name="empty"></string>
+  <string name="forbidden_permissions_rename">lai pārsauktu šo datni</string>
+  <string name="forbidden_permissions_delete">lai dzēstu šo datni</string>
+  <string name="share_link_forbidden_permissions">lai dalītu šo datni</string>
+  <string name="unshare_link_forbidden_permissions">lai pārtrauktu šis datnes dalīšanu</string>
+  <string name="forbidden_permissions_create">lai izveidotu datni</string>
   <string name="prefs_category_accounts">Konti</string>
+  <string name="prefs_add_account">Pievienot kontu</string>
+  <string name="log_progress_dialog_text">Ielādē datus…</string>
   <string name="saml_authentication_wrong_pass">Nepareiza parole</string>
+  <string name="actionbar_move">Pārvietot</string>
+  <string name="file_list_empty_moving">Šeit nekā nav. Jūs varat pievienot mapi!</string>
   <string name="folder_picker_choose_button_text">Izvēlieties</string>
+  <string name="forbidden_permissions_move">lai pārvietotu šo datni</string>
+  <string name="forbidden_permissions_copy">lai kopētu šo datni</string>
   <string name="prefs_category_security">Drošība</string>
+  <string name="shared_subject_header">koplietots</string>
+  <string name="with_you_subject_header">ar jums</string>
   <string name="auth_host_address">Servera adrese</string>
+  <string name="username">Lietotājvārds</string>
+  <string name="file_list__footer__folder">1 mape</string>
+  <string name="file_list__footer__file">1 datne</string>
+  <string name="share_dialog_title">Dalīšanās</string>
+  <string name="share_via_link_section_title">Dalīt saiti</string>
+  <string name="share_via_link_expiration_date_label">Iestaties termiņa datumu</string>
+  <string name="share_via_link_password_label">Aizsargāt ar paroli</string>
+  <string name="share_search">Meklēt</string>
 </resources>
index 1c6f96f..db8aa3e 100644 (file)
   <string name="filedetails_created">Создадено:</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">Тргнете го споделувањето на врската</string>
+  <string name="action_share">Сподели</string>
   <string name="common_yes">Да</string>
   <string name="common_no">Не</string>
   <string name="common_ok">Во ред</string>
-  <string name="common_cancel_download">Откажи превземање</string>
-  <string name="common_cancel_upload">Откажи прикачување</string>
   <string name="common_cancel">Откажи</string>
   <string name="common_save_exit">Сними &amp; Излез</string>
   <string name="common_error">Грешка</string>
   <string name="prefs_category_instant_uploading">Инстант прикачувања</string>
   <string name="prefs_category_security">Безбедност</string>
   <string name="prefs_instant_video_upload_path_title">Прикачи патека на видео</string>
-  <string name="download_folder_failed_content">Превземањето на папката %1$s не може да се заврши</string>
+  <string name="subject_user_shared_with_you">%1$s сподели \"%2$s\" со тебе</string>
   <string name="auth_refresh_button">Освежи ја конекцијата</string>
   <string name="auth_host_address">Адреса на сервер</string>
+  <string name="share_dialog_title">Споделување</string>
+  <string name="share_via_link_section_title">Сподели ја врската</string>
+  <string name="share_via_link_expiration_date_label">Постави рок на траење</string>
+  <string name="share_via_link_password_label">Заштити со лозинка</string>
+  <string name="share_search">Барај</string>
 </resources>
index 92ace9c..9d18045 100644 (file)
   <string name="auth_password">Нууц үг</string>
   <string name="sync_string_files">Файлууд</string>
   <string name="uploader_btn_upload_text">Байршуулах</string>
+  <string name="action_share">Түгээх</string>
   <string name="create_account">Аккаунт үүсгэх</string>
   <string name="common_remove">Устгах</string>
   <string name="empty"></string>
   <string name="prefs_category_security">Аюулгүй байдал</string>
+  <string name="share_dialog_title">Түгээлт</string>
 </resources>
index 4ac4d95..66752db 100644 (file)
   <string name="filedetails_created">Telah dibina:</string>
   <string name="filedetails_modified">Telah diubah:</string>
   <string name="filedetails_download">Muatturun</string>
+  <string name="action_share">Kongsi</string>
   <string name="common_yes">Ya</string>
   <string name="common_no">Tidak</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_upload">Batal muat naik</string>
   <string name="common_cancel">Batal</string>
   <string name="common_save_exit">Simpan &amp; Keluar</string>
   <string name="common_error">Ralat</string>
@@ -61,4 +61,5 @@
   <string name="empty"></string>
   <string name="prefs_category_accounts">Akaun</string>
   <string name="auth_host_address">Alamat pelayan</string>
+  <string name="share_search">Cari</string>
 </resources>
index 48cf4e1..943676d 100644 (file)
@@ -19,4 +19,5 @@
   <string name="common_cancel">ပယ်ဖျက်မည်</string>
   <string name="empty"></string>
   <string name="folder_picker_choose_button_text">ရွေးချယ်</string>
+  <string name="share_via_link_expiration_date_label">သက်တမ်းကုန်ဆုံးမည့်ရက်သတ်မှတ်မည်</string>
 </resources>
index bbf1061..2d9f1c5 100644 (file)
@@ -71,6 +71,7 @@
   <string name="file_list_seconds_ago">for få sekunder siden</string>
   <string name="file_list_empty">Ingenting her. Last opp noe!</string>
   <string name="file_list_loading">Laster...</string>
+  <string name="file_list_no_app_for_file_type">Ingen app funnet for filtypen!</string>
   <string name="local_file_list_empty">Det er ingen filer i denne mappen.</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_created">Opprettet:</string>
   <string name="filedetails_modified">Endret:</string>
   <string name="filedetails_download">Last ned</string>
-  <string name="filedetails_sync_file">Oppdater fil</string>
   <string name="filedetails_renamed_in_upload_msg">Filnavnet ble endret til  %1$s under opplasting</string>
   <string name="list_layout">Listeoppsett</string>
-  <string name="action_share_file">Del lenke</string>
-  <string name="action_unshare_file">Avslutt deling av lenke</string>
+  <string name="action_share">Delt ressurs</string>
   <string name="common_yes">Ja</string>
   <string name="common_no">Nei</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_download">Avbryt nedlasting</string>
-  <string name="common_cancel_upload">Avbryt opplasting</string>
   <string name="common_cancel">Avbryt</string>
   <string name="common_save_exit">Lagre og avslutt</string>
   <string name="common_error">Feil</string>
   <string name="prefs_category_instant_uploading">Umiddelbare opplastinger</string>
   <string name="prefs_category_security">Sikkerhet</string>
   <string name="prefs_instant_video_upload_path_title">Sti til video-opplasting</string>
-  <string name="download_folder_failed_content">Nedlasting av %1$s mappen kunne ikke fullføres</string>
   <string name="shared_subject_header">delte</string>
   <string name="with_you_subject_header">med deg</string>
-  <string name="subject_token">%1$s delte \"%2$s\" med deg</string>
-  <string name="saml_subject_token">\"%1$s\" er blitt delt med deg</string>
+  <string name="subject_user_shared_with_you">%1$s delte \"%2$s\" med deg</string>
+  <string name="subject_shared_with_you">\"%1$s\" er blitt delt med deg</string>
   <string name="auth_refresh_button">Oppfrisk forbindelse</string>
   <string name="auth_host_address">Server-adresse</string>
   <string name="common_error_out_memory">Ikke nok minne</string>
   <string name="file_list__footer__files">%1$d filer</string>
   <string name="file_list__footer__files_and_folder">%1$d filer, 1 mappe</string>
   <string name="file_list__footer__files_and_folders">%1$d filer, %2$d mapper</string>
+  <string name="share_dialog_title">Deling</string>
+  <string name="share_no_users">Ingen data delt med brukere ennå</string>
+  <string name="share_add_user_or_group">Legg til bruker eller gruppe</string>
+  <string name="share_via_link_section_title">Del lenke</string>
+  <string name="share_via_link_expiration_date_label">Sett utløpsdato</string>
+  <string name="share_via_link_password_label">Passordbeskyttet</string>
+  <string name="share_search">Søk</string>
 </resources>
index 88eef42..36e0602 100644 (file)
@@ -72,6 +72,7 @@ Download hier: %2$s</string>
   <string name="file_list_seconds_ago">seconden geleden</string>
   <string name="file_list_empty">Er bevindt zich hier niets. Upload een bestand!</string>
   <string name="file_list_loading">Laden...</string>
+  <string name="file_list_no_app_for_file_type">Geen app gevonden voor het bestandstype!</string>
   <string name="local_file_list_empty">Er staan geen bestanden in deze map.</string>
   <string name="filedetails_select_file">Druk op een bestand om extra informatie weer te geven</string>
   <string name="filedetails_size">Grootte:</string>
@@ -79,16 +80,14 @@ Download hier: %2$s</string>
   <string name="filedetails_created">Aangemaakt:</string>
   <string name="filedetails_modified">Aangepast:</string>
   <string name="filedetails_download">Download</string>
-  <string name="filedetails_sync_file">Bestand verversen</string>
+  <string name="filedetails_sync_file">Synchroniseren</string>
   <string name="filedetails_renamed_in_upload_msg">Bestand is tijdens het uploaden hernoemd naar %1$s</string>
   <string name="list_layout">Lijst layout</string>
-  <string name="action_share_file">Deel link</string>
-  <string name="action_unshare_file">Link niet meer delen</string>
+  <string name="action_share">Deel</string>
   <string name="common_yes">Ja</string>
   <string name="common_no">Nee</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_download">Annuleer download</string>
-  <string name="common_cancel_upload">Upload afbreken</string>
+  <string name="common_cancel_sync">Annuleren synchronisatie</string>
   <string name="common_cancel">Annuleren</string>
   <string name="common_save_exit">Opslaan &amp; Afsluiten</string>
   <string name="common_error">Fout</string>
@@ -247,6 +246,9 @@ Hieronder staan de lokale bestanden en de externe bestanden in %5$s waar ze naar
   <string name="ssl_validator_label_validity_to">Aan:</string>
   <string name="ssl_validator_label_signature">Handtekening:</string>
   <string name="ssl_validator_label_signature_algorithm">Algoritme:</string>
+  <string name="digest_algorithm_not_available">Dit digest algoritme is niet beschikbaar op uw telefoon.</string>
+  <string name="ssl_validator_label_certificate_fingerprint">Vingerafdruk:</string>
+  <string name="certificate_load_problem">Er is een probleem met het laden van het certificaat.</string>
   <string name="ssl_validator_null_cert">Het certificaat kon niet worden getoond.</string>
   <string name="ssl_validator_no_info_about_error">- Geen informatie over de fout</string>
   <string name="placeholder_sentence">Dit is een plaatshouder</string>
@@ -273,6 +275,8 @@ Hieronder staan de lokale bestanden en de externe bestanden in %5$s waar ze naar
   <string name="share_link_file_error">Er trad een fout op bij uw poging dit bestand of deze map te delen</string>
   <string name="unshare_link_file_no_exist">Kan delen niet beëindigen. Ga na of het bestand bestaat</string>
   <string name="unshare_link_file_error">Er trad een fout op bij uw poging het delen van dit bestand of deze map te beëindigen</string>
+  <string name="update_link_file_no_exist">Kan niet bijwerken. Ga na of het bestand bestaat</string>
+  <string name="update_link_file_error">Er trad een fout op bij uw poging deze gedeelde link bij te werken</string>
   <string name="share_link_password_title">Vul het wachtwoord in</string>
   <string name="share_link_empty_password">U moet een wachtwoord opgeven</string>
   <string name="activity_chooser_send_file_title">Versturen</string>
@@ -289,6 +293,7 @@ Hieronder staan de lokale bestanden en de externe bestanden in %5$s waar ze naar
   <string name="forbidden_permissions_delete">om dit bestand te verwijderen</string>
   <string name="share_link_forbidden_permissions">om dit bestand te delen</string>
   <string name="unshare_link_forbidden_permissions">om dit bestand niet meer te delen</string>
+  <string name="update_link_forbidden_permissions">deze gedeelde link bij te werken</string>
   <string name="forbidden_permissions_create">om dit bestand te creëren</string>
   <string name="uploader_upload_forbidden_permissions">om dit bestand in deze map te uploaden</string>
   <string name="downloader_download_file_not_found">Dit bestand is niet langer beschikbaar op de server</string>
@@ -302,7 +307,7 @@ Hieronder staan de lokale bestanden en de externe bestanden in %5$s waar ze naar
   <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="actionbar_move">Verplaatsen</string>
   <string name="file_list_empty_moving">Niets hier. U kunt een map toevoegen!</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>
@@ -318,11 +323,11 @@ Hieronder staan de lokale bestanden en de externe bestanden in %5$s waar ze naar
   <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>
-  <string name="download_folder_failed_content">Download van %1$s map kon niet worden voltooid</string>
+  <string name="sync_folder_failed_content">Synchronisatie van map %1$s kon niet worden voltooid</string>
   <string name="shared_subject_header">gedeeld</string>
   <string name="with_you_subject_header">met u</string>
-  <string name="subject_token">%1$s deelde \"%2$s\" met u</string>
-  <string name="saml_subject_token">\"%1$s\" is gedeeld met u</string>
+  <string name="subject_user_shared_with_you">%1$s deelde \"%2$s\" met u</string>
+  <string name="subject_shared_with_you">\"%1$s\" is gedeeld met u</string>
   <string name="auth_refresh_button">Verversen verbinding</string>
   <string name="auth_host_address">Serveradres</string>
   <string name="common_error_out_memory">Niet voldoende geheugen</string>
@@ -335,4 +340,18 @@ Hieronder staan de lokale bestanden en de externe bestanden in %5$s waar ze naar
   <string name="file_list__footer__files">%1$d bestanden</string>
   <string name="file_list__footer__files_and_folder">%1$d bestanden, 1 map</string>
   <string name="file_list__footer__files_and_folders">%1$d bestanden, %2$d mappen</string>
+  <string name="share_dialog_title">Delen</string>
+  <string name="share_with_user_section_title">Delen met gebruikers en groepen</string>
+  <string name="share_no_users">Nog geen gegevens met gebruikers gedeeld</string>
+  <string name="share_add_user_or_group">Toevoegen gebruiker of groep</string>
+  <string name="share_via_link_section_title">Deel link</string>
+  <string name="share_via_link_expiration_date_label">Stel vervaldatum in</string>
+  <string name="share_via_link_password_label">Wachtwoord beveiligd</string>
+  <string name="share_via_link_password_title">Beveiligd</string>
+  <string name="share_get_public_link_button">Ophalen link</string>
+  <string name="share_search">Zoeken</string>
+  <string name="search_users_and_groups_hint">Zoeken naar gebruikers en groepen</string>
+  <string name="share_group_clarification">%1$s (groep)</string>
+  <string name="share_sharee_unavailable">Sorry, uw serverversie staat niet toe om binnen de clients te delen met gebruikers.
+Neem contact op met uw beheerder</string>
 </resources>
index 2a12cc0..6392a96 100644 (file)
   <string name="filedetails_created">Oppretta:</string>
   <string name="filedetails_modified">Endra:</string>
   <string name="filedetails_download">Last ned</string>
-  <string name="action_share_file">Del lenkje</string>
+  <string name="action_share">Del</string>
   <string name="common_yes">Ja</string>
   <string name="common_no">Nei</string>
   <string name="common_ok">Greitt</string>
-  <string name="common_cancel_download">Avbryt nedlasting</string>
-  <string name="common_cancel_upload">Avbryt opplasting</string>
   <string name="common_cancel">Avbryt</string>
   <string name="common_save_exit">Lagra &amp; avslutt</string>
   <string name="common_error">Feil</string>
   <string name="folder_picker_choose_button_text">Vel</string>
   <string name="prefs_category_security">Tryggleik</string>
   <string name="auth_host_address">Tenaradresse</string>
+  <string name="share_dialog_title">Deling</string>
+  <string name="share_via_link_section_title">Del lenkje</string>
+  <string name="share_via_link_expiration_date_label">Set utløpsdato</string>
+  <string name="share_via_link_password_label">Passordvern</string>
+  <string name="share_search">Søk</string>
 </resources>
index ec864a1..90a02bc 100644 (file)
 <?xml version='1.0' encoding='UTF-8'?>
 <resources>
+  <string name="about_android">%1$s Android App</string>
   <string name="about_version">version %1$s</string>
-  <string name="actionbar_upload">Amontcarga</string>
+  <string name="actionbar_sync">Actualizar lo compte</string>
+  <string name="actionbar_upload">Mandar</string>
+  <string name="actionbar_upload_from_apps">Contengut d\'autras aplicacions</string>
   <string name="actionbar_upload_files">Fichièrs</string>
-  <string name="actionbar_mkdir">Novèl dorsièr</string>
-  <string name="actionbar_settings">Configuracion</string>
+  <string name="actionbar_open_with">Dobrir amb</string>
+  <string name="actionbar_mkdir">Dorsièr novèl</string>
+  <string name="actionbar_settings">Paramètres</string>
+  <string name="actionbar_see_details">Detalhs</string>
   <string name="actionbar_send_file">Mandar</string>
+  <string name="actionbar_sort">Triar</string>
+  <string name="actionbar_sort_title">Triar</string>
+  <string-array name="actionbar_sortby">
+    <item>per òrdre alfabetic</item>
+    <item>del mai recent al pus ancian</item>
+  </string-array>
   <!--TODO re-enable when server-side folder size calculation is available   
        <item>Biggest - Smallest</item>-->
   <!--TODO re-enable when "Accounts" is available in Navigation Drawer-->
   <!--<string name="drawer_item_accounts">Accounts</string>-->
+  <string name="drawer_item_all_files">Totes los fichièrs</string>
   <!--TODO re-enable when "On Device" is available
     <string name="drawer_item_on_device">On device</string>-->
   <string name="drawer_item_settings">Paramètres</string>
-  <string name="drawer_open">Dubrís</string>
+  <string name="drawer_item_logs">Logs</string>
+  <string name="drawer_close">Tampar</string>
+  <string name="drawer_open">Dobrir</string>
   <string name="prefs_category_general">General</string>
-  <string name="prefs_category_more">Mai d\'aquò</string>
+  <string name="prefs_category_more">Mai</string>
   <string name="prefs_accounts">Comptes</string>
-  <string name="prefs_manage_accounts">Maneja comptes</string>
+  <string name="prefs_manage_accounts">Gestion dels comptes</string>
+  <string name="prefs_passcode">Còde de seguretat</string>
+  <string name="prefs_instant_upload">Mandadís immediat de las fòtos</string>
+  <string name="prefs_instant_upload_summary">Mandar immediatament las fòtos presas per la camèra</string>
+  <string name="prefs_instant_video_upload">Mandadís immediat de las vidèos</string>
+  <string name="prefs_instant_video_upload_summary">Mandar immediatament las vidèos presas per la camèra</string>
+  <string name="prefs_log_title">Activar los logs</string>
+  <string name="prefs_log_summary">Utilizat per enregistrar los problèmas dins los logs</string>
+  <string name="prefs_log_title_history">Istoric dels logs</string>
+  <string name="prefs_log_summary_history">Aquò aficha los logs enregistrats</string>
+  <string name="prefs_log_delete_history_button">Suprimir l\'istoric</string>
   <string name="prefs_help">Ajuda</string>
-  <string name="prefs_feedback">Notificacions</string>
-  <string name="prefs_imprint">Mencions legalas</string>
-  <string name="auth_username">Nom d\'usancièr</string>
+  <string name="prefs_recommend">Recomandar a un amis</string>
+  <string name="prefs_feedback">Comentaris</string>
+  <string name="prefs_imprint">Mencions</string>
+  <string name="prefs_remember_last_share_location">Memorizar l\'emplaçament de partiment</string>
+  <string name="prefs_remember_last_upload_location_summary">Memorizar lo darrièr emplaçament de mandadís</string>
+  <string name="recommend_subject">Ensajatz %1$s sus vòstre smartphone !</string>
+  <string name="recommend_text">M\'agradariá de vos convidar a utilizar %1$s sus vòstre smartphone !
+Telecargatz-lo aicí : %2$s</string>
+  <string name="auth_check_server">Verificar lo servidor</string>
+  <string name="auth_host_url">Adreça del servidor https://…</string>
+  <string name="auth_username">Nom d\'utilizaire</string>
   <string name="auth_password">Senhal</string>
+  <string name="auth_register">Novèl dins %1$s ?</string>
   <string name="sync_string_files">Fichièrs</string>
-  <string name="setup_btn_connect">Connecta</string>
-  <string name="uploader_btn_upload_text">Amontcarga</string>
-  <string name="uploader_btn_new_folder_text">Novèl dorsièr</string>
-  <string name="uploader_wrn_no_account_title">Cap de compte trobat</string>
+  <string name="setup_btn_connect">Connectar</string>
+  <string name="uploader_btn_upload_text">Mandar</string>
+  <string name="uploader_btn_new_folder_text">Dorsièr novèl</string>
+  <string name="uploader_top_message">Seleccionar lo dorsièr de mandadís :</string>
+  <string name="uploader_wrn_no_account_title">Cap de compte es pas estat trobat</string>
+  <string name="uploader_wrn_no_account_text">Cap de compte %1$s es pas estat trobat. Començar per ne configurar un.</string>
   <string name="uploader_wrn_no_account_setup_btn_text">Configuracion</string>
-  <string name="uploader_wrn_no_account_quit_btn_text">Quita</string>
-  <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="uploader_wrn_no_account_quit_btn_text">Quitar</string>
+  <string name="uploader_wrn_no_content_title">Pas res a mandar</string>
+  <string name="uploader_wrn_no_content_text">Cap de contengut pas recebut. Pas res a mandar.</string>
+  <string name="uploader_error_forbidden_content">%1$s es pas autorizat a accedir al contengut partejat</string>
+  <string name="uploader_info_uploading">Mandadís...</string>
+  <string name="file_list_seconds_ago">i a qualques segondas</string>
+  <string name="file_list_empty">I a pas res aicí ! Mandatz doncas quicòm :)</string>
+  <string name="file_list_loading">Cargament...</string>
+  <string name="file_list_no_app_for_file_type">Cap d\'aplicacion pas trobada per aqueste tipe de fichièr !</string>
+  <string name="local_file_list_empty">Cap de fichièr es pas present dins aqueste dorsièr.</string>
+  <string name="filedetails_select_file">Quichatz sus un fichièr per afichar las informacions suplementàrias</string>
   <string name="filedetails_size">Talha :</string>
   <string name="filedetails_type">Tipe :</string>
-  <string name="filedetails_created">Creat :</string>
-  <string name="filedetails_modified">Modificat :</string>
-  <string name="filedetails_download">Avalcarga</string>
-  <string name="action_share_file">Partiment per ligam</string>
+  <string name="filedetails_created">Creat lo :</string>
+  <string name="filedetails_modified">Modificat lo :</string>
+  <string name="filedetails_download">Telecargar</string>
+  <string name="filedetails_sync_file">Sincronizar</string>
+  <string name="filedetails_renamed_in_upload_msg">Lo fichièr es estat renomenat en %s pendent lo mandadís</string>
+  <string name="list_layout">Afichatge en lista</string>
+  <string name="action_share">Partejar</string>
   <string name="common_yes">Òc</string>
   <string name="common_no">Non</string>
-  <string name="common_ok">D\'accòrdi</string>
-  <string name="common_cancel_upload"> Anulla l\'amontcargar</string>
-  <string name="common_cancel">Annula</string>
+  <string name="common_ok">D\'acòrdi</string>
+  <string name="common_cancel_sync">Anullar la sincronizacion</string>
+  <string name="common_cancel">Anullar</string>
+  <string name="common_save_exit">Salvar &amp; Quitar</string>
   <string name="common_error">Error</string>
-  <string name="common_error_unknown">Error Desconeguda </string>
-  <string name="about_title">A prepaus</string>
-  <string name="change_password">Cambia lo senhal</string>
-  <string name="delete_account">Escafa lo compte</string>
-  <string name="create_account">Crea un compte</string>
-  <string name="upload_chooser_title">Avalcarga dempuèi ...</string>
+  <string name="common_loading">Cargament…</string>
+  <string name="common_error_unknown">Error desconeguda </string>
+  <string name="about_title">A prepaus de</string>
+  <string name="change_password">Cambiar de senhal</string>
+  <string name="delete_account">Suprimir aqueste compte</string>
+  <string name="create_account">Crear un compte</string>
+  <string name="upload_chooser_title">Mandar un fichièr dempuèi…</string>
   <string name="uploader_info_dirname">Nom del dorsièr</string>
-  <string name="uploader_upload_in_progress_ticker">Al avalcargar ...</string>
-  <string name="uploader_upload_succeeded_ticker">Capitada d\'avalcargar</string>
-  <string name="common_choose_account">Causís lo compte</string>
+  <string name="uploader_upload_in_progress_ticker">Mandadís…</string>
+  <string name="uploader_upload_in_progress_content">Mandadís del fichièr %2$s : %1$d%% efectuats</string>
+  <string name="uploader_upload_succeeded_ticker">Mandadís capitat</string>
+  <string name="uploader_upload_succeeded_content_single">Lo fichièr %1$s es estat mandat amb succès</string>
+  <string name="uploader_upload_failed_ticker">Fracàs del mandadís</string>
+  <string name="uploader_upload_failed_content_single">Lo mandadís de %1$s a fracassat</string>
+  <string name="uploader_upload_failed_credentials_error">Lo mandadís a fracassat, vos cal vos connectar tornamai</string>
+  <string name="downloader_download_in_progress_ticker">Telecargament en cors…</string>
+  <string name="downloader_download_in_progress_content">Telecargament en cors de %2$s, %1$d%% efectuats</string>
+  <string name="downloader_download_succeeded_ticker">Telecargament capitat</string>
+  <string name="downloader_download_succeeded_content">%1$s es estat telecargat amb succès</string>
+  <string name="downloader_download_failed_ticker">Lo telecargament a fracassat</string>
+  <string name="downloader_download_failed_content">Lo telecargament de %1$s a fracassat</string>
+  <string name="downloader_not_downloaded_yet">Pas encara telecargat</string>
+  <string name="downloader_download_failed_credentials_error">Lo telecargament a fracassat, vos cal vos connectar tornamai</string>
+  <string name="common_choose_account">Causissètz un compte</string>
+  <string name="sync_fail_ticker">La sincronizacion a fracassat</string>
+  <string name="sync_fail_ticker_unauthorized">Fracàs de la sincronizacion, vos cal vos reconnectar</string>
+  <string name="sync_fail_content">La sincronizacion de %1$s a pas pogut èsser acabada</string>
+  <string name="sync_fail_content_unauthorized">Senhal invalid per %1$s</string>
+  <string name="sync_conflicts_in_favourites_ticker">De conflictes son estats trobats</string>
+  <string name="sync_conflicts_in_favourites_content">%1$d fichièrs de gardar sincronizats an pas pogut èsser sincronizats</string>
+  <string name="sync_fail_in_favourites_ticker">La sincronizacion dels fichièrs a fracassat</string>
+  <string name="sync_fail_in_favourites_content">Lo contengut de %1$d fichièrs a pas pogut èsser sincronizat (%2$d conflictes)</string>
+  <string name="sync_foreign_files_forgotten_ticker">Certans fichièrs locals son estats doblidats</string>
+  <string name="sync_foreign_files_forgotten_content">%1$d fichièrs del dorsièr %2$s an pas pogut èsser copiats dins</string>
+  <string name="sync_foreign_files_forgotten_explanation">Dempuèi la version 1.3.16, los fichièrs mandats dempuèi aqueste aparelh son copiats dins lo dorsièr local %1$s per evitar una pèrda de donadas quand un meteis fichièr es sincronizat amb mantun compte.
+
+En rason d\'aquesta modificacion, totes los fichièrs mandats amb de versions anterioras d\'aquesta aplicacion son estats copiats dins lo dorsièr %2$s. Pasmens, una error a empachat l\'acabament d\'aquesta operacion pendent la sincronizacion del compte. Podètz siá daissar los fichièrs tals coma son e suprimir lo ligam cap a %3$s, siá desplaçar los fichièrs dins lo dorsièr %1$s e gardar lo ligam cap a %4$s.
+
+Çaijós la lista dels fichièrs locals, e los fichièrs distants dins %5$s als quals èran ligats.</string>
+  <string name="sync_current_folder_was_removed">Lo dorsièr %1$s existís pas mai</string>
+  <string name="foreign_files_move">Desplaçar tot</string>
+  <string name="foreign_files_success">Totes los fichièrs son estats desplaçats</string>
+  <string name="foreign_files_fail">Certans fichièrs an pas pogut èsser desplaçats</string>
+  <string name="foreign_files_local_text">Local : %1$s</string>
+  <string name="foreign_files_remote_text">Distant : %1$s</string>
+  <string name="upload_query_move_foreign_files">I a pas pro de plaça disponibla per copiar los fichièrs seleccionats dins lo dorsièr %1$s. Volètz los desplaçar a la plaça ?</string>
+  <string name="pass_code_enter_pass_code">Sasissètz vòstre còde de seguretat</string>
+  <string name="pass_code_configure_your_pass_code">Sasissètz vòstre còde de seguretat</string>
+  <string name="pass_code_configure_your_pass_code_explanation">Lo còde de seguretat serà demandat a cada dobertura de l\'aplicacion</string>
+  <string name="pass_code_reenter_your_pass_code">Sasissètz tornamai vòstre còde de seguretat</string>
+  <string name="pass_code_remove_your_pass_code">Suprimir vòstre còde de seguretat</string>
+  <string name="pass_code_mismatch">Los còdes de seguretat son pas identics</string>
+  <string name="pass_code_wrong">Còde de seguretat incorrècte</string>
+  <string name="pass_code_removed">Còde de seguretat suprimit</string>
+  <string name="pass_code_stored">Còde de seguretat enregistrat</string>
+  <string name="media_notif_ticker">%1$s lector de musica</string>
+  <string name="media_state_playing">%1$s (lectura)</string>
+  <string name="media_state_loading">%1$s (cargament)</string>
+  <string name="media_event_done">Lectura de %1$s acabada</string>
+  <string name="media_err_nothing_to_play">Fichièr mèdia introbable </string>
+  <string name="media_err_no_account">Cap de compte es pas estat trobat</string>
+  <string name="media_err_not_in_owncloud">Lo fichièr es pas dins un compte valid</string>
+  <string name="media_err_unsupported">Lo codec d\'aqueste mèdia es pas pres en carga </string>
+  <string name="media_err_io">Lo fichièr mèdia pòt pas èsser legit</string>
+  <string name="media_err_malformed">Lo fichièr mèdia es pas corrèctament encodat</string>
+  <string name="media_err_timeout">Relambi depassat per la lectura del tròç</string>
+  <string name="media_err_invalid_progressive_playback">Lo fichièr mèdia pòt pas èsser difusat</string>
+  <string name="media_err_unknown">Lo fichièr mèdia pòt pas èsser jogat amb lo lector estandard</string>
+  <string name="media_err_security_ex">Error de seguretat a la lectura de %1$s</string>
+  <string name="media_err_io_ex">Error de lectura de fichièr a la lectura de %1$s</string>
+  <string name="media_err_unexpected">Error imprevista a la lectura de %1$s </string>
+  <string name="media_rewind_description">Boton de rembobinatge</string>
+  <string name="media_play_pause_description">Boton de lectura o de pausa</string>
+  <string name="media_forward_description">Boton d\'avança rapida</string>
+  <string name="auth_getting_authorization">Demanda d\'autorizacion…</string>
+  <string name="auth_trying_to_login">Temptativa de connexion…</string>
+  <string name="auth_no_net_conn_title">Pas de connexion ret</string>
+  <string name="auth_nossl_plain_ok_title">Connexion securizada pas disponibla</string>
+  <string name="auth_connection_established">Connexion establida</string>
+  <string name="auth_testing_connection">Tèst de connexion</string>
+  <string name="auth_not_configured_title">Configuracion del servidor erronèa</string>
+  <string name="auth_account_not_new">Un compte pels meteisses utilizaire e servidor existís ja sus aqueste aparelh</string>
+  <string name="auth_account_not_the_same">L\'utilizaire entrat correspond pas a l\'utilizaire d\'aqueste compte</string>
+  <string name="auth_unknown_error_title">Una error desconeguda s\'es produsida.</string>
+  <string name="auth_unknown_host_title">Impossible de trobar l\'òste</string>
+  <string name="auth_incorrect_path_title">Cap d\'instància del servidor es pas estada trobada</string>
+  <string name="auth_timeout_title">Lo servidor a pres tròp de temps a respondre</string>
+  <string name="auth_incorrect_address_title">Adreça invalida</string>
+  <string name="auth_ssl_general_error_title">Fracàs de l\'inicializacion SSL</string>
+  <string name="auth_ssl_unverified_server_title">Impossible de verificar l\'identitat del servidor SSL</string>
+  <string name="auth_bad_oc_version_title">La version del servidor es pas reconeguda</string>
+  <string name="auth_wrong_connection_title">Impossible d\'establir la connexion</string>
+  <string name="auth_secure_connection">Connexion securizada establida</string>
+  <string name="auth_unauthorized">Nom d\'utilizaire o senhal incorrècte</string>
+  <string name="auth_oauth_error">Fracàs d\'autorizacion</string>
+  <string name="auth_oauth_error_access_denied">Accès refusat pel servidor d\'autorizacion</string>
+  <string name="auth_wtf_reenter_URL">Estat imprevist ; sasissètz tornamai l\'URL del servidor</string>
+  <string name="auth_expired_oauth_token_toast">Vòstra autorizacion a expirat. Mercé de vos autentificar tornamai</string>
+  <string name="auth_expired_basic_auth_toast">Sasissètz lo senhal corrent</string>
+  <string name="auth_expired_saml_sso_token_toast">Vòstra session a expirat. Mercé de vos reconnectar</string>
+  <string name="auth_connecting_auth_server">Connexion al servidor d\'autentificacion…</string>
+  <string name="auth_unsupported_auth_method">Lo servidor pren pas en carga pas aqueste metòde d\'autentificacion</string>
+  <string name="auth_unsupported_multiaccount">%1$s pren pas en carga los comptes multiples</string>
+  <string name="auth_fail_get_user_name">Vòstre servidor a tornat un identificant d\'utilizaire incorrècte. Prenètz contacte amb vòstre administrator
+</string>
+  <string name="auth_can_not_auth_against_server">Impossible de s\'autentificar sus aqueste servidor</string>
+  <string name="auth_account_does_not_exist">Lo compte existís pas encara sus aqueste periferic</string>
   <string name="favorite">Apondre als favorits</string>
-  <string name="common_rename">Torna nomenar</string>
+  <string name="unfavorite">Suprimir dels favorits</string>
+  <string name="common_rename">Renomenar</string>
   <string name="common_remove">Suprimir</string>
+  <string name="confirmation_remove_alert">Sètz segur que volètz suprimir %1$s ?</string>
+  <string name="confirmation_remove_folder_alert">Sètz segur que volètz suprimir %1$s e son contengut ?</string>
+  <string name="confirmation_remove_local">Local solament</string>
+  <string name="confirmation_remove_folder_local">Local solament</string>
+  <string name="confirmation_remove_remote">Dempuèi lo servidor</string>
+  <string name="confirmation_remove_remote_and_local">Distant &amp; local</string>
+  <string name="remove_success_msg">Supression efectuada amb succès</string>
+  <string name="remove_fail_msg">Supression impossibla</string>
+  <string name="rename_dialog_title">Entratz un nom novèl</string>
+  <string name="rename_local_fail_msg">La version locala pòt pas èsser renomenada, reensajatz amb un nom diferent</string>
+  <string name="rename_server_fail_msg">Cambiament de nom impossible</string>
+  <string name="sync_file_fail_msg">Lo fichièr distant a pas pogut èsser verificat</string>
+  <string name="sync_file_nothing_to_do_msg">Lo contengut del fichièr es ja sincronizat</string>
+  <string name="create_dir_fail_msg">Lo dorsièr a pas pogut èsser creat</string>
+  <string name="filename_forbidden_characters">Caractèrs interdiches : / \\ &lt; &gt; : \" | ? *</string>
+  <string name="filename_forbidden_charaters_from_server">Lo nom de fichièr conten al mens un caractèr invalid</string>
+  <string name="filename_empty">Lo nom del fichièr pòt pas èsser void</string>
+  <string name="wait_a_moment">Pacientatz</string>
+  <string name="filedisplay_unexpected_bad_get_content">Problèma imprevist. Ensajatz una autra aplicacion per la seleccion del fichièr</string>
+  <string name="filedisplay_no_file_selected">Cap de fichièr pas seleccionat</string>
+  <string name="activity_chooser_title">Mandar lo ligam cap a…</string>
+  <string name="wait_for_tmp_copy_from_private_storage">Còpia del fichièr dempuèi l\'emmagazinatge privat</string>
+  <string name="oauth_check_onoff">Connexion amb oAuth2</string>
+  <string name="oauth_login_connection">Connexion al servidor oAuth2…</string>
+  <string name="ssl_validator_header">L\'identitat del site pòt pas èsser verificada</string>
+  <string name="ssl_validator_reason_cert_not_trusted">- Lo certificat del servidor es pas segur</string>
+  <string name="ssl_validator_reason_cert_expired">- Lo certificat del servidor a expirat</string>
+  <string name="ssl_validator_reason_cert_not_yet_valid">- Lo certificat del servidor es pas encara valid</string>
+  <string name="ssl_validator_reason_hostname_not_verified">- L\'URL correspond pas al nom d\'òste del certificat</string>
+  <string name="ssl_validator_question">Vos volètz fisaz d\'aqueste certificat malgrat tot ?</string>
+  <string name="ssl_validator_not_saved">Impossible de salvar lo certificat</string>
+  <string name="ssl_validator_btn_details_see">Detalhs</string>
+  <string name="ssl_validator_btn_details_hide">Amagar</string>
+  <string name="ssl_validator_label_subject">Desliurat a :</string>
+  <string name="ssl_validator_label_issuer">Desliurat per :</string>
+  <string name="ssl_validator_label_CN">Nom d\'usatge :</string>
+  <string name="ssl_validator_label_O">Organizacion :</string>
+  <string name="ssl_validator_label_OU">Unitat organizacionala :</string>
   <string name="ssl_validator_label_C">País :</string>
+  <string name="ssl_validator_label_ST">Region :</string>
+  <string name="ssl_validator_label_L">Localizacion :</string>
+  <string name="ssl_validator_label_validity">Validitat :</string>
+  <string name="ssl_validator_label_validity_from">Del :</string>
+  <string name="ssl_validator_label_validity_to">Al :</string>
+  <string name="ssl_validator_label_signature">Signatura :</string>
+  <string name="ssl_validator_label_signature_algorithm">Algoritme :</string>
+  <string name="ssl_validator_null_cert">Impossible d\'afichar lo certificat.</string>
+  <string name="ssl_validator_no_info_about_error">- Pas cap d\'informacion sus l\'error</string>
+  <string name="placeholder_sentence">Aquò es un espaci reservat</string>
+  <string name="placeholder_filename">placeholder.txt</string>
+  <string name="placeholder_filetype">Imatge PNG</string>
+  <string name="placeholder_filesize">389 Ko</string>
+  <string name="placeholder_timestamp">18/05/2012 12:23</string>
+  <string name="placeholder_media_time">12:23:45</string>
+  <string name="instant_upload_on_wifi">Mandar los imatges via una connexion WiFi unicament</string>
+  <string name="instant_video_upload_on_wifi">Mandar las vidèos via una connexion WiFi unicament</string>
+  <string name="instant_upload_path">/InstantUpload</string>
+  <string name="conflict_title">Conflicte de fichièrs</string>
+  <string name="conflict_message">Quin(s) fichièr(s) volètz gardar ? Se seleccionatz los dos, una chifra serà aponduda al nom del fichièr local.</string>
+  <string name="conflict_keep_both">Gardar las doas versions</string>
+  <string name="conflict_use_local_version">version locala</string>
+  <string name="conflict_use_server_version">version servidor</string>
+  <string name="preview_image_description">Previsualizacion de l\'imatge</string>
+  <string name="preview_image_error_unknown_format">Aqueste imatge pòt pas èsser afichada</string>
+  <string name="error__upload__local_file_not_copied">%1$s a pas pogut èsser copiat dins lo dorsièr local %2$s</string>
+  <string name="prefs_instant_upload_path_title">Repertòri de mandadís</string>
+  <string name="share_link_no_support_share_api">O planhèm, lo partiment es pas disponible sus vòstre servidor. Contactatz vòstre administrator.</string>
+  <string name="share_link_file_no_exist">Impossible de partejar. Verificatz que lo fichièr es plan present</string>
+  <string name="share_link_file_error">Una error s\'es produsida al moment de la tentative de partiment d\'aqueste fichièr o repertòri</string>
+  <string name="unshare_link_file_no_exist">Impossible de suprimir lo partiment. Verificatz que lo fichièr es ben present</string>
+  <string name="unshare_link_file_error">Una error s\'es produsida al moment de la temptativa d’anullacion del partiment d\'aqueste fichièr o repertòri</string>
+  <string name="share_link_password_title">Sasissètz un senhal</string>
+  <string name="share_link_empty_password">Vos cal sasir un senhal</string>
   <string name="activity_chooser_send_file_title">Mandar</string>
+  <string name="copy_link">Copiar lo ligam</string>
   <string name="clipboard_text_copied">Copiat dins lo quichapapièrs</string>
+  <string name="error_cant_bind_to_operations_service">Error critica : impossible de realizar d\'operacions</string>
+  <string name="network_error_socket_exception">Una error s\'es produsida pendent la connexion al servidor.</string>
+  <string name="network_error_socket_timeout_exception">Una error s\'es produsida pendent l\'espèra del servidor. L\'operacion a pas pogut èsser efectuada</string>
+  <string name="network_error_connect_timeout_exception">Una error s\'es produsida pendent l\'espèra del servidor. L\'operacion a pas pogut èsser efectuada</string>
+  <string name="network_host_not_available">L\'operacion a pas pogut èsser acabada, lo servidor es pas disponible</string>
   <string name="empty"></string>
+  <string name="forbidden_permissions">Avètz pas la permission %s</string>
+  <string name="forbidden_permissions_rename">de renomenar aqueste fichièr</string>
+  <string name="forbidden_permissions_delete">d’escafar aqueste fichièr</string>
+  <string name="share_link_forbidden_permissions">per fin de partejar aqueste fichièr</string>
+  <string name="unshare_link_forbidden_permissions">per fin de partejar pas mai aqueste fichièr</string>
+  <string name="forbidden_permissions_create">de crear aqueste fichièr</string>
+  <string name="uploader_upload_forbidden_permissions">per fin d’importar dins aqueste repertòri</string>
+  <string name="downloader_download_file_not_found">Aqueste fichièr es pas mai disponible sul servidor</string>
   <string name="prefs_category_accounts">Comptes</string>
+  <string name="prefs_add_account">Apondre un compte</string>
+  <string name="auth_redirect_non_secure_connection_title">La connexion securizada es redirigida cap a una rota non-securizada.</string>
+  <string name="actionbar_logger">Jornals</string>
+  <string name="log_send_history_button">Mandar l\'istoric</string>
+  <string name="log_send_no_mail_app">Cap d\'aplicacion pas trobada pel mandadís de jornals. Installar una aplicacion de corrièl !</string>
+  <string name="log_send_mail_subject">Jornals de l\'aplicacion Android %1$s</string>
+  <string name="log_progress_dialog_text">Cargament de las donadas…</string>
   <string name="saml_authentication_required_text">Autentificacion requesida</string>
   <string name="saml_authentication_wrong_pass">Senhal incorrècte</string>
   <string name="actionbar_move">Desplaçar</string>
-  <string name="folder_picker_choose_button_text">Causís</string>
-  <string name="shared_subject_header">partejat</string>
+  <string name="file_list_empty_moving">I a pas res aicí. Podètz apondre un dorsièr !</string>
+  <string name="folder_picker_choose_button_text">Causir</string>
+  <string name="move_file_not_found">Impossible de desplaçar. Verificatz que lo fichièr existís</string>
+  <string name="move_file_invalid_into_descendent">Es pas possible de desplaçar un dorsièr cap a un de sos descendents</string>
+  <string name="move_file_invalid_overwrite">Lo fichièr existís ja dins lo dorsièr de destinacion</string>
+  <string name="move_file_error">Una error s\'es produsida al moment de la temptativa de desplaçament d\'aqueste fichièr o dorsièr</string>
+  <string name="forbidden_permissions_move">de desplaçar aqueste fichièr</string>
+  <string name="copy_file_not_found">Impossible de copiar. Verificatz que lo fichièr existís</string>
+  <string name="copy_file_invalid_into_descendent">Es pas possible de copiar un dorsièr cap a un de sos descendents</string>
+  <string name="copy_file_invalid_overwrite">Fichièr ja existent dins lo dorsièr de destinacion</string>
+  <string name="copy_file_error">Una error s\'es produsida al moment de la còpia d\'aqueste fichièr o dorsièr</string>
+  <string name="forbidden_permissions_copy">de copiar aqueste fichièr</string>
+  <string name="prefs_category_instant_uploading">Mandadís immediat</string>
+  <string name="prefs_category_security">Seguretat</string>
+  <string name="prefs_instant_video_upload_path_title">Repertòri de mandadís de las vidèos</string>
+  <string name="sync_folder_failed_content">La sincronizacion del dorsièr %1$s a pas pogut èsser acabad</string>
+  <string name="shared_subject_header">a partejat</string>
+  <string name="with_you_subject_header">amb vos</string>
+  <string name="subject_user_shared_with_you">%1$s a partejat \"%2$s\" amb vos</string>
+  <string name="subject_shared_with_you">\"%1$s\" es estat partejat amb vos</string>
+  <string name="auth_refresh_button">Actualizar la connexion</string>
   <string name="auth_host_address">Adreça del servidor</string>
+  <string name="common_error_out_memory">Memòria insufisenta</string>
   <string name="username">Nom d\'utilizaire</string>
+  <string name="file_list__footer__folder">1 dorsièr</string>
+  <string name="file_list__footer__folders">%1$d dorsièrs</string>
+  <string name="file_list__footer__file">1 fichièr</string>
+  <string name="file_list__footer__file_and_folder">1 fichièr, 1 dorsièr</string>
+  <string name="file_list__footer__file_and_folders">1 fichièr, %1$d dorsièrs</string>
+  <string name="file_list__footer__files">%1$d fichièrs</string>
+  <string name="file_list__footer__files_and_folder">%1$d fichièrs, 1 dorsièr</string>
+  <string name="file_list__footer__files_and_folders">%1$d fichièrs, %2$d dorsièrs</string>
+  <string name="share_dialog_title">Partiment</string>
+  <string name="share_no_users">Cap de donada es pas partejada amb d\'utilizaires pel moment</string>
+  <string name="share_add_user_or_group">Apondre un utilizaire o un grop</string>
+  <string name="share_via_link_section_title">Partejar lo ligam</string>
+  <string name="share_via_link_expiration_date_label">Especificar una data d\'expiracion</string>
+  <string name="share_via_link_password_label">Protegir per un senhal</string>
+  <string name="share_search">Recercar</string>
+  <string name="search_users_and_groups_hint">Recercar d\'utilizaires e de gropes</string>
 </resources>
index f68a9c6..bee8058 100644 (file)
   <string name="filedetails_created">ਬਣਾਈ:</string>
   <string name="filedetails_modified">ਸੋਧ ਕੀਤੀ:</string>
   <string name="filedetails_download">ਡਾਊਨਲੋਡ</string>
-  <string name="filedetails_sync_file">ਫਾਇਲ ਤਾਜ਼ਾ ਕਰੋ</string>
+  <string name="action_share">ਸਾਂਝਾ ਕਰੋ</string>
   <string name="common_yes">ਹਾਂ</string>
   <string name="common_no">ਨਹੀਂ</string>
   <string name="common_ok">ਠੀਕ ਹੈ</string>
-  <string name="common_cancel_download">ਡਾਊਨਲੋਡ ਕਰਨਾ ਰੱਦ ਕਰੋ</string>
-  <string name="common_cancel_upload">ਅੱਪਲੋਡ ਰੱਦ ਕਰੋ</string>
   <string name="common_cancel">ਰੱਦ ਕਰੋ</string>
   <string name="common_save_exit">ਸੰਭਾਲੋ ਅਤੇ ਬੰਦ ਕਰੋ</string>
   <string name="common_error">ਗਲਤੀ</string>
   <string name="prefs_category_accounts">ਅਕਾਊਂਟ</string>
   <string name="folder_picker_choose_button_text">ਚੁਣੋ</string>
   <string name="auth_host_address">ਸਰਵਰ ਐਡਰੈਸ</string>
+  <string name="share_search">ਖੋਜ</string>
 </resources>
index 95168bd..f9bad15 100644 (file)
   <string name="filedetails_created">Utworzono:</string>
   <string name="filedetails_modified">Zmodyfikowano:</string>
   <string name="filedetails_download">Pobierz</string>
-  <string name="filedetails_sync_file">Odśwież plik</string>
   <string name="filedetails_renamed_in_upload_msg">Podczas wysyłania nazwa pliku została zmieniona na %1$s</string>
   <string name="list_layout">Lista szablonów wyglądu</string>
-  <string name="action_share_file">Udostępnij link</string>
-  <string name="action_unshare_file">Anuluj udostępnianie</string>
+  <string name="action_share">Udostępnij</string>
   <string name="common_yes">Tak</string>
   <string name="common_no">Nie</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_download">Anuluj pobieranie</string>
-  <string name="common_cancel_upload">Anuluj wysyłanie</string>
   <string name="common_cancel">Anuluj</string>
   <string name="common_save_exit">Zapisz i wyjdź</string>
   <string name="common_error">Błąd</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>
-  <string name="download_folder_failed_content">Pobieranie %1$s katalogu nie może zostać ukończone</string>
   <string name="shared_subject_header">udostępniony</string>
   <string name="with_you_subject_header">z tobą</string>
+  <string name="subject_user_shared_with_you">%1$s wspólne \"%2$s\" z tobą</string>
   <string name="auth_refresh_button">Odśwież połączenie</string>
   <string name="auth_host_address">Adres Serwera</string>
   <string name="common_error_out_memory">Brak wystarczającej pamięci</string>
   <string name="file_list__footer__folders">%1$d folderów</string>
   <string name="file_list__footer__file">1 plik</string>
   <string name="file_list__footer__file_and_folder">1 plik , 1 folder</string>
+  <string name="share_dialog_title">Udostępnianie</string>
+  <string name="share_via_link_section_title">Udostępnij link</string>
+  <string name="share_via_link_expiration_date_label">Ustaw datę wygaśnięcia</string>
+  <string name="share_via_link_password_label">Zabezpiecz hasłem</string>
+  <string name="share_search">Wyszukaj</string>
 </resources>
index 8102092..d0beab0 100644 (file)
@@ -71,6 +71,7 @@
   <string name="file_list_seconds_ago">segundos atrás</string>
   <string name="file_list_empty">Nada aqui. Envie alguma coisa!</string>
   <string name="file_list_loading">Carregando...</string>
+  <string name="file_list_no_app_for_file_type">Nenhum aplicativo encontrado por tipo de arquivo!</string>
   <string name="local_file_list_empty">Não existe nenhum arquivo nesta pasta.</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_created">Criado:</string>
   <string name="filedetails_modified">Modificado:</string>
   <string name="filedetails_download">Baixar</string>
-  <string name="filedetails_sync_file">Atualizar arquivo</string>
+  <string name="filedetails_sync_file">Sincronizar</string>
   <string name="filedetails_renamed_in_upload_msg">Arquivo foi renomeado para %1$s durante o envio</string>
   <string name="list_layout">Lista de Layout</string>
-  <string name="action_share_file">Compartilhar link</string>
-  <string name="action_unshare_file">Descompartilhar o link</string>
+  <string name="action_share">Compartilhar</string>
   <string name="common_yes">Sim</string>
   <string name="common_no">Não</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_download">Cancelar o download</string>
-  <string name="common_cancel_upload">Cancelar envio</string>
+  <string name="common_cancel_sync">Cancelar a sincronização</string>
   <string name="common_cancel">Cancelar</string>
   <string name="common_save_exit">Salvar &amp; Sair</string>
   <string name="common_error">Erro</string>
   <string name="ssl_validator_label_validity_to">Para:</string>
   <string name="ssl_validator_label_signature">Assinatura:</string>
   <string name="ssl_validator_label_signature_algorithm">Algoritmo:</string>
+  <string name="digest_algorithm_not_available">Este algoritmo de resumo não está disponível no seu telefone.</string>
+  <string name="ssl_validator_label_certificate_fingerprint">Impressão digital:</string>
+  <string name="certificate_load_problem">Existe um problema ao carregar o certificado.</string>
   <string name="ssl_validator_null_cert">O certificado não pode ser mostrado.</string>
   <string name="ssl_validator_no_info_about_error">- Nenhuma informação sobre o erro</string>
   <string name="placeholder_sentence">Este é um espaço reservado</string>
   <string name="share_link_file_error">Ocorreu um erro durante a tentativa de compartilhar esse arquivo ou pasta</string>
   <string name="unshare_link_file_no_exist">Não é possível cancelar o compartilhamento. Por favor verifique se o arquivo existe</string>
   <string name="unshare_link_file_error">Ocorreu um erro ao tentar descompartilhar este arquivo ou pasta</string>
+  <string name="update_link_file_no_exist">Não é possível atualizar. Por favor verifique se o arquivo existe</string>
+  <string name="update_link_file_error">Ocorreu um erro ao tentar atualizar o link compartilhado</string>
   <string name="share_link_password_title">Digite uma senha</string>
   <string name="share_link_empty_password">Você deve digitar uma senha</string>
   <string name="activity_chooser_send_file_title">Enviar</string>
   <string name="forbidden_permissions_delete">para excluir este arquivo</string>
   <string name="share_link_forbidden_permissions">para compartilhar este arquivo</string>
   <string name="unshare_link_forbidden_permissions">para descompartilhar este arquivo</string>
+  <string name="update_link_forbidden_permissions">atualizar este link compartilhado</string>
   <string name="forbidden_permissions_create">para criar este arquivo</string>
   <string name="uploader_upload_forbidden_permissions">para enviar para esta pasta</string>
   <string name="downloader_download_file_not_found">Este arquivo não mais está disponível neste servidor</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>
-  <string name="download_folder_failed_content">Baixar %1$s da pasta não pode ser completado</string>
+  <string name="sync_folder_failed_content">A sincronização da pasta %1$s não pode ser finalizada</string>
   <string name="shared_subject_header">compartilhado</string>
   <string name="with_you_subject_header">com você</string>
-  <string name="subject_token">%1$s compartilhado \"%2$s\" com você</string>
-  <string name="saml_subject_token">\"%1$s\" foi compartilhado com você</string>
+  <string name="subject_user_shared_with_you">%1$s compartilhado \"%2$s\" com você</string>
+  <string name="subject_shared_with_you">\"%1$s\" foi compartilhado com você</string>
   <string name="auth_refresh_button">Reinicializar conexão</string>
   <string name="auth_host_address">Endereço do servidor</string>
   <string name="common_error_out_memory">Não há memoria suficiente</string>
   <string name="file_list__footer__files">%1$d arquivos</string>
   <string name="file_list__footer__files_and_folder">%1$d arquivos, 1 pasta</string>
   <string name="file_list__footer__files_and_folders">%1$d arquivos, %2$d pastas</string>
+  <string name="share_dialog_title">Compartilhamento</string>
+  <string name="share_with_user_section_title">Compartilhar com usuários e grupos</string>
+  <string name="share_no_users">Ainda não existe nenhum dado compartilhado com usuários</string>
+  <string name="share_add_user_or_group">Adicionar Usuário ou Grupo</string>
+  <string name="share_via_link_section_title">Compartilhar link</string>
+  <string name="share_via_link_expiration_date_label">Definir data de expiração</string>
+  <string name="share_via_link_password_label">Proteger com senha</string>
+  <string name="share_via_link_password_title">Asegurado</string>
+  <string name="share_get_public_link_button">Obter link</string>
+  <string name="share_search">Perquisar</string>
+  <string name="search_users_and_groups_hint">Pesquisar usuários e grupos</string>
+  <string name="share_group_clarification">%1$s (grupo)</string>
+  <string name="share_sharee_unavailable">Desculpe, sua versão do servidor não permite compartilhamento com usuários que também são clientes.
+        \nEntre em contato com o administrador</string>
 </resources>
index 628b53a..029e1a4 100644 (file)
@@ -71,6 +71,7 @@
   <string name="file_list_seconds_ago">segundos atrás</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="file_list_no_app_for_file_type">Nenhuma App encontrada por tipo de ficheiro!</string>
   <string name="local_file_list_empty">Não existem ficheiros nesta pasta.</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_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_sync_file">Sincronizar</string>
   <string name="filedetails_renamed_in_upload_msg">O ficheiro foi renomeado para %1$s durante o envio.</string>
   <string name="list_layout">Apresentação da Lista</string>
-  <string name="action_share_file">Partilhar a hiperligação</string>
-  <string name="action_unshare_file">Cancelar partilha da hiperligação</string>
+  <string name="action_share">Compartilhar</string>
   <string name="common_yes">Sim</string>
   <string name="common_no">Não</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_sync">Cancelar sincronização</string>
   <string name="common_cancel">Cancelar</string>
   <string name="common_save_exit">Guardar &amp; Sair</string>
   <string name="common_error">Erro</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>
-  <string name="download_folder_failed_content">Não foi possível completar o download da pasta %1$s</string>
+  <string name="sync_folder_failed_content">Não foi possível completar a sincronização da pasta %1$s</string>
   <string name="shared_subject_header">partilhado</string>
   <string name="with_you_subject_header">consigo</string>
-  <string name="subject_token">%1$s partilhou \"%2$s\" consigo</string>
-  <string name="saml_subject_token">\"%1$s\" foi partilhado consigo</string>
+  <string name="subject_user_shared_with_you">%1$s partilhou \"%2$s\" consigo</string>
+  <string name="subject_shared_with_you">\"%1$s\" foi partilhado consigo</string>
   <string name="auth_refresh_button">Recarregar ligação</string>
   <string name="auth_host_address">Endereço do servidor</string>
   <string name="common_error_out_memory">Falta de memória</string>
   <string name="file_list__footer__files">%1$d ficheiros</string>
   <string name="file_list__footer__files_and_folder">%1$d ficheiros, 1 pasta</string>
   <string name="file_list__footer__files_and_folders">%1$d ficheiros, %2$d pastas</string>
+  <string name="share_dialog_title">Partilha</string>
+  <string name="share_no_users">Ainda não foram partilhados os dados com os utilizadores</string>
+  <string name="share_add_user_or_group">Adicionar Utilziador ou Grupo</string>
+  <string name="share_via_link_section_title">Compartilhar hiperligação</string>
+  <string name="share_via_link_expiration_date_label">Definir a data de expiração</string>
+  <string name="share_via_link_password_label">Proteger com Palavra-passe</string>
+  <string name="share_search">Procurar</string>
 </resources>
index e539924..3726bda 100644 (file)
   <string name="filedetails_created">Creat:</string>
   <string name="filedetails_modified">Modificat:</string>
   <string name="filedetails_download">Descarcă</string>
-  <string name="filedetails_sync_file">Împrospătare fișier</string>
   <string name="filedetails_renamed_in_upload_msg">Fișierul a fost redenumit %1$s în timpul încărcării</string>
   <string name="list_layout">Aspect listă</string>
-  <string name="action_share_file">Partajază legătură</string>
-  <string name="action_unshare_file">Departajează legătura</string>
+  <string name="action_share">Partajează</string>
   <string name="common_yes">Da</string>
   <string name="common_no">Nu</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_download">Anulează descărcarea</string>
-  <string name="common_cancel_upload">Anulează încărcarea</string>
   <string name="common_cancel">Anulează</string>
   <string name="common_save_exit">Salvare și ieșire</string>
   <string name="common_error">Eroare</string>
   <string name="prefs_category_instant_uploading">Încărcări instante</string>
   <string name="prefs_category_security">Securitate</string>
   <string name="prefs_instant_video_upload_path_title">Calea de încărcare Video</string>
-  <string name="download_folder_failed_content">Descărcarea fișierului %1$s nu s-a finisat</string>
   <string name="shared_subject_header">partajat</string>
   <string name="with_you_subject_header">cu tine</string>
-  <string name="subject_token">%1$s a partajat fișierul \"%2$s\" cu tine</string>
-  <string name="saml_subject_token">„%1$s” a fost partajat cu dumneavoastră</string>
+  <string name="subject_user_shared_with_you">%1$s a partajat fișierul \"%2$s\" cu tine</string>
+  <string name="subject_shared_with_you">„%1$s” a fost partajat cu dumneavoastră</string>
   <string name="auth_refresh_button">Reîmprospătează conexiunea</string>
   <string name="auth_host_address">Adresa server-ului</string>
   <string name="common_error_out_memory">Memorie insuficientă </string>
   <string name="file_list__footer__files">%1$d fișiere</string>
   <string name="file_list__footer__files_and_folder">%1$d fișiere, 1 folder</string>
   <string name="file_list__footer__files_and_folders">%1$d fișiere, %2$d foldere</string>
+  <string name="share_dialog_title">Partajare</string>
+  <string name="share_via_link_section_title">Partajază legătură</string>
+  <string name="share_via_link_expiration_date_label">Specifică data expirării</string>
+  <string name="share_via_link_password_label">Protejare cu parolă</string>
+  <string name="share_search">Căutare</string>
 </resources>
index 5e4e3e3..57974e2 100644 (file)
@@ -72,6 +72,7 @@
   <string name="file_list_seconds_ago">несколько секунд назад</string>
   <string name="file_list_empty">Здесь ничего нет. Загрузите что-нибудь!</string>
   <string name="file_list_loading">Загрузка...</string>
+  <string name="file_list_no_app_for_file_type">Не найдено приложений для этого типа файла.</string>
   <string name="local_file_list_empty">В этом каталоге нет файлов.</string>
   <string name="filedetails_select_file">Нажмите на файл для отображения дополнительной информации.</string>
   <string name="filedetails_size">Размер:</string>
   <string name="filedetails_created">Создан:</string>
   <string name="filedetails_modified">Изменён:</string>
   <string name="filedetails_download">Скачать</string>
-  <string name="filedetails_sync_file">Ð\9eбновиÑ\82Ñ\8c Ñ\84айл</string>
+  <string name="filedetails_sync_file">СинÑ\85Ñ\80онизаÑ\86иÑ\8f</string>
   <string name="filedetails_renamed_in_upload_msg">Файл был переименован в %1$s во время загрузки</string>
   <string name="list_layout">Макет списка</string>
-  <string name="action_share_file">Поделиться ссылкой</string>
-  <string name="action_unshare_file">Убрать ссылку</string>
+  <string name="action_share">Общий доступ</string>
   <string name="common_yes">Да</string>
   <string name="common_no">Нет</string>
   <string name="common_ok">ОК</string>
-  <string name="common_cancel_download">Отменить скачивание</string>
-  <string name="common_cancel_upload">Отменить загрузку</string>
+  <string name="common_cancel_sync">Отменить синхронизацию</string>
   <string name="common_cancel">Отмена</string>
   <string name="common_save_exit">Сохранить и выйти</string>
   <string name="common_error">Ошибка</string>
   <string name="confirmation_remove_folder_alert">Вы действительно хотите удалить %1$s и его содержимое?</string>
   <string name="confirmation_remove_local">Только локально</string>
   <string name="confirmation_remove_folder_local">Только локально</string>
+  <string name="confirmation_remove_remote">От сервера</string>
+  <string name="confirmation_remove_remote_and_local">Удаленно и локально</string>
   <string name="remove_success_msg">Удаление завершено</string>
   <string name="remove_fail_msg">Ошибка удаления</string>
   <string name="rename_dialog_title">Введите новое имя</string>
   <string name="ssl_validator_label_validity_to">По:</string>
   <string name="ssl_validator_label_signature">Подпись:</string>
   <string name="ssl_validator_label_signature_algorithm">Алгоритм:</string>
+  <string name="digest_algorithm_not_available">Этот хэш алгоритм не доступен на этом телефоне.</string>
+  <string name="ssl_validator_label_certificate_fingerprint">Отпечаток пальца:</string>
+  <string name="certificate_load_problem">Проблема при загрузке сертификата.</string>
   <string name="ssl_validator_null_cert">Сертификат не может быть показан.</string>
   <string name="ssl_validator_no_info_about_error">- Нет информации об ошибке</string>
   <string name="placeholder_sentence">Это заполнитель</string>
   <string name="conflict_title">Конфликт файлов</string>
   <string name="conflict_message">Какие файлы Вы хотите сохранить? При выборе обеих версий, к названию локального файла будет добавлена цифра</string>
   <string name="conflict_keep_both">Сохранить оба</string>
+  <string name="conflict_use_local_version">локальная версия</string>
+  <string name="conflict_use_server_version">удаленная версия</string>
   <string name="preview_image_description">Предпросмотр</string>
   <string name="preview_image_error_unknown_format">Это изображение не может быть отображено</string>
   <string name="error__upload__local_file_not_copied">%1$s невозможно скопировать в локальный каталог %2$s </string>
   <string name="share_link_file_error">При попытке поделиться этим файлом или каталогом произошла ошибка</string>
   <string name="unshare_link_file_no_exist">Невозможно закрыть доступ. Убедитесь что файл существует</string>
   <string name="unshare_link_file_error">При попытке закрыть доступ к этому файлу или каталогу произошла ошибка</string>
+  <string name="update_link_file_no_exist">Не удается обновить. Пожалуйста, проверьте, существует ли файл</string>
+  <string name="update_link_file_error">Произошла ошибка при попытке обновить общую ссылку</string>
   <string name="share_link_password_title">Введите пароль</string>
   <string name="share_link_empty_password">Вы должны ввести пароль</string>
   <string name="activity_chooser_send_file_title">Отправить</string>
   <string name="forbidden_permissions_delete">для удаления этого файла</string>
   <string name="share_link_forbidden_permissions">для открытия доступа к этому файлу</string>
   <string name="unshare_link_forbidden_permissions">для закрытия доступа к этому файлу</string>
+  <string name="update_link_forbidden_permissions">обновить эту общую ссылку</string>
   <string name="forbidden_permissions_create">для создания файла</string>
   <string name="uploader_upload_forbidden_permissions">для загрузки в этот каталог</string>
   <string name="downloader_download_file_not_found">Этот файл больше недоступен на сервере</string>
   <string name="move_file_invalid_overwrite">Файл уже существует в каталоге назначения</string>
   <string name="move_file_error">Произошла ошибка при попытке перемещения этого файла или каталога</string>
   <string name="forbidden_permissions_move">для перемещения этого файла</string>
+  <string name="copy_file_not_found">Не удалось произвести копирование. Пожалуйста проверьте существование файла</string>
+  <string name="copy_file_invalid_into_descendent">Нельзя произвести копирование папки в унаследованную папку</string>
   <string name="copy_file_invalid_overwrite">Файл уже существует в каталоге назначения</string>
+  <string name="copy_file_error">Произошла ошибка во время копирования этого файла или папки</string>
+  <string name="forbidden_permissions_copy">для копирования этого файла</string>
   <string name="prefs_category_instant_uploading">Мгновенные загрузки</string>
   <string name="prefs_category_security">Безопасность</string>
   <string name="prefs_instant_video_upload_path_title">Путь для загрузки Видео</string>
-  <string name="download_folder_failed_content">Не удалось завершить скачивание каталога %1$s</string>
+  <string name="sync_folder_failed_content">Синхронизация папки %1$s не может быть завершена</string>
   <string name="shared_subject_header">поделился</string>
   <string name="with_you_subject_header">с вами</string>
-  <string name="subject_token">%1$s предоставил вам доступ к \"%2$s\"</string>
-  <string name="saml_subject_token">Вам предоставлен доступ к \"%1$s\"</string>
+  <string name="subject_user_shared_with_you">%1$s предоставил вам доступ к \"%2$s\"</string>
+  <string name="subject_shared_with_you">Вам предоставлен доступ к \"%1$s\"</string>
   <string name="auth_refresh_button">Обновить соединение</string>
   <string name="auth_host_address">Адрес сервера</string>
   <string name="common_error_out_memory">Недостаточно памяти</string>
   <string name="file_list__footer__files">%1$d файлов</string>
   <string name="file_list__footer__files_and_folder">%1$d файлов, 1 каталог</string>
   <string name="file_list__footer__files_and_folders">%1$d файлов, %2$d каталогов</string>
+  <string name="share_dialog_title">Общий доступ</string>
+  <string name="share_with_user_section_title">Поделиться с пользователями и группами</string>
+  <string name="share_no_users">Нет данных используемых совместно с другими пользователями</string>
+  <string name="share_add_user_or_group">Добавить пользователя или группу</string>
+  <string name="share_via_link_section_title">Поделиться ссылкой</string>
+  <string name="share_via_link_expiration_date_label">Установить срок действия</string>
+  <string name="share_via_link_password_label">Защитить паролем</string>
+  <string name="share_via_link_password_title">Безопасный</string>
+  <string name="share_get_public_link_button">Получить ссылку</string>
+  <string name="share_search">Найти</string>
+  <string name="search_users_and_groups_hint">Поиск пользователей и групп</string>
+  <string name="share_group_clarification">%1$s (группа)</string>
+  <string name="share_sharee_unavailable">Извините, версия вашего сервера не позволяет поделиться с пользователями через клиент. \nПожалуйста обратитесь к администратору</string>
 </resources>
index 8116b72..2531d9b 100644 (file)
   <string name="filedetails_created">සෑදු දිනය:</string>
   <string name="filedetails_modified">වෙනස් කළ දිනය:</string>
   <string name="filedetails_download">භාගත කරන්න</string>
+  <string name="action_share">බෙදා හදා ගන්න</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_save_exit">සුරැක &amp; පිටවන්න</string>
   <string name="common_error">දෝශය</string>
@@ -79,4 +79,8 @@
   <string name="prefs_category_accounts">ගිණුම්</string>
   <string name="folder_picker_choose_button_text">තෝරන්න</string>
   <string name="auth_host_address">සේවාදායකයේ ලිපිනය</string>
+  <string name="share_dialog_title">හුවමාරු කිරීම</string>
+  <string name="share_via_link_expiration_date_label">කල් ඉකුත් විමේ දිනය දමන්න</string>
+  <string name="share_via_link_password_label">මුර පදයකින් ආරක්ශාකරන්න</string>
+  <string name="share_search">සොයන්න</string>
 </resources>
index 66ac426..e68ba4b 100644 (file)
@@ -71,6 +71,7 @@
   <string name="file_list_seconds_ago">pred sekundami</string>
   <string name="file_list_empty">Žiadny súbor. Nahrajte niečo!</string>
   <string name="file_list_loading">Načítavam...</string>
+  <string name="file_list_no_app_for_file_type">Nenašla sa aplikácia pre tento typ súboru!</string>
   <string name="local_file_list_empty">V tomto priečinku nie sú žiadne 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_created">Vytvorený:</string>
   <string name="filedetails_modified">Zmenený:</string>
   <string name="filedetails_download">Stiahnuť</string>
-  <string name="filedetails_sync_file">Obnoviť súbor</string>
+  <string name="filedetails_sync_file">Synchronizovať</string>
   <string name="filedetails_renamed_in_upload_msg">Súbor bol premenovaný na %1$s počas nahrávania</string>
   <string name="list_layout">Rozvrhnutie zoznamu</string>
-  <string name="action_share_file">Zdieľať linku</string>
-  <string name="action_unshare_file">Zrušiť zdieľanie odkazu</string>
+  <string name="action_share">Zdieľať</string>
   <string name="common_yes">Áno</string>
   <string name="common_no">Nie</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_download">Zrušiť sťahovanie</string>
-  <string name="common_cancel_upload">Zrušiť odosielanie</string>
+  <string name="common_cancel_sync">Zrušiť synchronizáciu</string>
   <string name="common_cancel">Zrušiť</string>
   <string name="common_save_exit">Uložiť a ukončiť</string>
   <string name="common_error">Chyba</string>
   <string name="ssl_validator_label_validity_to">Do: </string>
   <string name="ssl_validator_label_signature">Podpis:</string>
   <string name="ssl_validator_label_signature_algorithm">Algoritmus:</string>
+  <string name="digest_algorithm_not_available">Algoritmus digest nie je na vašom telefóne dostupný.</string>
+  <string name="ssl_validator_label_certificate_fingerprint">Odtlačok:</string>
+  <string name="certificate_load_problem">Nastal problém s načítaním certifikátu.</string>
   <string name="ssl_validator_null_cert">Certifikát nemohol byť zobrazený.</string>
   <string name="ssl_validator_no_info_about_error">- Žiadne informácie o tejto chybe</string>
   <string name="placeholder_sentence">Toto je \"placeholder\"</string>
   <string name="prefs_category_instant_uploading">Okamžité nahratie</string>
   <string name="prefs_category_security">Zabezpečenie</string>
   <string name="prefs_instant_video_upload_path_title">Cesta pre nahrávanie videí</string>
-  <string name="download_folder_failed_content">Sťahovanie %1$s priečinka nebolo dokončené</string>
+  <string name="sync_folder_failed_content">Synchronizáciu priečinka %1$s nebolo možné dokončiť</string>
   <string name="shared_subject_header">zdieľané</string>
   <string name="with_you_subject_header">s vami</string>
-  <string name="subject_token">%1$s vám zdieľal \"%2$s\"</string>
-  <string name="saml_subject_token">\"%1$s\" bol s vami nazdieľaný</string>
+  <string name="subject_user_shared_with_you">%1$s vám zdieľal \"%2$s\"</string>
+  <string name="subject_shared_with_you">\"%1$s\" bol s vami nazdieľaný</string>
   <string name="auth_refresh_button">Obnoviť pripojenie</string>
   <string name="auth_host_address">Adresa servera</string>
   <string name="common_error_out_memory">Nedostatok pamäte</string>
   <string name="file_list__footer__files">%1$d súb.</string>
   <string name="file_list__footer__files_and_folder">%1$d súb., 1 priečinok</string>
   <string name="file_list__footer__files_and_folders">%1$d súb., %2$d prieč.</string>
+  <string name="share_dialog_title">Zdieľanie</string>
+  <string name="share_no_users">Zatiaľ s používateľmi nezdieľate žiadne dáta.</string>
+  <string name="share_add_user_or_group">Pridať používateľa alebo skupinu</string>
+  <string name="share_via_link_section_title">Zdieľať linku</string>
+  <string name="share_via_link_expiration_date_label">Nastaviť dátum expirácie</string>
+  <string name="share_via_link_password_label">Chrániť heslom</string>
+  <string name="share_search">Hľadať</string>
+  <string name="search_users_and_groups_hint">Vyhľadať používateľov alebo skupiny</string>
+  <string name="share_group_clarification">%1$s (skupina)</string>
+  <string name="share_sharee_unavailable">Je nám ľúto, vaša verzia servera neumožňuje zdieľanie s používateľmi alebo skupinami.
+\nProsím, obráťte sa na svojho správcu</string>
 </resources>
index e58ba5b..2f11444 100644 (file)
@@ -71,6 +71,7 @@
   <string name="file_list_seconds_ago">pred nekaj sekundami</string>
   <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="file_list_no_app_for_file_type">Ne najdem aplikacije za to vrsto datoteke!</string>
   <string name="local_file_list_empty">V tej mapi ni datotek.</string>
   <string name="filedetails_select_file">Pritisnite na datoteko za prikaz dodatnih podrobnosti.</string>
   <string name="filedetails_size">Velikost:</string>
   <string name="filedetails_created">Ustvarjeno:</string>
   <string name="filedetails_modified">Spremenjeno:</string>
   <string name="filedetails_download">Prejmi</string>
-  <string name="filedetails_sync_file">Osveži datoteko</string>
+  <string name="filedetails_sync_file">Sinhroniziraj</string>
   <string name="filedetails_renamed_in_upload_msg">Datoteka je bila med nalaganjem preimenovana v %1$s</string>
   <string name="list_layout">Postavitev seznama</string>
-  <string name="action_share_file">Povezava za souporabo</string>
-  <string name="action_unshare_file">Odstrani možnost souporabe</string>
+  <string name="action_share">Souporaba</string>
   <string name="common_yes">Da</string>
   <string name="common_no">Ne</string>
   <string name="common_ok">V redu</string>
-  <string name="common_cancel_download">Prekliči prejem</string>
-  <string name="common_cancel_upload">Prekliči pošiljanje</string>
+  <string name="common_cancel_sync">Prekliči sinhronizacijo</string>
   <string name="common_cancel">Prekliči</string>
   <string name="common_save_exit">Shrani in končaj</string>
   <string name="common_error">Napaka</string>
   <string name="ssl_validator_label_validity_to">Do:</string>
   <string name="ssl_validator_label_signature">Podpis:</string>
   <string name="ssl_validator_label_signature_algorithm">Algoritem:</string>
+  <string name="digest_algorithm_not_available">Ta algoritem ni na voljo na vašem telefonu.</string>
+  <string name="certificate_load_problem">Imam težavo z nalaganjem certifikata.</string>
   <string name="ssl_validator_null_cert">Potrdila ni mogoče pokazati.</string>
   <string name="ssl_validator_no_info_about_error">– Ni podatkov o napaki</string>
   <string name="placeholder_sentence">To je vsebnik predmetov</string>
   <string name="share_link_file_error">Prišlo je do napake med poskusom omogočanja souporabe te datoteke ali mape</string>
   <string name="unshare_link_file_no_exist">Ni mogoče prekiniti souporabe. Preverite, ali datoteka obstaja.</string>
   <string name="unshare_link_file_error">Prišlo je do napake med poskusom odstranjevanja souporabe te datoteke ali mape</string>
+  <string name="update_link_file_no_exist">Nemorem posodobiti. Prosim, preverite ali datoteka obstaja.</string>
+  <string name="update_link_file_error">Prišlo je do napake med posodabljanjem povezav</string>
   <string name="share_link_password_title">Vpis gesla</string>
   <string name="share_link_empty_password">Vpisati je treba geslo.</string>
   <string name="activity_chooser_send_file_title">Pošlji</string>
   <string name="forbidden_permissions_delete">za izbris datoteke.</string>
   <string name="share_link_forbidden_permissions">za omogočanje souporabe datoteke.</string>
   <string name="unshare_link_forbidden_permissions">za preklic souporabe datoteke.</string>
+  <string name="update_link_forbidden_permissions">za posodobitev te povezave za souporabo</string>
   <string name="forbidden_permissions_create">za ustvarjanje datoteke.</string>
   <string name="uploader_upload_forbidden_permissions">za pošiljanje datoteke v oblak.</string>
   <string name="downloader_download_file_not_found">Datoteka na strežniku ni več na voljo.</string>
   <string name="move_file_invalid_overwrite">Datoteka v ciljni mapi že obstaja.</string>
   <string name="move_file_error">Prišlo je do napake med premikanjem datoteke v mapo</string>
   <string name="forbidden_permissions_move">med premikanjem datoteke</string>
+  <string name="copy_file_not_found">Ne morem kopirati. Prosim, preverite ali datoteka obstaja.</string>
+  <string name="copy_file_invalid_into_descendent">Ni mogoče kopirati mape v podrejeno mapo.</string>
   <string name="copy_file_invalid_overwrite">Datoteka v ciljni mapi že obstaja.</string>
+  <string name="copy_file_error">Prišlo je do napake med kopiranjem datoteke v mapo</string>
+  <string name="forbidden_permissions_copy">za kopiranje te 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>
-  <string name="download_folder_failed_content">Imenika %1$s  ni mogoče prejeti v celoti</string>
+  <string name="sync_folder_failed_content">Sinhronizacija mape %1$s ne more biti zaključena</string>
   <string name="shared_subject_header">v souporabi</string>
   <string name="with_you_subject_header">z vami</string>
-  <string name="subject_token">Uporabnik %1$s je omogočil souporabo \"%2$s\" z vami</string>
-  <string name="saml_subject_token">\"%1$s\" je oddan v souporabo z vami</string>
+  <string name="subject_user_shared_with_you">Uporabnik %1$s je omogočil souporabo \"%2$s\" z vami</string>
+  <string name="subject_shared_with_you">\"%1$s\" je oddan v souporabo z vami</string>
   <string name="auth_refresh_button">Osveži povezavo</string>
   <string name="auth_host_address">Naslov strežnika</string>
   <string name="common_error_out_memory">Ni dovolj pomnilnika</string>
   <string name="file_list__footer__files">%1$d datotek</string>
   <string name="file_list__footer__files_and_folder">%1$d datotek, 1 mapa</string>
   <string name="file_list__footer__files_and_folders">%1$d datotek, %2$d map</string>
+  <string name="share_dialog_title">Souporaba</string>
+  <string name="share_with_user_section_title">Deli z uporabniki in skupinami</string>
+  <string name="share_no_users">Podatki še niso bili deljeni z uporabniki</string>
+  <string name="share_add_user_or_group">Dodaj uporabnika ali skupino</string>
+  <string name="share_via_link_section_title">Povezava za souporabo</string>
+  <string name="share_via_link_expiration_date_label">Nastavi datum preteka</string>
+  <string name="share_via_link_password_label">Zaščiti z geslom</string>
+  <string name="share_via_link_password_title">Varovano</string>
+  <string name="share_get_public_link_button">Vzami povezavo</string>
+  <string name="share_search">Poišči</string>
+  <string name="search_users_and_groups_hint">Poišči uporabniku in skupine</string>
+  <string name="share_group_clarification">%1$s (skupina)</string>
+  <string name="share_sharee_unavailable">Žal, vaš strežnik ne dovoljuje deljenja z uporabniki med strankami.
+        \nKontaktirajte skrbnika.</string>
 </resources>
index fc3b8a4..3bb0088 100644 (file)
 <?xml version='1.0' encoding='UTF-8'?>
 <resources>
-  <string name="actionbar_upload">Ngarko</string>
-  <string name="actionbar_upload_files">Skedarët</string>
-  <string name="actionbar_mkdir">Dosje e\'re</string>
-  <string name="actionbar_settings">Parametrat</string>
-  <string name="actionbar_send_file">Dërgo</string>
+  <string name="about_android">Aplikacioni Android %1$s</string>
+  <string name="about_version">version %1$s</string>
+  <string name="actionbar_sync">Rifreskoni llogarinë</string>
+  <string name="actionbar_upload">Ngarkoni</string>
+  <string name="actionbar_upload_from_apps">Lëndë nga aplikacione të tjera</string>
+  <string name="actionbar_upload_files">Kartela</string>
+  <string name="actionbar_open_with">Hape me</string>
+  <string name="actionbar_mkdir">Dosje e re</string>
+  <string name="actionbar_settings">Rregullime</string>
+  <string name="actionbar_see_details">Hollësi</string>
+  <string name="actionbar_send_file">Dërgoje</string>
+  <string name="actionbar_sort">Renditi</string>
+  <string name="actionbar_sort_title">Renditi sipas</string>
+  <string-array name="actionbar_sortby">
+    <item>A-Z</item>
+    <item>Më e reja - Më e vjetra</item>
+  </string-array>
   <!--TODO re-enable when server-side folder size calculation is available   
        <item>Biggest - Smallest</item>-->
   <!--TODO re-enable when "Accounts" is available in Navigation Drawer-->
   <!--<string name="drawer_item_accounts">Accounts</string>-->
+  <string name="drawer_item_all_files">Krejt kartelat</string>
   <!--TODO re-enable when "On Device" is available
     <string name="drawer_item_on_device">On device</string>-->
-  <string name="drawer_open">Hap</string>
-  <string name="prefs_category_general">Përgjithshme</string>
+  <string name="drawer_item_settings">Llogari</string>
+  <string name="drawer_item_logs">Regjistra</string>
+  <string name="drawer_close">Mbylle</string>
+  <string name="drawer_open">Hape</string>
+  <string name="prefs_category_general">Të përgjithshme</string>
   <string name="prefs_category_more">Më tepër</string>
-  <string name="prefs_accounts">Llogarit</string>
+  <string name="prefs_accounts">Llogari</string>
+  <string name="prefs_manage_accounts">Administroni Llogari</string>
+  <string name="prefs_passcode">Kyçje kodkalimi</string>
+  <string name="prefs_instant_upload">Ngarkime të menjëhershme fotosh</string>
+  <string name="prefs_instant_upload_summary">Ngarkoni menjëherë foto të bëra nga kamera</string>
+  <string name="prefs_instant_video_upload">Ngarkime të menjëhershme videosh</string>
+  <string name="prefs_instant_video_upload_summary">Ngarkoni menjëherë video të bëra nga kamera</string>
+  <string name="prefs_log_title">Aktivizoni Regjistrimet</string>
+  <string name="prefs_log_summary">Kjo përdoret për të regjistruar probleme</string>
+  <string name="prefs_log_title_history">Historik Regjistrimesh</string>
+  <string name="prefs_log_summary_history">Kjo shfaq regjistrimet e bëra</string>
+  <string name="prefs_log_delete_history_button">Fshije Historikun</string>
   <string name="prefs_help">Ndihmë</string>
-  <string name="prefs_imprint">Stampoj</string>
-  <string name="auth_username">Përdoruesi</string>
-  <string name="auth_password">Kodi</string>
-  <string name="sync_string_files">Skedarët</string>
-  <string name="setup_btn_connect">Lidhu</string>
-  <string name="uploader_btn_upload_text">Ngarko</string>
-  <string name="uploader_btn_new_folder_text">Dosje e\'re</string>
-  <string name="uploader_wrn_no_account_title">Nuk u gjend asnjë llogari</string>
-  <string name="uploader_wrn_no_account_text">Nuk ka %1$s llogari në pajisjen tuaj. Ju lutemi të krijojnë një llogari të parë.</string>
-  <string name="uploader_wrn_no_account_setup_btn_text">Ndërto</string>
-  <string name="uploader_wrn_no_account_quit_btn_text">Dil</string>
-  <string name="uploader_info_uploading">Ngarko</string>
+  <string name="prefs_recommend">Këshillojani një shoku</string>
+  <string name="prefs_feedback">Përshtypje</string>
+  <string name="prefs_imprint">Imprint</string>
+  <string name="prefs_remember_last_share_location">Mba mend vend ndarjeje me të tjerët</string>
+  <string name="prefs_remember_last_upload_location_summary">Mba mend vendin e fundit të ngarkimit për ndarje me të tjerët</string>
+  <string name="recommend_subject">Provojeni %1$s te telefoni juaj!</string>
+  <string name="recommend_text">Dua t\’ju ftoj të përdorni %1$s në telefonin tuaj!\nShkarkojeni prej këtu: %2$s</string>
+  <string name="auth_check_server">Kontrollo Shërbyesin</string>
+  <string name="auth_host_url">Adresë https://… e shërbyesit</string>
+  <string name="auth_username">Emër përdoruesi</string>
+  <string name="auth_password">Fjalëkalim</string>
+  <string name="auth_register">Rishtar te %1$s?</string>
+  <string name="sync_string_files">Kartela</string>
+  <string name="setup_btn_connect">Lidhuni</string>
+  <string name="uploader_btn_upload_text">Ngarkoni</string>
+  <string name="uploader_btn_new_folder_text">Dosje e re</string>
+  <string name="uploader_top_message">Zgjidhni dosje ngarkimi:</string>
+  <string name="uploader_wrn_no_account_title">S\’u gjet llogari</string>
+  <string name="uploader_wrn_no_account_text">S\’ka llogari %1$s te pajisja juaj. Ju lutemi, rregulloni së pari një llogari.</string>
+  <string name="uploader_wrn_no_account_setup_btn_text">Rregullim</string>
+  <string name="uploader_wrn_no_account_quit_btn_text">Dilni</string>
+  <string name="uploader_wrn_no_content_title">Pa lëndë për ngarkim</string>
+  <string name="uploader_wrn_no_content_text">S\’u mor lëndë. Asgjë për t\’u ngarkuar.</string>
+  <string name="uploader_error_forbidden_content">%1$s nuk i lejohet të hyjë në lëndë të përbashkët</string>
+  <string name="uploader_info_uploading">Ngarkim</string>
   <string name="file_list_seconds_ago">sekonda më parë</string>
-  <string name="file_list_empty">Këtu nuk ka asgje. Ngarko dicka</string>
-  <string name="filedetails_select_file">Trokitje e lehtë në një dokument për të shfaqur informacion shtesë.</string>
-  <string name="filedetails_size">Dimensioni:</string>
-  <string name="filedetails_type">Tipi:</string>
-  <string name="filedetails_created">Krijuar:</string>
-  <string name="filedetails_modified">Modifikuar:</string>
-  <string name="filedetails_download">Shkarko</string>
-  <string name="action_share_file">Ndaje lidhjen</string>
+  <string name="file_list_empty">Këtu nuk ka gjë. Ngarkoni diçka!</string>
+  <string name="file_list_loading">Po ngarkohet…</string>
+  <string name="file_list_no_app_for_file_type">S\’u gjet aplikacion për llojin e kartelës!</string>
+  <string name="local_file_list_empty">Në këtë dosje s\’ka kartela.</string>
+  <string name="filedetails_select_file">Prekni mbi një kartelë që të shfaqen të dhëna shtesë.</string>
+  <string name="filedetails_size">Madhësi:</string>
+  <string name="filedetails_type">Lloj:</string>
+  <string name="filedetails_created">Krijuar më:</string>
+  <string name="filedetails_modified">Ndryshuar më:</string>
+  <string name="filedetails_download">Shkarkoje</string>
+  <string name="filedetails_sync_file">Njëkohëso</string>
+  <string name="filedetails_renamed_in_upload_msg">Kartela u riemërtua si %1$s gjatë ngarkimit</string>
+  <string name="list_layout">Skemë Liste</string>
+  <string name="action_share">Ndaje</string>
   <string name="common_yes">Po</string>
   <string name="common_no">Jo</string>
-  <string name="common_ok">Ok</string>
-  <string name="common_cancel_upload">Anulo ngarkimin</string>
-  <string name="common_cancel">Anulo</string>
-  <string name="common_error">Veprim i gabuar</string>
-  <string name="common_error_unknown">Gabim panjohur</string>
+  <string name="common_ok">OK</string>
+  <string name="common_cancel_sync">Anuloje njëkohësimin</string>
+  <string name="common_cancel">Anuloje</string>
+  <string name="common_save_exit">Ruaje &amp; Dil</string>
+  <string name="common_error">Gabim</string>
+  <string name="common_loading">Po ngarkohet …</string>
+  <string name="common_error_unknown">Gabim i panjohur</string>
   <string name="about_title">Rreth</string>
-  <string name="change_password">Ndrysho fjalëkalimin</string>
-  <string name="delete_account">Fshi llogarin</string>
-  <string name="create_account">Krijo llogari</string>
-  <string name="upload_chooser_title">Ngarko nga...</string>
-  <string name="uploader_info_dirname">Emri i Skedarit</string>
-  <string name="uploader_upload_in_progress_ticker">Ngarkim...</string>
-  <string name="uploader_upload_in_progress_content">%1$d%% Ngarkim %2$s</string>
-  <string name="uploader_upload_succeeded_ticker">Ngarkimi me sukses.</string>
+  <string name="change_password">Ndryshoni fjalëkalimin</string>
+  <string name="delete_account">Fshini llogarinë</string>
+  <string name="create_account">Krijoni llogari</string>
+  <string name="upload_chooser_title">Ngarkojeni prej …</string>
+  <string name="uploader_info_dirname">Emër dosjeje</string>
+  <string name="uploader_upload_in_progress_ticker">Po ngarkohet …</string>
+  <string name="uploader_upload_in_progress_content">%1$d%% Po ngarkohet %2$s</string>
+  <string name="uploader_upload_succeeded_ticker">Ngarkimi doli me sukses</string>
   <string name="uploader_upload_succeeded_content_single">%1$s u ngarkua me sukses</string>
   <string name="uploader_upload_failed_ticker">Ngarkimi dështoi</string>
-  <string name="uploader_upload_failed_content_single">Ngarkimi i %1$s nuk mund te behej</string>
-  <string name="downloader_download_in_progress_ticker">Shkarkimi...</string>
-  <string name="downloader_download_in_progress_content">%1$d%% Shkarkimi %2$s</string>
-  <string name="downloader_download_succeeded_ticker">Shkarkimi me sukses</string>
+  <string name="uploader_upload_failed_content_single">Ngarkimi i %1$s s\’u plotësua dot</string>
+  <string name="uploader_upload_failed_credentials_error">Ngarkimi dështoi, lypset të ribëni hyrjen</string>
+  <string name="downloader_download_in_progress_ticker">Po shkarkohet …</string>
+  <string name="downloader_download_in_progress_content">%1$d%% Shkarkim %2$s</string>
+  <string name="downloader_download_succeeded_ticker">Shkarkimi doli me sukses</string>
   <string name="downloader_download_succeeded_content">%1$s u shkarkua me sukses</string>
-  <string name="downloader_download_failed_ticker">Shkarkimi dështoj</string>
-  <string name="common_choose_account">Zgjidhni Llogarine</string>
-  <string name="auth_no_net_conn_title">Nuk ka lidhje ne Rrjet</string>
+  <string name="downloader_download_failed_ticker">Shkarkimi dështoi</string>
+  <string name="downloader_download_failed_content">Shkarkimi i %1$s s\’u plotësua dot</string>
+  <string name="downloader_not_downloaded_yet">Ende e pashkarkuar</string>
+  <string name="downloader_download_failed_credentials_error">Shkarkimi dështoi, lypset të ribëni hyrjen</string>
+  <string name="common_choose_account">Zgjidhni llogari</string>
+  <string name="sync_fail_ticker">Njëkohësimi dështoi</string>
+  <string name="sync_fail_ticker_unauthorized">Njëkohësimi dështoi, lypset të ribëni hyrjen</string>
+  <string name="sync_fail_content">Njëkohësimi i %1$s s\’u plotësua dot</string>
+  <string name="sync_fail_content_unauthorized">Fjalëkalim i pavlefshëm për %1$s</string>
+  <string name="sync_conflicts_in_favourites_ticker">U hasën përplasje</string>
+  <string name="sync_fail_in_favourites_content">Lënda e %1$d kartelave s\’u njëkohësua dot (%2$d përplasje)</string>
+  <string name="sync_foreign_files_forgotten_ticker">Disa kartela vendore u harruan</string>
+  <string name="sync_foreign_files_forgotten_content">%1$d kartela nga dosja %2$s s\’u kopjuan dot</string>
+  <string name="sync_foreign_files_forgotten_explanation">Nga versioni 1.3.16 e tutje, kartelat e ngarkuara nga kjo pajisje kopjohen te dosja vendore %1$s, për të parandaluar humbje të dhënash, kur një kartelë e vetme njëkohësohet me disa llogari.\n\nPër shkak të këtij ndryshimi, krejt kartelat e ngarkuara nën versione të mëparshëm të këtij aplikacioni u kopjuan në dosjen %2$s. Por plotësimin e këtij veprimi e pengoi një gabim gjatë njëkohësimit të llogarisë. Ose mund t\’i lini kartelat siç janë, dhe të hiqni lidhjen për te %3$s, ose të kaloni kartelat te dosja %1$s dhe të mbani lidhjen për te %4$s.\n\nMë poshtë radhiten kartelat vendore, dhe kartelat e largëta te %5$s me të cilat lidhen.</string>
+  <string name="sync_current_folder_was_removed">Dosja %1$s s\’ekziston më</string>
+  <string name="foreign_files_move">Zhvendosi krejt</string>
+  <string name="foreign_files_success">U zhvendosën krejt kartelat</string>
+  <string name="foreign_files_fail">Disa kartela s\’u zhvendosën dot</string>
+  <string name="foreign_files_local_text">Vendore: %1$s</string>
+  <string name="foreign_files_remote_text">E largët: %1$s</string>
+  <string name="upload_query_move_foreign_files">S\’ka hapësirë të mjaftueshme për të kopjuar te dosja %1$s kartelat e përzgjedhur. Doni t\i zhvendosni më mirë? </string>
+  <string name="pass_code_enter_pass_code">Ju lutemi, futni kodkalimin tuaj</string>
+  <string name="pass_code_configure_your_pass_code">Jepni kodkalimin tuaj</string>
+  <string name="pass_code_configure_your_pass_code_explanation">Kodkalimi do të kërkohet sa herë që niset aplikacioni</string>
+  <string name="pass_code_reenter_your_pass_code">Ju lutemi, rifutni kodkalimin tuaj</string>
+  <string name="pass_code_remove_your_pass_code">Hiqeni kodkalimin tuaj</string>
+  <string name="pass_code_mismatch">Kodkalimet s\’janë të njëjtë</string>
+  <string name="pass_code_wrong">Kodkalim i pasaktë</string>
+  <string name="pass_code_removed">Kodkalimi u hoq</string>
+  <string name="pass_code_stored">Kodkalimi u depozitua</string>
+  <string name="media_notif_ticker">Lojtësi %1$s i muzikës</string>
+  <string name="media_state_playing">%1$s (po luhet)</string>
+  <string name="media_state_loading">%1$s (po ngarkohet)</string>
+  <string name="media_event_done">Luajtja e %1$s përfundoi</string>
+  <string name="media_err_nothing_to_play">S\’u gjetën kartela media</string>
+  <string name="media_err_no_account">S\’u dha llogari</string>
+  <string name="media_err_not_in_owncloud">Kartelë jo në llogari të vlefshme</string>
+  <string name="media_err_unsupported">Kodek mediash i pambuluar</string>
+  <string name="media_err_io">S\’u lexua dot kartela media</string>
+  <string name="media_err_malformed">Kartelë media e koduar jo si duhet</string>
+  <string name="media_err_timeout">Mbaroi koha, teksa përpiqej të luhej</string>
+  <string name="media_err_invalid_progressive_playback">Kartela media s\’mund të transmetohet</string>
+  <string name="media_err_unknown">Kartela media s\’mund të luhet me lojtësin standard</string>
+  <string name="media_err_security_ex">Gabim sigurie gjatë përpjekjes për luajtje të %1$s</string>
+  <string name="media_err_io_ex">Gabim input-i gjatë përpjekjes për luajtje të %1$s</string>
+  <string name="media_err_unexpected">Gabim i papritur gjatë përpjekjes për luajtje të %1$s</string>
+  <string name="media_rewind_description">Butoni Mbrapsht</string>
+  <string name="media_play_pause_description">Butoni Luaje ose Pushoje</string>
+  <string name="media_forward_description">Butoni Përpara</string>
+  <string name="auth_getting_authorization">Po merret autorizim…</string>
+  <string name="auth_trying_to_login">Po përpiqet të bëhet hyrja…</string>
+  <string name="auth_no_net_conn_title">Pa lidhje rrjeti</string>
+  <string name="auth_nossl_plain_ok_title">S\’ka lidhje të sigurt.</string>
   <string name="auth_connection_established">Lidhja u vendos</string>
-  <string name="auth_secure_connection">Lidhja e Sigurt vendos</string>
-  <string name="common_rename">Riemërto</string>
-  <string name="common_remove">Hiq</string>
-  <string name="activity_chooser_send_file_title">Dërgo</string>
+  <string name="auth_testing_connection">Po provohet lidhja</string>
+  <string name="auth_not_configured_title">Formësim i keqformuar shërbyesi</string>
+  <string name="auth_account_not_new">Ka tashmë në pajisje një llogari për të njëjtin përdorues dhe shërbyes</string>
+  <string name="auth_account_not_the_same">Përdoruesi i dhënë s\’përputhet me përdoruesin e kësaj llogarie</string>
+  <string name="auth_unknown_error_title">Ndodhi një gabim i panjohur!</string>
+  <string name="auth_unknown_host_title">S\’u gjet dot strehë</string>
+  <string name="auth_incorrect_path_title">S\’u gjet dot instancë shërbyesi</string>
+  <string name="auth_timeout_title">Shërbyesit iu desh shumë kohë për përgjigje</string>
+  <string name="auth_incorrect_address_title">URL e keqformuar</string>
+  <string name="auth_ssl_general_error_title">Gatitja e SSL-së dështoi</string>
+  <string name="auth_ssl_unverified_server_title">S\’u verifikua dot identiteti i shërbyesit SSL</string>
+  <string name="auth_bad_oc_version_title">Version i papranuar shërbyesi</string>
+  <string name="auth_wrong_connection_title">S\’u vendos dot lidhja</string>
+  <string name="auth_secure_connection">U vendos lidhje e sigurt</string>
+  <string name="auth_unauthorized">Emër përdoruesi ose fjalëkalim i gabuar</string>
+  <string name="auth_oauth_error">Autorizim jo i suksesshëm</string>
+  <string name="auth_oauth_error_access_denied">Hyrje e mohuar nga shërbyesi i autorizimeve</string>
+  <string name="auth_wtf_reenter_URL">Gjendje e papritur; ju lutemi, rijepni URL-në e shërbyesit</string>
+  <string name="auth_expired_oauth_token_toast">Autorizimi juaj skadoi. Ju lutemi, autorizohuni sërish</string>
+  <string name="auth_expired_basic_auth_toast">Ju lutemi, jepni fjalëkalimin e tanishëm</string>
+  <string name="auth_expired_saml_sso_token_toast">Sesioni juaj skadoi. Ju lutemi, rilidhuni</string>
+  <string name="auth_connecting_auth_server">Po lidhet te shërbyesi i mirëfilltësimeve…</string>
+  <string name="auth_unsupported_auth_method">Shërbyesi s\’e mbulon këtë metodë mirëfilltësimesh</string>
+  <string name="auth_unsupported_multiaccount">%1$s s\’mbulon llogari të shumëfishta</string>
+  <string name="auth_fail_get_user_name">Shërbyesi juaj s\’po përgjigje me id të saktë përdoruesi, ju lutemi, lidhuni me një admin</string>
+  <string name="auth_can_not_auth_against_server">S\’mund të bëhet mirëfilltësim kundrejt këtij shërbyesi</string>
+  <string name="auth_account_does_not_exist">Llogaria s\’ekziston ende te pajisja</string>
+  <string name="favorite">Vëre te Të parapëlqyerit</string>
+  <string name="unfavorite">Hiqe nga Të parapëlqyerit</string>
+  <string name="common_rename">Riemërtojeni</string>
+  <string name="common_remove">Hiqe</string>
+  <string name="confirmation_remove_alert">Doni vërtet të hiqet %1$s?</string>
+  <string name="confirmation_remove_folder_alert">Doni vërtet të hiqet %1$s dhe lënda e tij?</string>
+  <string name="confirmation_remove_local">Vetëm vendorja</string>
+  <string name="confirmation_remove_folder_local">Vetëm vendorja</string>
+  <string name="confirmation_remove_remote">Nga shërbyesi</string>
+  <string name="confirmation_remove_remote_and_local">E largëta &amp; dhe vendorja</string>
+  <string name="remove_success_msg">Heqja doli me sukses</string>
+  <string name="remove_fail_msg">Heqja dështoi</string>
+  <string name="rename_dialog_title">Jepni një emër të ri</string>
+  <string name="rename_local_fail_msg">Kopja vendore s\’u riemërtua dot; provoni një emër tjetër</string>
+  <string name="rename_server_fail_msg">Riemërtimi s\’u plotësua dot</string>
+  <string name="sync_file_fail_msg">S\’u kap dot kartela</string>
+  <string name="sync_file_nothing_to_do_msg">Lëndë kartele tashmë e njëkohësuar</string>
+  <string name="create_dir_fail_msg">S\’u krijua dot dosja</string>
+  <string name="filename_forbidden_characters">Shenja të ndaluara: / \\ &lt; &gt; : \" | ? *</string>
+  <string name="filename_forbidden_charaters_from_server">Emri i kartelës përmban të paktën një shenjë të pavlefshme</string>
+  <string name="filename_empty">Emri i kartelës s\’mund të jetë i zbrazët</string>
+  <string name="wait_a_moment">Pritni një çast</string>
+  <string name="filedisplay_unexpected_bad_get_content">Problem i papritur; ju lutemi, përzgjidhni një kartelë nga një aplikacion tjetër</string>
+  <string name="filedisplay_no_file_selected">S\’u përzgjodh kartelë</string>
+  <string name="activity_chooser_title">Dërgoni lidhje te …</string>
+  <string name="wait_for_tmp_copy_from_private_storage">Po kopjohet kartelë nga depo private</string>
+  <string name="oauth_check_onoff">Hyrje me oAuth2</string>
+  <string name="oauth_login_connection">Po lidhet me shërbyesin oAuth2…</string>
+  <string name="ssl_validator_header">Identiteti i sajtit s\’u verifikua dot</string>
+  <string name="ssl_validator_reason_cert_not_trusted">- Dëshmia e shërbyesit s\’është e besuar</string>
+  <string name="ssl_validator_reason_cert_expired">- Dëshmia e shërbyesit skadoi</string>
+  <string name="ssl_validator_reason_cert_not_yet_valid">- Datat e vlefshmërisë së dëshmisë së shërbyesit i përkasin të ardhmes</string>
+  <string name="ssl_validator_reason_hostname_not_verified">- URL-ja s\’përputhet me emrin e strehëemrit te dëshmia</string>
+  <string name="ssl_validator_question">Doni të besohet kjo dëshmi sido qoftë?</string>
+  <string name="ssl_validator_not_saved">Dëshmia s\’u ruajt dot</string>
+  <string name="ssl_validator_btn_details_see">Hollësi</string>
+  <string name="ssl_validator_btn_details_hide">Fshihe</string>
+  <string name="ssl_validator_label_subject">Lëshuar për:</string>
+  <string name="ssl_validator_label_issuer">Lëshuar nga:</string>
+  <string name="ssl_validator_label_CN">Emër i rëndomtë:</string>
+  <string name="ssl_validator_label_O">Organizëm:</string>
+  <string name="ssl_validator_label_OU">Njësi organizative:</string>
+  <string name="ssl_validator_label_C">Vend:</string>
+  <string name="ssl_validator_label_ST">Shtet:</string>
+  <string name="ssl_validator_label_L">Vendndodhje:</string>
+  <string name="ssl_validator_label_validity">Vlefshmëri:</string>
+  <string name="ssl_validator_label_validity_from">Nga:</string>
+  <string name="ssl_validator_label_validity_to">Deri më:</string>
+  <string name="ssl_validator_label_signature">Nënshkrim:</string>
+  <string name="ssl_validator_label_signature_algorithm">Algoritëm:</string>
+  <string name="digest_algorithm_not_available">Ky algoritëm digest s’është i passhëm në telefonin tuaj.</string>
+  <string name="ssl_validator_label_certificate_fingerprint">Shenja gishtash:</string>
+  <string name="certificate_load_problem">Pati një problem gjatë ngarkimit të dëshmisë.</string>
+  <string name="ssl_validator_null_cert">Dëshmia s\’u shfaq dot.</string>
+  <string name="ssl_validator_no_info_about_error">- Pa të dhëna rreth gabimit</string>
+  <string name="placeholder_sentence">Kjo është një vendmbajtëse</string>
+  <string name="placeholder_filename">placeholder.txt</string>
+  <string name="placeholder_filetype">Figurë PNG</string>
+  <string name="placeholder_filesize">389 KB</string>
+  <string name="placeholder_timestamp">2012/05/18 12:23 PM</string>
+  <string name="placeholder_media_time">12:23:45</string>
+  <string name="instant_upload_on_wifi">Fotot ngarkoji vetëm përmes WiFi-it</string>
+  <string name="instant_video_upload_on_wifi">Videot ngarkoji vetëm përmes WiFi-it</string>
+  <string name="instant_upload_path">/InstantUpload</string>
+  <string name="conflict_title">Përplasje kartelash</string>
+  <string name="conflict_message">Cilat kartela doni të mbani? Nëse përzgjidhni të dy versionet, kartelës vendore do t\’i shtohet një numër te emri.</string>
+  <string name="conflict_keep_both">Mbaji të dyja</string>
+  <string name="conflict_use_local_version">versionin vendor</string>
+  <string name="conflict_use_server_version">versionin e shërbyesit</string>
+  <string name="preview_image_description">Paraparje figure</string>
+  <string name="preview_image_error_unknown_format">Kjo figurë nuk mund të shfaqet</string>
+  <string name="error__upload__local_file_not_copied">%1$s s\’u kopjua dot te dosja vendore %2$s</string>
+  <string name="prefs_instant_upload_path_title">Shteg Ngarkimi</string>
+  <string name="share_link_no_support_share_api">Na ndjeni, ndarja me të tjerët s\’është e aktivizuar te shërbyesi juaj. Ju lutemi, lidhuni me përgjegjësin tuaj.</string>
+  <string name="share_link_file_no_exist">S\’arrin të ndajë me të tjerët. Ju lutemi, kontrolloni nëse kartela ekziston apo jo</string>
+  <string name="share_link_file_error">Ndodhi një gabim teksa përpiqej të ndahej me të tjerët kjo kartelë apo dosje</string>
+  <string name="unshare_link_file_no_exist">S\’arrin të zhbëjë ndarjen me të tjerët. Ju lutemi, kontrolloni nëse kartela ekziston</string>
+  <string name="unshare_link_file_error">Ndodhi një gabim teksa përpiqej të zhbëhej ndarja me të tjerët e kësaj kartele apo dosjeje</string>
+  <string name="update_link_file_no_exist">S’u arrit të përditësohej gjë. Ju lutemi, kontrolloni nëse ekziston apo jo kartela.</string>
+  <string name="update_link_file_error">Ndodhi një gabim teksa provohej të përditësohej lidhja e ndarë me të tjerët</string>
+  <string name="share_link_password_title">Jepni një fjalëkalim</string>
+  <string name="share_link_empty_password">Duhet të jepni një fjalëkalim</string>
+  <string name="activity_chooser_send_file_title">Dërgoje</string>
+  <string name="copy_link">Kopjoje lidhjen</string>
+  <string name="clipboard_text_copied">U kopjua te e papastra</string>
+  <string name="error_cant_bind_to_operations_service">Gabim kritik: nuk mund të kryhen veprime</string>
+  <string name="network_error_socket_exception">Ndodhi një gabim teksa po lidhej me shërbyesin.</string>
+  <string name="network_error_socket_timeout_exception">Ndodhi një gabim teksa po pritej për shërbyesin, veprimi s\’u krye dot</string>
+  <string name="network_error_connect_timeout_exception">Ndodhi një gabim teksa po pritej për shërbyesin, veprimi s\’u krye dot</string>
+  <string name="network_host_not_available">Veprimi s\’u plotësua dot, shërbyesi është i pakapshëm</string>
   <string name="empty"></string>
-  <string name="prefs_category_accounts">Llogarit</string>
+  <string name="forbidden_permissions">Nuk keni leje %s</string>
+  <string name="forbidden_permissions_rename">për riemërtim të kësaj kartele</string>
+  <string name="forbidden_permissions_delete">për fshirje të kësaj kartele</string>
+  <string name="share_link_forbidden_permissions">për ndarje me të tjerët të kësaj kartele</string>
+  <string name="unshare_link_forbidden_permissions">për zhbërje të ndarjes me të tjerët të kësaj kartele</string>
+  <string name="update_link_forbidden_permissions">që të përditësohet kjo lidhje e ndarë me të tjerët</string>
+  <string name="forbidden_permissions_create">për krijim kartele</string>
+  <string name="uploader_upload_forbidden_permissions">për ngarkim në këtë dosje</string>
+  <string name="downloader_download_file_not_found">Kartela s\’gjendet më te shërbyesi</string>
+  <string name="prefs_category_accounts">Llogari</string>
+  <string name="prefs_add_account">Shtoni llogari</string>
+  <string name="auth_redirect_non_secure_connection_title">Lidhja e sigurt është ridrejtuar përmes një rruge të pasigurt.</string>
+  <string name="actionbar_logger">Regjistra</string>
+  <string name="log_send_history_button">Historik Dërgimesh</string>
+  <string name="log_send_no_mail_app">S\’u gjet aplikacion për dërgim regjistrash. Instaloni aplikacion email-esh!</string>
+  <string name="log_send_mail_subject">Regjistra aplikacioni %1$s për Android</string>
+  <string name="log_progress_dialog_text">Po ngarkohen të dhëna…</string>
+  <string name="saml_authentication_required_text">Lypset mirëfilltësim</string>
   <string name="saml_authentication_wrong_pass">Fjalëkalim i gabuar</string>
-  <string name="folder_picker_choose_button_text">Zgjidh</string>
-  <string name="prefs_category_security">Siguria</string>
-  <string name="auth_host_address">Adresa e serverit</string>
+  <string name="actionbar_move">Zhvendose</string>
+  <string name="file_list_empty_moving">S\’ka gjë këtu. Mund të shtoni një dosje!</string>
+  <string name="folder_picker_choose_button_text">Zgjidhni</string>
+  <string name="move_file_not_found">S\’arrin të zhvendosë. Ju lutemi, kontrolloni nëse ekziston apo jo kartela</string>
+  <string name="move_file_invalid_into_descendent">S\’është e mundur të zhvendoset një dosje në një tjetër brenda saj</string>
+  <string name="move_file_invalid_overwrite">Kartela gjendet tashmë te dosja vendmbërritje</string>
+  <string name="move_file_error">Ndodhi një gabim teksa përpiqej të zhvendosej kjo kartelë apo dosje</string>
+  <string name="forbidden_permissions_move">për zhvendosje të kësaj kartele</string>
+  <string name="copy_file_not_found">S\’arrin të kopjojë. Ju lutemi, kontrolloni nëse ekziston apo jo kartela</string>
+  <string name="copy_file_invalid_into_descendent">S\’është e mundur të kopjohet një dosje në një tjetër brenda saj</string>
+  <string name="copy_file_invalid_overwrite">Kartela gjendet tashmë te dosja vendmbërritje</string>
+  <string name="copy_file_error">Ndodhi një gabim teksa përpiqej të kopjohej kjo kartelë apo dosje</string>
+  <string name="forbidden_permissions_copy">për kopjim të kësaj kartele</string>
+  <string name="prefs_category_instant_uploading">Ngarkime të Menjëhershme</string>
+  <string name="prefs_category_security">Siguri</string>
+  <string name="prefs_instant_video_upload_path_title">Shteg Ngarkimi Videosh</string>
+  <string name="sync_folder_failed_content">Njëkohësimi i dosjes %1$s s’u plotësua dot</string>
+  <string name="shared_subject_header">ndarë</string>
+  <string name="with_you_subject_header">me ju</string>
+  <string name="subject_user_shared_with_you">%1$s ndau me ju \"%2$s\"</string>
+  <string name="subject_shared_with_you">\"%1$s\" është ndarë me ju</string>
+  <string name="auth_refresh_button">Rifreskoni lidhjen</string>
+  <string name="auth_host_address">Adresë shërbyesi</string>
+  <string name="common_error_out_memory">Pa kujtesë të mjaftueshme</string>
+  <string name="username">Emër përdoruesi</string>
+  <string name="file_list__footer__folder">1 dosje</string>
+  <string name="file_list__footer__folders">%1$d dosje</string>
+  <string name="file_list__footer__file">1 kartelë</string>
+  <string name="file_list__footer__file_and_folder">1 kartelë, 1 dosje</string>
+  <string name="file_list__footer__file_and_folders">1 kartelë, %1$d dosje</string>
+  <string name="file_list__footer__files">%1$d kartelë</string>
+  <string name="file_list__footer__files_and_folder">%1$d kartela, 1 dosje</string>
+  <string name="file_list__footer__files_and_folders">%1$d kartela, %2$d dosje</string>
+  <string name="share_dialog_title">Ndarje me të tjerët</string>
+  <string name="share_with_user_section_title">Ndajeni me përdorues dhe grupe</string>
+  <string name="share_no_users">Ende pa të dhëna të ndara me përdorues</string>
+  <string name="share_add_user_or_group">Shtoni Përdorues ose Grup</string>
+  <string name="share_via_link_section_title">Lidhje ndarjeje</string>
+  <string name="share_via_link_expiration_date_label">Caktoni datë skadimi</string>
+  <string name="share_via_link_password_label">Mbroje me fjalëkalim</string>
+  <string name="share_via_link_password_title">E siguruar</string>
+  <string name="share_get_public_link_button">Merreni lidhjen</string>
+  <string name="share_search">Kërko</string>
+  <string name="search_users_and_groups_hint">Kërkoni për grupe dhe përdorues</string>
+  <string name="share_group_clarification">%1$s (grup)</string>
+  <string name="share_sharee_unavailable">Na ndjeni, versioni juaj i shërbyesit nuk lejon ndarje me përdorues brenda klientësh.
+        \nJu lutemi, lidhuni me përgjegjësin tuaj</string>
 </resources>
index a820097..9b967f9 100644 (file)
   <string name="filedetails_size">Veličina:</string>
   <string name="filedetails_type">Tip:</string>
   <string name="filedetails_download">Preuzmi</string>
-  <string name="action_share_file">Podeli prečicu</string>
+  <string name="action_share">Deljenje</string>
   <string name="common_yes">Da</string>
   <string name="common_no">Ne</string>
   <string name="common_ok">Ok</string>
-  <string name="common_cancel_upload">Otkaži otpremanje</string>
   <string name="common_cancel">Otkaži</string>
   <string name="common_error">Greška</string>
   <string name="common_error_unknown">Nepoznata greška</string>
@@ -73,4 +72,8 @@
   <string name="empty"></string>
   <string name="prefs_category_accounts">Nalozi</string>
   <string name="folder_picker_choose_button_text">Izaberi</string>
+  <string name="share_via_link_section_title">Veza deljenja</string>
+  <string name="share_via_link_expiration_date_label">Datum isteka</string>
+  <string name="share_via_link_password_label">Zaštita lozinkom</string>
+  <string name="share_search">Traži</string>
 </resources>
index 4ed5508..f583600 100644 (file)
   <string name="filedetails_created">Направљен:</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="list_layout">Распоред листе</string>
-  <string name="action_share_file">Веза дељења</string>
-  <string name="action_unshare_file">Не дели везом</string>
+  <string name="action_share">Дељење</string>
   <string name="common_yes">Да</string>
   <string name="common_no">Не</string>
   <string name="common_ok">У реду</string>
-  <string name="common_cancel_download">Откажи преузимање</string>
-  <string name="common_cancel_upload">Откажи отпремање</string>
   <string name="common_cancel">Откажи</string>
   <string name="common_save_exit">Сачувај и изађи</string>
   <string name="common_error">Грешка</string>
   <string name="move_file_error">Дошло је до грешке при премештању фајла или фасцикле</string>
   <string name="forbidden_permissions_move">да преместите овај фајл</string>
   <string name="copy_file_invalid_overwrite">Фајл већ постоји у одредишној фасцикли</string>
+  <string name="forbidden_permissions_copy">да копирате овај фајл</string>
   <string name="prefs_category_instant_uploading">Тренутна отпремања</string>
   <string name="prefs_category_security">Безбедност</string>
   <string name="prefs_instant_video_upload_path_title">Путања отпремања видеа</string>
-  <string name="download_folder_failed_content">Преузимање фасцикле %1$s не може бити довршено</string>
   <string name="shared_subject_header">дељено</string>
   <string name="with_you_subject_header">са вама</string>
-  <string name="subject_token">%1$s подели „%2$s“ са вама</string>
+  <string name="subject_user_shared_with_you">%1$s подели „%2$s“ са вама</string>
   <string name="auth_refresh_button">Освежи везу</string>
   <string name="auth_host_address">Адреса сервера</string>
   <string name="common_error_out_memory">Нема довољно меморије</string>
   <string name="file_list__footer__files">%1$d фајлова</string>
   <string name="file_list__footer__files_and_folder">%1$d фајлова, 1 фасцикла</string>
   <string name="file_list__footer__files_and_folders">%1$d фајлова, %2$d фасцикли</string>
+  <string name="share_dialog_title">Дељење</string>
+  <string name="share_via_link_section_title">Веза дељења</string>
+  <string name="share_via_link_expiration_date_label">Постави датум истека</string>
+  <string name="share_via_link_password_label">Заштићено лозинком</string>
+  <string name="share_search">Тражи</string>
 </resources>
index 5a6cdba..5a82f32 100644 (file)
        <item>Biggest - Smallest</item>-->
   <!--TODO re-enable when "Accounts" is available in Navigation Drawer-->
   <!--<string name="drawer_item_accounts">Accounts</string>-->
+  <string name="drawer_item_all_files">Alla filer</string>
   <!--TODO re-enable when "On Device" is available
     <string name="drawer_item_on_device">On device</string>-->
+  <string name="drawer_item_settings">Inställningar</string>
+  <string name="drawer_item_logs">Loggar</string>
+  <string name="drawer_close">Stäng</string>
   <string name="drawer_open">Öppna</string>
   <string name="prefs_category_general">Allmänt</string>
   <string name="prefs_category_more">Mer</string>
   <string name="prefs_accounts">Konton</string>
   <string name="prefs_manage_accounts">Hantera konton</string>
+  <string name="prefs_passcode">Lösenordslås</string>
   <string name="prefs_instant_upload">Direktuppladdning av kamerabilder</string>
   <string name="prefs_instant_upload_summary">Direktuppladning av bilder tagna med kameran</string>
   <string name="prefs_instant_video_upload">Direktuppladning av video</string>
@@ -65,6 +70,8 @@
   <string name="uploader_info_uploading">Laddar upp</string>
   <string name="file_list_seconds_ago">sekunder sedan</string>
   <string name="file_list_empty">Ingenting här. Ladda upp något!</string>
+  <string name="file_list_loading">Laddar...</string>
+  <string name="file_list_no_app_for_file_type">Ingen app funnen för filtypen!</string>
   <string name="local_file_list_empty">Det finns inga filer i den här mappen.</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_created">Skapad:</string>
   <string name="filedetails_modified">Ändrad:</string>
   <string name="filedetails_download">Ladda ner</string>
-  <string name="filedetails_sync_file">Ladda om fil</string>
+  <string name="filedetails_sync_file">Synkronisera</string>
   <string name="filedetails_renamed_in_upload_msg">Filen bytte namn till %1$s under uppladdningen</string>
-  <string name="action_share_file">Dela länk</string>
-  <string name="action_unshare_file">Sluta dela länk</string>
+  <string name="list_layout">Listvy</string>
+  <string name="action_share">Dela</string>
   <string name="common_yes">Ja</string>
   <string name="common_no">Nej</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_download">Avbryt nedladdning</string>
-  <string name="common_cancel_upload">Avbryt uppladdning</string>
+  <string name="common_cancel_sync">Stoppa synkroniseringen</string>
   <string name="common_cancel">Avbryt</string>
   <string name="common_save_exit">Spara &amp; Avsluta</string>
   <string name="common_error">Fel</string>
   <string name="foreign_files_local_text">Lokal: %1$s</string>
   <string name="foreign_files_remote_text">Fjärr: %1$s</string>
   <string name="upload_query_move_foreign_files">Det finns inte tillräckligt med ledigt utrymme för att kopiera de valda filerna till %1$s mappen. Skulle du vilja flytta dem istället?</string>
+  <string name="pass_code_enter_pass_code">Var god ange ditt lösenord</string>
+  <string name="pass_code_configure_your_pass_code">Skriv in ditt lösenord</string>
+  <string name="pass_code_configure_your_pass_code_explanation">Lösenordet kommer efterfrågas varje gång du startar appen</string>
+  <string name="pass_code_reenter_your_pass_code">Var god ange ditt lösenord igen</string>
+  <string name="pass_code_remove_your_pass_code">Ta bort lösenordet</string>
+  <string name="pass_code_mismatch">Lösenorden matchar inte</string>
+  <string name="pass_code_wrong">Ogiltigt lösenord</string>
+  <string name="pass_code_removed">Lösenord borttaget</string>
+  <string name="pass_code_stored">Lösenord sparat</string>
   <string name="media_notif_ticker">%1$ musikspelare</string>
   <string name="media_state_playing">%1$s (spelar)</string>
   <string name="media_state_loading">%1$s (buffrar)</string>
   <string name="auth_no_net_conn_title">Ingen nätverksanslutning</string>
   <string name="auth_nossl_plain_ok_title">Säker anslutning inte tillgänglig.</string>
   <string name="auth_connection_established">Anslutning etablerad</string>
+  <string name="auth_testing_connection">Testar anslutning</string>
   <string name="auth_not_configured_title">Felaktig konfiguration</string>
   <string name="auth_account_not_new">En användare med samma namn och server finns redan i denna aparat</string>
   <string name="auth_account_not_the_same">Den angivna användaren matchar inte användaren för detta konto</string>
   <string name="auth_fail_get_user_name">Din server returnerar inte ett korrekt användare id, vänligen kontakta en administratör
        </string>
   <string name="auth_can_not_auth_against_server">Kan inte autentisera mot servern</string>
+  <string name="auth_account_does_not_exist">Det finns inget konto på denna enhet än</string>
   <string name="favorite">Favorit</string>
   <string name="unfavorite">Avfavoritisera</string>
   <string name="common_rename">Byt namn</string>
   <string name="confirmation_remove_folder_alert">Vill du verkligen ta bort %1$s och dess innehåll?</string>
   <string name="confirmation_remove_local">Endast lokalt</string>
   <string name="confirmation_remove_folder_local">Endast lokalt</string>
+  <string name="confirmation_remove_remote">Från servern</string>
+  <string name="confirmation_remove_remote_and_local">Fjärr &amp; lokal</string>
   <string name="remove_success_msg">Lyckad radering</string>
   <string name="remove_fail_msg">Radering kunde inte slutföras</string>
   <string name="rename_dialog_title">Ange ett nytt namn</string>
   <string name="sync_file_nothing_to_do_msg">Filinnehåll redan synkroniserat</string>
   <string name="create_dir_fail_msg">Mapp kunde inte skapas</string>
   <string name="filename_forbidden_characters">Förbjudna tecken är: / \\ &lt; &gt; : \" | ? *</string>
+  <string name="filename_forbidden_charaters_from_server">Filnamnet innehåller minst ett ogiltigt tecken</string>
   <string name="filename_empty">Filnamnet får inte lämnas blankt</string>
   <string name="wait_a_moment">Var god vänta</string>
   <string name="filedisplay_unexpected_bad_get_content">Oväntat problem; prova annat program för aktuell fil</string>
   <string name="filedisplay_no_file_selected">Ingen fil vald</string>
   <string name="activity_chooser_title">Sänd länk till ...</string>
+  <string name="wait_for_tmp_copy_from_private_storage">Kopierar fil från privat lagring</string>
   <string name="oauth_check_onoff">Logga in med oAuth2.</string>
   <string name="oauth_login_connection">Ansluter till oAuth2 servern…</string>
   <string name="ssl_validator_header">Webbplatsens identitet kunde inte verifieras</string>
   <string name="ssl_validator_label_validity_to">Till:</string>
   <string name="ssl_validator_label_signature">Signatur:</string>
   <string name="ssl_validator_label_signature_algorithm">Algoritm:</string>
+  <string name="digest_algorithm_not_available">Hashfunktionen är inte tillgänglig på din telefon.</string>
+  <string name="ssl_validator_label_certificate_fingerprint">Fingeravtryck:</string>
+  <string name="certificate_load_problem">Certifikatet kan inte laddas</string>
   <string name="ssl_validator_null_cert">Certifikatet kunde inte visas.</string>
   <string name="ssl_validator_no_info_about_error">- Ingen information om felet</string>
   <string name="placeholder_sentence">Detta är en platshållare</string>
   <string name="instant_upload_on_wifi">Ladda upp bilder endast via WiFi</string>
   <string name="instant_video_upload_on_wifi">Ladda upp videos endast via WIFI</string>
   <string name="instant_upload_path">/DirektUppladdning</string>
+  <string name="conflict_title">Filkonflikt</string>
+  <string name="conflict_message">Vilka filer vill du behålla? Om du markerar båda kommer den lokala filen få ett nummer tillagt i slutet på filnamnet.</string>
   <string name="conflict_keep_both">Behåll båda</string>
+  <string name="conflict_use_local_version">lokala versionen</string>
+  <string name="conflict_use_server_version">serverversionen</string>
   <string name="preview_image_description">Förhandsvisa bild</string>
   <string name="preview_image_error_unknown_format">Denna bild kan inte visas</string>
   <string name="error__upload__local_file_not_copied">%1$s kunde inte kopieras till %2$s lokal mapp</string>
   <string name="share_link_file_error">Ett fel uppstod vid försök att dela denna fil eller mapp</string>
   <string name="unshare_link_file_no_exist">Lyckades ej sluta dela. Vänligen kontrollera om filen existerar</string>
   <string name="unshare_link_file_error">Ett fel uppstod vid försök att sluta dela denna fil eller mapp</string>
+  <string name="update_link_file_no_exist">Kunde inte uppdatera. Var god kolla om filen existerar.</string>
+  <string name="update_link_file_error">Ett fel uppstod medan den delade länken försökte uppdateras</string>
   <string name="share_link_password_title">Ange ett lösenord</string>
   <string name="share_link_empty_password">Du måste ange ett lösenord</string>
   <string name="activity_chooser_send_file_title">Skicka</string>
   <string name="forbidden_permissions_delete">att radera denna fil</string>
   <string name="share_link_forbidden_permissions">att dela denna fil</string>
   <string name="unshare_link_forbidden_permissions">att avbryta delningen utav denna fil</string>
+  <string name="update_link_forbidden_permissions">för att uppdatera denna delade länken</string>
   <string name="forbidden_permissions_create">att skapa filen</string>
   <string name="uploader_upload_forbidden_permissions">att ladda upp i den här mappen</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="auth_redirect_non_secure_connection_title">Den säkra kopplingen omdirigeras via en osäker rutt.</string>
   <string name="actionbar_logger">Loggar</string>
   <string name="log_send_history_button">Skickat historik</string>
   <string name="log_send_no_mail_app">Ingen app för att skicka loggar hittades. Installera mail appen!</string>
   <string name="move_file_invalid_overwrite">Filen existerar redan i destinationsmappen</string>
   <string name="move_file_error">Ett fel uppstod vid försök att flytta denna fil eller mapp</string>
   <string name="forbidden_permissions_move">att flytta den här filen</string>
+  <string name="copy_file_not_found">Kunde inte kopiera. Var god kontrollera om filen existerar.</string>
+  <string name="copy_file_invalid_into_descendent">Det är inte möjligt att kopiera en mapp in i en egen undermapp</string>
   <string name="copy_file_invalid_overwrite">Filen existerar redan i destinationsmappen</string>
+  <string name="copy_file_error">Ett fel uppstod, kunde inte kopiera filen eller mappen</string>
+  <string name="forbidden_permissions_copy">att kopiera denna fil</string>
   <string name="prefs_category_instant_uploading">Direktuppladning</string>
   <string name="prefs_category_security">Säkerhet</string>
   <string name="prefs_instant_video_upload_path_title">Uppladdnings-sökväg för video</string>
-  <string name="download_folder_failed_content">Neddladning utav %1$s mappen kunde inte slutföras</string>
+  <string name="sync_folder_failed_content">Synkronisering av %1$s mapp kunde inte slutföras</string>
+  <string name="shared_subject_header">delad</string>
+  <string name="with_you_subject_header">med dig</string>
+  <string name="subject_user_shared_with_you">%1$s delade \"%2$s\" med dig</string>
+  <string name="subject_shared_with_you">\"%1$s\" har delats med dig</string>
+  <string name="auth_refresh_button">Uppdatera uppkopplingen</string>
   <string name="auth_host_address">Serveradress</string>
+  <string name="common_error_out_memory">Inte tillräckligt med minne</string>
+  <string name="username">Användarnamn</string>
+  <string name="file_list__footer__folder">1 mapp</string>
+  <string name="file_list__footer__folders">%1$d mappar</string>
+  <string name="file_list__footer__file">1 fil</string>
+  <string name="file_list__footer__file_and_folder">1 fil, 1 mapp</string>
+  <string name="file_list__footer__file_and_folders">1 fil, %1$d mappar</string>
+  <string name="file_list__footer__files">%1$d filer</string>
+  <string name="file_list__footer__files_and_folder">%1$d filer, 1 mapp</string>
+  <string name="file_list__footer__files_and_folders">%1$d filer, %2$d mappar</string>
+  <string name="share_dialog_title">Dela</string>
+  <string name="share_with_user_section_title">Dela med användare och grupper</string>
+  <string name="share_no_users">Ingen data delar med användare än</string>
+  <string name="share_add_user_or_group">Lägg till Användare eller Grupp</string>
+  <string name="share_via_link_section_title">Dela länk</string>
+  <string name="share_via_link_expiration_date_label">Sätt utgångsdatum</string>
+  <string name="share_via_link_password_label">Lösenordsskydda</string>
+  <string name="share_via_link_password_title">Säkrad</string>
+  <string name="share_get_public_link_button">Hämta länk</string>
+  <string name="share_search">Sök</string>
+  <string name="search_users_and_groups_hint">Sök användare och grupper</string>
+  <string name="share_group_clarification">%1$s (grupp)</string>
+  <string name="share_sharee_unavailable">Tyvärr tillåter inte din serverversion delning med användare inom klienter. \nVar god kontakta din administrator.</string>
 </resources>
index 2f30505..43b6e82 100644 (file)
   <string name="filedetails_modified">மாற்றப்பட்டது:</string>
   <string name="filedetails_download">பதிவிறக்குக</string>
   <string name="filedetails_renamed_in_upload_msg">பதிவேற்றும்போது கோப்பின் பெயரானது %1$s ஆக பெயர்மாற்றப்பட்டது</string>
+  <string name="action_share">பகிர்வு</string>
   <string name="common_yes">ஆம்</string>
   <string name="common_no">இல்லை</string>
   <string name="common_ok">சரி </string>
-  <string name="common_cancel_download">பதிவிறக்கலை இரத்துசெய்க</string>
-  <string name="common_cancel_upload">பதிவேற்றலை இரத்து செய்க</string>
   <string name="common_cancel">இரத்து செய்க</string>
   <string name="common_save_exit">சேமிக்க மற்றும் amp; வெளியேறு</string>
   <string name="common_error">வழு</string>
   <string name="prefs_category_accounts">கணக்குகள்</string>
   <string name="folder_picker_choose_button_text">தெரிவுசெய்க </string>
   <string name="auth_host_address">சேவையக முகவரி</string>
+  <string name="share_via_link_expiration_date_label">காலாவதி தேதியை குறிப்பிடுக</string>
+  <string name="share_via_link_password_label">கடவுச்சொல்லை பாதுகாத்தல்</string>
+  <string name="share_search">தேடுதல்</string>
 </resources>
index 92fa673..ff13904 100644 (file)
@@ -71,6 +71,7 @@
   <string name="file_list_seconds_ago">วินาที ก่อนหน้านี้</string>
   <string name="file_list_empty">ยังไม่มีไฟล์ใดๆเลย ลองอัพโหลดดูสิ!</string>
   <string name="file_list_loading">กำลังโหลด...</string>
+  <string name="file_list_no_app_for_file_type">ไม่พบแอพฯ ที่จะใช้เปิดไฟล์ประเภทนี้!</string>
   <string name="local_file_list_empty">ยังไม่มีไฟล์ในโฟลเดอร์นี้</string>
   <string name="filedetails_select_file">แตะที่ไฟล์ เพื่อแสดงข้อมูลเพิ่มเติม</string>
   <string name="filedetails_size">ขนาด:</string>
   <string name="filedetails_created">สร้างเมื่อ:</string>
   <string name="filedetails_modified">แก้ไขเมื่อ:</string>
   <string name="filedetails_download">ดาวน์โหลด</string>
-  <string name="filedetails_sync_file">à¸\9fืà¹\89à¸\99à¸\9fูà¹\84à¸\9fลà¹\8c</string>
+  <string name="filedetails_sync_file">à¸\9bระสาà¸\99à¸\82à¹\89อมูล</string>
   <string name="filedetails_renamed_in_upload_msg">ไฟล์ได้ถูกเปลี่ยนชื่อเป็น %1$s ในระหว่างการอัพโหลด</string>
   <string name="list_layout">เค้าโครงรายการ</string>
-  <string name="action_share_file">แชร์ลิงค์</string>
-  <string name="action_unshare_file">ยกเลิกการแชร์ลิงค์</string>
+  <string name="action_share">แชร์</string>
   <string name="common_yes">ตกลง</string>
   <string name="common_no">ไม่ตกลง</string>
   <string name="common_ok">ตกลง</string>
-  <string name="common_cancel_download">ยกเลิกการดาวน์โหลด</string>
-  <string name="common_cancel_upload">ยกเลิกการอัพโหลด</string>
+  <string name="common_cancel_sync">ยกเลิกการประสานข้อมูล</string>
   <string name="common_cancel">ยกเลิก</string>
   <string name="common_save_exit">บันทึก &amp; ออก</string>
   <string name="common_error">ข้อผิดพลาด</string>
   <string name="confirmation_remove_folder_alert">คุณต้องการที่จะลบ %1$s และเนื้อหาของมัน?</string>
   <string name="confirmation_remove_local">เฉพาะต้นทางเท่านั้น</string>
   <string name="confirmation_remove_folder_local">เฉพาะต้นทางเท่านั้น</string>
-  <string name="confirmation_remove_remote">จากเซิฟเวอร์</string>
+  <string name="confirmation_remove_remote">à¸\88าà¸\81à¹\80à¸\8bิรà¹\8cà¸\9fà¹\80วอรà¹\8c</string>
   <string name="confirmation_remove_remote_and_local">รีโมท &amp; ต้นทาง</string>
   <string name="remove_success_msg">ลบเรียบร้อยแล้ว</string>
   <string name="remove_fail_msg">ไม่สามารถลบได้</string>
   <string name="ssl_validator_label_validity_to">ถึง:</string>
   <string name="ssl_validator_label_signature">ลายเซ็นต์:</string>
   <string name="ssl_validator_label_signature_algorithm">อัลกอริทึ่ม:</string>
+  <string name="digest_algorithm_not_available">อัลกอริทึมย่อยนี้ไม่สามารถใช้งานบนโทรศัพท์ของคุณ</string>
+  <string name="ssl_validator_label_certificate_fingerprint">ลายนิ้วมือ:</string>
+  <string name="certificate_load_problem">มีปัญหาในการโหลดใบรับรอง</string>
   <string name="ssl_validator_null_cert">ไม่สามารถแสดงใบรับรอง</string>
   <string name="ssl_validator_no_info_about_error">- ไม่มีข้อมูลเกี่ยวกับข้อผิดพลาด</string>
   <string name="placeholder_sentence">นี่คือ placeholder</string>
   <string name="conflict_message">ไฟล์ใดที่คุณต้องการที่จะเก็บ? หากคุณเลือกทั้งสองรุ่น ไฟล์ต้นทางจะมีจำนวนชื่อเพิ่ม</string>
   <string name="conflict_keep_both">เก็บไว้ทั้งสองอย่าง</string>
   <string name="conflict_use_local_version">เวอร์ชันต้นทาง</string>
-  <string name="conflict_use_server_version">เวอร์ชันเซิฟเวอร์</string>
+  <string name="conflict_use_server_version">à¹\80วอรà¹\8cà¸\8aัà¸\99à¹\80à¸\8bิรà¹\8cà¸\9fà¹\80วอรà¹\8c</string>
   <string name="preview_image_description">แสดงรูปภาพตัวอย่าง</string>
   <string name="preview_image_error_unknown_format">ไม่สามารถแสดงรูปภาพนี้ได้</string>
   <string name="error__upload__local_file_not_copied">%1$s ไม่สามารถคัดลอกไปยังโฟลเดอร์ %2$s ในเครื่อง</string>
   <string name="share_link_file_error">เกิดข้อผิดพลาดในขณะที่พยายามจะแชร์ไฟล์หรือโฟลเดอร์นี้</string>
   <string name="unshare_link_file_no_exist">ไม่สามารถยกเลิกการแชร์ กรุณาตรวจสอบไฟล์ที่มีอยู่</string>
   <string name="unshare_link_file_error">เกิดข้อผิดพลาดในขณะที่จะยกเลิกการอชร์ไฟล์หรือโฟลเดอร์นี้</string>
+  <string name="update_link_file_no_exist">ไม่สามารถอัพเดท กรุณาตรวจสอบว่ามีไฟล์นั้นอยู่จริง</string>
+  <string name="update_link_file_error">เกิดข้อผิดพลาดในขณะที่กำลังพยายามอัพเดทลิงค์ที่แชร์</string>
   <string name="share_link_password_title">ป้อนรหัสผ่าน</string>
   <string name="share_link_empty_password">คุณจะต้องใส่รหัสผ่าน</string>
   <string name="activity_chooser_send_file_title">ส่ง</string>
   <string name="forbidden_permissions_delete">เพื่อลบไฟล์นี้</string>
   <string name="share_link_forbidden_permissions">เพื่อแชร์ไฟล์นี้</string>
   <string name="unshare_link_forbidden_permissions">เพื่อเลิกแชร์ไฟล์นี้</string>
+  <string name="update_link_forbidden_permissions">เพื่ออัพเดทลิงค์นี้ที่ถูกแชร์</string>
   <string name="forbidden_permissions_create">เพื่อสร้างไฟล์</string>
   <string name="uploader_upload_forbidden_permissions">เพื่ออัพโหลดในโฟลเดอร์นี้</string>
   <string name="downloader_download_file_not_found">ไฟล์ไม่พร้อมใช้งานบนเซิร์ฟเวอร์</string>
   <string name="prefs_category_instant_uploading">อัพโหลดทันที</string>
   <string name="prefs_category_security">ความปลอดภัย</string>
   <string name="prefs_instant_video_upload_path_title">อัพโหลดเส้นทางวิดีโอ</string>
-  <string name="download_folder_failed_content">การดาวน์โหลดโฟลเดอร์ %1$s อาจไม่สำเร็จ</string>
+  <string name="sync_folder_failed_content">ประสานข้อมูลโฟลเดอร์ %1$s ไม่สำเร็จ</string>
   <string name="shared_subject_header">ถูกแชร์</string>
   <string name="with_you_subject_header">กับคุณ</string>
-  <string name="subject_token">%1$s ได้แชร์ \"%2$s\" กับคุณ</string>
-  <string name="saml_subject_token">\"%1$s\" ได้ถูกแชร์กับคุณ</string>
+  <string name="subject_user_shared_with_you">%1$s ได้แชร์ \"%2$s\" กับคุณ</string>
+  <string name="subject_shared_with_you">\"%1$s\" ได้ถูกแชร์กับคุณ</string>
   <string name="auth_refresh_button">ฟื้นฟูการเชื่อมต่อ</string>
   <string name="auth_host_address">ที่อยู่เซิร์ฟเวอร์</string>
   <string name="common_error_out_memory">หน่วยความจำไม่พอ</string>
   <string name="file_list__footer__files">%1$d ไฟล์</string>
   <string name="file_list__footer__files_and_folder">%1$d ไฟล์, 1 โฟลเดอร์</string>
   <string name="file_list__footer__files_and_folders">%1$d ไฟล์, %2$d โฟลเดอร์</string>
+  <string name="share_dialog_title">การแชร์ข้อมูล</string>
+  <string name="share_with_user_section_title">แชร์กับผู้ใช้และกลุ่ม</string>
+  <string name="share_no_users">ยังไม่มีข้อมูลที่แชร์กับผู้ใช้ในตอนนี้</string>
+  <string name="share_add_user_or_group">เพิ่มผู้ใช่หรือกลุ่ม</string>
+  <string name="share_via_link_section_title">แชร์ลิงค์</string>
+  <string name="share_via_link_expiration_date_label">กำหนดวันที่หมดอายุ</string>
+  <string name="share_via_link_password_label">รหัสผ่านป้องกัน</string>
+  <string name="share_via_link_password_title">ความปลอดภัย</string>
+  <string name="share_get_public_link_button">รับลิงค์</string>
+  <string name="share_search">ค้นหา</string>
+  <string name="search_users_and_groups_hint">ค้นหาผู้ใช้และกลุ่ม</string>
+  <string name="share_group_clarification">%1$s (กลุ่ม)</string>
+  <string name="share_sharee_unavailable">ขออภัย รุ่นเซิร์ฟเวอร์ของคุณไม่อนุญาตให้แชร์กับผู้ใช้ภายในไคลเอนต์
+\nกรุณาติดต่อผู้ดูแลระบบ</string>
 </resources>
index d682fe6..b11b410 100644 (file)
@@ -71,6 +71,7 @@
   <string name="file_list_seconds_ago">saniyeler önce</string>
   <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="file_list_no_app_for_file_type">Dosya tipi için uygulama bulunamadı!</string>
   <string name="local_file_list_empty">Bu klasörde dosya yok.</string>
   <string name="filedetails_select_file">Ek bilgileri görmek için dosyaya dokunun.</string>
   <string name="filedetails_size">Boyut:</string>
   <string name="filedetails_created">Oluşturulma:</string>
   <string name="filedetails_modified">Değiştirilme:</string>
   <string name="filedetails_download">İndir</string>
-  <string name="filedetails_sync_file">Dosyayı yenile</string>
+  <string name="filedetails_sync_file">Eşitleme</string>
   <string name="filedetails_renamed_in_upload_msg">Dosya adı, yükleme sırasında %1$s olarak değiştirildi</string>
   <string name="list_layout">Liste Yerleşimi</string>
-  <string name="action_share_file">Paylaşma bağlantısı</string>
-  <string name="action_unshare_file">Bağlantı paylaşımını kaldır</string>
+  <string name="action_share">Paylaş</string>
   <string name="common_yes">Evet</string>
   <string name="common_no">Hayır</string>
   <string name="common_ok">Tamam</string>
-  <string name="common_cancel_download">İndirmeyi iptal et</string>
-  <string name="common_cancel_upload">Yüklemeyi iptal et</string>
+  <string name="common_cancel_sync">Eşitlemeyi iptal et</string>
   <string name="common_cancel">İptal</string>
   <string name="common_save_exit">Kaydet ve Çık</string>
   <string name="common_error">Hata</string>
         </string>
   <string name="auth_can_not_auth_against_server">Bu sunucuya karşı kimlik doğrulama yapılamaz</string>
   <string name="auth_account_does_not_exist">Hesap henüz cihazda mevcut değil</string>
-  <string name="favorite">Sık kullanılan</string>
+  <string name="favorite">Favorilere ekle</string>
   <string name="unfavorite">Favoriden kaldır</string>
   <string name="common_rename">Yeniden adlandır</string>
   <string name="common_remove">Kaldır</string>
   <string name="ssl_validator_label_validity_to">Bitiş:</string>
   <string name="ssl_validator_label_signature">İmza:</string>
   <string name="ssl_validator_label_signature_algorithm">Algoritma:</string>
+  <string name="digest_algorithm_not_available">Özümlenen algoritma telefonunuz için mevcut değil</string>
+  <string name="ssl_validator_label_certificate_fingerprint">Parmak izi:</string>
+  <string name="certificate_load_problem">Sertifika yüklemesinde problem var.</string>
   <string name="ssl_validator_null_cert">Sertifika gösterilemedi.</string>
   <string name="ssl_validator_no_info_about_error">- Hata hakkında bilgi yok</string>
   <string name="placeholder_sentence">Bu bir yer tutucudur</string>
   <string name="move_file_invalid_overwrite">Dosya zaten hedef klasörde mevcut</string>
   <string name="move_file_error">Bu dosya veya klasörü taşımaya çalışılırken bir hata oluştu</string>
   <string name="forbidden_permissions_move">bu dosyayı taşımak için</string>
+  <string name="copy_file_not_found">Kopyalama başarısız. Lütfen dosyanın mevcut olup olmadığını denetleyin</string>
+  <string name="copy_file_invalid_into_descendent">Klasörü, kendi alt klasörüne kopyalamak mümkün değil</string>
   <string name="copy_file_invalid_overwrite">Dosya zaten hedef klasörde mevcut</string>
+  <string name="copy_file_error">Bu dosya veya klasörü kopyalamaya çalışılırken bir hata oluştu</string>
+  <string name="forbidden_permissions_copy">bu dosyayı kopyalamak 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>
-  <string name="download_folder_failed_content">%1$s klasörün indirilmesi tamamlanamadı</string>
+  <string name="sync_folder_failed_content">%1$s klasörünün eşitlemesi tamamlanamadı</string>
   <string name="shared_subject_header">sizinle</string>
   <string name="with_you_subject_header">paylaştı</string>
-  <string name="subject_token">%1$s, sizinle \"%2$s\" paylaşımını yaptı</string>
-  <string name="saml_subject_token">\"%1$s\" sizinle paylaşıldı</string>
+  <string name="subject_user_shared_with_you">%1$s, sizinle \"%2$s\" paylaşımını yaptı</string>
+  <string name="subject_shared_with_you">\"%1$s\" sizinle paylaşıldı</string>
   <string name="auth_refresh_button">Bağlantıyı yenile</string>
   <string name="auth_host_address">Sunucu adresi</string>
   <string name="common_error_out_memory">Yeterli hafıza yok</string>
   <string name="file_list__footer__files">%1$d dosya</string>
   <string name="file_list__footer__files_and_folder">%1$d dosya, 1 klasör</string>
   <string name="file_list__footer__files_and_folders">%1$d dosya, %2$d klasör</string>
+  <string name="share_dialog_title">Paylaşım</string>
+  <string name="share_no_users">Henüz kullanıcılara paylaşılan veri yok</string>
+  <string name="share_add_user_or_group">Kullanıcı veya Grup ekle</string>
+  <string name="share_via_link_section_title">Paylaşma bağlantısı</string>
+  <string name="share_via_link_expiration_date_label">Son kullanma tarihini ayarla</string>
+  <string name="share_via_link_password_label">Parola koruması</string>
+  <string name="share_search">Ara</string>
+  <string name="search_users_and_groups_hint">Kullanıcı ve Grupları Ara</string>
+  <string name="share_group_clarification">%1$s (grup)</string>
+  <string name="share_sharee_unavailable">Üzgünüz sunucu versiyonunuz istemcilerdeki kullanıcılara paylaşıma izin vermiyor.
+\nLütfen yöneticinize başvurun</string>
 </resources>
index 4573d71..bd4ba67 100644 (file)
   <string name="filedetails_created">قۇرۇلغان ۋاقتى:</string>
   <string name="filedetails_modified">ئۆزگەرتكەن ۋاقىت:</string>
   <string name="filedetails_download">چۈشۈر</string>
+  <string name="action_share">ھەمبەھىر</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_save_exit">ساقلاپ چېكىن</string>
   <string name="common_error">خاتالىق</string>
@@ -52,4 +52,6 @@
   <string name="prefs_category_accounts">ھېساباتلار</string>
   <string name="prefs_category_security">بىخەتەرلىك</string>
   <string name="auth_host_address">مۇلازىمېتىر ئادرىسى</string>
+  <string name="share_dialog_title">ھەمبەھىر</string>
+  <string name="share_search">ئىزدە</string>
 </resources>
index c3bd6a0..174deda 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <resources>
-  <string name="about_android">%1$s Android App</string>
+  <string name="about_android">%1$s Android Додаток</string>
   <string name="about_version">версія %1$s</string>
   <string name="actionbar_sync">Оновити account</string>
   <string name="actionbar_upload">Відвантажити</string>
@@ -32,6 +32,7 @@
   <string name="prefs_category_more">Більше</string>
   <string name="prefs_accounts">Облікові записи</string>
   <string name="prefs_manage_accounts">Управління обліковими записами</string>
+  <string name="prefs_passcode">Захистити паролем</string>
   <string name="prefs_instant_upload">Миттєві зображення</string>
   <string name="prefs_instant_upload_summary">Миттєві зображення з камери</string>
   <string name="prefs_instant_video_upload">Миттєві відео</string>
@@ -70,6 +71,7 @@
   <string name="file_list_seconds_ago">секунди тому</string>
   <string name="file_list_empty">Тут нічого немає. Відвантажте що-небудь!</string>
   <string name="file_list_loading">Завантаження…</string>
+  <string name="file_list_no_app_for_file_type">Застосунку для цього типу файла не знайдено!</string>
   <string name="local_file_list_empty">В цій теці немає файлів.</string>
   <string name="filedetails_select_file">Натисніть на файлі для відображення додаткової інформації</string>
   <string name="filedetails_size">Розмір:</string>
   <string name="filedetails_created">Створено:</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">Видалити посилання</string>
+  <string name="list_layout">Вигляд списку</string>
+  <string name="action_share">Поділитися</string>
   <string name="common_yes">Так</string>
   <string name="common_no">Ні</string>
   <string name="common_ok">OK</string>
-  <string name="common_cancel_download">Скасувати завантаження</string>
-  <string name="common_cancel_upload">Перервати завантаження</string>
   <string name="common_cancel">Відмінити</string>
   <string name="common_save_exit">Зберегти &amp; Вихід</string>
   <string name="common_error">Помилка</string>
   <string name="foreign_files_local_text">Локально: %1$s</string>
   <string name="foreign_files_remote_text">Віддалено: %1$s</string>
   <string name="upload_query_move_foreign_files">Недостатньо місця для копіювання обраних файлів у теку %1$s. Чи бажаєте ви перемістити їх замість копіювання?</string>
+  <string name="pass_code_enter_pass_code">Будь ласка, введіть Ваш код доступу</string>
+  <string name="pass_code_configure_your_pass_code">Введіть Ваш код доступу</string>
+  <string name="pass_code_configure_your_pass_code_explanation">Код доступу буде запрошено кожного разу після завантаження додатку</string>
+  <string name="pass_code_reenter_your_pass_code">Будь ласка, введіть код доступу повторно</string>
+  <string name="pass_code_remove_your_pass_code">Видалити пароль</string>
+  <string name="pass_code_mismatch">Коди доступу не співпадають</string>
+  <string name="pass_code_wrong">Невірний код доступу</string>
+  <string name="pass_code_removed">Код доступу знято</string>
+  <string name="pass_code_stored">Код доступу збережено</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="auth_can_not_auth_against_server">Аутентифікація на цьому сервері неможлива</string>
   <string name="auth_account_does_not_exist">Користвача в пристрої не існуе</string>
   <string name="favorite">Улюблений</string>
+  <string name="unfavorite">Прибрати з вибраного</string>
   <string name="common_rename">Перейменувати</string>
   <string name="common_remove">Видалити</string>
   <string name="confirmation_remove_alert">Ви дійсно бажаєте видалити %1$s?</string>
   <string name="confirmation_remove_folder_alert">Ви дійсно бажаєте видалити %1$s та весь вміст?</string>
   <string name="confirmation_remove_local">Лише локально</string>
   <string name="confirmation_remove_folder_local">Лише локально</string>
+  <string name="confirmation_remove_remote">З серверу</string>
+  <string name="confirmation_remove_remote_and_local">Видалити &amp; локальний</string>
   <string name="remove_success_msg">Успішно видалено</string>
   <string name="remove_fail_msg">Видалення не вдалось</string>
   <string name="rename_dialog_title">Введіть нове ім\'я</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">Які файли Ви хочете зберегти? Якщо Ви оберете обидві версії, локальний файл матиме номер, що додається до його імені.</string>
   <string name="conflict_keep_both">Залишити обидва</string>
+  <string name="conflict_use_local_version">Локальна версія</string>
+  <string name="conflict_use_server_version">Версія сервера</string>
   <string name="preview_image_description">Попередній перегляд зображення</string>
   <string name="preview_image_error_unknown_format">Не вдалося показати зображення</string>
   <string name="error__upload__local_file_not_copied">%1$s неможливо скопіювати до %2$s</string>
   <string name="move_file_invalid_overwrite">Файл вже існує в теці призначення</string>
   <string name="move_file_error">Виникла помилка при спробі перемістити файл або теку</string>
   <string name="forbidden_permissions_move">перемістити цей файл</string>
+  <string name="copy_file_not_found">Неможливо скопіювати. Будь ласка, перевірте, чи існує файл</string>
+  <string name="copy_file_invalid_into_descendent">Неможливо копіювати теку до підтеки</string>
   <string name="copy_file_invalid_overwrite">Файл вже існує в теці призначення</string>
+  <string name="copy_file_error">Виникла помилка під час спроби скопіювати даний файл чи папку</string>
+  <string name="forbidden_permissions_copy">скопіювати даний файл</string>
   <string name="prefs_category_instant_uploading">Миттєво завантаження</string>
   <string name="prefs_category_security">Безпека</string>
   <string name="prefs_instant_video_upload_path_title">Шлях завантаження відео</string>
-  <string name="download_folder_failed_content">Скачування теки %1$s не може бути завершено</string>
+  <string name="shared_subject_header">поширений</string>
   <string name="with_you_subject_header">з Вами</string>
-  <string name="subject_token">%1$s поділився \"%2$s\" з вами</string>
+  <string name="subject_user_shared_with_you">%1$s поділився \"%2$s\" з вами</string>
+  <string name="subject_shared_with_you">З Вами поділилися \"%1$s\"</string>
   <string name="auth_refresh_button">Оновити з\'єднання</string>
   <string name="auth_host_address">Ареса серверу</string>
   <string name="common_error_out_memory">Недостатньо пам\'яті</string>
   <string name="file_list__footer__files">%1$d файлів</string>
   <string name="file_list__footer__files_and_folder">%1$d файлів, 1 тека</string>
   <string name="file_list__footer__files_and_folders">%1$d файлів, %2$d тек</string>
+  <string name="share_dialog_title">Спільний доступ</string>
+  <string name="share_via_link_section_title">Поділитись посиланням</string>
+  <string name="share_via_link_expiration_date_label">Встановити термін дії</string>
+  <string name="share_via_link_password_label">Захистити паролем</string>
+  <string name="share_search">Пошук</string>
 </resources>
index 3e97d3f..2e39141 100644 (file)
@@ -16,7 +16,7 @@
   <string name="setup_btn_connect">منسلک</string>
   <string name="file_list_seconds_ago">سیکنڈز پہلے</string>
   <string name="filedetails_download">ڈاؤن لوڈ،</string>
-  <string name="action_share_file">اشتراک لنک</string>
+  <string name="action_share">اشتراک</string>
   <string name="common_yes">ہاں</string>
   <string name="common_no">نہیں</string>
   <string name="common_ok">اوکے</string>
@@ -26,4 +26,8 @@
   <string name="activity_chooser_send_file_title">بھجیں</string>
   <string name="empty"></string>
   <string name="folder_picker_choose_button_text">منتخب کریں</string>
+  <string name="share_via_link_section_title">اشتراک لنک</string>
+  <string name="share_via_link_expiration_date_label">تاریخ معیاد سیٹ کریں</string>
+  <string name="share_via_link_password_label">محفوظ پاسورڈ</string>
+  <string name="share_search">تلاش</string>
 </resources>
index c017442..04d9ac9 100644 (file)
 <resources xmlns:android="http://schemas.android.com/apk/res/android">
        <style name="ProgressDialogTheme" parent="ownCloud.Dialog">
        </style>
+    <style name="Theme.ownCloud.NoActionBar">
+        <item name="windowActionBar">false</item>
+        <item name="windowNoTitle">true</item>
+        <item name="android:windowDrawsSystemBarBackgrounds">true</item>
+        <item name="android:statusBarColor">@android:color/transparent</item>
+    </style>
 </resources>
\ No newline at end of file
index bdccc82..e6482b4 100644 (file)
   <string name="filedetails_created">Đã tạo:</string>
   <string name="filedetails_modified">Đã chỉnh sửa:</string>
   <string name="filedetails_download">Tải về</string>
-  <string name="filedetails_sync_file">Cập nhật lại tập tin</string>
   <string name="filedetails_renamed_in_upload_msg">Tập tin đã bị đổi tên thành %1$s trong quá trình tải lên</string>
-  <string name="action_share_file">Chia sẻ liên kết</string>
-  <string name="action_unshare_file">Liên kết không chia sẻ</string>
+  <string name="action_share">Chia sẻ</string>
   <string name="common_yes">Yes</string>
   <string name="common_no">Không</string>
   <string name="common_ok">Chấp nhận</string>
-  <string name="common_cancel_download">Hủy tải về</string>
-  <string name="common_cancel_upload">Hủy upload</string>
   <string name="common_cancel">Hủy</string>
   <string name="common_save_exit">Lưu &amp; Thoát</string>
   <string name="common_error">Lỗi</string>
   <string name="prefs_category_accounts">Tài khoản</string>
   <string name="folder_picker_choose_button_text">Chọn</string>
   <string name="auth_host_address">Địa chỉ máy chủ</string>
+  <string name="share_dialog_title">Chia sẻ</string>
+  <string name="share_via_link_section_title">Chia sẻ liên kết</string>
+  <string name="share_via_link_expiration_date_label">Đặt ngày kết thúc</string>
+  <string name="share_via_link_password_label">Mật khẩu bảo vệ</string>
+  <string name="share_search">Tìm kiếm</string>
 </resources>
index ca8e51a..8596fea 100644 (file)
@@ -71,6 +71,7 @@
   <string name="file_list_seconds_ago">几秒前</string>
   <string name="file_list_empty">这里还什么都没有。上传些东西吧!</string>
   <string name="file_list_loading">加载中...</string>
+  <string name="file_list_no_app_for_file_type">找不到用于打开此类型文件的应用</string>
   <string name="local_file_list_empty">在该文件夹中不存在文件。</string>
   <string name="filedetails_select_file">点击一个文件可以显示额外的信息。</string>
   <string name="filedetails_size">大小:</string>
   <string name="filedetails_created">创建于:</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="list_layout">列表布局</string>
-  <string name="action_share_file">分享链接</string>
-  <string name="action_unshare_file">取消分享链接</string>
+  <string name="action_share">共享</string>
   <string name="common_yes">是</string>
   <string name="common_no">否</string>
   <string name="common_ok">确定</string>
-  <string name="common_cancel_download">取消下载</string>
-  <string name="common_cancel_upload">取消上传</string>
   <string name="common_cancel">取消</string>
   <string name="common_save_exit">保存并退出</string>
   <string name="common_error">错误</string>
   <string name="move_file_invalid_overwrite">该文件已经存在在目标文件夹</string>
   <string name="move_file_error">尝试移动该文件或文件夹时发生错误</string>
   <string name="forbidden_permissions_move">移动该文件</string>
+  <string name="copy_file_not_found">无法复制文件。请检查文件是否存在</string>
+  <string name="copy_file_invalid_into_descendent">将一个目录移动到它的子目录是不可能的</string>
   <string name="copy_file_invalid_overwrite">该文件已经存在在目标文件夹</string>
+  <string name="copy_file_error">尝试复制这个文件或文件夹时发生了错误</string>
+  <string name="forbidden_permissions_copy">复制这个文件</string>
   <string name="prefs_category_instant_uploading">即时上传</string>
   <string name="prefs_category_security">安全</string>
   <string name="prefs_instant_video_upload_path_title">视频上传路径</string>
-  <string name="download_folder_failed_content">%1$s 文件夹的下载无法完成</string>
   <string name="shared_subject_header">已共享</string>
   <string name="with_you_subject_header">与你</string>
-  <string name="subject_token">%1$s和你分享了“%2$s”</string>
-  <string name="saml_subject_token">已与你分享“%1$s”</string>
+  <string name="subject_user_shared_with_you">%1$s和你分享了“%2$s”</string>
+  <string name="subject_shared_with_you">已与你分享“%1$s”</string>
   <string name="auth_refresh_button">刷新连接</string>
   <string name="auth_host_address">服务器地址</string>
   <string name="common_error_out_memory">内存不足</string>
   <string name="file_list__footer__files">%1$d 个文件</string>
   <string name="file_list__footer__files_and_folder">%1$d 个文件,1 个文件夹</string>
   <string name="file_list__footer__files_and_folders">%1$d 个文件,%2$d 个文件夹</string>
+  <string name="share_dialog_title">共享</string>
+  <string name="share_via_link_section_title">分享链接</string>
+  <string name="share_via_link_expiration_date_label">设置过期日期</string>
+  <string name="share_via_link_password_label">密码保护</string>
+  <string name="share_search">搜索</string>
 </resources>
index 7810b88..aba6546 100644 (file)
   <string name="filedetails_created">建立時間:</string>
   <string name="filedetails_modified">修改時間:</string>
   <string name="filedetails_download">下載</string>
-  <string name="action_share_file">分享連結</string>
-  <string name="action_unshare_file">取消分享連結</string>
+  <string name="action_share">分享</string>
   <string name="common_yes">是</string>
   <string name="common_no">否</string>
   <string name="common_ok">確定</string>
-  <string name="common_cancel_download">取消下戴</string>
-  <string name="common_cancel_upload">取消上戴</string>
   <string name="common_cancel">取消</string>
   <string name="common_save_exit">儲存並離開</string>
   <string name="common_error">錯誤</string>
@@ -79,4 +76,9 @@
   <string name="saml_authentication_wrong_pass">密碼錯誤</string>
   <string name="prefs_category_security">安全</string>
   <string name="auth_host_address">伺服器地址</string>
+  <string name="share_dialog_title">分享</string>
+  <string name="share_via_link_section_title">分享連結</string>
+  <string name="share_via_link_expiration_date_label">設定分享期限</string>
+  <string name="share_via_link_password_label">密碼保護</string>
+  <string name="share_search">尋找</string>
 </resources>
index db564b1..60a13a6 100644 (file)
   <string name="filedetails_created">建立:</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="list_layout">列表版型</string>
-  <string name="action_share_file">分享連結</string>
-  <string name="action_unshare_file">取消共享連結</string>
+  <string name="action_share">分享</string>
   <string name="common_yes">是</string>
   <string name="common_no">否</string>
   <string name="common_ok">好</string>
-  <string name="common_cancel_download">取消下載</string>
-  <string name="common_cancel_upload">取消上傳</string>
   <string name="common_cancel">取消</string>
   <string name="common_save_exit">儲存並離開</string>
   <string name="common_error">錯誤</string>
   <string name="prefs_category_instant_uploading">即時上傳</string>
   <string name="prefs_category_security">安全性</string>
   <string name="prefs_instant_video_upload_path_title">影片上傳路徑</string>
-  <string name="download_folder_failed_content">%1$s 目錄的下載未完成</string>
   <string name="shared_subject_header">以分享的</string>
   <string name="with_you_subject_header">與你</string>
-  <string name="subject_token">%1$s 分享了 \"%2$s\" 給您</string>
-  <string name="saml_subject_token">\"%1$s\" 已經與您分享</string>
+  <string name="subject_user_shared_with_you">%1$s 分享了 \"%2$s\" 給您</string>
+  <string name="subject_shared_with_you">\"%1$s\" 已經與您分享</string>
   <string name="auth_refresh_button">重新連線</string>
   <string name="auth_host_address">伺服器位址</string>
   <string name="common_error_out_memory">記憶體不足</string>
   <string name="file_list__footer__files">%1$d 個檔案</string>
   <string name="file_list__footer__files_and_folder">%1$d 個檔案, 1 個資料夾</string>
   <string name="file_list__footer__files_and_folders">%1$d 個檔案, %2$d 個資料夾</string>
+  <string name="share_dialog_title">分享</string>
+  <string name="share_no_users">目前沒有任何您分享的內容</string>
+  <string name="share_add_user_or_group">新增使用者或是群組</string>
+  <string name="share_via_link_section_title">分享連結</string>
+  <string name="share_via_link_expiration_date_label">指定到期日</string>
+  <string name="share_via_link_password_label">密碼保護</string>
+  <string name="share_search">搜尋</string>
 </resources>
index 8ca0a4e..dab9b3f 100644 (file)
@@ -19,7 +19,7 @@
 -->
 <resources>
 
-    <color name="owncloud_blue">#1D2D44</color>
+    <color name="owncloud_blue">@color/actionbar_start_color</color>
     <color name="owncloud_blue_accent">#35537A</color>
     <color name="owncloud_blue_bright">#00ddff</color>
 
index 8f1aec2..d5e18cf 100644 (file)
@@ -74,6 +74,7 @@
     <string name="file_list_seconds_ago">seconds ago</string>
     <string name="file_list_empty">Nothing in here. Upload something!</string>
     <string name="file_list_loading">Loading&#8230;</string>
+    <string name="file_list_no_app_for_file_type">No App found for file type!</string>
     <string name="local_file_list_empty">There are no files in this folder.</string>
     <string name="filedetails_select_file">Tap on a file to display additional information.</string>
     <string name="filedetails_size">Size:</string>
     <string name="filedetails_created">Created:</string>
     <string name="filedetails_modified">Modified:</string>
     <string name="filedetails_download">Download</string>
-    <string name="filedetails_sync_file">Refresh file</string>
+    <string name="filedetails_sync_file">Synchronize</string>
     <string name="filedetails_renamed_in_upload_msg">File was renamed to %1$s during upload</string>
     <string name="list_layout">List Layout</string>
-    <string name="action_share_file">Share link</string>
-    <string name="action_unshare_file">Unshare link</string>
+    <string name="action_share">Share</string>
     <string name="common_yes">Yes</string>
     <string name="common_no">No</string>
     <string name="common_ok">OK</string>
-    <string name="common_cancel_download">Cancel download</string>
-    <string name="common_cancel_upload">Cancel upload</string>
+    <string name="common_cancel_sync">Cancel synchronization</string>
     <string name="common_cancel">Cancel</string>
     <string name="common_save_exit">Save &amp; Exit</string>
     <string name="common_error">Error</string>
     <string name="ssl_validator_label_validity_to">To:</string>
     <string name="ssl_validator_label_signature">Signature:</string>
     <string name="ssl_validator_label_signature_algorithm">Algorithm:</string>
+    <string name="digest_algorithm_not_available">This digest algorithm is not available on your phone.</string>
+    <string name="ssl_validator_label_certificate_fingerprint">Fingerprint:</string>
+    <string name="certificate_load_problem">There is a problem loading the certificate.</string>
     <string name="ssl_validator_null_cert">The certificate could not be shown.</string>
     <string name="ssl_validator_no_info_about_error">- No information about the error</string>
 
        <string name="share_link_file_error">An error occurred while trying to share this file or folder</string>
        <string name="unshare_link_file_no_exist">Unable to unshare. Please check whether the file exists</string>
        <string name="unshare_link_file_error">An error occurred while trying to unshare this file or folder</string>
+    <string name="update_link_file_no_exist">Unable to update. Please check whether the file exists </string>
+    <string name="update_link_file_error">An error occurred while trying to update the shared link</string>
     <string name="share_link_password_title">Enter a password</string>
     <string name="share_link_empty_password">You must enter a password</string>
 
     <string name="forbidden_permissions_delete">to delete this file</string>
     <string name="share_link_forbidden_permissions">to share this file</string>
     <string name="unshare_link_forbidden_permissions">to unshare this file</string>
+    <string name="update_link_forbidden_permissions">to update this shared link</string>
     <string name="forbidden_permissions_create">to create the file</string>
     <string name="uploader_upload_forbidden_permissions">to upload in this folder</string>
     <string name="downloader_download_file_not_found">The file is no longer available on the server</string>
        <string name="prefs_category_security">Security</string>
 
        <string name="prefs_instant_video_upload_path_title">Upload Video Path</string>
-    <string name="download_folder_failed_content">Download of %1$s folder could not be completed</string>
+    <string name="sync_folder_failed_content">Synchronization of %1$s folder could not be completed</string>
 
        <string name="shared_subject_header">shared</string>
        <string name="with_you_subject_header">with you</string>
     
-       <string name="subject_token">%1$s shared \"%2$s\" with you</string>
-    <string name="saml_subject_token">\"%1$s\" has been shared with you</string>
+       <string name="subject_user_shared_with_you">%1$s shared \"%2$s\" with you</string>
+    <string name="subject_shared_with_you">\"%1$s\" has been shared with you</string>
 
     <string name="auth_refresh_button">Refresh connection</string>
     <string name="auth_host_address">Server address</string>
     <string name="file_list__footer__files_and_folder">%1$d files, 1 folder</string>
     <string name="file_list__footer__files_and_folders">%1$d files, %2$d folders</string>
 
+    <string name="share_dialog_title">Sharing</string>
+    <string name="share_with_user_section_title">Share with users and groups</string>
+    <string name="share_no_users">No data shared with users yet</string>
+    <string name="share_add_user_or_group">Add User or Group</string>
+    <string name="share_via_link_section_title">Share link</string>
+    <string name="share_via_link_expiration_date_label">Set expiration date</string>
+    <string name="share_via_link_password_label">Password protect</string>
+    <string name="share_via_link_password_title">Secured</string>
+    <string name="share_get_public_link_button">Get link</string>
+
+    <string name="share_search">Search</string>
+
+    <string name="search_users_and_groups_hint">Search users and groups</string>
+    <string name="share_group_clarification">%1$s (group)</string>
+
+    <string name="share_sharee_unavailable">Sorry, your server version does not allow share with users within clients.
+        \nPlease contact your administrator</string>
+
 </resources>
index 54e5225..b7a6484 100644 (file)
                
        <color name="setup_text_hint">#777777</color>
        <color name="setup_text_typed">#000000</color>
+    <style name="Theme.ownCloud.NoActionBar">
+        <item name="windowActionBar">false</item>
+        <item name="windowNoTitle">true</item>
+    </style>
+    <style name="Theme.ownCloud.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
+    <style name="Theme.ownCloud.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
 </resources>
\ No newline at end of file
diff --git a/res/xml/users_and_groups_searchable.xml b/res/xml/users_and_groups_searchable.xml
new file mode 100644 (file)
index 0000000..9eadd56
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  ownCloud Android client application
+
+  @author David A. Velasco
+  Copyright (C) 2015 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/>.
+-->
+
+<!-- Searchable configuration to search users & groups in an OC server -->
+<searchable xmlns:android="http://schemas.android.com/apk/res/android"
+    android:label="@string/app_name"
+    android:hint="@string/search_users_and_groups_hint"
+    android:searchSuggestAuthority="com.owncloud.android.providers.UsersAndGroupsSearchProvider"
+    android:searchSuggestIntentAction="com.owncloud.android.providers.UsersAndGroupsSearchProvider.action.SHARE_WITH"
+    android:searchSuggestThreshold="1" >
+</searchable>
\ No newline at end of file
index 87766b5..2f05a3e 100644 (file)
@@ -289,4 +289,15 @@ public class AccountUtils {
         return serverVersion;\r
     }\r
 \r
+    public static boolean hasSearchUsersSupport(Account account){\r
+        OwnCloudVersion serverVersion = null;\r
+        if (account != null) {\r
+            AccountManager accountMgr = AccountManager.get(MainApp.getAppContext());\r
+            String serverVersionStr = accountMgr.getUserData(account, Constants.KEY_OC_VERSION);\r
+            if (serverVersionStr != null) {\r
+                serverVersion = new OwnCloudVersion(serverVersionStr);\r
+            }\r
+        }\r
+        return (serverVersion != null ? serverVersion.isSearchUsersSupported() : false);\r
+    }\r
 }\r
index 02ab3c7..7b0398e 100644 (file)
@@ -742,7 +742,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
                 mOAuthTokenEndpointText.getText().toString().trim());\r
         \r
         getServerInfoIntent.putExtra(\r
-                OperationsService.EXTRA_OAUTH2_QUERY_PARAMETERS, \r
+                OperationsService.EXTRA_OAUTH2_QUERY_PARAMETERS,\r
                 queryParameters);\r
         \r
         if (mOperationsServiceBinder != null) {\r
@@ -801,6 +801,8 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
         showRefreshButton(false);\r
 \r
         if (uri.length() != 0) {\r
+            uri = stripIndexPhpOrAppsFiles(uri, mHostUrlInput);\r
+\r
             // Handle internationalized domain names\r
             uri = DisplayUtils.convertIdn(uri, true);\r
 \r
@@ -1143,6 +1145,17 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
         return url;\r
     }\r
 \r
+    private String stripIndexPhpOrAppsFiles(String url, EditText mHostUrlInput) {\r
+        if (url.endsWith("/index.php")) {\r
+            url = url.substring(0, url.lastIndexOf("/index.php"));\r
+            mHostUrlInput.setText(url);\r
+        } else if (url.contains("/index.php/apps/")) {\r
+            url = url.substring(0, url.lastIndexOf("/index.php/apps/"));\r
+            mHostUrlInput.setText(url);\r
+        }\r
+\r
+        return url;\r
+    }\r
 \r
     // TODO remove, if possible\r
     private String trimUrlWebdav(String url){       \r
index 29a11c4..8a14244 100644 (file)
 
 package com.owncloud.android.datamodel;
 
-import java.io.File;
-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 android.accounts.Account;
 import android.content.ContentProviderClient;
 import android.content.ContentProviderOperation;
@@ -45,16 +37,26 @@ import android.provider.MediaStore;
 import com.owncloud.android.MainApp;
 import com.owncloud.android.db.ProviderMeta.ProviderTableMeta;
 import com.owncloud.android.lib.common.utils.Log_OC;
-import com.owncloud.android.lib.resources.files.FileUtils;
 import com.owncloud.android.lib.resources.shares.OCShare;
 import com.owncloud.android.lib.resources.shares.ShareType;
+import com.owncloud.android.lib.resources.status.CapabilityBooleanType;
+import com.owncloud.android.lib.resources.status.OCCapability;
 import com.owncloud.android.utils.FileStorageUtils;
 
+import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.Vector;
 
 public class FileDataStorageManager {
 
@@ -88,18 +90,10 @@ public class FileDataStorageManager {
         return mAccount;
     }
 
-    public void setContentResolver(ContentResolver cr) {
-        mContentResolver = cr;
-    }
-
     public ContentResolver getContentResolver() {
         return mContentResolver;
     }
 
-    public void setContentProviderClient(ContentProviderClient cp) {
-        mContentProviderClient = cp;
-    }
-
     public ContentProviderClient getContentProviderClient() {
         return mContentProviderClient;
     }
@@ -160,12 +154,12 @@ public class FileDataStorageManager {
 
 
     public Vector<OCFile> getFolderImages(OCFile folder/*, boolean onlyOnDevice*/) {
-        Vector<OCFile> ret = new Vector<OCFile>(); 
+        Vector<OCFile> ret = new Vector<OCFile>();
         if (folder != null) {
             // TODO better implementation, filtering in the access to database instead of here
             // TODO Enable when "On Device" is recovered ?
             Vector<OCFile> tmp = getFolderContent(folder/*, onlyOnDevice*/);
-            OCFile current = null; 
+            OCFile current = null;
             for (int i=0; i<tmp.size(); i++) {
                 current = tmp.get(i);
                 if (current.isImage()) {
@@ -180,15 +174,14 @@ public class FileDataStorageManager {
         boolean overriden = false;
         ContentValues cv = new ContentValues();
         cv.put(ProviderTableMeta.FILE_MODIFIED, file.getModificationTimestamp());
-        cv.put( 
-            ProviderTableMeta.FILE_MODIFIED_AT_LAST_SYNC_FOR_DATA, 
-            file.getModificationTimestampAtLastSyncForData()
+        cv.put(
+                ProviderTableMeta.FILE_MODIFIED_AT_LAST_SYNC_FOR_DATA,
+                file.getModificationTimestampAtLastSyncForData()
         );
         cv.put(ProviderTableMeta.FILE_CREATION, file.getCreationTimestamp());
         cv.put(ProviderTableMeta.FILE_CONTENT_LENGTH, file.getFileLength());
         cv.put(ProviderTableMeta.FILE_CONTENT_TYPE, file.getMimetype());
         cv.put(ProviderTableMeta.FILE_NAME, file.getFileName());
-        //if (file.getParentId() != DataStorageManager.ROOT_PARENT_ID)
         cv.put(ProviderTableMeta.FILE_PARENT, file.getParentId());
         cv.put(ProviderTableMeta.FILE_PATH, file.getRemotePath());
         if (!file.isFolder())
@@ -198,17 +191,20 @@ public class FileDataStorageManager {
         cv.put(ProviderTableMeta.FILE_LAST_SYNC_DATE_FOR_DATA, file.getLastSyncDateForData());
         cv.put(ProviderTableMeta.FILE_KEEP_IN_SYNC, file.isFavorite() ? 1 : 0);
         cv.put(ProviderTableMeta.FILE_ETAG, file.getEtag());
-        cv.put(ProviderTableMeta.FILE_SHARE_BY_LINK, file.isShareByLink() ? 1 : 0);
+        cv.put(ProviderTableMeta.FILE_SHARED_VIA_LINK, file.isSharedViaLink() ? 1 : 0);
+        cv.put(ProviderTableMeta.FILE_SHARED_WITH_SHAREE, file.isSharedWithSharee() ? 1 : 0);
         cv.put(ProviderTableMeta.FILE_PUBLIC_LINK, file.getPublicLink());
         cv.put(ProviderTableMeta.FILE_PERMISSIONS, file.getPermissions());
         cv.put(ProviderTableMeta.FILE_REMOTE_ID, file.getRemoteId());
         cv.put(ProviderTableMeta.FILE_UPDATE_THUMBNAIL, file.needsUpdateThumbnail());
         cv.put(ProviderTableMeta.FILE_IS_DOWNLOADING, file.isDownloading());
-        
+        cv.put(ProviderTableMeta.FILE_ETAG_IN_CONFLICT, file.getEtagInConflict());
+
         boolean sameRemotePath = fileExists(file.getRemotePath());
-        if (sameRemotePath ||                fileExists(file.getFileId())) {           // for renamed files; no more delete and create
+        if (sameRemotePath ||
+                fileExists(file.getFileId())) {  // for renamed files; no more delete and create
 
-            OCFile oldFile = null;
+            OCFile oldFile;
             if (sameRemotePath) {
                 oldFile = getFileByPath(file.getRemotePath());
                 file.setFileId(oldFile.getFileId());
@@ -254,12 +250,6 @@ public class FileDataStorageManager {
             }
         }
 
-//        if (file.isFolder()) {
-//            updateFolderSize(file.getFileId());
-//        } else {
-//            updateFolderSize(file.getParentId());
-//        }
-
         return overriden;
     }
 
@@ -276,12 +266,12 @@ public class FileDataStorageManager {
      */
     public void saveFolder(
             OCFile folder, Collection<OCFile> updatedFiles, Collection<OCFile> filesToRemove
-        ) {
-        
-        Log_OC.d(TAG,  "Saving folder " + folder.getRemotePath() + " with " + updatedFiles.size() 
+    ) {
+
+        Log_OC.d(TAG,  "Saving folder " + folder.getRemotePath() + " with " + updatedFiles.size()
                 + " children and " + filesToRemove.size() + " files to remove");
 
-        ArrayList<ContentProviderOperation> operations = 
+        ArrayList<ContentProviderOperation> operations =
                 new ArrayList<ContentProviderOperation>(updatedFiles.size());
 
         // prepare operations to insert or update files to save in the given folder
@@ -289,8 +279,8 @@ public class FileDataStorageManager {
             ContentValues cv = new ContentValues();
             cv.put(ProviderTableMeta.FILE_MODIFIED, file.getModificationTimestamp());
             cv.put(
-                ProviderTableMeta.FILE_MODIFIED_AT_LAST_SYNC_FOR_DATA, 
-                file.getModificationTimestampAtLastSyncForData()
+                    ProviderTableMeta.FILE_MODIFIED_AT_LAST_SYNC_FOR_DATA,
+                    file.getModificationTimestampAtLastSyncForData()
             );
             cv.put(ProviderTableMeta.FILE_CREATION, file.getCreationTimestamp());
             cv.put(ProviderTableMeta.FILE_CONTENT_LENGTH, file.getFileLength());
@@ -307,12 +297,14 @@ public class FileDataStorageManager {
             cv.put(ProviderTableMeta.FILE_LAST_SYNC_DATE_FOR_DATA, file.getLastSyncDateForData());
             cv.put(ProviderTableMeta.FILE_KEEP_IN_SYNC, file.isFavorite() ? 1 : 0);
             cv.put(ProviderTableMeta.FILE_ETAG, file.getEtag());
-            cv.put(ProviderTableMeta.FILE_SHARE_BY_LINK, file.isShareByLink() ? 1 : 0);
+            cv.put(ProviderTableMeta.FILE_SHARED_VIA_LINK, file.isSharedViaLink() ? 1 : 0);
+            cv.put(ProviderTableMeta.FILE_SHARED_WITH_SHAREE, file.isSharedWithSharee() ? 1 : 0);
             cv.put(ProviderTableMeta.FILE_PUBLIC_LINK, file.getPublicLink());
             cv.put(ProviderTableMeta.FILE_PERMISSIONS, file.getPermissions());
             cv.put(ProviderTableMeta.FILE_REMOTE_ID, file.getRemoteId());
             cv.put(ProviderTableMeta.FILE_UPDATE_THUMBNAIL, file.needsUpdateThumbnail());
             cv.put(ProviderTableMeta.FILE_IS_DOWNLOADING, file.isDownloading());
+            cv.put(ProviderTableMeta.FILE_ETAG_IN_CONFLICT, file.getEtagInConflict());
 
             boolean existsByPath = fileExists(file.getRemotePath());
             if (existsByPath || fileExists(file.getFileId())) {
@@ -337,15 +329,14 @@ public class FileDataStorageManager {
         for (OCFile file : filesToRemove) {
             if (file.getParentId() == folder.getFileId()) {
                 whereArgs = new String[]{mAccount.name, file.getRemotePath()};
-                //Uri.withAppendedPath(ProviderTableMeta.CONTENT_URI_FILE, "" + file.getFileId());
                 if (file.isFolder()) {
                     operations.add(ContentProviderOperation.newDelete(
                             ContentUris.withAppendedId(
                                     ProviderTableMeta.CONTENT_URI_DIR, file.getFileId()
                             )
                     ).withSelection(where, whereArgs).build());
-                    
-                    File localFolder = 
+
+                    File localFolder =
                             new File(FileStorageUtils.getDefaultSavePathFor(mAccount.name, file));
                     if (localFolder.exists()) {
                         removeLocalFolder(localFolder);
@@ -370,8 +361,8 @@ public class FileDataStorageManager {
         ContentValues cv = new ContentValues();
         cv.put(ProviderTableMeta.FILE_MODIFIED, folder.getModificationTimestamp());
         cv.put(
-            ProviderTableMeta.FILE_MODIFIED_AT_LAST_SYNC_FOR_DATA, 
-            folder.getModificationTimestampAtLastSyncForData()
+                ProviderTableMeta.FILE_MODIFIED_AT_LAST_SYNC_FOR_DATA,
+                folder.getModificationTimestampAtLastSyncForData()
         );
         cv.put(ProviderTableMeta.FILE_CREATION, folder.getCreationTimestamp());
         cv.put(ProviderTableMeta.FILE_CONTENT_LENGTH, 0);
@@ -384,7 +375,8 @@ public class FileDataStorageManager {
         cv.put(ProviderTableMeta.FILE_LAST_SYNC_DATE_FOR_DATA, folder.getLastSyncDateForData());
         cv.put(ProviderTableMeta.FILE_KEEP_IN_SYNC, folder.isFavorite() ? 1 : 0);
         cv.put(ProviderTableMeta.FILE_ETAG, folder.getEtag());
-        cv.put(ProviderTableMeta.FILE_SHARE_BY_LINK, folder.isShareByLink() ? 1 : 0);
+        cv.put(ProviderTableMeta.FILE_SHARED_VIA_LINK, folder.isSharedViaLink() ? 1 : 0);
+        cv.put(ProviderTableMeta.FILE_SHARED_WITH_SHAREE, folder.isSharedWithSharee() ? 1 : 0);
         cv.put(ProviderTableMeta.FILE_PUBLIC_LINK, folder.getPublicLink());
         cv.put(ProviderTableMeta.FILE_PERMISSIONS, folder.getPermissions());
         cv.put(ProviderTableMeta.FILE_REMOTE_ID, folder.getRemoteId());
@@ -434,43 +426,9 @@ public class FileDataStorageManager {
             }
         }
 
-        //updateFolderSize(folder.getFileId());
-
     }
 
 
-//    /**
-//     * 
-//     * @param id
-//     */
-//    private void updateFolderSize(long id) {
-//        if (id > FileDataStorageManager.ROOT_PARENT_ID) {
-//            Log_OC.d(TAG, "Updating size of " + id);
-//            if (getContentResolver() != null) {
-//                getContentResolver().update(ProviderTableMeta.CONTENT_URI_DIR, 
-//                        new ContentValues(),    
-                            // won't be used, but cannot be null; crashes in KLP
-//                        ProviderTableMeta._ID + "=?",
-//                        new String[] { String.valueOf(id) });
-//            } else {
-//                try {
-//                    getContentProviderClient().update(ProviderTableMeta.CONTENT_URI_DIR, 
-//                            new ContentValues(),    
-                                // won't be used, but cannot be null; crashes in KLP
-//                            ProviderTableMeta._ID + "=?",
-//                            new String[] { String.valueOf(id) });
-//                    
-//                } catch (RemoteException e) {
-//                    Log_OC.e(
-//    TAG, "Exception in update of folder size through compatibility patch " + e.getMessage());
-//                }
-//            }
-//        } else {
-//            Log_OC.e(TAG,  "not updating size for folder " + id);
-//        }
-//    }
-
-
     public boolean removeFile(OCFile file, boolean removeDBData, boolean removeLocalCopy) {
         boolean success = true;
         if (file != null) {
@@ -479,9 +437,12 @@ public class FileDataStorageManager {
 
             } else {
                 if (removeDBData) {
-                    //Uri file_uri = Uri.withAppendedPath(ProviderTableMeta.CONTENT_URI_FILE, ""+file.getFileId());
-                    Uri file_uri = ContentUris.withAppendedId(ProviderTableMeta.CONTENT_URI_FILE, file.getFileId());
-                    String where = ProviderTableMeta.FILE_ACCOUNT_OWNER + "=?" + " AND " + ProviderTableMeta.FILE_PATH + "=?";
+                    //Uri file_uri = Uri.withAppendedPath(ProviderTableMeta.CONTENT_URI_FILE,
+                    // ""+file.getFileId());
+                    Uri file_uri = ContentUris.withAppendedId(ProviderTableMeta.CONTENT_URI_FILE,
+                            file.getFileId());
+                    String where = ProviderTableMeta.FILE_ACCOUNT_OWNER + "=?" + " AND " +
+                            ProviderTableMeta.FILE_PATH + "=?";
                     String[] whereArgs = new String[]{mAccount.name, file.getRemotePath()};
                     int deleted = 0;
                     if (getContentProviderClient() != null) {
@@ -505,6 +466,7 @@ public class FileDataStorageManager {
                         // maybe unnecessary, but should be checked TODO remove if unnecessary
                         file.setStoragePath(null);
                         saveFile(file);
+                        saveConflict(file, null);
                     }
                 }
             }
@@ -529,7 +491,7 @@ public class FileDataStorageManager {
     private boolean removeFolderInDb(OCFile folder) {
         Uri folder_uri = Uri.withAppendedPath(ProviderTableMeta.CONTENT_URI_DIR, "" +
                 folder.getFileId());   // URI for recursive deletion
-        String where = ProviderTableMeta.FILE_ACCOUNT_OWNER + "=?" + " AND " + 
+        String where = ProviderTableMeta.FILE_ACCOUNT_OWNER + "=?" + " AND " +
                 ProviderTableMeta.FILE_PATH + "=?";
         String [] whereArgs = new String[]{mAccount.name, folder.getRemotePath()};
         int deleted = 0;
@@ -596,7 +558,7 @@ public class FileDataStorageManager {
         return success;
     }
 
-    
+
     /**
      * Updates database and file system for a file or folder that was moved to a different location.
      *
@@ -609,7 +571,8 @@ public class FileDataStorageManager {
 
             OCFile targetParent = getFileByPath(targetParentPath);
             if (targetParent == null) {
-                throw new IllegalStateException("Parent folder of the target path does not exist!!");
+                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
@@ -666,12 +629,12 @@ public class FileDataStorageManager {
                         // update link to downloaded content - but local move is not done here!
                         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(
@@ -702,7 +665,8 @@ 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 
@@ -786,7 +750,7 @@ public class FileDataStorageManager {
         return ret;
     }
 
-    
+
     private Vector<OCFile> getFolderContent(long parentId/*, boolean onlyOnDevice*/) {
 
         Vector<OCFile> ret = new Vector<OCFile>();
@@ -816,7 +780,7 @@ public class FileDataStorageManager {
                 OCFile child = createFileInstance(c);
                 // TODO Enable when "On Device" is recovered ?
                 // if (child.isFolder() || !onlyOnDevice || onlyOnDevice && child.isDown()){
-                    ret.add(child);
+                ret.add(child);
                 // }
             } while (c.moveToNext());
         }
@@ -933,8 +897,10 @@ public class FileDataStorageManager {
             file.setFavorite(c.getInt(
                     c.getColumnIndex(ProviderTableMeta.FILE_KEEP_IN_SYNC)) == 1 ? true : false);
             file.setEtag(c.getString(c.getColumnIndex(ProviderTableMeta.FILE_ETAG)));
-            file.setShareByLink(c.getInt(
-                    c.getColumnIndex(ProviderTableMeta.FILE_SHARE_BY_LINK)) == 1 ? true : false);
+            file.setShareViaLink(c.getInt(
+                    c.getColumnIndex(ProviderTableMeta.FILE_SHARED_VIA_LINK)) == 1 ? true : false);
+            file.setShareWithSharee(c.getInt(
+                    c.getColumnIndex(ProviderTableMeta.FILE_SHARED_WITH_SHAREE)) == 1 ? true : false);
             file.setPublicLink(c.getString(c.getColumnIndex(ProviderTableMeta.FILE_PUBLIC_LINK)));
             file.setPermissions(c.getString(c.getColumnIndex(ProviderTableMeta.FILE_PERMISSIONS)));
             file.setRemoteId(c.getString(c.getColumnIndex(ProviderTableMeta.FILE_REMOTE_ID)));
@@ -942,44 +908,12 @@ public class FileDataStorageManager {
                     c.getColumnIndex(ProviderTableMeta.FILE_UPDATE_THUMBNAIL)) == 1 ? true : false);
             file.setDownloading(c.getInt(
                     c.getColumnIndex(ProviderTableMeta.FILE_IS_DOWNLOADING)) == 1 ? true : false);
-                    
-        }
-        return file;
-    }
+            file.setEtagInConflict(c.getString(c.getColumnIndex(ProviderTableMeta.FILE_ETAG_IN_CONFLICT)));
 
-    /**
-     * Returns if the file/folder is shared by link or not
-     *
-     * @param path Path of the file/folder
-     * @return
-     */
-    public boolean isShareByLink(String path) {
-        Cursor c = getCursorForValue(ProviderTableMeta.FILE_STORAGE_PATH, path);
-        OCFile file = null;
-        if (c.moveToFirst()) {
-            file = createFileInstance(c);
         }
-        c.close();
-        return file.isShareByLink();
-    }
-
-    /**
-     * Returns the public link of the file/folder
-     *
-     * @param path Path of the file/folder
-     * @return
-     */
-    public String getPublicLink(String path) {
-        Cursor c = getCursorForValue(ProviderTableMeta.FILE_STORAGE_PATH, path);
-        OCFile file = null;
-        if (c.moveToFirst()) {
-            file = createFileInstance(c);
-        }
-        c.close();
-        return file.getPublicLink();
+        return file;
     }
 
-
     // Methods for Shares
     public boolean saveShare(OCShare share) {
         boolean overriden = false;
@@ -994,25 +928,25 @@ public class FileDataStorageManager {
         cv.put(ProviderTableMeta.OCSHARES_EXPIRATION_DATE, share.getExpirationDate());
         cv.put(ProviderTableMeta.OCSHARES_TOKEN, share.getToken());
         cv.put(
-            ProviderTableMeta.OCSHARES_SHARE_WITH_DISPLAY_NAME, 
-            share.getSharedWithDisplayName()
+                ProviderTableMeta.OCSHARES_SHARE_WITH_DISPLAY_NAME,
+                share.getSharedWithDisplayName()
         );
         cv.put(ProviderTableMeta.OCSHARES_IS_DIRECTORY, share.isFolder() ? 1 : 0);
         cv.put(ProviderTableMeta.OCSHARES_USER_ID, share.getUserId());
-        cv.put(ProviderTableMeta.OCSHARES_ID_REMOTE_SHARED, share.getIdRemoteShared());
+        cv.put(ProviderTableMeta.OCSHARES_ID_REMOTE_SHARED, share.getRemoteId());
         cv.put(ProviderTableMeta.OCSHARES_ACCOUNT_OWNER, mAccount.name);
 
-        if (shareExists(share.getIdRemoteShared())) {           // for renamed files; no more delete and create
+        if (shareExists(share.getRemoteId())) {// for renamed files; no more delete and create
             overriden = true;
             if (getContentResolver() != null) {
                 getContentResolver().update(ProviderTableMeta.CONTENT_URI_SHARE, cv,
                         ProviderTableMeta.OCSHARES_ID_REMOTE_SHARED + "=?",
-                        new String[]{String.valueOf(share.getIdRemoteShared())});
+                        new String[]{String.valueOf(share.getRemoteId())});
             } else {
                 try {
                     getContentProviderClient().update(ProviderTableMeta.CONTENT_URI_SHARE,
                             cv, ProviderTableMeta.OCSHARES_ID_REMOTE_SHARED + "=?",
-                            new String[]{String.valueOf(share.getIdRemoteShared())});
+                            new String[]{String.valueOf(share.getRemoteId())});
                 } catch (RemoteException e) {
                     Log_OC.e(TAG,
                             "Fail to insert insert file to database "
@@ -1045,26 +979,55 @@ public class FileDataStorageManager {
     }
 
 
-    public OCShare getFirstShareByPathAndType(String path, ShareType type) {
+    /**
+     * Get first share bound to a file with a known path and given {@link ShareType}.
+     *
+     * @param path          Path of the file.
+     * @param type          Type of the share to get
+     * @param shareWith     Target of the share. Ignored in type is {@link ShareType#PUBLIC_LINK}
+     * @return              First {@OCShare} instance found in DB bound to the file in 'path'
+     */
+    public OCShare getFirstShareByPathAndType(String path, ShareType type, String shareWith) {
         Cursor c = null;
+        if (shareWith == null) {
+            shareWith = "";
+        }
+
+        String selection = ProviderTableMeta.OCSHARES_PATH + "=? AND "
+                + ProviderTableMeta.OCSHARES_SHARE_TYPE + "=? AND "
+                + ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + "=?" ;
+        if (!ShareType.PUBLIC_LINK.equals(type)) {
+            selection += " AND " + ProviderTableMeta.OCSHARES_SHARE_WITH + "=?";
+        }
+
+        String [] selectionArgs;
+        if (ShareType.PUBLIC_LINK.equals(type)) {
+            selectionArgs = new String[]{
+                    path,
+                    Integer.toString(type.getValue()),
+                    mAccount.name
+            };
+        } else {
+            selectionArgs = new String[]{
+                    path,
+                    Integer.toString(type.getValue()),
+                    mAccount.name,
+                    shareWith
+            };
+        }
+
         if (getContentResolver() != null) {
             c = getContentResolver().query(
                     ProviderTableMeta.CONTENT_URI_SHARE,
                     null,
-                    ProviderTableMeta.OCSHARES_PATH + "=? AND "
-                            + ProviderTableMeta.OCSHARES_SHARE_TYPE + "=? AND "
-                            + ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + "=?",
-                    new String[]{path, Integer.toString(type.getValue()), mAccount.name},
+                    selection, selectionArgs,
                     null);
         } else {
             try {
                 c = getContentProviderClient().query(
                         ProviderTableMeta.CONTENT_URI_SHARE,
                         null,
-                        ProviderTableMeta.OCSHARES_PATH + "=? AND "
-                                + ProviderTableMeta.OCSHARES_SHARE_TYPE + "=? AND "
-                                + ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + "=?",
-                        new String[]{path, Integer.toString(type.getValue()), mAccount.name},
+                        selection, selectionArgs,
                         null);
 
             } catch (RemoteException e) {
@@ -1090,6 +1053,8 @@ public class FileDataStorageManager {
                     .getColumnIndex(ProviderTableMeta.OCSHARES_ITEM_SOURCE)));
             share.setShareType(ShareType.fromValue(c.getInt(c
                     .getColumnIndex(ProviderTableMeta.OCSHARES_SHARE_TYPE))));
+            share.setShareWith(c.getString(c
+                    .getColumnIndex(ProviderTableMeta.OCSHARES_SHARE_WITH)));
             share.setPermissions(c.getInt(c
                     .getColumnIndex(ProviderTableMeta.OCSHARES_PERMISSIONS)));
             share.setSharedDate(c.getLong(c
@@ -1103,7 +1068,8 @@ public class FileDataStorageManager {
             share.setIsFolder(c.getInt(
                     c.getColumnIndex(ProviderTableMeta.OCSHARES_IS_DIRECTORY)) == 1);
             share.setUserId(c.getLong(c.getColumnIndex(ProviderTableMeta.OCSHARES_USER_ID)));
-            share.setIdRemoteShared(c.getLong(c.getColumnIndex(ProviderTableMeta.OCSHARES_ID_REMOTE_SHARED)));
+            share.setIdRemoteShared(c.getLong(
+                    c.getColumnIndex(ProviderTableMeta.OCSHARES_ID_REMOTE_SHARED)));
         }
         return share;
     }
@@ -1142,9 +1108,10 @@ public class FileDataStorageManager {
         return shareExists(ProviderTableMeta.OCSHARES_ID_REMOTE_SHARED, String.valueOf(remoteId));
     }
 
-    private void cleanSharedFiles() {
+    private void resetShareFlagsInAllFiles() {
         ContentValues cv = new ContentValues();
-        cv.put(ProviderTableMeta.FILE_SHARE_BY_LINK, false);
+        cv.put(ProviderTableMeta.FILE_SHARED_VIA_LINK, false);
+        cv.put(ProviderTableMeta.FILE_SHARED_WITH_SHAREE, false);
         cv.put(ProviderTableMeta.FILE_PUBLIC_LINK, "");
         String where = ProviderTableMeta.FILE_ACCOUNT_OWNER + "=?";
         String[] whereArgs = new String[]{mAccount.name};
@@ -1154,29 +1121,54 @@ public class FileDataStorageManager {
 
         } else {
             try {
-                getContentProviderClient().update(ProviderTableMeta.CONTENT_URI, cv, where, whereArgs);
+                getContentProviderClient().update(ProviderTableMeta.CONTENT_URI, cv, where,
+                        whereArgs);
             } catch (RemoteException e) {
-                Log_OC.e(TAG, "Exception in cleanSharedFiles" + e.getMessage());
+                Log_OC.e(TAG, "Exception in resetShareFlagsInAllFiles" + e.getMessage());
             }
         }
     }
 
-    private void cleanSharedFilesInFolder(OCFile folder) {
+    private void resetShareFlagsInFolder(OCFile folder) {
         ContentValues cv = new ContentValues();
-        cv.put(ProviderTableMeta.FILE_SHARE_BY_LINK, false);
+        cv.put(ProviderTableMeta.FILE_SHARED_VIA_LINK, false);
+        cv.put(ProviderTableMeta.FILE_SHARED_WITH_SHAREE, false);
         cv.put(ProviderTableMeta.FILE_PUBLIC_LINK, "");
         String where = ProviderTableMeta.FILE_ACCOUNT_OWNER + "=? AND " +
                 ProviderTableMeta.FILE_PARENT + "=?";
         String [] whereArgs = new String[] { mAccount.name , String.valueOf(folder.getFileId()) };
-        
+
+        if (getContentResolver() != null) {
+            getContentResolver().update(ProviderTableMeta.CONTENT_URI, cv, where, whereArgs);
+
+        } else {
+            try {
+                getContentProviderClient().update(ProviderTableMeta.CONTENT_URI, cv, where,
+                        whereArgs);
+            } catch (RemoteException e) {
+                Log_OC.e(TAG, "Exception in resetShareFlagsInFolder " + e.getMessage());
+            }
+        }
+    }
+
+    private void resetShareFlagInAFile(String filePath){
+        ContentValues cv = new ContentValues();
+        cv.put(ProviderTableMeta.FILE_SHARED_VIA_LINK, false);
+        cv.put(ProviderTableMeta.FILE_SHARED_WITH_SHAREE, false);
+        cv.put(ProviderTableMeta.FILE_PUBLIC_LINK, "");
+        String where = ProviderTableMeta.FILE_ACCOUNT_OWNER + "=? AND " +
+                ProviderTableMeta.FILE_PATH+ "=?";
+        String [] whereArgs = new String[] { mAccount.name , filePath };
+
         if (getContentResolver() != null) {
             getContentResolver().update(ProviderTableMeta.CONTENT_URI, cv, where, whereArgs);
 
         } else {
             try {
-                getContentProviderClient().update(ProviderTableMeta.CONTENT_URI, cv, where, whereArgs);
+                getContentProviderClient().update(ProviderTableMeta.CONTENT_URI, cv, where,
+                        whereArgs);
             } catch (RemoteException e) {
-                Log_OC.e(TAG, "Exception in cleanSharedFilesInFolder " + e.getMessage());
+                Log_OC.e(TAG, "Exception in resetShareFlagsInFolder " + e.getMessage());
             }
         }
     }
@@ -1190,7 +1182,8 @@ public class FileDataStorageManager {
 
         } else {
             try {
-                getContentProviderClient().delete(ProviderTableMeta.CONTENT_URI_SHARE, where, whereArgs);
+                getContentProviderClient().delete(ProviderTableMeta.CONTENT_URI_SHARE, where,
+                        whereArgs);
             } catch (RemoteException e) {
                 Log_OC.e(TAG, "Exception in cleanShares" + e.getMessage());
             }
@@ -1200,7 +1193,7 @@ public class FileDataStorageManager {
     public void saveShares(Collection<OCShare> shares) {
         cleanShares();
         if (shares != null) {
-            ArrayList<ContentProviderOperation> operations = 
+            ArrayList<ContentProviderOperation> operations =
                     new ArrayList<ContentProviderOperation>(shares.size());
 
             // prepare operations to insert or update files to save in the given folder
@@ -1216,28 +1209,28 @@ public class FileDataStorageManager {
                 cv.put(ProviderTableMeta.OCSHARES_EXPIRATION_DATE, share.getExpirationDate());
                 cv.put(ProviderTableMeta.OCSHARES_TOKEN, share.getToken());
                 cv.put(
-                    ProviderTableMeta.OCSHARES_SHARE_WITH_DISPLAY_NAME, 
-                    share.getSharedWithDisplayName()
+                        ProviderTableMeta.OCSHARES_SHARE_WITH_DISPLAY_NAME,
+                        share.getSharedWithDisplayName()
                 );
                 cv.put(ProviderTableMeta.OCSHARES_IS_DIRECTORY, share.isFolder() ? 1 : 0);
                 cv.put(ProviderTableMeta.OCSHARES_USER_ID, share.getUserId());
-                cv.put(ProviderTableMeta.OCSHARES_ID_REMOTE_SHARED, share.getIdRemoteShared());
+                cv.put(ProviderTableMeta.OCSHARES_ID_REMOTE_SHARED, share.getRemoteId());
                 cv.put(ProviderTableMeta.OCSHARES_ACCOUNT_OWNER, mAccount.name);
 
-                if (shareExists(share.getIdRemoteShared())) {
+                if (shareExists(share.getRemoteId())) {
                     // updating an existing file
                     operations.add(
                             ContentProviderOperation.newUpdate(ProviderTableMeta.CONTENT_URI_SHARE).
-                            withValues(cv).
-                            withSelection(ProviderTableMeta.OCSHARES_ID_REMOTE_SHARED + "=?",
-                                    new String[]{String.valueOf(share.getIdRemoteShared())})
-                            .build());
+                                    withValues(cv).
+                                    withSelection(ProviderTableMeta.OCSHARES_ID_REMOTE_SHARED + "=?",
+                                            new String[]{String.valueOf(share.getRemoteId())})
+                                    .build());
                 } else {
                     // adding a new file
                     operations.add(
                             ContentProviderOperation.newInsert(ProviderTableMeta.CONTENT_URI_SHARE).
-                            withValues(cv).
-                            build()
+                                    withValues(cv).
+                                    build()
                     );
                 }
             }
@@ -1246,11 +1239,12 @@ public class FileDataStorageManager {
             if (operations.size() > 0) {
                 @SuppressWarnings("unused")
                 ContentProviderResult[] results = null;
-                Log_OC.d(TAG, "Sending " + operations.size() + 
+                Log_OC.d(TAG, "Sending " + operations.size() +
                         " operations to FileContentProvider");
                 try {
                     if (getContentResolver() != null) {
-                        results = getContentResolver().applyBatch(MainApp.getAuthority(), operations);
+                        results = getContentResolver().applyBatch(MainApp.getAuthority(),
+                                operations);
                     } else {
                         results = getContentProviderClient().applyBatch(operations);
                     }
@@ -1267,10 +1261,10 @@ public class FileDataStorageManager {
     }
 
     public void updateSharedFiles(Collection<OCFile> sharedFiles) {
-        cleanSharedFiles();
+        resetShareFlagsInAllFiles();
 
         if (sharedFiles != null) {
-            ArrayList<ContentProviderOperation> operations = 
+            ArrayList<ContentProviderOperation> operations =
                     new ArrayList<ContentProviderOperation>(sharedFiles.size());
 
             // prepare operations to insert or update files to save in the given folder
@@ -1278,8 +1272,8 @@ public class FileDataStorageManager {
                 ContentValues cv = new ContentValues();
                 cv.put(ProviderTableMeta.FILE_MODIFIED, file.getModificationTimestamp());
                 cv.put(
-                    ProviderTableMeta.FILE_MODIFIED_AT_LAST_SYNC_FOR_DATA, 
-                    file.getModificationTimestampAtLastSyncForData()
+                        ProviderTableMeta.FILE_MODIFIED_AT_LAST_SYNC_FOR_DATA,
+                        file.getModificationTimestampAtLastSyncForData()
                 );
                 cv.put(ProviderTableMeta.FILE_CREATION, file.getCreationTimestamp());
                 cv.put(ProviderTableMeta.FILE_CONTENT_LENGTH, file.getFileLength());
@@ -1293,40 +1287,42 @@ public class FileDataStorageManager {
                 cv.put(ProviderTableMeta.FILE_ACCOUNT_OWNER, mAccount.name);
                 cv.put(ProviderTableMeta.FILE_LAST_SYNC_DATE, file.getLastSyncDateForProperties());
                 cv.put(
-                    ProviderTableMeta.FILE_LAST_SYNC_DATE_FOR_DATA, 
-                    file.getLastSyncDateForData()
+                        ProviderTableMeta.FILE_LAST_SYNC_DATE_FOR_DATA,
+                        file.getLastSyncDateForData()
                 );
                 cv.put(ProviderTableMeta.FILE_KEEP_IN_SYNC, file.isFavorite() ? 1 : 0);
                 cv.put(ProviderTableMeta.FILE_ETAG, file.getEtag());
-                cv.put(ProviderTableMeta.FILE_SHARE_BY_LINK, file.isShareByLink() ? 1 : 0);
+                cv.put(ProviderTableMeta.FILE_SHARED_VIA_LINK, file.isSharedViaLink() ? 1 : 0);
+                cv.put(ProviderTableMeta.FILE_SHARED_WITH_SHAREE, file.isSharedWithSharee() ? 1 : 0);
                 cv.put(ProviderTableMeta.FILE_PUBLIC_LINK, file.getPublicLink());
                 cv.put(ProviderTableMeta.FILE_PERMISSIONS, file.getPermissions());
                 cv.put(ProviderTableMeta.FILE_REMOTE_ID, file.getRemoteId());
                 cv.put(
-                    ProviderTableMeta.FILE_UPDATE_THUMBNAIL, 
-                    file.needsUpdateThumbnail() ? 1 : 0
+                        ProviderTableMeta.FILE_UPDATE_THUMBNAIL,
+                        file.needsUpdateThumbnail() ? 1 : 0
                 );
                 cv.put(
                         ProviderTableMeta.FILE_IS_DOWNLOADING,
                         file.isDownloading() ? 1 : 0
                 );
+                cv.put(ProviderTableMeta.FILE_ETAG_IN_CONFLICT, file.getEtagInConflict());
 
                 boolean existsByPath = fileExists(file.getRemotePath());
                 if (existsByPath || fileExists(file.getFileId())) {
                     // updating an existing file
                     operations.add(
                             ContentProviderOperation.newUpdate(ProviderTableMeta.CONTENT_URI).
-                            withValues(cv).
-                            withSelection(ProviderTableMeta._ID + "=?",
-                                    new String[]{String.valueOf(file.getFileId())})
-                            .build());
+                                    withValues(cv).
+                                    withSelection(ProviderTableMeta._ID + "=?",
+                                            new String[]{String.valueOf(file.getFileId())})
+                                    .build());
 
                 } else {
                     // adding a new file
                     operations.add(
                             ContentProviderOperation.newInsert(ProviderTableMeta.CONTENT_URI).
-                            withValues(cv).
-                            build()
+                                    withValues(cv).
+                                    build()
                     );
                 }
             }
@@ -1335,7 +1331,7 @@ public class FileDataStorageManager {
             if (operations.size() > 0) {
                 @SuppressWarnings("unused")
                 ContentProviderResult[] results = null;
-                Log_OC.d(TAG, "Sending " + operations.size() + 
+                Log_OC.d(TAG, "Sending " + operations.size() +
                         " operations to FileContentProvider");
                 try {
                     if (getContentResolver() != null) {
@@ -1358,8 +1354,8 @@ public class FileDataStorageManager {
     public void removeShare(OCShare share) {
         Uri share_uri = ProviderTableMeta.CONTENT_URI_SHARE;
         String where = ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + "=?" + " AND " +
-                ProviderTableMeta.FILE_PATH + "=?";
-        String [] whereArgs = new String[]{mAccount.name, share.getPath()};
+                ProviderTableMeta._ID + "=?";
+        String [] whereArgs = new String[]{mAccount.name, Long.toString(share.getId())};
         if (getContentProviderClient() != null) {
             try {
                 getContentProviderClient().delete(share_uri, where, whereArgs);
@@ -1372,38 +1368,132 @@ public class FileDataStorageManager {
     }
 
     public void saveSharesDB(ArrayList<OCShare> shares) {
-        saveShares(shares);
-
-        ArrayList<OCFile> sharedFiles = new ArrayList<OCFile>();
+        ArrayList<ContentProviderOperation> operations = new ArrayList<ContentProviderOperation>();
 
-        for (OCShare share : shares) {
-            // Get the path
-            String path = share.getPath();
-            if (share.isFolder()) {
-                path = path + FileUtils.PATH_SEPARATOR;
+        // Reset flags & Remove shares for this files
+        String filePath = "";
+        for (OCShare share: shares) {
+            if (filePath != share.getPath()){
+                filePath = share.getPath();
+                resetShareFlagInAFile(filePath);
+                operations = prepareRemoveSharesInFile(filePath, operations);
             }
+        }
+
+       // Add operations to insert shares
+       operations = prepareInsertShares(shares, operations);
+
+        // apply operations in batch
+        if (operations.size() > 0) {
+            Log_OC.d(TAG, "Sending " + operations.size() + " operations to FileContentProvider");
+            try {
+                if (getContentResolver() != null) {
+                    getContentResolver().applyBatch(MainApp.getAuthority(), operations);
 
-            // Update OCFile with data from share: ShareByLink  and publicLink
-            OCFile file = getFileByPath(path);
-            if (file != null) {
-                if (share.getShareType().equals(ShareType.PUBLIC_LINK)) {
-                    file.setShareByLink(true);
-                    sharedFiles.add(file);
+                } else {
+                    getContentProviderClient().applyBatch(operations);
                 }
+
+            } catch (OperationApplicationException e) {
+                Log_OC.e(TAG, "Exception in batch of operations " + e.getMessage());
+
+            } catch (RemoteException e) {
+                Log_OC.e(TAG, "Exception in batch of operations  " + e.getMessage());
             }
         }
 
-        updateSharedFiles(sharedFiles);
+//        // TODO: review if it is needed
+//        // Update shared files
+//        ArrayList<OCFile> sharedFiles = new ArrayList<OCFile>();
+//
+//        for (OCShare share : shares) {
+//            // Get the path
+//            String path = share.getPath();
+//            if (share.isFolder()) {
+//                path = path + FileUtils.PATH_SEPARATOR;
+//            }
+//
+//            // Update OCFile with data from share: ShareByLink, publicLink and
+//            OCFile file = getFileByPath(path);
+//            if (file != null) {
+//                if (share.getShareType().equals(ShareType.PUBLIC_LINK)) {
+//                    file.setShareViaLink(true);
+//                    sharedFiles.add(file);
+//                }
+//            }
+//        }
+//
+//        // TODO: Review
+//        updateSharedFiles(sharedFiles);
+    }
+
+    public void removeSharesForFile(String remotePath) {
+        resetShareFlagInAFile(remotePath);
+        ArrayList<ContentProviderOperation> operations = new ArrayList<ContentProviderOperation>();
+        operations = prepareRemoveSharesInFile(remotePath, operations);
+        // apply operations in batch
+        if (operations.size() > 0) {
+            Log_OC.d(TAG, "Sending " + operations.size() + " operations to FileContentProvider");
+            try {
+                if (getContentResolver() != null) {
+                    getContentResolver().applyBatch(MainApp.getAuthority(), operations);
+
+                } else {
+                    getContentProviderClient().applyBatch(operations);
+                }
+
+            } catch (OperationApplicationException e) {
+                Log_OC.e(TAG, "Exception in batch of operations " + e.getMessage());
+
+            } catch (RemoteException e) {
+                Log_OC.e(TAG, "Exception in batch of operations  " + e.getMessage());
+            }
+        }
     }
 
 
     public void saveSharesInFolder(ArrayList<OCShare> shares, OCFile folder) {
-        cleanSharedFilesInFolder(folder);
+        resetShareFlagsInFolder(folder);
         ArrayList<ContentProviderOperation> operations = new ArrayList<ContentProviderOperation>();
         operations = prepareRemoveSharesInFolder(folder, operations);
 
         if (shares != null) {
             // prepare operations to insert or update files to save in the given folder
+            operations = prepareInsertShares(shares, operations);
+        }
+
+        // apply operations in batch
+        if (operations.size() > 0) {
+            Log_OC.d(TAG, "Sending " + operations.size() + " operations to FileContentProvider");
+            try {
+                if (getContentResolver() != null) {
+                    getContentResolver().applyBatch(MainApp.getAuthority(), operations);
+
+                } else {
+                    getContentProviderClient().applyBatch(operations);
+                }
+
+            } catch (OperationApplicationException e) {
+                Log_OC.e(TAG, "Exception in batch of operations " + e.getMessage());
+
+            } catch (RemoteException e) {
+
+            }
+        }
+
+    }
+
+    /**
+     * Prepare operations to insert or update files to save in the given folder
+     * @param shares        List of shares to insert
+     * @param operations    List of operations
+     * @return
+     */
+    private ArrayList<ContentProviderOperation> prepareInsertShares(
+            ArrayList<OCShare> shares, ArrayList<ContentProviderOperation> operations) {
+
+        if (shares != null) {
+            // prepare operations to insert or update files to save in the given folder
             for (OCShare share : shares) {
                 ContentValues cv = new ContentValues();
                 cv.put(ProviderTableMeta.OCSHARES_FILE_SOURCE, share.getFileSource());
@@ -1416,58 +1506,23 @@ public class FileDataStorageManager {
                 cv.put(ProviderTableMeta.OCSHARES_EXPIRATION_DATE, share.getExpirationDate());
                 cv.put(ProviderTableMeta.OCSHARES_TOKEN, share.getToken());
                 cv.put(
-                    ProviderTableMeta.OCSHARES_SHARE_WITH_DISPLAY_NAME, 
-                    share.getSharedWithDisplayName()
+                        ProviderTableMeta.OCSHARES_SHARE_WITH_DISPLAY_NAME,
+                        share.getSharedWithDisplayName()
                 );
                 cv.put(ProviderTableMeta.OCSHARES_IS_DIRECTORY, share.isFolder() ? 1 : 0);
                 cv.put(ProviderTableMeta.OCSHARES_USER_ID, share.getUserId());
-                cv.put(ProviderTableMeta.OCSHARES_ID_REMOTE_SHARED, share.getIdRemoteShared());
+                cv.put(ProviderTableMeta.OCSHARES_ID_REMOTE_SHARED, share.getRemoteId());
                 cv.put(ProviderTableMeta.OCSHARES_ACCOUNT_OWNER, mAccount.name);
 
-                /*
-                if (shareExists(share.getIdRemoteShared())) {
-                    // updating an existing share resource
-                    operations.add(
-                            ContentProviderOperation.newUpdate(ProviderTableMeta.CONTENT_URI_SHARE).
-                            withValues(cv).
-                            withSelection(  ProviderTableMeta.OCSHARES_ID_REMOTE_SHARED + "=?", 
-                                    new String[] { String.valueOf(share.getIdRemoteShared()) })
-                                    .build());
-
-                } else {
-                */
                 // adding a new share resource
                 operations.add(
                         ContentProviderOperation.newInsert(ProviderTableMeta.CONTENT_URI_SHARE).
-                        withValues(cv).
-                        build()
+                                withValues(cv).
+                                build()
                 );
-                //}
             }
         }
-
-        // apply operations in batch
-        if (operations.size() > 0) {
-            @SuppressWarnings("unused")
-            ContentProviderResult[] results = null;
-            Log_OC.d(TAG, "Sending " + operations.size() + " operations to FileContentProvider");
-            try {
-                if (getContentResolver() != null) {
-                    results = getContentResolver().applyBatch(MainApp.getAuthority(), operations);
-
-                } else {
-                    results = getContentProviderClient().applyBatch(operations);
-                }
-
-            } catch (OperationApplicationException e) {
-                Log_OC.e(TAG, "Exception in batch of operations " + e.getMessage());
-
-            } catch (RemoteException e) {
-                Log_OC.e(TAG, "Exception in batch of operations  " + e.getMessage());
-            }
-        }
-        //}
-
+        return operations;
     }
 
     private ArrayList<ContentProviderOperation> prepareRemoveSharesInFolder(
@@ -1479,55 +1534,75 @@ public class FileDataStorageManager {
 
             // TODO Enable when "On Device" is recovered ?
             Vector<OCFile> files = getFolderContent(folder /*, false*/);
-            
+
             for (OCFile file : files) {
                 whereArgs[0] = file.getRemotePath();
                 preparedOperations.add(
                         ContentProviderOperation.newDelete(ProviderTableMeta.CONTENT_URI_SHARE).
-                        withSelection(where, whereArgs).
-                        build()
+                                withSelection(where, whereArgs).
+                                build()
                 );
             }
         }
         return preparedOperations;
-        
-        /*
-        if (operations.size() > 0) {
-            try {
-                if (getContentResolver() != null) {
-                    getContentResolver().applyBatch(MainApp.getAuthority(), operations);
 
-                } else {
-                    getContentProviderClient().applyBatch(operations);
-                }
+    }
 
-            } catch (OperationApplicationException e) {
-                Log_OC.e(TAG, "Exception in batch of operations " + e.getMessage());
+    private ArrayList<ContentProviderOperation> prepareRemoveSharesInFile(
+            String filePath, ArrayList<ContentProviderOperation> preparedOperations) {
+
+        String where = ProviderTableMeta.OCSHARES_PATH + "=?" + " AND "
+                + ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + "=?";
+        String[] whereArgs = new String[]{filePath, mAccount.name};
+
+        preparedOperations.add(
+                ContentProviderOperation.newDelete(ProviderTableMeta.CONTENT_URI_SHARE).
+                        withSelection(where, whereArgs).
+                        build()
+        );
+
+        return preparedOperations;
+
+    }
+
+    public ArrayList<OCShare> getSharesWithForAFile(String filePath, String accountName){
+        // Condition
+        String where = ProviderTableMeta.OCSHARES_PATH + "=?" + " AND "
+                + ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + "=?"+ "AND"
+                + " (" + ProviderTableMeta.OCSHARES_SHARE_TYPE + "=? OR "
+                + ProviderTableMeta.OCSHARES_SHARE_TYPE +  "=? ) ";
+        String [] whereArgs = new String[]{ filePath, accountName ,
+                Integer.toString(ShareType.USER.getValue()),
+                Integer.toString(ShareType.GROUP.getValue()) };
+
+        Cursor c = null;
+        if (getContentResolver() != null) {
+            c = getContentResolver().query(
+                    ProviderTableMeta.CONTENT_URI_SHARE,
+                    null, where, whereArgs, null);
+        } else {
+            try {
+                c = getContentProviderClient().query(
+                        ProviderTableMeta.CONTENT_URI_SHARE,
+                        null, where, whereArgs, null);
 
             } catch (RemoteException e) {
-                Log_OC.e(TAG, "Exception in batch of operations  " + e.getMessage());
+                Log_OC.e(TAG, "Could not get list of shares with: " + e.getMessage());
+                c = null;
             }
-        }            
-        */
-            
-            /*
-            if (getContentResolver() != null) {
-                
-                getContentResolver().delete(ProviderTableMeta.CONTENT_URI_SHARE, 
-                                            where,
-                                            whereArgs);
-            } else {
-                try {
-                    getContentProviderClient().delete(  ProviderTableMeta.CONTENT_URI_SHARE, 
-                                                        where,
-                                                        whereArgs);
+        }
+        ArrayList<OCShare> shares = new ArrayList<OCShare>();
+        OCShare share = null;
+        if (c.moveToFirst()) {
+            do {
+                share = createShareInstance(c);
+                shares.add(share);
+                // }
+            } while (c.moveToNext());
+        }
+        c.close();
 
-                } catch (RemoteException e) {
-                    Log_OC.e(TAG, "Exception deleting shares in a folder " + e.getMessage());
-                }
-            }
-            */
-        //}
+        return shares;
     }
 
     public void triggerMediaScan(String path) {
@@ -1578,4 +1653,334 @@ public class FileDataStorageManager {
 
     }
 
+    public void saveConflict(OCFile file, String etagInConflict) {
+        if (!file.isDown()) {
+            etagInConflict = null;
+        }
+        ContentValues cv = new ContentValues();
+        cv.put(ProviderTableMeta.FILE_ETAG_IN_CONFLICT, etagInConflict);
+        int updated = 0;
+        if (getContentResolver() != null) {
+            updated = getContentResolver().update(
+                    ProviderTableMeta.CONTENT_URI_FILE,
+                    cv,
+                    ProviderTableMeta._ID + "=?",
+                    new String[] { String.valueOf(file.getFileId())}
+            );
+        } else {
+            try {
+                updated = getContentProviderClient().update(
+                        ProviderTableMeta.CONTENT_URI_FILE,
+                        cv,
+                        ProviderTableMeta._ID + "=?",
+                        new String[]{String.valueOf(file.getFileId())}
+                );
+            } catch (RemoteException e) {
+                Log_OC.e(TAG, "Failed saving conflict in database " + e.getMessage());
+            }
+        }
+
+        Log_OC.d(TAG, "Number of files updated with CONFLICT: " + updated);
+
+        if (updated > 0) {
+            if (etagInConflict != null) {
+                /// set conflict in all ancestor folders
+
+                long parentId = file.getParentId();
+                Set<String> ancestorIds = new HashSet<String>();
+                while (parentId != FileDataStorageManager.ROOT_PARENT_ID) {
+                    ancestorIds.add(Long.toString(parentId));
+                    parentId = getFileById(parentId).getParentId();
+                }
+
+                if (ancestorIds.size() > 0) {
+                    StringBuffer whereBuffer = new StringBuffer();
+                    whereBuffer.append(ProviderTableMeta._ID).append(" IN (");
+                    for (int i = 0; i < ancestorIds.size() - 1; i++) {
+                        whereBuffer.append("?,");
+                    }
+                    whereBuffer.append("?");
+                    whereBuffer.append(")");
+
+                    if (getContentResolver() != null) {
+                        updated = getContentResolver().update(
+                                ProviderTableMeta.CONTENT_URI_FILE,
+                                cv,
+                                whereBuffer.toString(),
+                                ancestorIds.toArray(new String[]{})
+                        );
+                    } else {
+                        try {
+                            updated = getContentProviderClient().update(
+                                    ProviderTableMeta.CONTENT_URI_FILE,
+                                    cv,
+                                    whereBuffer.toString(),
+                                    ancestorIds.toArray(new String[]{})
+                            );
+                        } catch (RemoteException e) {
+                            Log_OC.e(TAG, "Failed saving conflict in database " + e.getMessage());
+                        }
+                    }
+                } // else file is ROOT folder, no parent to set in conflict
+
+            } else {
+                /// update conflict in ancestor folders
+                // (not directly unset; maybe there are more conflicts below them)
+                String parentPath = file.getRemotePath();
+                if (parentPath.endsWith(OCFile.PATH_SEPARATOR)) {
+                    parentPath = parentPath.substring(0, parentPath.length() - 1);
+                }
+                parentPath = parentPath.substring(0, parentPath.lastIndexOf(OCFile.PATH_SEPARATOR) + 1);
+
+                Log_OC.d(TAG, "checking parents to remove conflict; STARTING with " + parentPath);
+                while (parentPath.length() > 0) {
+
+                    String whereForDescencentsInConflict =
+                            ProviderTableMeta.FILE_ETAG_IN_CONFLICT + " IS NOT NULL AND " +
+                                    ProviderTableMeta.FILE_CONTENT_TYPE + " != 'DIR' AND " +
+                                    ProviderTableMeta.FILE_ACCOUNT_OWNER + " = ? AND " +
+                                    ProviderTableMeta.FILE_PATH + " LIKE ?";
+                    Cursor descendentsInConflict = null;
+                    if (getContentResolver() != null) {
+                        descendentsInConflict = getContentResolver().query(
+                                ProviderTableMeta.CONTENT_URI_FILE,
+                                new String[]{ProviderTableMeta._ID},
+                                whereForDescencentsInConflict,
+                                new String[]{mAccount.name, parentPath + "%"},
+                                null
+                        );
+                    } else {
+                        try {
+                            descendentsInConflict = getContentProviderClient().query(
+                                    ProviderTableMeta.CONTENT_URI_FILE,
+                                    new String[]{ProviderTableMeta._ID},
+                                    whereForDescencentsInConflict,
+                                    new String[]{mAccount.name, parentPath + "%"},
+                                    null
+                            );
+                        } catch (RemoteException e) {
+                            Log_OC.e(TAG, "Failed querying for descendents in conflict " + e.getMessage());
+                        }
+                    }
+                    if (descendentsInConflict == null || descendentsInConflict.getCount() == 0) {
+                        Log_OC.d(TAG, "NO MORE conflicts in " + parentPath);
+                        if (getContentResolver() != null) {
+                            updated = getContentResolver().update(
+                                    ProviderTableMeta.CONTENT_URI_FILE,
+                                    cv,
+                                    ProviderTableMeta.FILE_ACCOUNT_OWNER + "=? AND " +
+                                            ProviderTableMeta.FILE_PATH + "=?",
+                                    new String[]{mAccount.name, parentPath}
+                            );
+                        } else {
+                            try {
+                                updated = getContentProviderClient().update(
+                                        ProviderTableMeta.CONTENT_URI_FILE,
+                                        cv,
+                                        ProviderTableMeta.FILE_ACCOUNT_OWNER + "=? AND " +
+                                                ProviderTableMeta.FILE_PATH + "=?"
+                                        , new String[]{mAccount.name, parentPath}
+                                );
+                            } catch (RemoteException e) {
+                                Log_OC.e(TAG, "Failed saving conflict in database " + e.getMessage());
+                            }
+                        }
+
+                    } else {
+                        Log_OC.d(TAG, "STILL " + descendentsInConflict.getCount() + " in " + parentPath);
+                    }
+
+                    if (descendentsInConflict != null) {
+                        descendentsInConflict.close();
+                    }
+
+                    parentPath = parentPath.substring(0, parentPath.length() - 1);  // trim last /
+                    parentPath = parentPath.substring(0, parentPath.lastIndexOf(OCFile.PATH_SEPARATOR) + 1);
+                    Log_OC.d(TAG, "checking parents to remove conflict; NEXT " + parentPath);
+                }
+            }
+        }
+
+    }
+
+    public OCCapability saveCapabilities(OCCapability capability){
+
+        // Prepare capabilities data
+        ContentValues cv = new ContentValues();
+        cv.put(ProviderTableMeta.CAPABILITIES_ACCOUNT_NAME, mAccount.name);
+        cv.put(ProviderTableMeta.CAPABILITIES_VERSION_MAYOR, capability.getVersionMayor());
+        cv.put(ProviderTableMeta.CAPABILITIES_VERSION_MINOR, capability.getVersionMinor());
+        cv.put(ProviderTableMeta.CAPABILITIES_VERSION_MICRO, capability.getVersionMicro());
+        cv.put(ProviderTableMeta.CAPABILITIES_VERSION_STRING, capability.getVersionString());
+        cv.put(ProviderTableMeta.CAPABILITIES_VERSION_EDITION, capability.getVersionEdition());
+        cv.put(ProviderTableMeta.CAPABILITIES_CORE_POLLINTERVAL, capability.getCorePollinterval());
+        cv.put(ProviderTableMeta.CAPABILITIES_SHARING_API_ENABLED, capability.getFilesSharingApiEnabled().getValue());
+        cv.put(ProviderTableMeta.CAPABILITIES_SHARING_PUBLIC_ENABLED,
+                capability.getFilesSharingPublicEnabled().getValue());
+        cv.put(ProviderTableMeta.CAPABILITIES_SHARING_PUBLIC_PASSWORD_ENFORCED,
+                capability.getFilesSharingPublicPasswordEnforced().getValue());
+        cv.put(ProviderTableMeta.CAPABILITIES_SHARING_PUBLIC_EXPIRE_DATE_ENABLED,
+                capability.getFilesSharingPublicExpireDateEnabled().getValue());
+        cv.put(ProviderTableMeta.CAPABILITIES_SHARING_PUBLIC_EXPIRE_DATE_DAYS,
+                capability.getFilesSharingPublicExpireDateDays());
+        cv.put(ProviderTableMeta.CAPABILITIES_SHARING_PUBLIC_EXPIRE_DATE_ENFORCED,
+                capability.getFilesSharingPublicExpireDateEnforced().getValue());
+        cv.put(ProviderTableMeta.CAPABILITIES_SHARING_PUBLIC_SEND_MAIL,
+                capability.getFilesSharingPublicSendMail().getValue());
+        cv.put(ProviderTableMeta.CAPABILITIES_SHARING_PUBLIC_UPLOAD,
+                capability.getFilesSharingPublicUpload().getValue());
+        cv.put(ProviderTableMeta.CAPABILITIES_SHARING_USER_SEND_MAIL,
+                capability.getFilesSharingUserSendMail().getValue());
+        cv.put(ProviderTableMeta.CAPABILITIES_SHARING_RESHARING, capability.getFilesSharingResharing().getValue());
+        cv.put(ProviderTableMeta.CAPABILITIES_SHARING_FEDERATION_OUTGOING,
+                capability.getFilesSharingFederationOutgoing().getValue());
+        cv.put(ProviderTableMeta.CAPABILITIES_SHARING_FEDERATION_INCOMING,
+                capability.getFilesSharingFederationIncoming().getValue());
+        cv.put(ProviderTableMeta.CAPABILITIES_FILES_BIGFILECHUNKING, capability.getFilesBigFileChuncking().getValue());
+        cv.put(ProviderTableMeta.CAPABILITIES_FILES_UNDELETE, capability.getFilesUndelete().getValue());
+        cv.put(ProviderTableMeta.CAPABILITIES_FILES_VERSIONING, capability.getFilesVersioning().getValue());
+
+        if (capabilityExists(mAccount.name)) {
+            if (getContentResolver() != null) {
+                getContentResolver().update(ProviderTableMeta.CONTENT_URI_CAPABILITIES, cv,
+                        ProviderTableMeta.CAPABILITIES_ACCOUNT_NAME + "=?",
+                        new String[]{mAccount.name});
+            } else {
+                try {
+                    getContentProviderClient().update(ProviderTableMeta.CONTENT_URI_CAPABILITIES,
+                            cv, ProviderTableMeta.CAPABILITIES_ACCOUNT_NAME + "=?",
+                            new String[]{mAccount.name});
+                } catch (RemoteException e) {
+                    Log_OC.e(TAG,
+                            "Fail to insert insert file to database "
+                                    + e.getMessage());
+                }
+            }
+        } else {
+            Uri result_uri = null;
+            if (getContentResolver() != null) {
+                result_uri = getContentResolver().insert(
+                        ProviderTableMeta.CONTENT_URI_CAPABILITIES, cv);
+            } else {
+                try {
+                    result_uri = getContentProviderClient().insert(
+                            ProviderTableMeta.CONTENT_URI_CAPABILITIES, cv);
+                } catch (RemoteException e) {
+                    Log_OC.e(TAG,
+                            "Fail to insert insert capability to database "
+                                    + e.getMessage());
+                }
+            }
+            if (result_uri != null) {
+                long new_id = Long.parseLong(result_uri.getPathSegments()
+                        .get(1));
+                capability.setId(new_id);
+                capability.setAccountName(mAccount.name);
+            }
+        }
+
+        return capability;
+    }
+
+    private boolean capabilityExists(String accountName) {
+        Cursor c = getCapabilityCursorForAccount(accountName);
+        boolean exists = false;
+        if (c != null) {
+            exists = c.moveToFirst();
+            c.close();
+        }
+        return exists;
+    }
+
+    private Cursor getCapabilityCursorForAccount(String accountName){
+        Cursor c = null;
+        if (getContentResolver() != null) {
+            c = getContentResolver()
+                    .query(ProviderTableMeta.CONTENT_URI_CAPABILITIES,
+                            null,
+                            ProviderTableMeta.CAPABILITIES_ACCOUNT_NAME + "=? ",
+                            new String[]{accountName}, null);
+        } else {
+            try {
+                c = getContentProviderClient().query(
+                        ProviderTableMeta.CONTENT_URI_CAPABILITIES,
+                        null,
+                        ProviderTableMeta.CAPABILITIES_ACCOUNT_NAME + "=? ",
+                        new String[]{accountName}, null);
+            } catch (RemoteException e) {
+                Log_OC.e(TAG,
+                        "Couldn't determine capability existance, assuming non existance: "
+                                + e.getMessage());
+            }
+        }
+
+        return c;
+
+    }
+    public OCCapability getCapability(String accountName){
+        OCCapability capability = null;
+        Cursor c = getCapabilityCursorForAccount(accountName);
+
+        if (c.moveToFirst()) {
+            capability = createCapabilityInstance(c);
+        } else {
+            capability = new OCCapability();    // return default with all UNKNOWN
+        }
+        c.close();
+        return capability;
+    }
+
+    private OCCapability createCapabilityInstance(Cursor c) {
+        OCCapability capability = null;
+        if (c != null) {
+            capability = new OCCapability();
+            capability.setId(c.getLong(c.getColumnIndex(ProviderTableMeta._ID)));
+            capability.setAccountName(c.getString(c
+                    .getColumnIndex(ProviderTableMeta.CAPABILITIES_ACCOUNT_NAME)));
+            capability.setVersionMayor(c.getInt(c
+                    .getColumnIndex(ProviderTableMeta.CAPABILITIES_VERSION_MAYOR)));
+            capability.setVersionMinor(c.getInt(c
+                    .getColumnIndex(ProviderTableMeta.CAPABILITIES_VERSION_MINOR)));
+            capability.setVersionMicro(c.getInt(c
+                    .getColumnIndex(ProviderTableMeta.CAPABILITIES_VERSION_MICRO)));
+            capability.setVersionString(c.getString(c
+                    .getColumnIndex(ProviderTableMeta.CAPABILITIES_VERSION_STRING)));
+            capability.setVersionEdition(c.getString(c
+                    .getColumnIndex(ProviderTableMeta.CAPABILITIES_VERSION_EDITION)));
+            capability.setCorePollinterval(c.getInt(c
+                    .getColumnIndex(ProviderTableMeta.CAPABILITIES_CORE_POLLINTERVAL)));
+            capability.setFilesSharingApiEnabled(CapabilityBooleanType.fromValue(c.getInt(c
+                    .getColumnIndex(ProviderTableMeta.CAPABILITIES_SHARING_API_ENABLED))));
+            capability.setFilesSharingPublicEnabled(CapabilityBooleanType.fromValue(c.getInt(c
+                    .getColumnIndex(ProviderTableMeta.CAPABILITIES_SHARING_PUBLIC_ENABLED))));
+            capability.setFilesSharingPublicPasswordEnforced(CapabilityBooleanType.fromValue(c.getInt(c
+                    .getColumnIndex(ProviderTableMeta.CAPABILITIES_SHARING_PUBLIC_PASSWORD_ENFORCED))));
+            capability.setFilesSharingPublicExpireDateEnabled(CapabilityBooleanType.fromValue(c.getInt(c
+                    .getColumnIndex(ProviderTableMeta.CAPABILITIES_SHARING_PUBLIC_EXPIRE_DATE_ENABLED))));
+            capability.setFilesSharingPublicExpireDateDays(c.getInt(c
+                    .getColumnIndex(ProviderTableMeta.CAPABILITIES_SHARING_PUBLIC_EXPIRE_DATE_DAYS)));
+            capability.setFilesSharingPublicExpireDateEnforced(CapabilityBooleanType.fromValue(c.getInt(c
+                    .getColumnIndex(ProviderTableMeta.CAPABILITIES_SHARING_PUBLIC_EXPIRE_DATE_ENFORCED))));
+            capability.setFilesSharingPublicSendMail(CapabilityBooleanType.fromValue(c.getInt(c
+                    .getColumnIndex(ProviderTableMeta.CAPABILITIES_SHARING_PUBLIC_SEND_MAIL))));
+            capability.setFilesSharingPublicUpload(CapabilityBooleanType.fromValue(c.getInt(c
+                    .getColumnIndex(ProviderTableMeta.CAPABILITIES_SHARING_PUBLIC_UPLOAD))));
+            capability.setFilesSharingUserSendMail(CapabilityBooleanType.fromValue(c.getInt(c
+                    .getColumnIndex(ProviderTableMeta.CAPABILITIES_SHARING_USER_SEND_MAIL))));
+            capability.setFilesSharingResharing(CapabilityBooleanType.fromValue(c.getInt(c
+                    .getColumnIndex(ProviderTableMeta.CAPABILITIES_SHARING_RESHARING))));
+            capability.setFilesSharingFederationOutgoing(CapabilityBooleanType.fromValue(c.getInt(c
+                    .getColumnIndex(ProviderTableMeta.CAPABILITIES_SHARING_FEDERATION_OUTGOING))));
+            capability.setFilesSharingFederationIncoming(CapabilityBooleanType.fromValue(c.getInt(c
+                    .getColumnIndex(ProviderTableMeta.CAPABILITIES_SHARING_FEDERATION_INCOMING))));
+            capability.setFilesBigFileChuncking(CapabilityBooleanType.fromValue(c.getInt(c
+                    .getColumnIndex(ProviderTableMeta.CAPABILITIES_FILES_BIGFILECHUNKING))));
+            capability.setFilesUndelete(CapabilityBooleanType.fromValue(c.getInt(c
+                    .getColumnIndex(ProviderTableMeta.CAPABILITIES_FILES_UNDELETE))));
+            capability.setFilesVersioning(CapabilityBooleanType.fromValue(c.getInt(c
+                    .getColumnIndex(ProviderTableMeta.CAPABILITIES_FILES_VERSIONING))));
+
+        }
+        return capability;
+    }
 }
index 4baf1ea..2b9bd5e 100644 (file)
@@ -1,6 +1,8 @@
 /**
  *   ownCloud Android client application
  *
+ *   @author Bartek Przybylski
+ *   @author David A. Velasco
  *   Copyright (C) 2012  Bartek Przybylski
  *   Copyright (C) 2015 ownCloud Inc.
  *
@@ -20,6 +22,8 @@
 
 package com.owncloud.android.datamodel;
 
+import android.content.ContentResolver;
+import android.net.Uri;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.webkit.MimeTypeMap;
@@ -43,6 +47,8 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
         }
     };
 
+    private final static String PERMISSION_SHARED_WITH_ME = "S";    // TODO move to better location
+
     public static final String PATH_SEPARATOR = "/";
     public static final String ROOT_PATH = PATH_SEPARATOR;
 
@@ -74,6 +80,16 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
 
     private boolean mIsDownloading;
 
+    private String mEtagInConflict;    // Save file etag in the server, when there is a conflict. No conflict =  null
+
+    private boolean mShareWithSharee;
+
+    /**
+     * URI to the local path of the file contents, if stored in the device; cached after first call
+     * to {@link #getStorageUri()}
+     */
+    private Uri mLocalUri;
+
 
     /**
      * Create new {@link OCFile} with given path.
@@ -115,8 +131,10 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
         mPublicLink = source.readString();
         mPermissions = source.readString();
         mRemoteId = source.readString();
-        mNeedsUpdateThumbnail = source.readInt() == 0;
-        mIsDownloading = source.readInt() == 0;
+        mNeedsUpdateThumbnail = source.readInt() == 1;
+        mIsDownloading = source.readInt() == 1;
+        mEtagInConflict = source.readString();
+        mShareWithSharee = source.readInt() == 1;
 
     }
 
@@ -142,6 +160,8 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
         dest.writeString(mRemoteId);
         dest.writeInt(mNeedsUpdateThumbnail ? 1 : 0);
         dest.writeInt(mIsDownloading ? 1 : 0);
+        dest.writeString(mEtagInConflict);
+        dest.writeInt(mShareWithSharee ? 1 : 0);
     }
 
     /**
@@ -204,12 +224,31 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
     }
 
     /**
+     * The URI to the file contents, if stored locally
+     *
+     * @return A URI to the local copy of the file, or NULL if not stored in the device
+     */
+    public Uri getStorageUri() {
+        if (mLocalPath == null || mLocalPath.length() == 0) {
+            return null;
+        }
+        if (mLocalUri == null) {
+            Uri.Builder builder = new Uri.Builder();
+            builder.scheme(ContentResolver.SCHEME_FILE);
+            builder.path(mLocalPath);
+            mLocalUri = builder.build();
+        }
+        return mLocalUri;
+    }
+
+    /**
      * Can be used to set the path where the file is stored
      *
      * @param storage_path to set
      */
     public void setStoragePath(String storage_path) {
         mLocalPath = storage_path;
+        mLocalUri = null;
     }
 
     /**
@@ -316,24 +355,6 @@ 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
-     */
-    public void addFile(OCFile file) throws IllegalStateException {
-        if (isFolder()) {
-            file.mParentId = mId;
-            mNeedsUpdating = true;
-            return;
-        }
-        throw new IllegalStateException(
-                "This is not a directory where you can add stuff to!");
-    }
-
-    /**
      * Used internally. Reset all file properties
      */
     private void resetData() {
@@ -357,6 +378,8 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
         mRemoteId = null;
         mNeedsUpdateThumbnail = false;
         mIsDownloading = false;
+        mEtagInConflict = null;
+        mShareWithSharee = false;
     }
 
     /**
@@ -498,15 +521,15 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
     }
 
     public void setEtag(String etag) {
-        this.mEtag = etag;
+        this.mEtag = (etag != null ? etag : "");
     }
 
 
-    public boolean isShareByLink() {
+    public boolean isSharedViaLink() {
         return mShareByLink;
     }
 
-    public void setShareByLink(boolean shareByLink) {
+    public void setShareViaLink(boolean shareByLink) {
         this.mShareByLink = shareByLink;
     }
 
@@ -598,8 +621,24 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
         this.mIsDownloading = isDownloading;
     }
 
-    public boolean isSynchronizing() {
-        // TODO real implementation
-        return false;
+    public String getEtagInConflict() {
+        return mEtagInConflict;
+    }
+
+    public void setEtagInConflict(String etagInConflict) {
+        mEtagInConflict = etagInConflict;
+    }
+
+    public boolean isSharedWithSharee() {
+        return mShareWithSharee;
+    }
+
+    public void setShareWithSharee(boolean shareWithSharee) {
+        this.mShareWithSharee = shareWithSharee;
+    }
+
+    public boolean isSharedWithMe() {
+        String permissions = getPermissions();
+        return (permissions != null && permissions.contains(PERMISSION_SHARED_WITH_ME));
     }
 }
index f0ecf76..4ad7317 100644 (file)
@@ -278,12 +278,13 @@ public class ThumbnailsCacheManager {
                     OwnCloudVersion serverOCVersion = AccountUtils.getServerVersion(mAccount);
                     if (mClient != null && serverOCVersion != null) {
                         if (serverOCVersion.supportsRemoteThumbnails()) {
+                            GetMethod get = null;
                             try {
                                 String uri = mClient.getBaseUri() + "" +
                                         "/index.php/apps/files/api/v1/thumbnail/" +
                                         px + "/" + px + Uri.encode(file.getRemotePath(), "/");
                                 Log_OC.d("Thumbnail", "URI: " + uri);
-                                GetMethod get = new GetMethod(uri);
+                                get = new GetMethod(uri);
                                 int status = mClient.executeMethod(get);
                                 if (status == HttpStatus.SC_OK) {
                                     InputStream inputStream = get.getResponseBodyAsStream();
@@ -299,9 +300,15 @@ public class ThumbnailsCacheManager {
                                     if (thumbnail != null) {
                                         addBitmapToCache(imageKey, thumbnail);
                                     }
+                                } else {
+                                    mClient.exhaustResponse(get.getResponseBodyAsStream());
                                 }
                             } catch (Exception e) {
                                 e.printStackTrace();
+                            } finally {
+                                if (get != null) {
+                                    get.releaseConnection();
+                                }
                             }
                         } else {
                             Log_OC.d(TAG, "Server too old");
index 25e8fbd..1c67433 100644 (file)
@@ -31,7 +31,7 @@ import com.owncloud.android.MainApp;
 public class ProviderMeta {\r
 \r
     public static final String DB_NAME = "filelist";\r
-    public static final int DB_VERSION = 10;\r
+    public static final int DB_VERSION = 13;\r
 \r
     private ProviderMeta() {\r
     }\r
@@ -39,6 +39,7 @@ public class ProviderMeta {
     static public class ProviderTableMeta implements BaseColumns {\r
         public static final String FILE_TABLE_NAME = "filelist";\r
         public static final String OCSHARES_TABLE_NAME = "ocshares";\r
+        public static final String CAPABILITIES_TABLE_NAME = "capabilities";\r
         public static final Uri CONTENT_URI = Uri.parse("content://"\r
                 + MainApp.getAuthority() + "/");\r
         public static final Uri CONTENT_URI_FILE = Uri.parse("content://"\r
@@ -47,6 +48,8 @@ public class ProviderMeta {
                 + MainApp.getAuthority() + "/dir");\r
         public static final Uri CONTENT_URI_SHARE = Uri.parse("content://"\r
                 + MainApp.getAuthority() + "/shares");\r
+        public static final Uri CONTENT_URI_CAPABILITIES = Uri.parse("content://"\r
+                + MainApp.getAuthority() + "/capabilities");\r
 \r
         public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.owncloud.file";\r
         public static final String CONTENT_TYPE_ITEM = "vnd.android.cursor.item/vnd.owncloud.file";\r
@@ -62,16 +65,18 @@ public class ProviderMeta {
         public static final String FILE_STORAGE_PATH = "media_path";\r
         public static final String FILE_PATH = "path";\r
         public static final String FILE_ACCOUNT_OWNER = "file_owner";\r
-        public static final String FILE_LAST_SYNC_DATE = "last_sync_date";  // _for_properties, but let's keep it as it is\r
+        public static final String FILE_LAST_SYNC_DATE = "last_sync_date";// _for_properties, but let's keep it as it is\r
         public static final String FILE_LAST_SYNC_DATE_FOR_DATA = "last_sync_date_for_data";\r
         public static final String FILE_KEEP_IN_SYNC = "keep_in_sync";\r
         public static final String FILE_ETAG = "etag";\r
-        public static final String FILE_SHARE_BY_LINK = "share_by_link";\r
+        public static final String FILE_SHARED_VIA_LINK = "share_by_link";\r
+        public static final String FILE_SHARED_WITH_SHAREE = "shared_via_users";\r
         public static final String FILE_PUBLIC_LINK = "public_link";\r
         public static final String FILE_PERMISSIONS = "permissions";\r
         public static final String FILE_REMOTE_ID = "remote_id";\r
         public static final String FILE_UPDATE_THUMBNAIL = "update_thumbnail";\r
         public static final String FILE_IS_DOWNLOADING= "is_downloading";\r
+        public static final String FILE_ETAG_IN_CONFLICT = "etag_in_conflict";\r
 \r
         public static final String FILE_DEFAULT_SORT_ORDER = FILE_NAME\r
                 + " collate nocase asc";\r
@@ -94,7 +99,35 @@ public class ProviderMeta {
         \r
         public static final String OCSHARES_DEFAULT_SORT_ORDER = OCSHARES_FILE_SOURCE \r
                 + " collate nocase asc";\r
-        \r
 \r
+        // Columns of capabilities table\r
+        public static final String CAPABILITIES_ACCOUNT_NAME = "account";\r
+        public static final String CAPABILITIES_VERSION_MAYOR = "version_mayor";\r
+        public static final String CAPABILITIES_VERSION_MINOR = "version_minor";\r
+        public static final String CAPABILITIES_VERSION_MICRO = "version_micro";\r
+        public static final String CAPABILITIES_VERSION_STRING = "version_string";\r
+        public static final String CAPABILITIES_VERSION_EDITION = "version_edition";\r
+        public static final String CAPABILITIES_CORE_POLLINTERVAL = "core_pollinterval";\r
+        public static final String CAPABILITIES_SHARING_API_ENABLED = "sharing_api_enabled";\r
+        public static final String CAPABILITIES_SHARING_PUBLIC_ENABLED = "sharing_public_enabled";\r
+        public static final String CAPABILITIES_SHARING_PUBLIC_PASSWORD_ENFORCED = "sharing_public_password_enforced";\r
+        public static final String CAPABILITIES_SHARING_PUBLIC_EXPIRE_DATE_ENABLED =\r
+                "sharing_public_expire_date_enabled";\r
+        public static final String CAPABILITIES_SHARING_PUBLIC_EXPIRE_DATE_DAYS =\r
+                "sharing_public_expire_date_days";\r
+        public static final String CAPABILITIES_SHARING_PUBLIC_EXPIRE_DATE_ENFORCED =\r
+                "sharing_public_expire_date_enforced";\r
+        public static final String CAPABILITIES_SHARING_PUBLIC_SEND_MAIL = "sharing_public_send_mail";\r
+        public static final String CAPABILITIES_SHARING_PUBLIC_UPLOAD = "sharing_public_upload";\r
+        public static final String CAPABILITIES_SHARING_USER_SEND_MAIL = "sharing_user_send_mail";\r
+        public static final String CAPABILITIES_SHARING_RESHARING = "sharing_resharing";\r
+        public static final String CAPABILITIES_SHARING_FEDERATION_OUTGOING = "sharing_federation_outgoing";\r
+        public static final String CAPABILITIES_SHARING_FEDERATION_INCOMING = "sharing_federation_incoming";\r
+        public static final String CAPABILITIES_FILES_BIGFILECHUNKING = "files_bigfilechunking";\r
+        public static final String CAPABILITIES_FILES_UNDELETE = "files_undelete";\r
+        public static final String CAPABILITIES_FILES_VERSIONING = "files_versioning";\r
+\r
+        public static final String CAPABILITIES_DEFAULT_SORT_ORDER = CAPABILITIES_ACCOUNT_NAME\r
+                + " collate nocase asc";\r
     }\r
 }\r
index f7fee62..e562af0 100644 (file)
@@ -29,12 +29,14 @@ import android.view.Menu;
 import android.view.MenuItem;
 
 import com.owncloud.android.R;
+import com.owncloud.android.authentication.AccountUtils;
 import com.owncloud.android.datamodel.OCFile;
 import com.owncloud.android.files.services.FileDownloader;
 import com.owncloud.android.files.services.FileDownloader.FileDownloaderBinder;
 import com.owncloud.android.files.services.FileUploader;
 import com.owncloud.android.files.services.FileUploader.FileUploaderBinder;
-import com.owncloud.android.services.OperationsService;
+import com.owncloud.android.lib.resources.status.CapabilityBooleanType;
+import com.owncloud.android.lib.resources.status.OCCapability;
 import com.owncloud.android.services.OperationsService.OperationsServiceBinder;
 import com.owncloud.android.ui.activity.ComponentsGetter;
 
@@ -58,7 +60,8 @@ public class FileMenuFilter {
      *                          {@link FileUploader} and {@link FileDownloader} services
      * @param context           Android {@link Context}, needed to access build setup resources.
      */
-    public FileMenuFilter(OCFile targetFile, Account account, ComponentsGetter cg, Context context) {
+    public FileMenuFilter(OCFile targetFile, Account account, ComponentsGetter cg,
+                          Context context) {
         mFile = targetFile;
         mAccount = account;
         mComponentsGetter = cg;
@@ -106,21 +109,25 @@ public class FileMenuFilter {
      * @param toHide            List to save the options that must be shown in the menu.
      */
     private void filter(List<Integer> toShow, List <Integer> toHide) {
-        boolean downloading = false;
-        boolean uploading = false;
+        boolean synchronizing = false;
         if (mComponentsGetter != null && mFile != null && mAccount != null) {
-            FileDownloaderBinder downloaderBinder = mComponentsGetter.getFileDownloaderBinder();
-            downloading = (downloaderBinder != null && downloaderBinder.isDownloading(mAccount, mFile));
             OperationsServiceBinder opsBinder = mComponentsGetter.getOperationsServiceBinder();
-            downloading |= (opsBinder != null && opsBinder.isSynchronizing(mAccount, mFile.getRemotePath()));
             FileUploaderBinder uploaderBinder = mComponentsGetter.getFileUploaderBinder();
-            uploading = (uploaderBinder != null && uploaderBinder.isUploading(mAccount, mFile));
+            FileDownloaderBinder downloaderBinder = mComponentsGetter.getFileDownloaderBinder();
+            synchronizing = (
+                // comparing local and remote
+                (opsBinder != null && opsBinder.isSynchronizing(mAccount, mFile.getRemotePath())) ||
+                // downloading
+                (downloaderBinder != null && downloaderBinder.isDownloading(mAccount, mFile)) ||
+                // uploading
+                (uploaderBinder != null && uploaderBinder.isUploading(mAccount, mFile))
+            );
         }
 
         /// decision is taken for each possible action on a file in the menu
 
         // DOWNLOAD 
-        if (mFile == null || mFile.isDown() || downloading || uploading) {
+        if (mFile == null || mFile.isDown() || mFile.isFolder() || synchronizing) {
             toHide.add(R.id.action_download_file);
 
         } else {
@@ -128,7 +135,7 @@ public class FileMenuFilter {
         }
 
         // RENAME
-        if (mFile == null || downloading || uploading) {
+        if (mFile == null || synchronizing) {
             toHide.add(R.id.action_rename_file);
 
         } else {
@@ -136,7 +143,7 @@ public class FileMenuFilter {
         }
 
         // MOVE & COPY
-        if (mFile == null || downloading || uploading) {
+        if (mFile == null || synchronizing) {
             toHide.add(R.id.action_move);
             toHide.add(R.id.action_copy);
         } else {
@@ -145,7 +152,7 @@ public class FileMenuFilter {
         }
 
         // REMOVE
-        if (mFile == null || downloading || uploading) {
+        if (mFile == null || synchronizing) {
             toHide.add(R.id.action_remove_file);
 
         } else {
@@ -153,53 +160,43 @@ public class FileMenuFilter {
         }
 
         // OPEN WITH (different to preview!)
-        if (mFile == null || mFile.isFolder() || !mFile.isDown() || downloading || uploading) {
+        if (mFile == null || mFile.isFolder() || !mFile.isDown() || synchronizing) {
             toHide.add(R.id.action_open_file_with);
 
         } else {
             toShow.add(R.id.action_open_file_with);
         }
 
+        // CANCEL SYNCHRONIZATION
+        if (mFile == null || !synchronizing) {
+            toHide.add(R.id.action_cancel_sync);
 
-        // CANCEL DOWNLOAD
-        if (mFile == null || !downloading) {
-            toHide.add(R.id.action_cancel_download);
-        } else {
-            toShow.add(R.id.action_cancel_download);
-        }
-
-        // CANCEL UPLOAD
-        if (mFile == null || !uploading || mFile.isFolder()) {
-            toHide.add(R.id.action_cancel_upload);
         } else {
-            toShow.add(R.id.action_cancel_upload);
+            toShow.add(R.id.action_cancel_sync);
         }
 
-        // SYNC FILE CONTENTS
-        if (mFile == null || mFile.isFolder() || !mFile.isDown() || downloading || uploading) {
+        // SYNC CONTENTS (BOTH FILE AND FOLDER)
+        if (mFile == null || (!mFile.isFolder() && !mFile.isDown()) || synchronizing) {
             toHide.add(R.id.action_sync_file);
+
         } else {
             toShow.add(R.id.action_sync_file);
         }
 
-        // SHARE FILE 
-        // TODO add check on SHARE available on server side?
+        // SHARE FILE
         boolean shareAllowed = (mContext != null  &&
                 mContext.getString(R.string.share_feature).equalsIgnoreCase("on"));
-        if (!shareAllowed || mFile == null) {
+        OCCapability capability = mComponentsGetter.getStorageManager().getCapability(mAccount.name);
+        boolean shareApiEnabled  = capability != null &&
+                (capability.getFilesSharingApiEnabled().isTrue() ||
+                        capability.getFilesSharingApiEnabled().isUnknown()
+                );
+        if (!shareAllowed ||  mFile == null || !shareApiEnabled) {
             toHide.add(R.id.action_share_file);
         } else {
             toShow.add(R.id.action_share_file);
         }
 
-        // UNSHARE FILE  
-        // TODO add check on SHARE available on server side?
-        if ( !shareAllowed || (mFile == null || !mFile.isShareByLink())) {
-            toHide.add(R.id.action_unshare_file);
-        } else {
-            toShow.add(R.id.action_unshare_file);
-        }
-
         // SEE DETAILS
         if (mFile == null || mFile.isFolder()) {
             toHide.add(R.id.action_see_details);
@@ -210,21 +207,21 @@ public class FileMenuFilter {
         // SEND
         boolean sendAllowed = (mContext != null &&
                 mContext.getString(R.string.send_files_to_other_apps).equalsIgnoreCase("on"));
-        if (mFile == null || !sendAllowed || mFile.isFolder() || uploading || downloading) {
+        if (mFile == null || !sendAllowed || mFile.isFolder() || synchronizing) {
             toHide.add(R.id.action_send_file);
         } else {
             toShow.add(R.id.action_send_file);
         }
 
         // FAVORITES
-        if (mFile == null || downloading || uploading || mFile.isFolder() || mFile.isFavorite()) {
+        if (mFile == null || synchronizing || mFile.isFolder() || mFile.isFavorite()) {
             toHide.add(R.id.action_favorite_file);
         } else {
             toShow.add(R.id.action_favorite_file);
         }
 
         // UNFAVORITES
-        if (mFile == null || downloading || uploading || mFile.isFolder() || !mFile.isFavorite()) {
+        if (mFile == null || synchronizing || mFile.isFolder() || !mFile.isFavorite()) {
             toHide.add(R.id.action_unfavorite_file);
         } else {
             toShow.add(R.id.action_unfavorite_file);
index 2237028..5ce6cc3 100644 (file)
 package com.owncloud.android.files;
 
 import android.accounts.Account;
+import android.content.ActivityNotFoundException;
+import android.content.Context;
 import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
 import android.net.Uri;
 import android.support.v4.app.DialogFragment;
 import android.webkit.MimeTypeMap;
@@ -35,13 +39,17 @@ import com.owncloud.android.files.services.FileDownloader.FileDownloaderBinder;
 import com.owncloud.android.files.services.FileUploader.FileUploaderBinder;
 import com.owncloud.android.lib.common.network.WebdavUtils;
 import com.owncloud.android.lib.common.utils.Log_OC;
+import com.owncloud.android.lib.resources.shares.ShareType;
 import com.owncloud.android.lib.resources.status.OwnCloudVersion;
 import com.owncloud.android.services.OperationsService;
 import com.owncloud.android.services.observer.FileObserverService;
 import com.owncloud.android.ui.activity.FileActivity;
+import com.owncloud.android.ui.activity.ShareActivity;
 import com.owncloud.android.ui.dialog.ShareLinkToDialog;
+import com.owncloud.android.ui.dialog.SharePasswordDialogFragment;
 
-import org.apache.http.protocol.HTTP;
+
+import java.util.List;
 
 /**
  *
@@ -68,7 +76,8 @@ public class FileOperationsHelper {
             String encodedStoragePath = WebdavUtils.encodePath(storagePath);
 
             Intent intentForSavedMimeType = new Intent(Intent.ACTION_VIEW);
-            intentForSavedMimeType.setDataAndType(Uri.parse("file://"+ encodedStoragePath), file.getMimetype());
+            intentForSavedMimeType.setDataAndType(Uri.parse("file://"+ encodedStoragePath),
+                    file.getMimetype());
             intentForSavedMimeType.setFlags(
                     Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION
             );
@@ -80,62 +89,130 @@ public class FileOperationsHelper {
                 );
                 if (guessedMimeType != null && !guessedMimeType.equals(file.getMimetype())) {
                     intentForGuessedMimeType = new Intent(Intent.ACTION_VIEW);
-                    intentForGuessedMimeType.setDataAndType(Uri.parse("file://"+ encodedStoragePath), guessedMimeType);
+                    intentForGuessedMimeType.
+                            setDataAndType(Uri.parse("file://"+ encodedStoragePath),
+                                    guessedMimeType);
                     intentForGuessedMimeType.setFlags(
-                            Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION
+                            Intent.FLAG_GRANT_READ_URI_PERMISSION |
+                                    Intent.FLAG_GRANT_WRITE_URI_PERMISSION
                     );
                 }
             }
-            
-            Intent chooserIntent;
+
+            Intent openFileWithIntent;
             if (intentForGuessedMimeType != null) {
-                chooserIntent = Intent.createChooser(intentForGuessedMimeType, mFileActivity.getString(R.string.actionbar_open_with));
+                openFileWithIntent = intentForGuessedMimeType;
             } else {
-                chooserIntent = Intent.createChooser(intentForSavedMimeType, mFileActivity.getString(R.string.actionbar_open_with));
+                openFileWithIntent = intentForSavedMimeType;
             }
 
-            mFileActivity.startActivity(chooserIntent);
+            List<ResolveInfo> launchables = mFileActivity.getPackageManager().
+                    queryIntentActivities(openFileWithIntent, PackageManager.GET_INTENT_FILTERS);
+
+            if(launchables != null && launchables.size() > 0) {
+                try {
+                    mFileActivity.startActivity(
+                            Intent.createChooser(
+                                    openFileWithIntent, mFileActivity.getString(R.string.actionbar_open_with)
+                            )
+                    );
+                } catch (ActivityNotFoundException anfe) {
+                    showNoAppForFileTypeToast(mFileActivity.getApplicationContext());
+                }
+            } else {
+                showNoAppForFileTypeToast(mFileActivity.getApplicationContext());
+            }
 
         } else {
             Log_OC.wtf(TAG, "Trying to open a NULL OCFile");
         }
     }
 
+    /**
+     * Displays a toast stating that no application could be found to open the file.
+     *
+     * @param context the context to be able to show a toast.
+     */
+    private void showNoAppForFileTypeToast(Context context) {
+        Toast.makeText(context,
+                R.string.file_list_no_app_for_file_type, Toast.LENGTH_SHORT)
+                .show();
+    }
 
-    public void shareFileWithLink(OCFile file) {
 
+    /**
+     * Helper method to share a file via a public link. Starts a request to do it in {@link OperationsService}
+     *
+     * @param file          The file to share.
+     * @param password      Optional password to protect the public share.
+     */
+    public void shareFileViaLink(OCFile file, String password) {
         if (isSharedSupported()) {
             if (file != null) {
-                String link = "https://fake.url";
-                Intent intent = createShareWithLinkIntent(link);
-                String[] packagesToExclude = new String[]{mFileActivity.getPackageName()};
-                DialogFragment chooserDialog = ShareLinkToDialog.newInstance(intent, packagesToExclude, file);
-                chooserDialog.show(mFileActivity.getSupportFragmentManager(), FTAG_CHOOSER_DIALOG);
+                mFileActivity.showLoadingDialog(
+                        mFileActivity.getApplicationContext().
+                                getString(R.string.wait_a_moment)
+                );
+                Intent service = new Intent(mFileActivity, OperationsService.class);
+                service.setAction(OperationsService.ACTION_CREATE_SHARE_VIA_LINK);
+                service.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
+                if (password != null && password.length() > 0) {
+                    service.putExtra(OperationsService.EXTRA_SHARE_PASSWORD, password);
+                }
+                service.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath());
+                mWaitingForOpId = mFileActivity.getOperationsServiceBinder().queueNewOperation(service);
 
             } else {
                 Log_OC.wtf(TAG, "Trying to share a NULL OCFile");
+                // TODO user-level error?
             }
 
         } else {
             // Show a Message
             Toast t = Toast.makeText(
-                    mFileActivity, mFileActivity.getString(R.string.share_link_no_support_share_api), Toast.LENGTH_LONG
+                    mFileActivity, mFileActivity.getString(R.string.share_link_no_support_share_api),
+                    Toast.LENGTH_LONG
             );
             t.show();
         }
     }
 
+    public void getFileWithLink(OCFile file){
+        if (isSharedSupported()) {
+            if (file != null) {
+                mFileActivity.showLoadingDialog(mFileActivity.getApplicationContext().
+                        getString(R.string.wait_a_moment));
+
+                Intent service = new Intent(mFileActivity, OperationsService.class);
+                service.setAction(OperationsService.ACTION_CREATE_SHARE_VIA_LINK);
+                service.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
+                service.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath());
+                mWaitingForOpId = mFileActivity.getOperationsServiceBinder().queueNewOperation(service);
+
+            } else {
+                Log_OC.wtf(TAG, "Trying to share a NULL OCFile");
+            }
+        } else {
+            // Show a Message
+            Toast t = Toast.makeText(
+                    mFileActivity, mFileActivity.getString(R.string.share_link_no_support_share_api),
+                    Toast.LENGTH_LONG
+            );
+            t.show();
+        }
+    }
 
     public void shareFileWithLinkToApp(OCFile file, String password, Intent sendIntent) {
         
         if (file != null) {
-            mFileActivity.showLoadingDialog();
+            mFileActivity.showLoadingDialog(mFileActivity.getApplicationContext().
+                    getString(R.string.wait_a_moment));
 
             Intent service = new Intent(mFileActivity, OperationsService.class);
-            service.setAction(OperationsService.ACTION_CREATE_SHARE);
+            service.setAction(OperationsService.ACTION_CREATE_SHARE_VIA_LINK);
             service.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
             service.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath());
-            service.putExtra(OperationsService.EXTRA_PASSWORD_SHARE, password);
+            service.putExtra(OperationsService.EXTRA_SHARE_PASSWORD, password);
             service.putExtra(OperationsService.EXTRA_SEND_INTENT, sendIntent);
             mWaitingForOpId = mFileActivity.getOperationsServiceBinder().queueNewOperation(service);
             
@@ -144,12 +221,30 @@ public class FileOperationsHelper {
         }
     }
 
+    /**
+     * Helper method to share a file with a known sharee. Starts a request to do it in {@link OperationsService}
+     *
+     * @param file          The file to share.
+     * @param shareeName    Name (user name or group name) of the target sharee.
+     * @param shareType     The share type determines the sharee type.
+     */
+    public void shareFileWithSharee(OCFile file, String shareeName, ShareType shareType) {
+        if (file != null) {
+            // TODO check capability?
+            mFileActivity.showLoadingDialog(mFileActivity.getApplicationContext().
+                    getString(R.string.wait_a_moment));
+
+            Intent service = new Intent(mFileActivity, OperationsService.class);
+            service.setAction(OperationsService.ACTION_CREATE_SHARE_WITH_SHAREE);
+            service.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
+            service.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath());
+            service.putExtra(OperationsService.EXTRA_SHARE_WITH, shareeName);
+            service.putExtra(OperationsService.EXTRA_SHARE_TYPE, shareType);
+            mWaitingForOpId = mFileActivity.getOperationsServiceBinder().queueNewOperation(service);
 
-    private Intent createShareWithLinkIntent(String link) {
-        Intent intentToShareLink = new Intent(Intent.ACTION_SEND);
-        intentToShareLink.putExtra(Intent.EXTRA_TEXT, link);
-        intentToShareLink.setType(HTTP.PLAIN_TEXT_TYPE);
-        return intentToShareLink;
+        } else {
+            Log_OC.wtf(TAG, "Trying to share a NULL OCFile");
+        }
     }
 
 
@@ -165,26 +260,144 @@ public class FileOperationsHelper {
     }
 
 
-    public void unshareFileWithLink(OCFile file) {
+    /**
+     * Helper method to unshare a file publicly shared via link.
+     * Starts a request to do it in {@link OperationsService}
+     *
+     * @param file      The file to unshare.
+     */
+    public void unshareFileViaLink(OCFile file) {
+
+        // Unshare the file: Create the intent
+        Intent unshareService = new Intent(mFileActivity, OperationsService.class);
+        unshareService.setAction(OperationsService.ACTION_UNSHARE);
+        unshareService.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
+        unshareService.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath());
+        unshareService.putExtra(OperationsService.EXTRA_SHARE_TYPE, ShareType.PUBLIC_LINK);
+        unshareService.putExtra(OperationsService.EXTRA_SHARE_WITH, "");
+
+        queueShareIntent(unshareService);
+    }
+
+    public void unshareFileWithUserOrGroup(OCFile file, ShareType shareType, String userOrGroup){
+
+        // Unshare the file: Create the intent
+        Intent unshareService = new Intent(mFileActivity, OperationsService.class);
+        unshareService.setAction(OperationsService.ACTION_UNSHARE);
+        unshareService.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
+        unshareService.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath());
+        unshareService.putExtra(OperationsService.EXTRA_SHARE_TYPE, shareType);
+        unshareService.putExtra(OperationsService.EXTRA_SHARE_WITH, userOrGroup);
+
+        queueShareIntent(unshareService);
+    }
+
 
+    private void queueShareIntent(Intent shareIntent){
         if (isSharedSupported()) {
             // Unshare the file
-            Intent service = new Intent(mFileActivity, OperationsService.class);
-            service.setAction(OperationsService.ACTION_UNSHARE);
-            service.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
-            service.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath());
-            mWaitingForOpId = mFileActivity.getOperationsServiceBinder().queueNewOperation(service);
-            
-            mFileActivity.showLoadingDialog();
+            mWaitingForOpId = mFileActivity.getOperationsServiceBinder().
+                    queueNewOperation(shareIntent);
+
+            mFileActivity.showLoadingDialog(mFileActivity.getApplicationContext().
+                    getString(R.string.wait_a_moment));
 
         } else {
             // Show a Message
-            Toast t = Toast.makeText(mFileActivity, mFileActivity.getString(R.string.share_link_no_support_share_api), Toast.LENGTH_LONG);
+            Toast t = Toast.makeText(mFileActivity,
+                    mFileActivity.getString(R.string.share_link_no_support_share_api),
+                    Toast.LENGTH_LONG);
             t.show();
 
         }
     }
 
+    /**
+     * Show an instance of {@link ShareType} for sharing or unsharing the {@OCFile} received as parameter.
+     *
+     * @param file  File to share or unshare.
+     */
+    public void showShareFile(OCFile file){
+        Intent intent = new Intent(mFileActivity, ShareActivity.class);
+        intent.putExtra(mFileActivity.EXTRA_FILE, file);
+        intent.putExtra(mFileActivity.EXTRA_ACCOUNT, mFileActivity.getAccount());
+        mFileActivity.startActivity(intent);
+
+    }
+
+
+    /**
+     * Starts a dialog that requests a password to the user to protect a share link.
+     *
+     * @param   file            File which public share will be protected by the requested password
+     * @param   createShare     When 'true', the request for password will be followed by the creation of a new
+     *                          public link; when 'false', a public share is assumed to exist, and the password
+     *                          is bound to it.
+     */
+    public void requestPasswordForShareViaLink(OCFile file, boolean createShare) {
+        SharePasswordDialogFragment dialog =
+                SharePasswordDialogFragment.newInstance(file, createShare);
+        dialog.show(
+                mFileActivity.getSupportFragmentManager(),
+                SharePasswordDialogFragment.PASSWORD_FRAGMENT
+        );
+    }
+
+    /**
+     * Updates a public share on a file to set its password.
+     * Starts a request to do it in {@link OperationsService}
+     *
+     * @param file          File which public share will be protected with a password.
+     * @param password      Password to set for the public link; null or empty string to clear
+     *                      the current password
+     */
+    public void setPasswordToShareViaLink(OCFile file, String password) {
+        // Set password updating share
+        Intent updateShareIntent = new Intent(mFileActivity, OperationsService.class);
+        updateShareIntent.setAction(OperationsService.ACTION_UPDATE_SHARE);
+        updateShareIntent.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
+        updateShareIntent.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath());
+        updateShareIntent.putExtra(
+                OperationsService.EXTRA_SHARE_PASSWORD,
+                (password == null) ? "" : password
+        );
+
+        queueShareIntent(updateShareIntent);
+    }
+
+
+    /**
+     * Updates a public share on a file to set its expiration date.
+     * Starts a request to do it in {@link OperationsService}
+     *
+     * @param file                      File which public share will be constrained with an expiration date.
+     * @param expirationTimeInMillis    Expiration date to set. A negative value clears the current expiration
+     *                                  date, leaving the link unrestricted. Zero makes no change.
+     */
+    public void setExpirationDateToShareViaLink(OCFile file, long expirationTimeInMillis) {
+        Intent updateShareIntent = new Intent(mFileActivity, OperationsService.class);
+        updateShareIntent.setAction(OperationsService.ACTION_UPDATE_SHARE);
+        updateShareIntent.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
+        updateShareIntent.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath());
+        updateShareIntent.putExtra(
+                OperationsService.EXTRA_SHARE_EXPIRATION_DATE_IN_MILLIS,
+                expirationTimeInMillis
+        );
+        queueShareIntent(updateShareIntent);
+    }
+
+
+    /**
+     * @return 'True' if the server supports the Search Users API
+     */
+    public boolean isSearchUsersSupportedSupported() {
+        if (mFileActivity.getAccount() != null) {
+            OwnCloudVersion serverVersion = AccountUtils.getServerVersion(mFileActivity.getAccount());
+            return (serverVersion != null && serverVersion.isSearchUsersSupported());
+        }
+        return false;
+    }
+
     public void sendDownloadedFile(OCFile file) {
         if (file != null) {
             String storagePath = file.getStoragePath();
@@ -197,7 +410,7 @@ public class FileOperationsHelper {
 
             // Show dialog, without the own app
             String[] packagesToExclude = new String[]{mFileActivity.getPackageName()};
-            DialogFragment chooserDialog = ShareLinkToDialog.newInstance(sendIntent, packagesToExclude, file);
+            DialogFragment chooserDialog = ShareLinkToDialog.newInstance(sendIntent, packagesToExclude);
             chooserDialog.show(mFileActivity.getSupportFragmentManager(), FTAG_CHOOSER_DIALOG);
 
         } else {
@@ -205,9 +418,12 @@ public class FileOperationsHelper {
         }
     }
 
-
+    /**
+     * Request the synchronization of a file or folder with the OC server, including its contents.
+     *
+     * @param file          The file or folder to synchronize
+     */
     public void syncFile(OCFile file) {
-
         if (!file.isFolder()){
             Intent intent = new Intent(mFileActivity, OperationsService.class);
             intent.setAction(OperationsService.ACTION_SYNC_FILE);
@@ -215,7 +431,8 @@ public class FileOperationsHelper {
             intent.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath());
             intent.putExtra(OperationsService.EXTRA_SYNC_FILE_CONTENTS, true);
             mWaitingForOpId = mFileActivity.getOperationsServiceBinder().queueNewOperation(intent);
-            mFileActivity.showLoadingDialog();
+            mFileActivity.showLoadingDialog(mFileActivity.getApplicationContext().
+                    getString(R.string.wait_a_moment));
             
         } else {
             Intent intent = new Intent(mFileActivity, OperationsService.class);
@@ -223,6 +440,7 @@ public class FileOperationsHelper {
             intent.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
             intent.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath());
             mFileActivity.startService(intent);
+
         }
     }
 
@@ -253,7 +471,8 @@ public class FileOperationsHelper {
         service.putExtra(OperationsService.EXTRA_NEWNAME, newFilename);
         mWaitingForOpId = mFileActivity.getOperationsServiceBinder().queueNewOperation(service);
         
-        mFileActivity.showLoadingDialog();
+        mFileActivity.showLoadingDialog(mFileActivity.getApplicationContext().
+                getString(R.string.wait_a_moment));
     }
 
 
@@ -266,7 +485,8 @@ public class FileOperationsHelper {
         service.putExtra(OperationsService.EXTRA_REMOVE_ONLY_LOCAL, onlyLocalCopy);
         mWaitingForOpId =  mFileActivity.getOperationsServiceBinder().queueNewOperation(service);
         
-        mFileActivity.showLoadingDialog();
+        mFileActivity.showLoadingDialog(mFileActivity.getApplicationContext().
+                getString(R.string.wait_a_moment));
     }
 
 
@@ -279,7 +499,8 @@ public class FileOperationsHelper {
         service.putExtra(OperationsService.EXTRA_CREATE_FULL_PATH, createFullPath);
         mWaitingForOpId =  mFileActivity.getOperationsServiceBinder().queueNewOperation(service);
         
-        mFileActivity.showLoadingDialog();
+        mFileActivity.showLoadingDialog(mFileActivity.getApplicationContext().
+                getString(R.string.wait_a_moment));
     }
 
     /**
@@ -289,7 +510,8 @@ public class FileOperationsHelper {
     public void cancelTransference(OCFile file) {
         Account account = mFileActivity.getAccount();
         if (file.isFolder()) {
-            OperationsService.OperationsServiceBinder opsBinder = mFileActivity.getOperationsServiceBinder();
+            OperationsService.OperationsServiceBinder opsBinder =
+                    mFileActivity.getOperationsServiceBinder();
             if (opsBinder != null) {
                 opsBinder.cancel(account, file);
             }
@@ -297,19 +519,11 @@ public class FileOperationsHelper {
 
         // for both files and folders
         FileDownloaderBinder downloaderBinder = mFileActivity.getFileDownloaderBinder();
-        FileUploaderBinder uploaderBinder = mFileActivity.getFileUploaderBinder();
         if (downloaderBinder != null && downloaderBinder.isDownloading(account, file)) {
             downloaderBinder.cancel(account, file);
-
-            // TODO - review why is this here, and solve in a better way
-            // Remove etag for parent, if file is a favorite
-            if (file.isFavorite()) {
-                OCFile parent = mFileActivity.getStorageManager().getFileById(file.getParentId());
-                parent.setEtag("");
-                mFileActivity.getStorageManager().saveFile(parent);
-            }
-
-        } else if (uploaderBinder != null && uploaderBinder.isUploading(account, file)) {
+        }
+        FileUploaderBinder uploaderBinder = mFileActivity.getFileUploaderBinder();
+        if (uploaderBinder != null && uploaderBinder.isUploading(account, file)) {
             uploaderBinder.cancel(account, file);
         }
     }
@@ -329,7 +543,8 @@ public class FileOperationsHelper {
         service.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
         mWaitingForOpId =  mFileActivity.getOperationsServiceBinder().queueNewOperation(service);
 
-        mFileActivity.showLoadingDialog();
+        mFileActivity.showLoadingDialog(mFileActivity.getApplicationContext().
+                getString(R.string.wait_a_moment));
     }
 
     /**
@@ -347,7 +562,8 @@ public class FileOperationsHelper {
         service.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
         mWaitingForOpId = mFileActivity.getOperationsServiceBinder().queueNewOperation(service);
 
-        mFileActivity.showLoadingDialog();
+        mFileActivity.showLoadingDialog(mFileActivity.getApplicationContext().
+                getString(R.string.wait_a_moment));
     }
 
     public long getOpIdWaitingFor() {
@@ -364,9 +580,11 @@ public class FileOperationsHelper {
      */
     public boolean isVersionWithForbiddenCharacters() {
         if (mFileActivity.getAccount() != null) {
-            OwnCloudVersion serverVersion = AccountUtils.getServerVersion(mFileActivity.getAccount());
+            OwnCloudVersion serverVersion =
+                    AccountUtils.getServerVersion(mFileActivity.getAccount());
             return (serverVersion != null && serverVersion.isVersionWithForbiddenCharacters());
         }
         return false;
     }
+
 }
index f6d3b50..513a639 100644 (file)
 package com.owncloud.android.files.services;
 
 import java.io.File;
-import java.io.IOException;
 import java.util.AbstractList;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Vector;
 
-import com.owncloud.android.MainApp;
 import com.owncloud.android.R;
 import com.owncloud.android.authentication.AccountUtils;
 import com.owncloud.android.authentication.AuthenticatorActivity;
@@ -54,7 +52,6 @@ import com.owncloud.android.utils.ErrorMessageAdapter;
 
 import android.accounts.Account;
 import android.accounts.AccountManager;
-import android.accounts.AccountsException;
 import android.accounts.OnAccountsUpdateListener;
 import android.app.NotificationManager;
 import android.app.PendingIntent;
@@ -153,7 +150,7 @@ public class FileDownloader extends Service
 
     /**
      * Entry point to add one or several files to the queue of downloads.
-     * <p/>
+     *
      * New downloads are added calling to startService(), resulting in a call to this method.
      * This ensures the service will keep on working although the caller activity goes away.
      */
@@ -169,12 +166,6 @@ public class FileDownloader extends Service
         } else {
             final Account account = intent.getParcelableExtra(EXTRA_ACCOUNT);
             final OCFile file = intent.getParcelableExtra(EXTRA_FILE);
-
-            /*Log_OC.v(
-                    "NOW " + TAG + ", thread " + Thread.currentThread().getName(),
-                    "Received request to download file"
-            );*/
-
             AbstractList<String> requestedDownloads = new Vector<String>();
             try {
                 DownloadFileOperation newDownload = new DownloadFileOperation(account, file);
@@ -183,24 +174,11 @@ public class FileDownloader extends Service
                 Pair<String, String> putResult = mPendingDownloads.putIfAbsent(
                         account, file.getRemotePath(), newDownload
                 );
-                String downloadKey = putResult.first;
-                requestedDownloads.add(downloadKey);
-                    /*Log_OC.v(
-                        "NOW " + TAG + ", thread " + Thread.currentThread().getName(),
-                        "Download on " + file.getRemotePath() + " added to queue"
-                    );*/
-
-                // Store file on db with state 'downloading'
-                    /*
-                    TODO - check if helps with UI responsiveness,
-                    letting only folders use FileDownloaderBinder to check
-                    FileDataStorageManager storageManager =
-                    new FileDataStorageManager(account, getContentResolver());
-                    file.setDownloading(true);
-                    storageManager.saveFile(file);
-                    */
-
-                sendBroadcastNewDownload(newDownload, putResult.second);
+                if (putResult != null) {
+                    String downloadKey = putResult.first;
+                    requestedDownloads.add(downloadKey);
+                    sendBroadcastNewDownload(newDownload, putResult.second);
+                }   // else, file already in the queue of downloads; don't repeat the request
 
             } catch (IllegalArgumentException e) {
                 Log_OC.e(TAG, "Not enough information provided in intent: " + e.getMessage());
@@ -275,34 +253,23 @@ public class FileDownloader extends Service
          * @param file    A file in the queue of pending downloads
          */
         public void cancel(Account account, OCFile file) {
-            /*Log_OC.v(
-                    "NOW " + TAG + ", thread " + Thread.currentThread().getName(),
-                    "Received request to cancel download of " + file.getRemotePath()
-            );
-            Log_OC.v(   "NOW " + TAG + ", thread " + Thread.currentThread().getName(),
-                    "Removing download of " + file.getRemotePath());*/
-            Pair<DownloadFileOperation, String> removeResult =
-                    mPendingDownloads.remove(account, file.getRemotePath());
+            Pair<DownloadFileOperation, String> removeResult = mPendingDownloads.remove(account, file.getRemotePath());
             DownloadFileOperation download = removeResult.first;
             if (download != null) {
-                /*Log_OC.v(   "NOW " + TAG + ", thread " + Thread.currentThread().getName(),
-                        "Canceling returned download of " + file.getRemotePath());*/
                 download.cancel();
             } else {
                 if (mCurrentDownload != null && mCurrentAccount != null &&
                         mCurrentDownload.getRemotePath().startsWith(file.getRemotePath()) &&
                         account.name.equals(mCurrentAccount.name)) {
-                    /*Log_OC.v(   "NOW " + TAG + ", thread " + Thread.currentThread().getName(),
-                     "Canceling current sync as descendant: " + mCurrentDownload.getRemotePath());*/
                     mCurrentDownload.cancel();
                 }
             }
         }
 
         /**
-         * Cancels a pending or current upload for an account
+         * Cancels all the downloads for an account
          *
-         * @param account Owncloud accountName where the remote file will be stored.
+         * @param account   ownCloud account.
          */
         public void cancel(Account account) {
             Log_OC.d(TAG, "Account= " + account.name);
@@ -325,7 +292,7 @@ public class FileDownloader extends Service
         /**
          * Returns True when the file described by 'file' in the ownCloud account 'account'
          * is downloading or waiting to download.
-         * <p/>
+         *
          * If 'file' is a directory, returns 'true' if any of its descendant files is downloading or
          * waiting to download.
          *
@@ -349,7 +316,6 @@ public class FileDownloader extends Service
                 OnDatatransferProgressListener listener, Account account, OCFile file
         ) {
             if (account == null || file == null || listener == null) return;
-            //String targetKey = buildKey(account, file.getRemotePath());
             mBoundListeners.put(file.getFileId(), listener);
         }
 
@@ -357,15 +323,14 @@ public class FileDownloader extends Service
         /**
          * Removes a listener interested in the progress of the download for a concrete file.
          *
-         * @param listener Object to notify about progress of transfer.
-         * @param account  ownCloud account holding the file of interest.
-         * @param file     {@link OCFile} of interest for listener.
+         * @param listener      Object to notify about progress of transfer.
+         * @param account       ownCloud account holding the file of interest.
+         * @param file          {@link OCFile} of interest for listener.
          */
         public void removeDatatransferProgressListener(
                 OnDatatransferProgressListener listener, Account account, OCFile file
         ) {
             if (account == null || file == null || listener == null) return;
-            //String targetKey = buildKey(account, file.getRemotePath());
             Long fileId = file.getFileId();
             if (mBoundListeners.get(fileId) == listener) {
                 mBoundListeners.remove(fileId);
@@ -375,8 +340,6 @@ public class FileDownloader extends Service
         @Override
         public void onTransferProgress(long progressRate, long totalTransferredSoFar,
                                        long totalToTransfer, String fileName) {
-            //String key = buildKey(mCurrentDownload.getAccount(),
-            // mCurrentDownload.getFile().getRemotePath());
             OnDatatransferProgressListener boundListener =
                     mBoundListeners.get(mCurrentDownload.getFile().getFileId());
             if (boundListener != null) {
@@ -385,23 +348,12 @@ public class FileDownloader extends Service
             }
         }
 
-        /**
-         * Review downloads and cancel it if its account doesn't exist
-         */
-        public void checkAccountOfCurrentDownload() {
-            if (mCurrentDownload != null &&
-                    !AccountUtils.exists(mCurrentDownload.getAccount(), getApplicationContext())) {
-                mCurrentDownload.cancel();
-            }
-            // The rest of downloads are cancelled when they try to start
-        }
-
     }
 
 
     /**
      * Download worker. Performs the pending downloads in the order they were requested.
-     * <p/>
+
      * Created with the Looper of a new thread, started in {@link FileUploader#onCreate()}.
      */
     private static class ServiceHandler extends Handler {
@@ -440,14 +392,13 @@ public class FileDownloader extends Service
      */
     private void downloadFile(String downloadKey) {
 
-        /*Log_OC.v(   "NOW " + TAG + ", thread " + Thread.currentThread().getName(),
-                "Getting download of " + downloadKey);*/
         mCurrentDownload = mPendingDownloads.get(downloadKey);
 
         if (mCurrentDownload != null) {
             // Detect if the account exists
             if (AccountUtils.exists(mCurrentDownload.getAccount(), getApplicationContext())) {
                 Log_OC.d(TAG, "Account " + mCurrentDownload.getAccount().name + " exists");
+
                 notifyDownloadStart(mCurrentDownload);
 
                 RemoteOperationResult downloadResult = null;
@@ -470,26 +421,16 @@ public class FileDownloader extends Service
 
 
                     /// perform the download
-                    /*Log_OC.v(   "NOW " + TAG + ", thread " + Thread.currentThread().getName(),
-                        "Executing download of " + mCurrentDownload.getRemotePath());*/
                     downloadResult = mCurrentDownload.execute(mDownloadClient);
                     if (downloadResult.isSuccess()) {
                         saveDownloadedFile();
                     }
 
-                } catch (AccountsException e) {
-                    Log_OC.e(TAG, "Error while trying to get authorization for "
-                            + mCurrentAccount.name, e);
-                    downloadResult = new RemoteOperationResult(e);
-                } catch (IOException e) {
-                    Log_OC.e(TAG, "Error while trying to get authorization for "
-                            + mCurrentAccount.name, e);
+                } catch (Exception e) {
+                    Log_OC.e(TAG, "Error downloading", e);
                     downloadResult = new RemoteOperationResult(e);
 
                 } finally {
-                /*Log_OC.v(   "NOW " + TAG + ", thread " + Thread.currentThread().getName(),
-                        "Removing payload " + mCurrentDownload.getRemotePath());*/
-
                     Pair<DownloadFileOperation, String> removeResult =
                             mPendingDownloads.removePayload(mCurrentAccount,
                                     mCurrentDownload.getRemotePath());
@@ -497,9 +438,9 @@ public class FileDownloader extends Service
                     /// notify result
                     notifyDownloadResult(mCurrentDownload, downloadResult);
 
-                    sendBroadcastDownloadFinished(mCurrentDownload, downloadResult,
-                            removeResult.second);
+                    sendBroadcastDownloadFinished(mCurrentDownload, downloadResult, removeResult.second);
                 }
+
             } else {
                 // Cancel the transfer
                 Log_OC.d(TAG, "Account " + mCurrentDownload.getAccount().toString() +
@@ -513,6 +454,8 @@ public class FileDownloader extends Service
 
     /**
      * Updates the OC File after a successful download.
+     *
+     * TODO move to DownloadFileOperation
      */
     private void saveDownloadedFile() {
         OCFile file = mStorageManager.getFileById(mCurrentDownload.getFile().getFileId());
@@ -522,26 +465,17 @@ public class FileDownloader extends Service
         file.setNeedsUpdateThumbnail(true);
         file.setModificationTimestamp(mCurrentDownload.getModificationTimestamp());
         file.setModificationTimestampAtLastSyncForData(mCurrentDownload.getModificationTimestamp());
-        // file.setEtag(mCurrentDownload.getEtag());    // TODO Etag, where available
+        file.setEtag(mCurrentDownload.getEtag());
         file.setMimetype(mCurrentDownload.getMimeType());
         file.setStoragePath(mCurrentDownload.getSavePath());
         file.setFileLength((new File(mCurrentDownload.getSavePath()).length()));
         file.setRemoteId(mCurrentDownload.getFile().getRemoteId());
         mStorageManager.saveFile(file);
         mStorageManager.triggerMediaScan(file.getStoragePath());
+        mStorageManager.saveConflict(file, null);
     }
 
     /**
-     * Update the OC File after a unsuccessful download
-     */
-    private void updateUnsuccessfulDownloadedFile() {
-        OCFile file = mStorageManager.getFileById(mCurrentDownload.getFile().getFileId());
-        file.setDownloading(false);
-        mStorageManager.saveFile(file);
-    }
-
-
-    /**
      * Creates a status notification to show the download progress
      *
      * @param download Download operation starting.
@@ -683,6 +617,7 @@ public class FileDownloader extends Service
             DownloadFileOperation download,
             RemoteOperationResult downloadResult,
             String unlinkedFromRemotePath) {
+
         Intent end = new Intent(getDownloadFinishMessage());
         end.putExtra(EXTRA_DOWNLOAD_RESULT, downloadResult.isSuccess());
         end.putExtra(ACCOUNT_NAME, download.getAccount().name);
index 98ad87e..5c2cd1e 100644 (file)
 package com.owncloud.android.files.services;
 
 import java.io.File;
-import java.io.IOException;
 import java.util.AbstractList;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Vector;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
 
 import android.accounts.Account;
 import android.accounts.AccountManager;
-import android.accounts.AccountsException;
 import android.accounts.OnAccountsUpdateListener;
 import android.app.NotificationManager;
 import android.app.PendingIntent;
@@ -46,6 +42,7 @@ import android.os.Looper;
 import android.os.Message;
 import android.os.Process;
 import android.support.v4.app.NotificationCompat;
+import android.util.Pair;
 import android.webkit.MimeTypeMap;
 
 import com.owncloud.android.R;
@@ -86,6 +83,7 @@ public class FileUploader extends Service
     public static final String EXTRA_REMOTE_PATH = "REMOTE_PATH";
     public static final String EXTRA_OLD_REMOTE_PATH = "OLD_REMOTE_PATH";
     public static final String EXTRA_OLD_FILE_PATH = "OLD_FILE_PATH";
+    public static final String EXTRA_LINKED_TO_PATH = "LINKED_TO";
     public static final String ACCOUNT_NAME = "ACCOUNT_NAME";
 
     public static final String KEY_FILE = "FILE";
@@ -113,11 +111,10 @@ public class FileUploader extends Service
     private ServiceHandler mServiceHandler;
     private IBinder mBinder;
     private OwnCloudClient mUploadClient = null;
-    private Account mLastAccount = null;
+    private Account mCurrentAccount = null;
     private FileDataStorageManager mStorageManager;
 
-    private ConcurrentMap<String, UploadFileOperation> mPendingUploads =
-            new ConcurrentHashMap<String, UploadFileOperation>();
+    private IndexedForest<UploadFileOperation> mPendingUploads = new IndexedForest<UploadFileOperation>();
     private UploadFileOperation mCurrentUpload = null;
 
     private NotificationManager mNotificationManager;
@@ -133,26 +130,14 @@ public class FileUploader extends Service
     }
 
     /**
-     * Builds a key for mPendingUploads from the account and file to upload
-     *
-     * @param account   Account where the file to upload is stored
-     * @param file      File to upload
-     */
-    private String buildRemoteName(Account account, OCFile file) {
-        return account.name + file.getRemotePath();
-    }
-
-    private String buildRemoteName(Account account, String remotePath) {
-        return account.name + remotePath;
-    }
-
-    /**
      * Checks if an ownCloud server version should support chunked uploads.
      *
      * @param version OwnCloud version instance corresponding to an ownCloud
      *            server.
      * @return 'True' if the ownCloud server with version supports chunked
      *         uploads.
+     *
+     * TODO - move to OCClient
      */
     private static boolean chunkedUploadIsSupported(OwnCloudVersion version) {
         return (version != null && version.compareTo(OwnCloudVersion.owncloud_v4_5) >= 0);
@@ -282,7 +267,7 @@ public class FileUploader extends Service
             files = new OCFile[localPaths.length];
             for (int i = 0; i < localPaths.length; i++) {
                 files[i] = obtainNewOCFileToUpload(remotePaths[i], localPaths[i],
-                        ((mimeTypes != null) ? mimeTypes[i] : null), storageManager);
+                        ((mimeTypes != null) ? mimeTypes[i] : null));
                 if (files[i] == null) {
                     // TODO @andomaex add failure Notification
                     return Service.START_NOT_STICKY;
@@ -298,19 +283,26 @@ public class FileUploader extends Service
         UploadFileOperation newUpload = null;
         try {
             for (int i = 0; i < files.length; i++) {
-                uploadKey = buildRemoteName(account, files[i].getRemotePath());
-                newUpload = new UploadFileOperation(account, files[i], chunked, isInstant,
+                newUpload = new UploadFileOperation(
+                        account,
+                        files[i],
+                        chunked,
+                        isInstant,
                         forceOverwrite, localAction,
-                        getApplicationContext());
+                        getApplicationContext()
+                );
                 if (isInstant) {
                     newUpload.setRemoteFolderToBeCreated();
                 }
-                // Grants that the file only upload once time
-                mPendingUploads.putIfAbsent(uploadKey, newUpload);
-
                 newUpload.addDatatransferProgressListener(this);
-                newUpload.addDatatransferProgressListener((FileUploaderBinder)mBinder);
-                requestedUploads.add(uploadKey);
+                newUpload.addDatatransferProgressListener((FileUploaderBinder) mBinder);
+                Pair<String, String> putResult = mPendingUploads.putIfAbsent(
+                        account, files[i].getRemotePath(), newUpload
+                );
+                if (putResult != null) {
+                    uploadKey = putResult.first;
+                    requestedUploads.add(uploadKey);
+                }   // else, file already in the queue of uploads; don't repeat the request
             }
 
         } catch (IllegalArgumentException e) {
@@ -333,7 +325,6 @@ public class FileUploader extends Service
             msg.obj = requestedUploads;
             mServiceHandler.sendMessage(msg);
         }
-        Log_OC.i(TAG, "mPendingUploads size:" + mPendingUploads.size());
         return Service.START_NOT_STICKY;
     }
 
@@ -386,23 +377,27 @@ public class FileUploader extends Service
         /**
          * Cancels a pending or current upload of a remote file.
          *
-         * @param account Owncloud account where the remote file will be stored.
-         * @param file A file in the queue of pending uploads
+         * @param account   ownCloud account where the remote file will be stored.
+         * @param file      A file in the queue of pending uploads
          */
         public void cancel(Account account, OCFile file) {
-            UploadFileOperation upload;
-            synchronized (mPendingUploads) {
-                upload = mPendingUploads.remove(buildRemoteName(account, file));
-            }
+            Pair<UploadFileOperation, String> removeResult = mPendingUploads.remove(account, file.getRemotePath());
+            UploadFileOperation upload = removeResult.first;
             if (upload != null) {
                 upload.cancel();
+            } else {
+                if (mCurrentUpload != null && mCurrentAccount != null &&
+                        mCurrentUpload.getRemotePath().startsWith(file.getRemotePath()) &&
+                        account.name.equals(mCurrentAccount.name)) {
+                    mCurrentUpload.cancel();
+                }
             }
         }
 
         /**
-         * Cancels a pending or current upload for an account
+         * Cancels all the uploads for an account
          *
-         * @param account Owncloud accountName where the remote file will be stored.
+         * @param account   ownCloud account.
          */
         public void cancel(Account account) {
             Log_OC.d(TAG, "Account= " + account.name);
@@ -414,13 +409,14 @@ public class FileUploader extends Service
                 }
             }
             // Cancel pending uploads
-            cancelUploadForAccount(account.name);
+            cancelUploadsForAccount(account);
         }
 
         public void clearListeners() {
             mBoundListeners.clear();
         }
 
+
         /**
          * Returns True when the file described by 'file' is being uploaded to
          * the ownCloud account 'account' or waiting for it
@@ -432,22 +428,8 @@ public class FileUploader extends Service
          * @param file      A file that could be in the queue of pending uploads
          */
         public boolean isUploading(Account account, OCFile file) {
-            if (account == null || file == null)
-                return false;
-            String targetKey = buildRemoteName(account, file);
-            synchronized (mPendingUploads) {
-                if (file.isFolder()) {
-                    // this can be slow if there are many uploads :(
-                    Iterator<String> it = mPendingUploads.keySet().iterator();
-                    boolean found = false;
-                    while (it.hasNext() && !found) {
-                        found = it.next().startsWith(targetKey);
-                    }
-                    return found;
-                } else {
-                    return (mPendingUploads.containsKey(targetKey));
-                }
-            }
+            if (account == null || file == null) return false;
+            return (mPendingUploads.contains(account, file.getRemotePath()));
         }
 
 
@@ -496,15 +478,19 @@ public class FileUploader extends Service
         }
 
         /**
-         * Review uploads and cancel it if its account doesn't exist
+         * Builds a key for the map of listeners.
+         *
+         * TODO remove and replace key with file.getFileId() after changing current policy (upload file, then
+         * add to local database) to better policy (add to local database, then upload)
+         *
+         * @param account       ownCloud account where the file to upload belongs.
+         * @param file          File to upload
+         * @return              Key
          */
-        public void checkAccountOfCurrentUpload() {
-            if (mCurrentUpload != null &&
-                    !AccountUtils.exists(mCurrentUpload.getAccount(), getApplicationContext())) {
-                mCurrentUpload.cancel();
-            }
-            // The rest of uploads are cancelled when they try to start
+        private String buildRemoteName(Account account, OCFile file) {
+            return account.name + file.getRemotePath();
         }
+
     }
 
     /**
@@ -544,17 +530,13 @@ public class FileUploader extends Service
     /**
      * Core upload method: sends the file(s) to upload
      *
-     * @param uploadKey Key to access the upload to perform, contained in
-     *            mPendingUploads
+     * @param uploadKey Key to access the upload to perform, contained in mPendingUploads
      */
     public void uploadFile(String uploadKey) {
 
-        synchronized (mPendingUploads) {
-            mCurrentUpload = mPendingUploads.get(uploadKey);
-        }
+        mCurrentUpload = mPendingUploads.get(uploadKey);
 
         if (mCurrentUpload != null) {
-
             // Detect if the account exists
             if (AccountUtils.exists(mCurrentUpload.getAccount(), getApplicationContext())) {
                 Log_OC.d(TAG, "Account " + mCurrentUpload.getAccount().name + " exists");
@@ -564,16 +546,20 @@ public class FileUploader extends Service
                 RemoteOperationResult uploadResult = null, grantResult;
 
                 try {
-                    /// prepare client object to send requests to the ownCloud server
-                    if (mUploadClient == null ||
-                            !mLastAccount.equals(mCurrentUpload.getAccount())) {
-                        mLastAccount = mCurrentUpload.getAccount();
-                        mStorageManager =
-                                new FileDataStorageManager(mLastAccount, getContentResolver());
-                        OwnCloudAccount ocAccount = new OwnCloudAccount(mLastAccount, this);
-                        mUploadClient = OwnCloudClientManagerFactory.getDefaultSingleton().
-                                getClientFor(ocAccount, this);
-                    }
+                    /// prepare client object to send the request to the ownCloud server
+                    if (mCurrentAccount == null || !mCurrentAccount.equals(mCurrentUpload.getAccount())) {
+                        mCurrentAccount = mCurrentUpload.getAccount();
+                        mStorageManager = new FileDataStorageManager(
+                                mCurrentAccount,
+                                getContentResolver()
+                        );
+                    }   // else, reuse storage manager from previous operation
+
+                    // always get client from client manager, to get fresh credentials in case of update
+                    OwnCloudAccount ocAccount = new OwnCloudAccount(mCurrentAccount, this);
+                    mUploadClient = OwnCloudClientManagerFactory.getDefaultSingleton().
+                            getClientFor(ocAccount, this);
+
 
                     /// check the existence of the parent folder for the file to upload
                     String remoteParentPath = new File(mCurrentUpload.getRemotePath()).getParent();
@@ -588,43 +574,44 @@ public class FileUploader extends Service
                         uploadResult = mCurrentUpload.execute(mUploadClient);
                         if (uploadResult.isSuccess()) {
                             saveUploadedFile();
+
+                        } else if (uploadResult.getCode() == ResultCode.SYNC_CONFLICT) {
+                            mStorageManager.saveConflict(mCurrentUpload.getFile(),
+                                    mCurrentUpload.getFile().getEtagInConflict());
                         }
                     } else {
                         uploadResult = grantResult;
                     }
 
-                } catch (AccountsException e) {
-                    Log_OC.e(TAG, "Error while trying to get autorization for " +
-                            mLastAccount.name, e);
-                    uploadResult = new RemoteOperationResult(e);
-
-                } catch (IOException e) {
-                    Log_OC.e(TAG, "Error while trying to get autorization for " +
-                            mLastAccount.name, e);
+                } catch (Exception e) {
+                    Log_OC.e(TAG, "Error uploading", e);
                     uploadResult = new RemoteOperationResult(e);
 
                 } finally {
-                    synchronized (mPendingUploads) {
-                        mPendingUploads.remove(uploadKey);
-                        Log_OC.i(TAG, "Remove CurrentUploadItem from pending upload Item Map.");
-                    }
-                    if (uploadResult != null && uploadResult.isException()) {
-                        // enforce the creation of a new client object for next uploads;
-                        // this grant that a new socket will be created in the future if
-                        // the current exception is due to an abrupt lose of network connection
-                        mUploadClient = null;
+                    Pair<UploadFileOperation, String> removeResult;
+                    if (mCurrentUpload.wasRenamed()) {
+                        removeResult = mPendingUploads.removePayload(
+                                mCurrentAccount,
+                                mCurrentUpload.getOldFile().getRemotePath()
+                        );
+                    } else {
+                        removeResult = mPendingUploads.removePayload(
+                                mCurrentAccount,
+                                mCurrentUpload.getRemotePath()
+                        );
                     }
-                }
 
-                /// notify result
-                notifyUploadResult(uploadResult, mCurrentUpload);
-                sendFinalBroadcast(mCurrentUpload, uploadResult);
+                    /// notify result
+                    notifyUploadResult(mCurrentUpload, uploadResult);
+
+                    sendBroadcastUploadFinished(mCurrentUpload, uploadResult, removeResult.second);
+                }
 
             } else {
                 // Cancel the transfer
                 Log_OC.d(TAG, "Account " + mCurrentUpload.getAccount().toString() +
                         " doesn't exist");
-                cancelUploadForAccount(mCurrentUpload.getAccount().name);
+                cancelUploadsForAccount(mCurrentUpload.getAccount());
 
             }
         }
@@ -691,7 +678,7 @@ public class FileUploader extends Service
      * synchronized with the server, specially the modification time and Etag
      * (where available)
      *
-     * TODO refactor this ugly thing
+     * TODO move into UploadFileOperation
      */
     private void saveUploadedFile() {
         OCFile file = mCurrentUpload.getFile();
@@ -709,6 +696,8 @@ public class FileUploader extends Service
         if (result.isSuccess()) {
             updateOCFile(file, (RemoteFile) result.getData().get(0));
             file.setLastSyncDateForProperties(syncDate);
+        } else {
+            Log_OC.e(TAG, "Error reading properties of file after successful upload; this is gonna hurt...");
         }
 
         // / maybe this would be better as part of UploadFileOperation... or
@@ -718,6 +707,7 @@ public class FileUploader extends Service
             if (oldFile.fileExists()) {
                 oldFile.setStoragePath(null);
                 mStorageManager.saveFile(oldFile);
+                mStorageManager.saveConflict(oldFile, null);
 
             } // else: it was just an automatic renaming due to a name
             // coincidence; nothing else is needed, the storagePath is right
@@ -725,6 +715,10 @@ public class FileUploader extends Service
         }
         file.setNeedsUpdateThumbnail(true);
         mStorageManager.saveFile(file);
+        mStorageManager.saveConflict(file, null);
+        
+        mStorageManager.triggerMediaScan(file.getStoragePath());
+
     }
 
     private void updateOCFile(OCFile file, RemoteFile remoteFile) {
@@ -733,12 +727,11 @@ public class FileUploader extends Service
         file.setMimetype(remoteFile.getMimeType());
         file.setModificationTimestamp(remoteFile.getModifiedTimestamp());
         file.setModificationTimestampAtLastSyncForData(remoteFile.getModifiedTimestamp());
-        // file.setEtag(remoteFile.getEtag());    // TODO Etag, where available
+        file.setEtag(remoteFile.getEtag());
         file.setRemoteId(remoteFile.getRemoteId());
     }
 
-    private OCFile obtainNewOCFileToUpload(String remotePath, String localPath, String mimeType,
-                                           FileDataStorageManager storageManager) {
+    private OCFile obtainNewOCFileToUpload(String remotePath, String localPath, String mimeType) {
 
         // MIME type
         if (mimeType == null || mimeType.length() <= 0) {
@@ -829,11 +822,11 @@ public class FileUploader extends Service
     /**
      * Updates the status notification with the result of an upload operation.
      *
-     * @param uploadResult Result of the upload operation.
-     * @param upload Finished upload operation
+     * @param uploadResult  Result of the upload operation.
+     * @param upload        Finished upload operation
      */
-    private void notifyUploadResult(
-            RemoteOperationResult uploadResult, UploadFileOperation upload) {
+    private void notifyUploadResult(UploadFileOperation upload,
+                                    RemoteOperationResult uploadResult) {
         Log_OC.d(TAG, "NotifyUploadResult with resultCode: " + uploadResult.getCode());
         // / cancelled operation or success -> silent removal of progress notification
         mNotificationManager.cancel(R.string.uploader_upload_in_progress_ticker);
@@ -940,10 +933,15 @@ public class FileUploader extends Service
      * Sends a broadcast in order to the interested activities can update their
      * view
      *
-     * @param upload Finished upload operation
-     * @param uploadResult Result of the upload operation
+     * @param upload                    Finished upload operation
+     * @param uploadResult              Result of the upload operation
+     * @param unlinkedFromRemotePath    Path in the uploads tree where the upload was unlinked from
      */
-    private void sendFinalBroadcast(UploadFileOperation upload, RemoteOperationResult uploadResult) {
+    private void sendBroadcastUploadFinished(
+            UploadFileOperation upload,
+            RemoteOperationResult uploadResult,
+            String unlinkedFromRemotePath) {
+
         Intent end = new Intent(getUploadFinishMessage());
         end.putExtra(EXTRA_REMOTE_PATH, upload.getRemotePath()); // real remote
         // path, after
@@ -956,6 +954,10 @@ public class FileUploader extends Service
         end.putExtra(EXTRA_OLD_FILE_PATH, upload.getOriginalStoragePath());
         end.putExtra(ACCOUNT_NAME, upload.getAccount().name);
         end.putExtra(EXTRA_UPLOAD_RESULT, uploadResult.isSuccess());
+        if (unlinkedFromRemotePath != null) {
+            end.putExtra(EXTRA_LINKED_TO_PATH, unlinkedFromRemotePath);
+        }
+
         sendStickyBroadcast(end);
     }
 
@@ -965,6 +967,8 @@ public class FileUploader extends Service
      * @param localPath         Full path to a file in the local file system.
      * @param mimeType          MIME type of the file.
      * @return true if is needed to add the pdf file extension to the file
+     *
+     * TODO - move to OCFile or Utils class
      */
     private boolean isPdfFileFromContentProviderWithoutExtension(String localPath,
                                                                  String mimeType) {
@@ -975,20 +979,11 @@ public class FileUploader extends Service
 
     /**
      * Remove uploads of an account
-     * @param accountName       Name of an OC account
+     *
+     * @param account       Downloads account to remove
      */
-    private void cancelUploadForAccount(String accountName){
-        // this can be slow if there are many uploads :(
-        Iterator<String> it = mPendingUploads.keySet().iterator();
-        Log_OC.d(TAG, "Number of pending updloads= "  + mPendingUploads.size());
-        while (it.hasNext()) {
-            String key = it.next();
-            Log_OC.d(TAG, "mPendingUploads CANCELLED " + key);
-            if (key.startsWith(accountName)) {
-                synchronized (mPendingUploads) {
-                    mPendingUploads.remove(key);
-                }
-            }
-        }
+    private void cancelUploadsForAccount(Account account){
+        // Cancel pending uploads
+        mPendingUploads.remove(account);
     }
 }
index 4c1ac7b..8f4ccb6 100644 (file)
@@ -101,38 +101,45 @@ public class IndexedForest<V> {
     public /* synchronized */ Pair<String, String> putIfAbsent(Account account, String remotePath, V value) {
         String targetKey = buildKey(account, remotePath);
         Node<V> valuedNode = new Node(targetKey, value);
-        mMap.putIfAbsent(
-                targetKey,
-                valuedNode
+        Node<V> previousValue = mMap.putIfAbsent(
+            targetKey,
+            valuedNode
         );
+        if (previousValue != null) {
+            // remotePath already known; not replaced
+            return null;
 
-        String currentPath = remotePath, parentPath = null, parentKey = null;
-        Node<V> currentNode = valuedNode, parentNode = null;
-        boolean linked = false;
-        while (!OCFile.ROOT_PATH.equals(currentPath) && !linked) {
-            parentPath = new File(currentPath).getParent();
-            if (!parentPath.endsWith(OCFile.PATH_SEPARATOR)) {
-                parentPath += OCFile.PATH_SEPARATOR;
+        } else {
+            // value really added
+            String currentPath = remotePath, parentPath = null, parentKey = null;
+            Node<V> currentNode = valuedNode, parentNode = null;
+            boolean linked = false;
+            while (!OCFile.ROOT_PATH.equals(currentPath) && !linked) {
+                parentPath = new File(currentPath).getParent();
+                if (!parentPath.endsWith(OCFile.PATH_SEPARATOR)) {
+                    parentPath += OCFile.PATH_SEPARATOR;
+                }
+                parentKey = buildKey(account, parentPath);
+                parentNode = mMap.get(parentKey);
+                if (parentNode == null) {
+                    parentNode = new Node(parentKey, null);
+                    parentNode.addChild(currentNode);
+                    mMap.put(parentKey, parentNode);
+                } else {
+                    parentNode.addChild(currentNode);
+                    linked = true;
+                }
+                currentPath = parentPath;
+                currentNode = parentNode;
             }
-            parentKey = buildKey(account, parentPath);
-            parentNode = mMap.get(parentKey);
-            if (parentNode == null) {
-                parentNode = new Node(parentKey, null);
-                parentNode.addChild(currentNode);
-                mMap.put(parentKey, parentNode);
-            } else {
-                parentNode.addChild(currentNode);
-                linked = true;
+
+            String linkedTo = OCFile.ROOT_PATH;
+            if (linked) {
+                linkedTo = parentNode.getKey().substring(account.name.length());
             }
-            currentPath = parentPath;
-            currentNode = parentNode;
-        }
 
-        String linkedTo = OCFile.ROOT_PATH;
-        if (linked) {
-            linkedTo = parentNode.getKey().substring(account.name.length());
+            return new Pair<String, String>(targetKey, linkedTo);
         }
-        return new Pair<String, String>(targetKey, linkedTo);
     };
 
 
index c71b35f..5dd043f 100644 (file)
@@ -55,7 +55,8 @@ public class NotificationBuilderWithProgressBar extends NotificationCompat.Build
         if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
             return new NotificationBuilderWithProgressBar(context); 
         } else {
-            return new NotificationCompat.Builder(context);
+            return new NotificationCompat.Builder(context).
+                    setColor(context.getResources().getColor(R.color.primary));
         }
     }
     
diff --git a/src/com/owncloud/android/operations/CreateShareOperation.java b/src/com/owncloud/android/operations/CreateShareOperation.java
deleted file mode 100644 (file)
index a7270eb..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-/**
- *   ownCloud Android client application
- *
- *   @author masensio
- *   Copyright (C) 2015 ownCloud Inc.
- *
- *   This program is free software: you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License version 2,
- *   as published by the Free Software Foundation.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-package com.owncloud.android.operations;
-
-/**
- * Creates a new share from a given file
- */
-
-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;
-import com.owncloud.android.lib.resources.shares.OCShare;
-import com.owncloud.android.lib.common.operations.RemoteOperation;
-import com.owncloud.android.lib.common.operations.RemoteOperationResult;
-import com.owncloud.android.lib.common.utils.Log_OC;
-import com.owncloud.android.lib.resources.shares.GetRemoteSharesForFileOperation;
-import com.owncloud.android.lib.resources.shares.ShareType;
-import com.owncloud.android.lib.resources.shares.CreateRemoteShareOperation;
-import com.owncloud.android.lib.resources.files.FileUtils;
-import com.owncloud.android.operations.common.SyncOperation;
-
-public class CreateShareOperation extends SyncOperation {
-
-    private static final String TAG = CreateShareOperation.class.getSimpleName();
-
-    protected FileDataStorageManager mStorageManager;
-
-    private Context mContext;
-    private String mPath;
-    private ShareType mShareType;
-    private String mShareWith;
-    private boolean mPublicUpload;
-    private String mPassword;
-    private int mPermissions;
-    private Intent mSendIntent;
-
-    /**
-     * 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     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 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 - Default for public shares
-     *                      2 - Update
-     *                      4 - Create
-     *                      8 - Delete
-     *                      16- Re-share
-     *                      31- All above - Default for private shares
-     *                      For user or group shares.
-     *                      To obtain combinations, add the desired values together.  
-     *                      For instance, for Re-Share, delete, read, update, add 16+8+2+1 = 27.
-     */
-    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;
-        mPublicUpload = publicUpload;
-        mPassword = password;
-        mPermissions = permissions;
-        mSendIntent = sendIntent;
-    }
-
-    @Override
-    protected RemoteOperationResult run(OwnCloudClient client) {
-        RemoteOperation operation = null;
-        
-        // Check if the share link already exists
-        operation = new GetRemoteSharesForFileOperation(mPath, false, false);
-        RemoteOperationResult result =
-                ((GetRemoteSharesForFileOperation)operation).execute(client);
-
-        if (!result.isSuccess() || result.getData().size() <= 0) {
-            operation = new CreateRemoteShareOperation(mPath, mShareType, mShareWith, mPublicUpload,
-                    mPassword, mPermissions);
-            result = ((CreateRemoteShareOperation)operation).execute(client);
-        }
-        
-        if (result.isSuccess()) {
-            if (result.getData().size() > 0) {
-                OCShare share = (OCShare) result.getData().get(0);
-                updateData(share);
-            } 
-        }
-        
-        return result;
-    }
-    
-    public String getPath() {
-        return mPath;
-    }
-
-    public ShareType getShareType() {
-        return mShareType;
-    }
-
-    public String getShareWith() {
-        return mShareWith;
-    }
-
-    public boolean getPublicUpload() {
-        return mPublicUpload;
-    }
-
-    public String getPassword() {
-        return mPassword;
-    }
-
-    public int getPermissions() {
-        return mPermissions;
-    }
-
-    public Intent getSendIntent() {
-        return mSendIntent;
-    }
-    
-    private void updateData(OCShare share) {
-        // Update DB with the response
-        share.setPath(mPath);
-        if (mPath.endsWith(FileUtils.PATH_SEPARATOR)) {
-            share.setIsFolder(true);
-        } else {
-            share.setIsFolder(false);
-        }
-        share.setPermissions(mPermissions);
-        
-        getStorageManager().saveShare(share);
-        
-        // Update OCFile with data from share: ShareByLink  and publicLink
-        OCFile file = getStorageManager().getFileByPath(mPath);
-        if (file!=null) {
-            mSendIntent.putExtra(Intent.EXTRA_TEXT, share.getShareLink());
-            if (getClient().getCredentials().getUsername() == null) {
-                //in saml is null
-                mSendIntent.putExtra(Intent.EXTRA_SUBJECT,
-                        String.format(mContext.getString(R.string.saml_subject_token),
-                                file.getFileName()));
-            } else {
-                mSendIntent.putExtra(Intent.EXTRA_SUBJECT,
-                        String.format(mContext.getString(R.string.subject_token),
-                                getClient().getCredentials().getUsername(), file.getFileName()));
-            }
-            file.setPublicLink(share.getShareLink());
-            file.setShareByLink(true);
-            getStorageManager().saveFile(file);
-            Log_OC.d(TAG, "Public Link = " + file.getPublicLink());
-
-        }
-    }
-
-}
diff --git a/src/com/owncloud/android/operations/CreateShareViaLinkOperation.java b/src/com/owncloud/android/operations/CreateShareViaLinkOperation.java
new file mode 100644 (file)
index 0000000..bed23c7
--- /dev/null
@@ -0,0 +1,169 @@
+/**
+ *   ownCloud Android client application
+ *
+ *   @author masensio
+ *   @author David A. Velasco
+ *   Copyright (C) 2015 ownCloud Inc.
+ *
+ *   This program is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License version 2,
+ *   as published by the Free Software Foundation.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+package com.owncloud.android.operations;
+
+/**
+ * Creates a new public share for a given file
+ */
+
+
+import android.content.Context;
+import android.content.Intent;
+
+import com.owncloud.android.R;
+import com.owncloud.android.datamodel.OCFile;
+import com.owncloud.android.lib.common.OwnCloudClient;
+import com.owncloud.android.lib.common.operations.RemoteOperation;
+import com.owncloud.android.lib.common.operations.RemoteOperationResult;
+import com.owncloud.android.lib.resources.files.FileUtils;
+import com.owncloud.android.lib.resources.shares.CreateRemoteShareOperation;
+import com.owncloud.android.lib.resources.shares.GetRemoteSharesForFileOperation;
+import com.owncloud.android.lib.resources.shares.OCShare;
+import com.owncloud.android.lib.resources.shares.ShareType;
+import com.owncloud.android.operations.common.SyncOperation;
+
+public class CreateShareViaLinkOperation extends SyncOperation {
+
+    private String mPath;
+    private String mPassword;
+    private Intent mSendIntent;
+    private String mFileName;
+
+    /**
+     * Constructor
+     * @param path          Full path of the file/folder being shared. Mandatory argument
+     * @param password      Password to protect a public link share.
+     *                      Only available for public link shares
+     *  @param sendIntent   Optional Intent with the information of an app where the link to the new share (if public)
+     *                      should be posted later.
+     */
+    public CreateShareViaLinkOperation(
+            String path,
+            String password,
+            Intent sendIntent
+    ) {
+
+        mPath = path;
+        mPassword = password;
+        mSendIntent = sendIntent;
+        mFileName = null;
+    }
+
+    @Override
+    protected RemoteOperationResult run(OwnCloudClient client) {
+        // Check if the share link already exists
+        RemoteOperation operation = new GetRemoteSharesForFileOperation(mPath, false, false);
+        RemoteOperationResult result = operation.execute(client);
+
+        // Create public link if doesn't exist yet
+        boolean publicShareExists = false;
+        if (result.isSuccess()) {
+            OCShare share = null;
+            for (int i=0 ; i<result.getData().size(); i++) {
+                share = (OCShare) result.getData().get(i);
+                if (ShareType.PUBLIC_LINK.equals(share.getShareType())) {
+                    publicShareExists = true;
+                    break;
+                }
+            }
+        }
+        if (!publicShareExists) {
+            CreateRemoteShareOperation createOp = new CreateRemoteShareOperation(
+                    mPath,
+                    ShareType.PUBLIC_LINK,
+                    "",
+                    false,
+                    mPassword,
+                    OCShare.DEFAULT_PERMISSION
+            );
+            createOp.setGetShareDetails(true);
+            result = createOp.execute(client);
+        }
+        
+        if (result.isSuccess()) {
+            if (result.getData().size() > 0) {
+                OCShare share = (OCShare) result.getData().get(0);
+                updateData(share);
+            } 
+        }
+        
+        return result;
+    }
+    
+    public String getPath() {
+        return mPath;
+    }
+
+    public String getPassword() {
+        return mPassword;
+    }
+
+    public Intent getSendIntent() {
+        return mSendIntent;
+    }
+
+    public Intent getSendIntentWithSubject(Context context) {
+        if (context != null && mSendIntent != null && mSendIntent.getStringExtra(Intent.EXTRA_SUBJECT) != null) {
+            if (getClient() == null || getClient().getCredentials() == null ||
+                    getClient().getCredentials().getUsername() == null) {
+                mSendIntent.putExtra(
+                        Intent.EXTRA_SUBJECT,
+                        context.getString(R.string.subject_shared_with_you, mFileName)
+                );
+            } else {
+                mSendIntent.putExtra(
+                        Intent.EXTRA_SUBJECT,
+                        context.getString(
+                                R.string.subject_user_shared_with_you,
+                                getClient().getCredentials().getUsername(),
+                                mFileName
+                        )
+                );
+            }
+        }
+        return mSendIntent;
+    }
+
+    private void updateData(OCShare share) {
+        // Update DB with the response
+        share.setPath(mPath);
+        if (mPath.endsWith(FileUtils.PATH_SEPARATOR)) {
+            share.setIsFolder(true);
+        } else {
+            share.setIsFolder(false);
+        }
+
+        getStorageManager().saveShare(share);
+        
+        // Update OCFile with data from share: ShareByLink  and publicLink
+        OCFile file = getStorageManager().getFileByPath(mPath);
+        if (file!=null) {
+            file.setPublicLink(share.getShareLink());
+            file.setShareViaLink(true);
+            getStorageManager().saveFile(file);
+            if (mSendIntent != null) {
+                mSendIntent.putExtra(Intent.EXTRA_TEXT, share.getShareLink());
+            }
+        }
+    }
+
+}
diff --git a/src/com/owncloud/android/operations/CreateShareWithShareeOperation.java b/src/com/owncloud/android/operations/CreateShareWithShareeOperation.java
new file mode 100644 (file)
index 0000000..b19d6c2
--- /dev/null
@@ -0,0 +1,115 @@
+/**
+ *   ownCloud Android client application
+ *
+ *   @author masensio
+ *   @author David A. Velasco
+ *   Copyright (C) 2015 ownCloud Inc.
+ *
+ *   This program is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License version 2,
+ *   as published by the Free Software Foundation.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+package com.owncloud.android.operations;
+
+/**
+ * Creates a new private share for a given file
+ */
+
+
+import com.owncloud.android.datamodel.FileDataStorageManager;
+import com.owncloud.android.datamodel.OCFile;
+import com.owncloud.android.lib.common.OwnCloudClient;
+import com.owncloud.android.lib.common.operations.RemoteOperationResult;
+import com.owncloud.android.lib.resources.files.FileUtils;
+import com.owncloud.android.lib.resources.shares.CreateRemoteShareOperation;
+import com.owncloud.android.lib.resources.shares.OCShare;
+import com.owncloud.android.lib.resources.shares.ShareType;
+import com.owncloud.android.operations.common.SyncOperation;
+
+public class CreateShareWithShareeOperation extends SyncOperation {
+
+    protected FileDataStorageManager mStorageManager;
+
+    private String mPath;
+    private String mShareeName;
+    private ShareType mShareType;
+
+    /**
+     * Constructor.
+     *
+     * @param path          Full path of the file/folder being shared.
+     * @param shareeName    User or group name of the target sharee.
+     * @param shareType     Type of share determines type of sharee; {@link ShareType#USER} and {@link ShareType#GROUP}
+     *                      are the only valid values for the moment.
+     */
+    public CreateShareWithShareeOperation(String path, String shareeName, ShareType shareType) {
+        if (!ShareType.USER.equals(shareType) && !ShareType.GROUP.equals(shareType)) {
+            throw new IllegalArgumentException("Illegal share type " + shareType);
+        }
+        mPath = path;
+        mShareeName = shareeName;
+        mShareType = shareType;
+    }
+
+    @Override
+    protected RemoteOperationResult run(OwnCloudClient client) {
+        // Check if the share link already exists
+        // TODO or not
+        /*
+        RemoteOperation operation = new GetRemoteSharesForFileOperation(mPath, false, false);
+        RemoteOperationResult result = operation.execute(client);
+        if (!result.isSuccess() || result.getData().size() <= 0) {
+        */
+
+        CreateRemoteShareOperation operation = new CreateRemoteShareOperation(
+                mPath,
+                mShareType,
+                mShareeName,
+                false,
+                "",
+                OCShare.DEFAULT_PERMISSION
+        );
+        operation.setGetShareDetails(true);
+        RemoteOperationResult result = operation.execute(client);
+
+        
+        if (result.isSuccess()) {
+            if (result.getData().size() > 0) {
+                OCShare share = (OCShare) result.getData().get(0);
+                updateData(share);
+            } 
+        }
+        
+        return result;
+    }
+    
+    public String getPath() {
+        return mPath;
+    }
+
+    private void updateData(OCShare share) {
+        // Update DB with the response
+        share.setPath(mPath);
+        share.setIsFolder(mPath.endsWith(FileUtils.PATH_SEPARATOR));
+
+        getStorageManager().saveShare(share);
+        
+        // Update OCFile with data from share: ShareByLink  and publicLink
+        OCFile file = getStorageManager().getFileByPath(mPath);
+        if (file!=null) {
+            file.setShareWithSharee(true);    // TODO - this should be done by the FileContentProvider, as part of getStorageManager().saveShare(share)
+            getStorageManager().saveFile(file);
+        }
+    }
+
+}
index 0cb303c..dff8aef 100644 (file)
@@ -27,7 +27,6 @@ import java.util.Iterator;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicBoolean;
 
-import com.owncloud.android.MainApp;
 import com.owncloud.android.datamodel.OCFile;
 import com.owncloud.android.lib.common.network.OnDatatransferProgressListener;
 import com.owncloud.android.lib.common.OwnCloudClient;
@@ -52,6 +51,7 @@ public class DownloadFileOperation extends RemoteOperation {
     private OCFile mFile;
     private Set<OnDatatransferProgressListener> mDataTransferListeners = new HashSet<OnDatatransferProgressListener>();
     private long mModificationTimestamp = 0;
+    private String mEtag = "";
     private final AtomicBoolean mCancellationRequested = new AtomicBoolean(false);
     
     private DownloadRemoteFileOperation mDownloadOperation;
@@ -127,11 +127,15 @@ public class DownloadFileOperation extends RemoteOperation {
                 mFile.getModificationTimestamp();
     }
 
+    public String getEtag() {
+        return mEtag;
+    }
+
     @Override
     protected RemoteOperationResult run(OwnCloudClient client) {
-        RemoteOperationResult result = null;
-        File newFile = null;
-        boolean moved = true;
+        RemoteOperationResult result;
+        File newFile;
+        boolean moved;
         
         /// download will be performed to a temporal file, then moved to the final location
         File tmpFile = new File(getTmpPath());
@@ -154,6 +158,7 @@ public class DownloadFileOperation extends RemoteOperation {
         
         if (result.isSuccess()) {
             mModificationTimestamp = mDownloadOperation.getModificationTimestamp();
+            mEtag = mDownloadOperation.getEtag();
             newFile = new File(getSavePath());
             newFile.getParentFile().mkdirs();
             moved = tmpFile.renameTo(newFile);
diff --git a/src/com/owncloud/android/operations/GetCapabilitiesOperarion.java b/src/com/owncloud/android/operations/GetCapabilitiesOperarion.java
new file mode 100644 (file)
index 0000000..0a63449
--- /dev/null
@@ -0,0 +1,51 @@
+/**
+ *   ownCloud Android client application
+ *
+ *   @author masensio
+ *   Copyright (C) 2015 ownCloud Inc.
+ *
+ *   This program is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License version 2,
+ *   as published by the Free Software Foundation.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package com.owncloud.android.operations;
+
+import com.owncloud.android.lib.common.OwnCloudClient;
+import com.owncloud.android.lib.common.operations.RemoteOperationResult;
+import com.owncloud.android.lib.resources.status.GetRemoteCapabilitiesOperation;
+import com.owncloud.android.lib.resources.status.OCCapability;
+import com.owncloud.android.operations.common.SyncOperation;
+
+/**
+ * Get and save capabilities from the server
+ */
+public class GetCapabilitiesOperarion extends SyncOperation {
+
+    @Override
+    protected RemoteOperationResult run(OwnCloudClient client) {
+        GetRemoteCapabilitiesOperation getCapabilities = new GetRemoteCapabilitiesOperation();
+        RemoteOperationResult result = getCapabilities.execute(client);
+
+        if (result.isSuccess()){
+            // Read data from the result
+            if( result.getData()!= null && result.getData().size() > 0) {
+                OCCapability capability = (OCCapability) result.getData().get(0);
+
+                // Save the capabilities into database
+                getStorageManager().saveCapabilities(capability);
+            }
+        }
+
+        return result;
+    }
+
+}
index bf136ad..a04d415 100644 (file)
 
 package com.owncloud.android.operations;
 
-import java.util.ArrayList;
-
-import com.owncloud.android.MainApp;
 import com.owncloud.android.lib.common.OwnCloudClient;
-import com.owncloud.android.lib.resources.shares.OCShare;
 import com.owncloud.android.lib.common.operations.RemoteOperationResult;
 import com.owncloud.android.lib.common.utils.Log_OC;
 import com.owncloud.android.lib.resources.shares.GetRemoteSharesForFileOperation;
+import com.owncloud.android.lib.resources.shares.OCShare;
 import com.owncloud.android.operations.common.SyncOperation;
 
+import java.util.ArrayList;
+
 /**
  * Provide a list shares for a specific file.
  */
@@ -73,6 +72,11 @@ public class GetSharesForFileOperation extends SyncOperation {
             }
 
             getStorageManager().saveSharesDB(shares);
+
+        } else if (result.getCode() == RemoteOperationResult.ResultCode.SHARE_NOT_FOUND) {
+            // no share on the file - remove local shares
+            getStorageManager().removeSharesForFile(mPath);
+
         }
 
         return result;
diff --git a/src/com/owncloud/android/operations/GetSharesOperation.java b/src/com/owncloud/android/operations/GetSharesOperation.java
deleted file mode 100644 (file)
index 09a8e34..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- *   ownCloud Android client application
- *
- *   @author masensio
- *   @author David A. Velasco
- *   Copyright (C) 2015 ownCloud Inc.
- *
- *   This program is free software: you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License version 2,
- *   as published by the Free Software Foundation.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-package com.owncloud.android.operations;
-
-import java.util.ArrayList;
-
-import com.owncloud.android.MainApp;
-import com.owncloud.android.lib.common.OwnCloudClient;
-import com.owncloud.android.lib.common.operations.RemoteOperationResult;
-import com.owncloud.android.lib.common.utils.Log_OC;
-import com.owncloud.android.lib.resources.shares.OCShare;
-import com.owncloud.android.lib.resources.shares.GetRemoteSharesOperation;
-import com.owncloud.android.operations.common.SyncOperation;
-
-/**
- * Access to remote operation to get the share files/folders
- * Save the data in Database
- */
-
-public class GetSharesOperation extends SyncOperation {
-
-    private static final String TAG = GetSharesOperation.class.getSimpleName();
-
-    @Override
-    protected RemoteOperationResult run(OwnCloudClient client) {
-        GetRemoteSharesOperation operation = new GetRemoteSharesOperation();
-        RemoteOperationResult result = operation.execute(client);
-
-        if (result.isSuccess()) {
-
-            // Update DB with the response
-            Log_OC.d(TAG, "Share list size = " + result.getData().size());
-            ArrayList<OCShare> shares = new ArrayList<OCShare>();
-            for(Object obj: result.getData()) {
-                shares.add((OCShare) obj);
-            }
-
-            getStorageManager().saveSharesDB(shares);
-        }
-
-        return result;
-    }
-
-}
index 977f72a..368833e 100644 (file)
 
 package com.owncloud.android.operations;
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Vector;
 
-import org.apache.http.HttpStatus;
 import android.accounts.Account;
 import android.content.Context;
 import android.content.Intent;
 import android.util.Log;
-//import android.support.v4.content.LocalBroadcastManager;
 
-import com.owncloud.android.MainApp;
 import com.owncloud.android.datamodel.FileDataStorageManager;
 import com.owncloud.android.datamodel.OCFile;
 
@@ -50,7 +41,6 @@ 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.lib.resources.shares.GetRemoteSharesForFileOperation;
-import com.owncloud.android.lib.resources.files.FileUtils;
 import com.owncloud.android.lib.resources.files.ReadRemoteFileOperation;
 import com.owncloud.android.lib.resources.files.ReadRemoteFolderOperation;
 import com.owncloud.android.lib.resources.files.RemoteFile;
@@ -120,7 +110,10 @@ public class RefreshFolderOperation extends RemoteOperation {
     /** 'True' means that Etag will be ignored */
     private boolean mIgnoreETag;
 
-    
+    private List<SynchronizeFileOperation> mFilesToSyncContents;
+    // this will be used for every file when 'folder synchronization' replaces 'folder download'
+
+
     /**
      * Creates a new instance of {@link RefreshFolderOperation}.
      * 
@@ -154,6 +147,7 @@ public class RefreshFolderOperation extends RemoteOperation {
         mForgottenLocalFiles = new HashMap<String, String>();
         mRemoteFolderChanged = false;
         mIgnoreETag = ignoreETag;
+        mFilesToSyncContents = new Vector<SynchronizeFileOperation>();
     }
     
     
@@ -191,8 +185,9 @@ public class RefreshFolderOperation extends RemoteOperation {
         mConflictsFound = 0;
         mForgottenLocalFiles.clear();
         
-        if (FileUtils.PATH_SEPARATOR.equals(mLocalFolder.getRemotePath()) && !mSyncFullAccount) {
+        if (OCFile.ROOT_PATH.equals(mLocalFolder.getRemotePath()) && !mSyncFullAccount) {
             updateOCVersion(client);
+
         }
         
         result = checkForChanges(client);
@@ -201,9 +196,14 @@ public class RefreshFolderOperation extends RemoteOperation {
             if (mRemoteFolderChanged) {
                 result = fetchAndSyncRemoteFolder(client);
             } else {
-                // TODO Enable when "On Device" is recovered ?
+                fetchFavoritesToSyncFromLocalData();
                 mChildren = mStorageManager.getFolderContent(mLocalFolder/*, false*/);
             }
+
+            if (result.isSuccess()) {
+                // request for the synchronization of KEPT-IN-SYNC file contents
+                startContentSynchronizations(mFilesToSyncContents, client);
+            }
         }
         
         if (!mSyncFullAccount) {            
@@ -232,16 +232,29 @@ public class RefreshFolderOperation extends RemoteOperation {
         RemoteOperationResult result = update.execute(client);
         if (result.isSuccess()) {
             mIsShareSupported = update.getOCVersion().isSharedSupported();
+
+            // Update Capabilities for this account
+            if (update.getOCVersion().isVersionWithCapabilitiesAPI()) {
+                updateCapabilities(client);
+            } else {
+                Log_OC.d(TAG, "Capabilities API disabled");
+            }
+        }
+    }
+
+    private void updateCapabilities(OwnCloudClient client){
+        GetCapabilitiesOperarion getCapabilities = new GetCapabilitiesOperarion();
+        RemoteOperationResult  result = getCapabilities.execute(mStorageManager,mContext);
+        if (!result.isSuccess()){
+            Log_OC.w(TAG, "Update Capabilities unsuccessfully");
         }
     }
 
-    
     private RemoteOperationResult checkForChanges(OwnCloudClient client) {
         mRemoteFolderChanged = true;
         RemoteOperationResult result = null;
-        String remotePath = null;
+        String remotePath = mLocalFolder.getRemotePath();
 
-        remotePath = mLocalFolder.getRemotePath();
         Log_OC.d(TAG, "Checking changes in " + mAccount.name + remotePath);
         
         // remote request 
@@ -264,7 +277,7 @@ public class RefreshFolderOperation extends RemoteOperation {
 
             result = new RemoteOperationResult(ResultCode.OK);
         
-            Log_OC.i(TAG, "Checked " + mAccount.name + remotePath + " : " + 
+            Log_OC.i(TAG, "Checked " + mAccount.name + remotePath + " : " +
                     (mRemoteFolderChanged ? "changed" : "not changed"));
             
         } else {
@@ -337,15 +350,15 @@ public class RefreshFolderOperation extends RemoteOperation {
         mLocalFolder = mStorageManager.getFileByPath(mLocalFolder.getRemotePath());
 
         // parse data from remote folder 
-        OCFile remoteFolder = fillOCFile((RemoteFile)folderAndFiles.get(0));
+        OCFile remoteFolder = FileStorageUtils.fillOCFile((RemoteFile) folderAndFiles.get(0));
         remoteFolder.setParentId(mLocalFolder.getParentId());
         remoteFolder.setFileId(mLocalFolder.getFileId());
         
-        Log_OC.d(TAG, "Remote folder " + mLocalFolder.getRemotePath() 
+        Log_OC.d(TAG, "Remote folder " + mLocalFolder.getRemotePath()
                 + " changed - starting update of local data ");
         
         List<OCFile> updatedFiles = new Vector<OCFile>(folderAndFiles.size() - 1);
-        List<SynchronizeFileOperation> filesToSyncContents = new Vector<SynchronizeFileOperation>();
+        mFilesToSyncContents.clear();
 
         // get current data about local contents of the folder to synchronize
         // TODO Enable when "On Device" is recovered ?
@@ -356,54 +369,56 @@ public class RefreshFolderOperation extends RemoteOperation {
         }
         
         // loop to update every child
-        OCFile remoteFile = null, localFile = null;
+        OCFile remoteFile = null, localFile = null, updatedFile = null;
+        RemoteFile r;
         for (int i=1; i<folderAndFiles.size(); i++) {
             /// new OCFile instance with the data from the server
-            remoteFile = fillOCFile((RemoteFile)folderAndFiles.get(i));
-            remoteFile.setParentId(mLocalFolder.getFileId());
+            r = (RemoteFile) folderAndFiles.get(i);
+            remoteFile = FileStorageUtils.fillOCFile(r);
+
+            /// new OCFile instance to merge fresh data from server with local state
+            updatedFile = FileStorageUtils.fillOCFile(r);
+            updatedFile.setParentId(mLocalFolder.getFileId());
 
             /// retrieve local data for the read file 
             //  localFile = mStorageManager.getFileByPath(remoteFile.getRemotePath());
             localFile = localFilesMap.remove(remoteFile.getRemotePath());
             
-            /// add to the remoteFile (the new one) data about LOCAL STATE (not existing in server)
-            remoteFile.setLastSyncDateForProperties(mCurrentSyncTime);
+            /// add to updatedFile data about LOCAL STATE (not existing in server)
+            updatedFile.setLastSyncDateForProperties(mCurrentSyncTime);
             if (localFile != null) {
-                // some properties of local state are kept unmodified
-                remoteFile.setFileId(localFile.getFileId());
-                remoteFile.setFavorite(localFile.isFavorite());
-                remoteFile.setLastSyncDateForData(localFile.getLastSyncDateForData());
-                remoteFile.setModificationTimestampAtLastSyncForData(
+                updatedFile.setFileId(localFile.getFileId());
+                updatedFile.setFavorite(localFile.isFavorite());
+                updatedFile.setLastSyncDateForData(localFile.getLastSyncDateForData());
+                updatedFile.setModificationTimestampAtLastSyncForData(
                         localFile.getModificationTimestampAtLastSyncForData()
                 );
-                remoteFile.setStoragePath(localFile.getStoragePath());
-                // eTag will not be updated unless contents are synchronized 
-                //  (Synchronize[File|Folder]Operation with remoteFile as parameter)
-                remoteFile.setEtag(localFile.getEtag());    
-                if (remoteFile.isFolder()) {
-                    remoteFile.setFileLength(localFile.getFileLength()); 
+                updatedFile.setStoragePath(localFile.getStoragePath());
+                // eTag will not be updated unless file CONTENTS are synchronized
+                updatedFile.setEtag(localFile.getEtag());
+                if (updatedFile.isFolder()) {
+                    updatedFile.setFileLength(localFile.getFileLength());
                         // TODO move operations about size of folders to FileContentProvider
                 } else if (mRemoteFolderChanged && remoteFile.isImage() &&
                         remoteFile.getModificationTimestamp() !=
                                 localFile.getModificationTimestamp()) {
-                    remoteFile.setNeedsUpdateThumbnail(true);
+                    updatedFile.setNeedsUpdateThumbnail(true);
                     Log.d(TAG, "Image " + remoteFile.getFileName() + " updated on the server");
                 }
-                remoteFile.setPublicLink(localFile.getPublicLink());
-                remoteFile.setShareByLink(localFile.isShareByLink());
+                updatedFile.setPublicLink(localFile.getPublicLink());
+                updatedFile.setShareViaLink(localFile.isSharedViaLink());
+                updatedFile.setShareWithSharee(localFile.isSharedWithSharee());
+                updatedFile.setEtagInConflict(localFile.getEtagInConflict());
             } else {
-                // remote eTag will not be updated unless contents are synchronized 
-                //  (Synchronize[File|Folder]Operation with remoteFile as parameter)
-                remoteFile.setEtag(""); 
+                // remote eTag will not be updated unless file CONTENTS are synchronized
+                updatedFile.setEtag("");
             }
 
             /// check and fix, if needed, local storage path
-            checkAndFixForeignStoragePath(remoteFile);      // policy - local files are COPIED 
-                                                            // into the ownCloud local folder;
-            searchForLocalFileInDefaultPath(remoteFile);    // legacy   
+            FileStorageUtils.searchForLocalFileInDefaultPath(updatedFile, mAccount);
 
             /// prepare content synchronization for kept-in-sync files
-            if (remoteFile.isFavorite()) {
+            if (updatedFile.isFavorite()) {
                 SynchronizeFileOperation operation = new SynchronizeFileOperation(  localFile,        
                                                                                     remoteFile, 
                                                                                     mAccount, 
@@ -411,18 +426,15 @@ public class RefreshFolderOperation extends RemoteOperation {
                                                                                     mContext
                                                                                     );
                 
-                filesToSyncContents.add(operation);
+                mFilesToSyncContents.add(operation);
             }
-            
-            updatedFiles.add(remoteFile);
+
+            updatedFiles.add(updatedFile);
         }
 
         // save updated contents in local database
         mStorageManager.saveFolder(remoteFolder, updatedFiles, localFilesMap.values());
 
-        // request for the synchronization of file contents AFTER saving current remote properties
-        startContentSynchronizations(filesToSyncContents, client);
-
         mChildren = updatedFiles;
     }
 
@@ -460,103 +472,19 @@ public class RefreshFolderOperation extends RemoteOperation {
     }
 
 
-    public boolean isMultiStatus(int status) {
-        return (status == HttpStatus.SC_MULTI_STATUS); 
-    }
-
     /**
-     * Creates and populates a new {@link OCFile} object with the data read from the server.
-     * 
-     * @param remote    remote file read from the server (remote file or folder).
-     * @return          New OCFile instance representing the remote resource described by we.
+     * Syncs the Share resources for the files contained in the folder refreshed (children, not deeper descendants).
+     *
+     * @param client    Handler of a session with an OC server.
+     * @return          The result of the remote operation retrieving the Share resources in the folder refreshed by
+     *                  the operation.
      */
-    private OCFile fillOCFile(RemoteFile remote) {
-        OCFile file = new OCFile(remote.getRemotePath());
-        file.setCreationTimestamp(remote.getCreationTimestamp());
-        file.setFileLength(remote.getLength());
-        file.setMimetype(remote.getMimeType());
-        file.setModificationTimestamp(remote.getModifiedTimestamp());
-        file.setEtag(remote.getEtag());
-        file.setPermissions(remote.getPermissions());
-        file.setRemoteId(remote.getRemoteId());
-        return file;
-    }
-    
-
-    /**
-     * Checks the storage path of the OCFile received as parameter. 
-     * If it's out of the local ownCloud folder, tries to copy the file inside it. 
-     * 
-     * If the copy fails, the link to the local file is nullified. The account of forgotten 
-     * files is kept in {@link #mForgottenLocalFiles}
-     *) 
-     * @param file      File to check and fix.
-     */
-    private void checkAndFixForeignStoragePath(OCFile file) {
-        String storagePath = file.getStoragePath();
-        String expectedPath = FileStorageUtils.getDefaultSavePathFor(mAccount.name, file);
-        if (storagePath != null && !storagePath.equals(expectedPath)) {
-            /// fix storagePaths out of the local ownCloud folder
-            File originalFile = new File(storagePath);
-            if (FileStorageUtils.getUsableSpace(mAccount.name) < originalFile.length()) {
-                mForgottenLocalFiles.put(file.getRemotePath(), storagePath);
-                file.setStoragePath(null);
-                    
-            } else {
-                InputStream in = null;
-                OutputStream out = null;
-                try {
-                    File expectedFile = new File(expectedPath);
-                    File expectedParent = expectedFile.getParentFile();
-                    expectedParent.mkdirs();
-                    if (!expectedParent.isDirectory()) {
-                        throw new IOException(
-                                "Unexpected error: parent directory could not be created"
-                        );
-                    }
-                    expectedFile.createNewFile();
-                    if (!expectedFile.isFile()) {
-                        throw new IOException("Unexpected error: target file could not be created");
-                    }                    
-                    in = new FileInputStream(originalFile);
-                    out = new FileOutputStream(expectedFile);
-                    byte[] buf = new byte[1024];
-                    int len;
-                    while ((len = in.read(buf)) > 0){
-                        out.write(buf, 0, len);
-                    }
-                    file.setStoragePath(expectedPath);
-                    
-                } catch (Exception e) {
-                    Log_OC.e(TAG, "Exception while copying foreign file " + expectedPath, e);
-                    mForgottenLocalFiles.put(file.getRemotePath(), storagePath);
-                    file.setStoragePath(null);
-                    
-                } finally {
-                    try {
-                        if (in != null) in.close();
-                    } catch (Exception e) {
-                        Log_OC.d(TAG, "Weird exception while closing input stream for " 
-                                + storagePath + " (ignoring)", e);
-                    }
-                    try {
-                        if (out != null) out.close();
-                    } catch (Exception e) {
-                        Log_OC.d(TAG, "Weird exception while closing output stream for " 
-                                + expectedPath + " (ignoring)", e);
-                    }
-                }
-            }
-        }
-    }
-    
-    
     private RemoteOperationResult refreshSharesForFolder(OwnCloudClient client) {
         RemoteOperationResult result = null;
         
         // remote request 
         GetRemoteSharesForFileOperation operation = 
-                new GetRemoteSharesForFileOperation(mLocalFolder.getRemotePath(), false, true);
+                new GetRemoteSharesForFileOperation(mLocalFolder.getRemotePath(), true, true);
         result = operation.execute(client);
         
         if (result.isSuccess()) {
@@ -573,24 +501,6 @@ public class RefreshFolderOperation extends RemoteOperation {
     
 
     /**
-     * Scans the default location for saving local copies of files searching for
-     * a 'lost' file with the same full name as the {@link OCFile} received as 
-     * parameter.
-     *  
-     * @param file      File to associate a possible 'lost' local file.
-     */
-    private void searchForLocalFileInDefaultPath(OCFile file) {
-        if (file.getStoragePath() == null && !file.isFolder()) {
-            File f = new File(FileStorageUtils.getDefaultSavePathFor(mAccount.name, file));
-            if (f.exists()) {
-                file.setStoragePath(f.getAbsolutePath());
-                file.setLastSyncDateForData(f.lastModified());
-            }
-        }
-    }
-
-    
-    /**
      * Sends a message to any application component interested in the progress 
      * of the synchronization.
      * 
@@ -614,8 +524,20 @@ public class RefreshFolderOperation extends RemoteOperation {
     }
 
 
-    public boolean getRemoteFolderChanged() {
-        return mRemoteFolderChanged;
+    private void fetchFavoritesToSyncFromLocalData() {
+        List<OCFile> children = mStorageManager.getFolderContent(mLocalFolder);
+        for (OCFile child : children) {
+            if (!child.isFolder() && child.isFavorite()) {
+                SynchronizeFileOperation operation = new SynchronizeFileOperation(
+                        child,
+                        child,  // cheating with the remote file to get an update to server; to refactor
+                        mAccount,
+                        true,
+                        mContext
+                );
+                mFilesToSyncContents.add(operation);
+            }
+        }
     }
 
 }
index f94adb1..bc0caf1 100644 (file)
@@ -22,7 +22,6 @@
 
 package com.owncloud.android.operations;
 
-import com.owncloud.android.MainApp;
 import com.owncloud.android.datamodel.OCFile;
 import com.owncloud.android.files.services.FileDownloader;
 import com.owncloud.android.files.services.FileUploader;
@@ -208,15 +207,13 @@ public class SynchronizeFileOperation extends SyncOperation {
 
                 /// check changes in server and local file
                 boolean serverChanged = false;
-                /* time for eTag is coming, but not yet
-                    if (mServerFile.getEtag() != null) {
-                        serverChanged = (!mServerFile.getEtag().equals(mLocalFile.getEtag()));
-                    } else { */
-                serverChanged = (
-                    mServerFile.getModificationTimestamp() !=
-                            mLocalFile.getModificationTimestampAtLastSyncForData()
-                );
-                //}
+                if (mLocalFile.getEtag() == null || mLocalFile.getEtag().length() == 0) {
+                    // file uploaded (null) or downloaded ("") before upgrade to version 1.8.0; check the old condition
+                    serverChanged = mServerFile.getModificationTimestamp() !=
+                            mLocalFile.getModificationTimestampAtLastSyncForData();
+                } else {
+                    serverChanged = (!mServerFile.getEtag().equals(mLocalFile.getEtag()));
+                }
                 boolean localChanged = (
                     mLocalFile.getLocalModificationTimestamp() > mLocalFile.getLastSyncDateForData()
                 );
@@ -225,6 +222,7 @@ public class SynchronizeFileOperation extends SyncOperation {
                 //if (!mLocalFile.getEtag().isEmpty() && localChanged && serverChanged) {
                 if (localChanged && serverChanged) {
                     result = new RemoteOperationResult(ResultCode.SYNC_CONFLICT);
+                    getStorageManager().saveConflict(mLocalFile, mServerFile.getEtag());
 
                 } else if (localChanged) {
                     if (mSyncFileContents && mAllowUploads) {
@@ -254,6 +252,7 @@ public class SynchronizeFileOperation extends SyncOperation {
                         mServerFile.setLastSyncDateForData(mLocalFile.getLastSyncDateForData());
                         mServerFile.setStoragePath(mLocalFile.getStoragePath());
                         mServerFile.setParentId(mLocalFile.getParentId());
+                        mServerFile.setEtag(mLocalFile.getEtag());
                         getStorageManager().saveFile(mServerFile);
 
                     }
@@ -264,7 +263,11 @@ public class SynchronizeFileOperation extends SyncOperation {
                     result = new RemoteOperationResult(ResultCode.OK);
                 }
 
-            } 
+                // safe blanket: sync'ing a not in-conflict file will clean wrong conflict markers in ancestors
+                if (result.getCode() != ResultCode.SYNC_CONFLICT) {
+                    getStorageManager().saveConflict(mLocalFile, null);
+                }
+            }
 
         }
 
index 78b6a7b..675295a 100644 (file)
@@ -60,7 +60,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
  *  Fetches the list and properties of the files contained in the given folder, including their 
  *  properties, and updates the local database with them.
  *  
- *  Does NOT enter in the child folders to synchronize their contents also.
+ *  Does NOT enter in the child folders to synchronize their contents also, BUT requests for a new operation instance
+ *  doing so.
  */
 public class SynchronizeFolderOperation extends SyncOperation {
 
@@ -96,10 +97,7 @@ public class SynchronizeFolderOperation extends SyncOperation {
     private List<OCFile> mFilesForDirectDownload;
         // to avoid extra PROPFINDs when there was no change in the folder
     
-    private List<SyncOperation> mFilesToSyncContentsWithoutUpload;
-        // this will go out when 'folder synchronization' replaces 'folder download'; step by step  
-
-    private List<SyncOperation> mFavouriteFilesToSyncContents;
+    private List<SyncOperation> mFilesToSyncContents;
         // this will be used for every file when 'folder synchronization' replaces 'folder download' 
 
     private final AtomicBoolean mCancellationRequested;
@@ -120,8 +118,7 @@ public class SynchronizeFolderOperation extends SyncOperation {
         mContext = context;
         mRemoteFolderChanged = false;
         mFilesForDirectDownload = new Vector<OCFile>();
-        mFilesToSyncContentsWithoutUpload = new Vector<SyncOperation>();
-        mFavouriteFilesToSyncContents = new Vector<SyncOperation>();
+        mFilesToSyncContents = new Vector<SyncOperation>();
         mCancellationRequested = new AtomicBoolean(false);
     }
 
@@ -281,7 +278,7 @@ public class SynchronizeFolderOperation extends SyncOperation {
         FileDataStorageManager storageManager = getStorageManager();
         
         // parse data from remote folder
-        OCFile remoteFolder = fillOCFile((RemoteFile)folderAndFiles.get(0));
+        OCFile remoteFolder = FileStorageUtils.fillOCFile((RemoteFile) folderAndFiles.get(0));
         remoteFolder.setParentId(mLocalFolder.getParentId());
         remoteFolder.setFileId(mLocalFolder.getFileId());
 
@@ -290,8 +287,7 @@ public class SynchronizeFolderOperation extends SyncOperation {
 
         List<OCFile> updatedFiles = new Vector<OCFile>(folderAndFiles.size() - 1);
         mFilesForDirectDownload.clear();
-        mFilesToSyncContentsWithoutUpload.clear();
-        mFavouriteFilesToSyncContents.clear();
+        mFilesToSyncContents.clear();
 
         if (mCancellationRequested.get()) {
             throw new OperationCancelledException();
@@ -306,85 +302,78 @@ public class SynchronizeFolderOperation extends SyncOperation {
         }
 
         // loop to synchronize every child
-        OCFile remoteFile = null, localFile = null;
+        OCFile remoteFile = null, localFile = null, updatedFile = null;
+        RemoteFile r;
         for (int i=1; i<folderAndFiles.size(); i++) {
             /// new OCFile instance with the data from the server
-            remoteFile = fillOCFile((RemoteFile)folderAndFiles.get(i));
-            remoteFile.setParentId(mLocalFolder.getFileId());
+            r = (RemoteFile) folderAndFiles.get(i);
+            remoteFile = FileStorageUtils.fillOCFile(r);
+
+            /// new OCFile instance to merge fresh data from server with local state
+            updatedFile = FileStorageUtils.fillOCFile(r);
+            updatedFile.setParentId(mLocalFolder.getFileId());
 
             /// retrieve local data for the read file
             //  localFile = mStorageManager.getFileByPath(remoteFile.getRemotePath());
             localFile = localFilesMap.remove(remoteFile.getRemotePath());
 
-            /// add to the remoteFile (the new one) data about LOCAL STATE (not existing in server)
-            remoteFile.setLastSyncDateForProperties(mCurrentSyncTime);
+            /// add to updatedFile data about LOCAL STATE (not existing in server)
+            updatedFile.setLastSyncDateForProperties(mCurrentSyncTime);
             if (localFile != null) {
-                // some properties of local state are kept unmodified
-                remoteFile.setFileId(localFile.getFileId());
-                remoteFile.setFavorite(localFile.isFavorite());
-                remoteFile.setLastSyncDateForData(localFile.getLastSyncDateForData());
-                remoteFile.setModificationTimestampAtLastSyncForData(
+                updatedFile.setFileId(localFile.getFileId());
+                updatedFile.setFavorite(localFile.isFavorite());
+                updatedFile.setLastSyncDateForData(localFile.getLastSyncDateForData());
+                updatedFile.setModificationTimestampAtLastSyncForData(
                         localFile.getModificationTimestampAtLastSyncForData()
                 );
-                remoteFile.setStoragePath(localFile.getStoragePath());
-                // eTag will not be updated unless contents are synchronized
-                //  (Synchronize[File|Folder]Operation with remoteFile as parameter)
-                remoteFile.setEtag(localFile.getEtag());
-                if (remoteFile.isFolder()) {
-                    remoteFile.setFileLength(localFile.getFileLength());
+                updatedFile.setStoragePath(localFile.getStoragePath());
+                // eTag will not be updated unless file CONTENTS are synchronized
+                updatedFile.setEtag(localFile.getEtag());
+                if (updatedFile.isFolder()) {
+                    updatedFile.setFileLength(localFile.getFileLength());
                         // TODO move operations about size of folders to FileContentProvider
                 } else if (mRemoteFolderChanged && remoteFile.isImage() &&
                         remoteFile.getModificationTimestamp() !=
                                 localFile.getModificationTimestamp()) {
-                    remoteFile.setNeedsUpdateThumbnail(true);
+                    updatedFile.setNeedsUpdateThumbnail(true);
                     Log.d(TAG, "Image " + remoteFile.getFileName() + " updated on the server");
                 }
-                remoteFile.setPublicLink(localFile.getPublicLink());
-                remoteFile.setShareByLink(localFile.isShareByLink());
+                updatedFile.setPublicLink(localFile.getPublicLink());
+                updatedFile.setShareViaLink(localFile.isSharedViaLink());
+                updatedFile.setShareWithSharee(localFile.isSharedWithSharee());
+                updatedFile.setEtagInConflict(localFile.getEtagInConflict());
             } else {
-                // remote eTag will not be updated unless contents are synchronized
-                //  (Synchronize[File|Folder]Operation with remoteFile as parameter)
-                remoteFile.setEtag("");
+                // remote eTag will not be updated unless file CONTENTS are synchronized
+                updatedFile.setEtag("");
             }
 
             /// check and fix, if needed, local storage path
-            searchForLocalFileInDefaultPath(remoteFile);
+            searchForLocalFileInDefaultPath(updatedFile);
             
             /// classify file to sync/download contents later
             if (remoteFile.isFolder()) {
                 /// to download children files recursively
-                synchronized(mCancellationRequested) {
+                synchronized (mCancellationRequested) {
                     if (mCancellationRequested.get()) {
                         throw new OperationCancelledException();
                     }
                     startSyncFolderOperation(remoteFile.getRemotePath());
                 }
 
-            } else if (remoteFile.isFavorite()) {
-                /// prepare content synchronization for kept-in-sync files
-                SynchronizeFileOperation operation = new SynchronizeFileOperation(
-                        localFile,
-                        remoteFile,
-                        mAccount,
-                        true,
-                        mContext
-                    );
-                mFavouriteFilesToSyncContents.add(operation);
-                
             } else {
-                /// prepare limited synchronization for regular files
+                /// prepare content synchronization for files (any file, not just favorites)
                 SynchronizeFileOperation operation = new SynchronizeFileOperation(
                         localFile,
                         remoteFile,
                         mAccount,
                         true,
-                        false,
                         mContext
                     );
-                mFilesToSyncContentsWithoutUpload.add(operation);
+                mFilesToSyncContents.add(operation);
+                
             }
 
-            updatedFiles.add(remoteFile);
+            updatedFiles.add(updatedFile);
         }
 
         // save updated contents in local database
@@ -408,10 +397,23 @@ public class SynchronizeFolderOperation extends SyncOperation {
                 }
 
             } else {
-                /// prepare limited synchronization for regular files
+                /// synchronization for regular files
                 if (!child.isDown()) {
                     mFilesForDirectDownload.add(child);
+
+                } else {
+                    /// this should result in direct upload of files that were locally modified
+                    SynchronizeFileOperation operation = new SynchronizeFileOperation(
+                            child,
+                            (child.getEtagInConflict() != null ? child : null),
+                            mAccount,
+                            true,
+                            mContext
+                    );
+                    mFilesToSyncContents.add(operation);
+
                 }
+
             }
         }
     }
@@ -419,8 +421,7 @@ public class SynchronizeFolderOperation extends SyncOperation {
 
     private void syncContents(OwnCloudClient client) throws OperationCancelledException {
         startDirectDownloads();
-        startContentSynchronizations(mFilesToSyncContentsWithoutUpload, client);
-        startContentSynchronizations(mFavouriteFilesToSyncContents, client);
+        startContentSynchronizations(mFilesToSyncContents, client);
     }
 
     
@@ -479,26 +480,6 @@ public class SynchronizeFolderOperation extends SyncOperation {
 
     
     /**
-     * Creates and populates a new {@link com.owncloud.android.datamodel.OCFile}
-     * object with the data read from the server.
-     *
-     * @param remote    remote file read from the server (remote file or folder).
-     * @return          New OCFile instance representing the remote resource described by we.
-     */
-    private OCFile fillOCFile(RemoteFile remote) {
-        OCFile file = new OCFile(remote.getRemotePath());
-        file.setCreationTimestamp(remote.getCreationTimestamp());
-        file.setFileLength(remote.getLength());
-        file.setMimetype(remote.getMimeType());
-        file.setModificationTimestamp(remote.getModifiedTimestamp());
-        file.setEtag(remote.getEtag());
-        file.setPermissions(remote.getPermissions());
-        file.setRemoteId(remote.getRemoteId());
-        return file;
-    }
-
-
-    /**
      * Scans the default location for saving local copies of files searching for
      * a 'lost' file with the same full name as the {@link com.owncloud.android.datamodel.OCFile}
      * received as parameter.
diff --git a/src/com/owncloud/android/operations/UnshareLinkOperation.java b/src/com/owncloud/android/operations/UnshareLinkOperation.java
deleted file mode 100644 (file)
index 1b66226..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- *   ownCloud Android client application
- *
- *   @author masensio
- *   Copyright (C) 2015 ownCloud Inc.
- *
- *   This program is free software: you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License version 2,
- *   as published by the Free Software Foundation.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-package com.owncloud.android.operations;
-
-import android.content.Context;
-
-import com.owncloud.android.MainApp;
-import com.owncloud.android.datamodel.OCFile;
-
-import com.owncloud.android.lib.common.OwnCloudClient;
-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.lib.resources.files.ExistenceCheckRemoteOperation;
-import com.owncloud.android.lib.resources.shares.OCShare;
-import com.owncloud.android.lib.resources.shares.RemoveRemoteShareOperation;
-import com.owncloud.android.lib.resources.shares.ShareType;
-
-import com.owncloud.android.operations.common.SyncOperation;
-
-/**
- * Unshare file/folder
- * Save the data in Database
- */
-public class UnshareLinkOperation extends SyncOperation {
-
-    private static final String TAG = UnshareLinkOperation.class.getSimpleName();
-    
-    private String mRemotePath;
-    private Context mContext;
-    
-    
-    public UnshareLinkOperation(String remotePath, Context context) {
-        mRemotePath = remotePath;
-        mContext = context;
-    }
-
-    @Override
-    protected RemoteOperationResult run(OwnCloudClient client) {
-        RemoteOperationResult result  = null;
-        
-        // Get Share for a file
-        OCShare share = getStorageManager().getFirstShareByPathAndType(mRemotePath,
-                ShareType.PUBLIC_LINK);
-        
-        if (share != null) {
-            RemoveRemoteShareOperation operation =
-                    new RemoveRemoteShareOperation((int) share.getIdRemoteShared());
-            result = operation.execute(client);
-
-            if (result.isSuccess() || result.getCode() == ResultCode.SHARE_NOT_FOUND) {
-                Log_OC.d(TAG, "Share id = " + share.getIdRemoteShared() + " deleted");
-
-                OCFile file = getStorageManager().getFileByPath(mRemotePath);
-                file.setShareByLink(false);
-                file.setPublicLink("");
-                getStorageManager().saveFile(file);
-                getStorageManager().removeShare(share);
-                
-                if (result.getCode() == ResultCode.SHARE_NOT_FOUND) {
-                    if (existsFile(client, file.getRemotePath())) {
-                        result = new RemoteOperationResult(ResultCode.OK);
-                    } else {
-                        getStorageManager().removeFile(file, true, true);
-                    }
-                }
-            } 
-                
-        } else {
-            result = new RemoteOperationResult(ResultCode.SHARE_NOT_FOUND);
-        }
-
-        return result;
-    }
-    
-    private boolean existsFile(OwnCloudClient client, String remotePath){
-        ExistenceCheckRemoteOperation existsOperation =
-                new ExistenceCheckRemoteOperation(remotePath, mContext, false);
-        RemoteOperationResult result = existsOperation.execute(client);
-        return result.isSuccess();
-    }
-
-}
diff --git a/src/com/owncloud/android/operations/UnshareOperation.java b/src/com/owncloud/android/operations/UnshareOperation.java
new file mode 100644 (file)
index 0000000..d819abf
--- /dev/null
@@ -0,0 +1,113 @@
+/**
+ *   ownCloud Android client application
+ *
+ *   @author masensio
+ *   Copyright (C) 2015 ownCloud Inc.
+ *
+ *   This program is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License version 2,
+ *   as published by the Free Software Foundation.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+package com.owncloud.android.operations;
+
+import android.content.Context;
+
+import com.owncloud.android.datamodel.OCFile;
+
+import com.owncloud.android.lib.common.OwnCloudClient;
+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.lib.resources.files.ExistenceCheckRemoteOperation;
+import com.owncloud.android.lib.resources.shares.OCShare;
+import com.owncloud.android.lib.resources.shares.RemoveRemoteShareOperation;
+import com.owncloud.android.lib.resources.shares.ShareType;
+
+import com.owncloud.android.operations.common.SyncOperation;
+
+import java.util.ArrayList;
+
+/**
+ * Unshare file/folder
+ * Save the data in Database
+ */
+public class UnshareOperation extends SyncOperation {
+
+    private static final String TAG = UnshareOperation.class.getSimpleName();
+    
+    private String mRemotePath;
+    private ShareType mShareType;
+    private String mShareWith;
+    private Context mContext;
+    
+    public UnshareOperation(String remotePath, ShareType shareType, String shareWith,
+                                Context context) {
+        mRemotePath = remotePath;
+        mShareType = shareType;
+        mShareWith = shareWith;
+        mContext = context;
+    }
+
+    @Override
+    protected RemoteOperationResult run(OwnCloudClient client) {
+        RemoteOperationResult result  = null;
+        
+        // Get Share for a file
+        OCShare share = getStorageManager().getFirstShareByPathAndType(mRemotePath,
+                mShareType, mShareWith);
+        
+        if (share != null) {
+            OCFile file = getStorageManager().getFileByPath(mRemotePath);
+            RemoveRemoteShareOperation operation =
+                    new RemoveRemoteShareOperation((int) share.getRemoteId());
+            result = operation.execute(client);
+
+            if (result.isSuccess()) {
+                Log_OC.d(TAG, "Share id = " + share.getRemoteId() + " deleted");
+
+                if (mShareType == ShareType.PUBLIC_LINK) {
+                    file.setShareViaLink(false);
+                    file.setPublicLink("");
+                } else if (mShareType == ShareType.USER || mShareType == ShareType.GROUP){
+                    // Check if it is the last share
+                    ArrayList <OCShare> sharesWith = getStorageManager().
+                            getSharesWithForAFile(mRemotePath,
+                            getStorageManager().getAccount().name);
+                    if (sharesWith.size() == 1) {
+                        file.setShareWithSharee(false);
+                    }
+                }
+
+                getStorageManager().saveFile(file);
+                getStorageManager().removeShare(share);
+                
+            } else if (!existsFile(client, file.getRemotePath())) {
+                // unshare failed because file was deleted before
+                getStorageManager().removeFile(file, true, true);
+            }
+
+        } else {
+            result = new RemoteOperationResult(ResultCode.SHARE_NOT_FOUND);
+        }
+
+        return result;
+    }
+    
+    private boolean existsFile(OwnCloudClient client, String remotePath){
+        ExistenceCheckRemoteOperation existsOperation =
+                new ExistenceCheckRemoteOperation(remotePath, mContext, false);
+        RemoteOperationResult result = existsOperation.execute(client);
+        return result.isSuccess();
+    }
+
+}
diff --git a/src/com/owncloud/android/operations/UpdateShareViaLinkOperation.java b/src/com/owncloud/android/operations/UpdateShareViaLinkOperation.java
new file mode 100644 (file)
index 0000000..14b60e8
--- /dev/null
@@ -0,0 +1,152 @@
+/**
+ *   ownCloud Android client application
+ *
+ *   @author David A. Velasco
+ *   Copyright (C) 2015 ownCloud Inc.
+ *
+ *   This program is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License version 2,
+ *   as published by the Free Software Foundation.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+package com.owncloud.android.operations;
+
+import com.owncloud.android.datamodel.OCFile;
+import com.owncloud.android.lib.common.OwnCloudClient;
+import com.owncloud.android.lib.common.operations.RemoteOperation;
+import com.owncloud.android.lib.common.operations.RemoteOperationResult;
+import com.owncloud.android.lib.resources.files.FileUtils;
+import com.owncloud.android.lib.resources.shares.GetRemoteShareOperation;
+import com.owncloud.android.lib.resources.shares.OCShare;
+import com.owncloud.android.lib.resources.shares.ShareType;
+import com.owncloud.android.lib.resources.shares.UpdateRemoteShareOperation;
+import com.owncloud.android.operations.common.SyncOperation;
+
+import java.util.Calendar;
+
+
+/**
+ * Updates an existing public share for a given file
+ */
+
+public class UpdateShareViaLinkOperation extends SyncOperation {
+
+    private String mPath;
+    private String mPassword;
+    private long mExpirationDateInMillis;
+
+    /**
+     * Constructor
+     *
+     * @param path          Full path of the file/folder being shared. Mandatory argument
+     */
+    public UpdateShareViaLinkOperation(String path) {
+
+        mPath = path;
+        mPassword = null;
+        mExpirationDateInMillis = 0;
+    }
+
+
+    /**
+     * Set password to update in public link.
+     *
+     * @param password      Password to set to the public link.
+     *                      Empty string clears the current password.
+     *                      Null results in no update applied to the password.
+     */
+    public void setPassword(String password) {
+        mPassword = password;
+    }
+
+
+    /**
+     * Set expiration date to update in Share resource.
+     *
+     * @param expirationDateInMillis    Expiration date to set to the public link.
+     *                                  A negative value clears the current expiration date.
+     *                                  Zero value (start-of-epoch) results in no update done on
+     *                                  the expiration date.
+     */
+    public void setExpirationDate(long expirationDateInMillis) {
+        mExpirationDateInMillis = expirationDateInMillis;
+    }
+
+
+    @Override
+    protected RemoteOperationResult run(OwnCloudClient client) {
+
+        OCShare publicShare = getStorageManager().getFirstShareByPathAndType(
+                mPath,
+                ShareType.PUBLIC_LINK,
+                ""
+        );
+
+        if (publicShare == null) {
+            // TODO try to get remote share before failing?
+            return new RemoteOperationResult(
+                    RemoteOperationResult.ResultCode.SHARE_NOT_FOUND
+            );
+        }
+
+        // Update remote share with password
+        UpdateRemoteShareOperation udpateOp = new UpdateRemoteShareOperation(
+            publicShare.getRemoteId()
+        );
+        udpateOp.setPassword(mPassword);
+        udpateOp.setExpirationDate(mExpirationDateInMillis);
+        RemoteOperationResult result = udpateOp.execute(client);
+
+        if (result.isSuccess()) {
+            // Retrieve updated share / save directly with password? -> no; the password is not be saved
+            RemoteOperation getShareOp = new GetRemoteShareOperation(publicShare.getRemoteId());
+            result = getShareOp.execute(client);
+            if (result.isSuccess()) {
+                OCShare share = (OCShare) result.getData().get(0);
+                updateData(share);
+            }
+        }
+
+        return result;
+    }
+
+    public String getPath() {
+        return mPath;
+    }
+
+    public String getPassword() {
+        return mPassword;
+    }
+
+    private void updateData(OCShare share) {
+        // Update DB with the response
+        share.setPath(mPath);
+        if (mPath.endsWith(FileUtils.PATH_SEPARATOR)) {
+            share.setIsFolder(true);
+        } else {
+            share.setIsFolder(false);
+        }
+
+        getStorageManager().saveShare(share);   // TODO info about having a password? ask to Gonzalo
+
+        // Update OCFile with data from share: ShareByLink  and publicLink
+        // TODO check & remove if not needed
+        OCFile file = getStorageManager().getFileByPath(mPath);
+        if (file != null) {
+            file.setPublicLink(share.getShareLink());
+            file.setShareViaLink(true);
+            getStorageManager().saveFile(file);
+        }
+    }
+
+}
+
index 12cf1ac..ee9f7c8 100644 (file)
@@ -31,7 +31,7 @@ import java.util.Iterator;
 import java.util.Set;
 import java.util.concurrent.atomic.AtomicBoolean;
 
-import org.apache.commons.httpclient.methods.PutMethod;
+import org.apache.commons.httpclient.HttpStatus;
 import org.apache.commons.httpclient.methods.RequestEntity;
 
 import android.accounts.Account;
@@ -75,7 +75,6 @@ public class UploadFileOperation extends RemoteOperation {
     private boolean mWasRenamed = false;
     private String mOriginalFileName = null;
     private String mOriginalStoragePath = null;
-    PutMethod mPutMethod = null;
     private Set<OnDatatransferProgressListener> mDataTransferListeners = new HashSet<OnDatatransferProgressListener>();
     private AtomicBoolean mCancellationRequested = new AtomicBoolean(false);
     private Context mContext;
@@ -312,61 +311,61 @@ public class UploadFileOperation extends RemoteOperation {
                     (new File(mFile.getStoragePath())).length() >
                             ChunkedUploadRemoteFileOperation.CHUNK_SIZE ) {
                 mUploadOperation = new ChunkedUploadRemoteFileOperation(mFile.getStoragePath(),
-                        mFile.getRemotePath(), mFile.getMimetype());
+                        mFile.getRemotePath(), mFile.getMimetype(), mFile.getEtagInConflict());
             } else {
                 mUploadOperation = new UploadRemoteFileOperation(mFile.getStoragePath(),
-                        mFile.getRemotePath(), mFile.getMimetype());
+                        mFile.getRemotePath(), mFile.getMimetype(), mFile.getEtagInConflict());
             }
             Iterator <OnDatatransferProgressListener> listener = mDataTransferListeners.iterator();
             while (listener.hasNext()) {
                 mUploadOperation.addDatatransferProgressListener(listener.next());
             }
-            if (!mCancellationRequested.get()) {
-                result = mUploadOperation.execute(client);
-
-                /// move local temporal file or original file to its corresponding
-                // location in the ownCloud local folder
-                if (result.isSuccess()) {
-                    if (mLocalBehaviour == FileUploader.LOCAL_BEHAVIOUR_FORGET) {
-                        mFile.setStoragePath(null);
-
-                    } else {
-                        mFile.setStoragePath(expectedPath);
-                        File fileToMove = null;
-                        if (temporalFile != null) { // FileUploader.LOCAL_BEHAVIOUR_COPY
-                            // ; see where temporalFile was
-                            // set
-                            fileToMove = temporalFile;
-                        } else { // FileUploader.LOCAL_BEHAVIOUR_MOVE
-                            fileToMove = originalFile;
-                        }
-                        if (!expectedFile.equals(fileToMove)) {
-                            File expectedFolder = expectedFile.getParentFile();
-                            expectedFolder.mkdirs();
-                            if (!expectedFolder.isDirectory() || !fileToMove.renameTo(expectedFile)) {
-                                mFile.setStoragePath(null); // forget the local file
-                                // by now, treat this as a success; the file was
-                                // uploaded; the user won't like that the local file
-                                // is not linked, but this should be a very rare
-                                // fail;
-                                // the best option could be show a warning message
-                                // (but not a fail)
-                                // result = new
-                                // RemoteOperationResult(ResultCode.LOCAL_STORAGE_NOT_MOVED);
-                                // return result;
-                            }
+            if (mCancellationRequested.get()) {
+                throw new OperationCancelledException();
+            }
+
+            result = mUploadOperation.execute(client);
+
+            /// move local temporal file or original file to its corresponding
+            // location in the ownCloud local folder
+            if (result.isSuccess()) {
+                if (mLocalBehaviour == FileUploader.LOCAL_BEHAVIOUR_FORGET) {
+                    mFile.setStoragePath(null);
+
+                } else {
+                    mFile.setStoragePath(expectedPath);
+                    File fileToMove = null;
+                    if (temporalFile != null) { // FileUploader.LOCAL_BEHAVIOUR_COPY
+                        // ; see where temporalFile was
+                        // set
+                        fileToMove = temporalFile;
+                    } else { // FileUploader.LOCAL_BEHAVIOUR_MOVE
+                        fileToMove = originalFile;
+                    }
+                    if (!expectedFile.equals(fileToMove)) {
+                        File expectedFolder = expectedFile.getParentFile();
+                        expectedFolder.mkdirs();
+                        if (!expectedFolder.isDirectory() || !fileToMove.renameTo(expectedFile)) {
+                            mFile.setStoragePath(null); // forget the local file
+                            // by now, treat this as a success; the file was
+                            // uploaded; the user won't like that the local file
+                            // is not linked, but this should be a very rare
+                            // fail;
+                            // the best option could be show a warning message
+                            // (but not a fail)
+                            // result = new
+                            // RemoteOperationResult(ResultCode.LOCAL_STORAGE_NOT_MOVED);
+                            // return result;
                         }
                     }
                 }
+
+            } else if (result.getHttpCode() == HttpStatus.SC_PRECONDITION_FAILED ) {
+                result = new RemoteOperationResult(ResultCode.SYNC_CONFLICT);
             }
 
         } catch (Exception e) {
-            // TODO something cleaner with cancellations
-            if (mCancellationRequested.get()) {
-                result = new RemoteOperationResult(new OperationCancelledException());
-            } else {
-                result = new RemoteOperationResult(e);
-            }
+            result = new RemoteOperationResult(e);
 
         } finally {
             if (temporalFile != null && !originalFile.equals(temporalFile)) {
@@ -406,7 +405,7 @@ public class UploadFileOperation extends RemoteOperation {
         newFile.setModificationTimestamp(mFile.getModificationTimestamp());
         newFile.setModificationTimestampAtLastSyncForData(
                 mFile.getModificationTimestampAtLastSyncForData());
-        // newFile.setEtag(mFile.getEtag())
+        newFile.setEtag(mFile.getEtag());
         newFile.setFavorite(mFile.isFavorite());
         newFile.setLastSyncDateForProperties(mFile.getLastSyncDateForProperties());
         newFile.setLastSyncDateForData(mFile.getLastSyncDateForData());
index 5fb5c8c..3d917d2 100644 (file)
 
 package com.owncloud.android.operations.common;
 
-import com.owncloud.android.MainApp;
+import android.content.Context;
+import android.os.Handler;
+
 import com.owncloud.android.datamodel.FileDataStorageManager;
 import com.owncloud.android.lib.common.OwnCloudClient;
 import com.owncloud.android.lib.common.operations.OnRemoteOperationListener;
 import com.owncloud.android.lib.common.operations.RemoteOperation;
 import com.owncloud.android.lib.common.operations.RemoteOperationResult;
 
-import android.content.Context;
-import android.os.Handler;
-
 
 /**
  * Operation which execution involves both interactions with an ownCloud server and
index 70cd897..e652bad 100644 (file)
 
 package com.owncloud.android.providers;
 
-import java.io.File;
-import java.security.Provider;
-import java.util.ArrayList;
-import java.util.HashMap;
-
-import com.owncloud.android.MainApp;
-import com.owncloud.android.R;
-import com.owncloud.android.datamodel.OCFile;
-import com.owncloud.android.db.ProviderMeta;
-import com.owncloud.android.db.ProviderMeta.ProviderTableMeta;
-import com.owncloud.android.lib.common.accounts.AccountUtils;
-import com.owncloud.android.lib.common.utils.Log_OC;
-import com.owncloud.android.lib.resources.shares.ShareType;
-import com.owncloud.android.utils.FileStorageUtils;
-
 import android.accounts.Account;
 import android.accounts.AccountManager;
 import android.content.ContentProvider;
@@ -55,6 +40,19 @@ import android.database.sqlite.SQLiteQueryBuilder;
 import android.net.Uri;
 import android.text.TextUtils;
 
+import com.owncloud.android.MainApp;
+import com.owncloud.android.R;
+import com.owncloud.android.datamodel.OCFile;
+import com.owncloud.android.db.ProviderMeta;
+import com.owncloud.android.db.ProviderMeta.ProviderTableMeta;
+import com.owncloud.android.lib.common.accounts.AccountUtils;
+import com.owncloud.android.lib.common.utils.Log_OC;
+import com.owncloud.android.lib.resources.shares.ShareType;
+import com.owncloud.android.utils.FileStorageUtils;
+
+import java.io.File;
+import java.util.ArrayList;
+
 /**
  * The ContentProvider for the ownCloud App.
  */
@@ -62,95 +60,14 @@ public class FileContentProvider extends ContentProvider {
 
     private DataBaseHelper mDbHelper;
 
-    // Projection for filelist table
-    private static HashMap<String, String> mFileProjectionMap;
-    static {
-        mFileProjectionMap = new HashMap<String, String>();
-        mFileProjectionMap.put(ProviderTableMeta._ID, ProviderTableMeta._ID);
-        mFileProjectionMap.put(ProviderTableMeta.FILE_PARENT,
-                ProviderTableMeta.FILE_PARENT);
-        mFileProjectionMap.put(ProviderTableMeta.FILE_PATH,
-                ProviderTableMeta.FILE_PATH);
-        mFileProjectionMap.put(ProviderTableMeta.FILE_NAME,
-                ProviderTableMeta.FILE_NAME);
-        mFileProjectionMap.put(ProviderTableMeta.FILE_CREATION,
-                ProviderTableMeta.FILE_CREATION);
-        mFileProjectionMap.put(ProviderTableMeta.FILE_MODIFIED,
-                ProviderTableMeta.FILE_MODIFIED);
-        mFileProjectionMap.put(ProviderTableMeta.FILE_MODIFIED_AT_LAST_SYNC_FOR_DATA,
-                ProviderTableMeta.FILE_MODIFIED_AT_LAST_SYNC_FOR_DATA);
-        mFileProjectionMap.put(ProviderTableMeta.FILE_CONTENT_LENGTH,
-                ProviderTableMeta.FILE_CONTENT_LENGTH);
-        mFileProjectionMap.put(ProviderTableMeta.FILE_CONTENT_TYPE,
-                ProviderTableMeta.FILE_CONTENT_TYPE);
-        mFileProjectionMap.put(ProviderTableMeta.FILE_STORAGE_PATH,
-                ProviderTableMeta.FILE_STORAGE_PATH);
-        mFileProjectionMap.put(ProviderTableMeta.FILE_LAST_SYNC_DATE,
-                ProviderTableMeta.FILE_LAST_SYNC_DATE);
-        mFileProjectionMap.put(ProviderTableMeta.FILE_LAST_SYNC_DATE_FOR_DATA,
-                ProviderTableMeta.FILE_LAST_SYNC_DATE_FOR_DATA);
-        mFileProjectionMap.put(ProviderTableMeta.FILE_KEEP_IN_SYNC,
-                ProviderTableMeta.FILE_KEEP_IN_SYNC);
-        mFileProjectionMap.put(ProviderTableMeta.FILE_ACCOUNT_OWNER,
-                ProviderTableMeta.FILE_ACCOUNT_OWNER);
-        mFileProjectionMap.put(ProviderTableMeta.FILE_ETAG,
-                ProviderTableMeta.FILE_ETAG);
-        mFileProjectionMap.put(ProviderTableMeta.FILE_SHARE_BY_LINK,
-                ProviderTableMeta.FILE_SHARE_BY_LINK);
-        mFileProjectionMap.put(ProviderTableMeta.FILE_PUBLIC_LINK,
-                ProviderTableMeta.FILE_PUBLIC_LINK);
-        mFileProjectionMap.put(ProviderTableMeta.FILE_PERMISSIONS,
-                ProviderTableMeta.FILE_PERMISSIONS);
-        mFileProjectionMap.put(ProviderTableMeta.FILE_REMOTE_ID,
-                ProviderTableMeta.FILE_REMOTE_ID);
-        mFileProjectionMap.put(ProviderTableMeta.FILE_UPDATE_THUMBNAIL,
-                ProviderTableMeta.FILE_UPDATE_THUMBNAIL);
-        mFileProjectionMap.put(ProviderTableMeta.FILE_IS_DOWNLOADING,
-                ProviderTableMeta.FILE_IS_DOWNLOADING);
-    }
-
     private static final int SINGLE_FILE = 1;
     private static final int DIRECTORY = 2;
     private static final int ROOT_DIRECTORY = 3;
     private static final int SHARES = 4;
+    private static final int CAPABILITIES = 5;
 
     private static final String TAG = FileContentProvider.class.getSimpleName();
 
-    // Projection for ocshares table
-    private static HashMap<String, String> mOCSharesProjectionMap;
-    static {
-        mOCSharesProjectionMap = new HashMap<String, String>();
-        mOCSharesProjectionMap.put(ProviderTableMeta._ID, ProviderTableMeta._ID);
-        mOCSharesProjectionMap.put(ProviderTableMeta.OCSHARES_FILE_SOURCE,
-                ProviderTableMeta.OCSHARES_FILE_SOURCE);
-        mOCSharesProjectionMap.put(ProviderTableMeta.OCSHARES_ITEM_SOURCE,
-                ProviderTableMeta.OCSHARES_ITEM_SOURCE);
-        mOCSharesProjectionMap.put(ProviderTableMeta.OCSHARES_SHARE_TYPE,
-                ProviderTableMeta.OCSHARES_SHARE_TYPE);
-        mOCSharesProjectionMap.put(ProviderTableMeta.OCSHARES_SHARE_WITH,
-                ProviderTableMeta.OCSHARES_SHARE_WITH);
-        mOCSharesProjectionMap.put(ProviderTableMeta.OCSHARES_PATH,
-                ProviderTableMeta.OCSHARES_PATH);
-        mOCSharesProjectionMap.put(ProviderTableMeta.OCSHARES_PERMISSIONS,
-                ProviderTableMeta.OCSHARES_PERMISSIONS);
-        mOCSharesProjectionMap.put(ProviderTableMeta.OCSHARES_SHARED_DATE,
-                ProviderTableMeta.OCSHARES_SHARED_DATE);
-        mOCSharesProjectionMap.put(ProviderTableMeta.OCSHARES_EXPIRATION_DATE,
-                ProviderTableMeta.OCSHARES_EXPIRATION_DATE);
-        mOCSharesProjectionMap.put(ProviderTableMeta.OCSHARES_TOKEN,
-                ProviderTableMeta.OCSHARES_TOKEN);
-        mOCSharesProjectionMap.put(ProviderTableMeta.OCSHARES_SHARE_WITH_DISPLAY_NAME,
-                ProviderTableMeta.OCSHARES_SHARE_WITH_DISPLAY_NAME);
-        mOCSharesProjectionMap.put(ProviderTableMeta.OCSHARES_IS_DIRECTORY,
-                ProviderTableMeta.OCSHARES_IS_DIRECTORY);
-        mOCSharesProjectionMap.put(ProviderTableMeta.OCSHARES_USER_ID,
-                ProviderTableMeta.OCSHARES_USER_ID);
-        mOCSharesProjectionMap.put(ProviderTableMeta.OCSHARES_ID_REMOTE_SHARED,
-                ProviderTableMeta.OCSHARES_ID_REMOTE_SHARED);
-        mOCSharesProjectionMap.put(ProviderTableMeta.OCSHARES_ACCOUNT_OWNER,
-                ProviderTableMeta.OCSHARES_ACCOUNT_OWNER);
-    }
-
     private UriMatcher mUriMatcher;
 
     @Override
@@ -250,6 +167,9 @@ public class FileContentProvider extends ContentProvider {
         case SHARES:
             count = db.delete(ProviderTableMeta.OCSHARES_TABLE_NAME, where, whereArgs);
             break;
+        case CAPABILITIES:
+            count = db.delete(ProviderTableMeta.CAPABILITIES_TABLE_NAME, where, whereArgs);
+            break;
         default:
             //Log_OC.e(TAG, "Unknown uri " + uri);
             throw new IllegalArgumentException("Unknown uri: " + uri.toString());
@@ -307,9 +227,7 @@ public class FileContentProvider extends ContentProvider {
                 }
                 long rowId = db.insert(ProviderTableMeta.FILE_TABLE_NAME, null, values);
                 if (rowId > 0) {
-                    Uri insertedFileUri =
-                            ContentUris.withAppendedId(ProviderTableMeta.CONTENT_URI_FILE, rowId);
-                    return insertedFileUri;
+                    return ContentUris.withAppendedId(ProviderTableMeta.CONTENT_URI_FILE, rowId);
                 } else {
                     throw new SQLException("ERROR " + uri);
                 }
@@ -325,45 +243,29 @@ public class FileContentProvider extends ContentProvider {
             }
 
         case SHARES:
-            String path = values.getAsString(ProviderTableMeta.OCSHARES_PATH);
-            String accountNameShare= values.getAsString(ProviderTableMeta.OCSHARES_ACCOUNT_OWNER);
-            String[] projectionShare = new String[] {
-                    ProviderTableMeta._ID, ProviderTableMeta.OCSHARES_PATH,
-                    ProviderTableMeta.OCSHARES_ACCOUNT_OWNER
-            };
-            String whereShare = ProviderTableMeta.OCSHARES_PATH + "=? AND " +
-                    ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + "=?";
-            String[] whereArgsShare = new String[] {path, accountNameShare};
             Uri insertedShareUri = null;
-            Cursor doubleCheckShare =
-                    query(db, uri, projectionShare, whereShare, whereArgsShare, null);
-            // ugly patch; serious refactorization is needed to reduce work in
-            // FileDataStorageManager and bring it to FileContentProvider
-            if (doubleCheckShare == null || !doubleCheckShare.moveToFirst()) {
-                if (doubleCheckShare != null) {
-                    doubleCheckShare.close();
-                }
-                long rowId = db.insert(ProviderTableMeta.OCSHARES_TABLE_NAME, null, values);
-                if (rowId >0) {
-                    insertedShareUri =
-                            ContentUris.withAppendedId(ProviderTableMeta.CONTENT_URI_SHARE, rowId);
-                } else {
-                    throw new SQLException("ERROR " + uri);
-
-                }
+            long rowId = db.insert(ProviderTableMeta.OCSHARES_TABLE_NAME, null, values);
+            if (rowId >0) {
+                insertedShareUri =
+                        ContentUris.withAppendedId(ProviderTableMeta.CONTENT_URI_SHARE, rowId);
             } else {
-                // file is already inserted; race condition, let's avoid a duplicated entry
-                insertedShareUri = ContentUris.withAppendedId(
-                        ProviderTableMeta.CONTENT_URI_SHARE,
-                        doubleCheckShare.getLong(
-                                doubleCheckShare.getColumnIndex(ProviderTableMeta._ID)
-                        )
-                );
-                doubleCheckShare.close();
+                throw new SQLException("ERROR " + uri);
+
             }
-            updateFilesTableAccordingToShareInsertion(db, uri, values);
+            updateFilesTableAccordingToShareInsertion(db, values);
             return insertedShareUri;
 
+        case CAPABILITIES:
+            Uri insertedCapUri = null;
+            long id = db.insert(ProviderTableMeta.CAPABILITIES_TABLE_NAME, null, values);
+            if (id >0) {
+                insertedCapUri =
+                        ContentUris.withAppendedId(ProviderTableMeta.CONTENT_URI_CAPABILITIES, id);
+            } else {
+                throw new SQLException("ERROR " + uri);
+
+            }
+            return insertedCapUri;
 
         default:
             throw new IllegalArgumentException("Unknown uri id: " + uri);
@@ -372,21 +274,23 @@ public class FileContentProvider extends ContentProvider {
     }
 
     private void updateFilesTableAccordingToShareInsertion(
-            SQLiteDatabase db, Uri uri, ContentValues shareValues
+            SQLiteDatabase db, ContentValues newShare
             ) {
         ContentValues fileValues = new ContentValues();
-        fileValues.put(
-                ProviderTableMeta.FILE_SHARE_BY_LINK,
-                ShareType.PUBLIC_LINK.getValue() ==
-                        shareValues.getAsInteger(ProviderTableMeta.OCSHARES_SHARE_TYPE) ? 1 : 0
-        );
-        String whereShare = ProviderTableMeta.FILE_PATH + "=? AND " +
+        int newShareType = newShare.getAsInteger(ProviderTableMeta.OCSHARES_SHARE_TYPE);
+        if (newShareType == ShareType.PUBLIC_LINK.getValue()) {
+            fileValues.put(ProviderTableMeta.FILE_SHARED_VIA_LINK, 1);
+        } else if (newShareType == ShareType.USER.getValue() || newShareType == ShareType.GROUP.getValue()) {
+            fileValues.put(ProviderTableMeta.FILE_SHARED_WITH_SHAREE, 1);
+        }
+
+        String where = ProviderTableMeta.FILE_PATH + "=? AND " +
                 ProviderTableMeta.FILE_ACCOUNT_OWNER + "=?";
-        String[] whereArgsShare = new String[] {
-                shareValues.getAsString(ProviderTableMeta.OCSHARES_PATH),
-                shareValues.getAsString(ProviderTableMeta.OCSHARES_ACCOUNT_OWNER)
+        String[] whereArgs = new String[] {
+                newShare.getAsString(ProviderTableMeta.OCSHARES_PATH),
+                newShare.getAsString(ProviderTableMeta.OCSHARES_ACCOUNT_OWNER)
         };
-        db.update(ProviderTableMeta.FILE_TABLE_NAME, fileValues, whereShare, whereArgsShare);
+        db.update(ProviderTableMeta.FILE_TABLE_NAME, fileValues, where, whereArgs);
     }
 
 
@@ -403,6 +307,8 @@ public class FileContentProvider extends ContentProvider {
         mUriMatcher.addURI(authority, "dir/#", DIRECTORY);
         mUriMatcher.addURI(authority, "shares/", SHARES);
         mUriMatcher.addURI(authority, "shares/#", SHARES);
+        mUriMatcher.addURI(authority, "capabilities/", CAPABILITIES);
+        mUriMatcher.addURI(authority, "capabilities/#", CAPABILITIES);
 
         return true;
     }
@@ -441,7 +347,6 @@ public class FileContentProvider extends ContentProvider {
         SQLiteQueryBuilder sqlQuery = new SQLiteQueryBuilder();
 
         sqlQuery.setTables(ProviderTableMeta.FILE_TABLE_NAME);
-        sqlQuery.setProjectionMap(mFileProjectionMap);
 
         switch (mUriMatcher.match(uri)) {
         case ROOT_DIRECTORY:
@@ -459,7 +364,13 @@ public class FileContentProvider extends ContentProvider {
             break;
         case SHARES:
             sqlQuery.setTables(ProviderTableMeta.OCSHARES_TABLE_NAME);
-            sqlQuery.setProjectionMap(mOCSharesProjectionMap);
+            if (uri.getPathSegments().size() > 1) {
+                sqlQuery.appendWhere(ProviderTableMeta._ID + "="
+                        + uri.getPathSegments().get(1));
+            }
+            break;
+        case CAPABILITIES:
+            sqlQuery.setTables(ProviderTableMeta.CAPABILITIES_TABLE_NAME);
             if (uri.getPathSegments().size() > 1) {
                 sqlQuery.appendWhere(ProviderTableMeta._ID + "="
                         + uri.getPathSegments().get(1));
@@ -471,11 +382,16 @@ public class FileContentProvider extends ContentProvider {
 
         String order;
         if (TextUtils.isEmpty(sortOrder)) {
-            if (mUriMatcher.match(uri) == SHARES) {
-                order = ProviderTableMeta.OCSHARES_DEFAULT_SORT_ORDER;
-            } else {
-
-                order = ProviderTableMeta.FILE_DEFAULT_SORT_ORDER;
+            switch (mUriMatcher.match(uri)) {
+                case SHARES:
+                    order = ProviderTableMeta.OCSHARES_DEFAULT_SORT_ORDER;
+                    break;
+                case CAPABILITIES:
+                    order = ProviderTableMeta.CAPABILITIES_DEFAULT_SORT_ORDER;
+                    break;
+                default: // Files
+                    order = ProviderTableMeta.FILE_DEFAULT_SORT_ORDER;
+                    break;
             }
         } else {
             order = sortOrder;
@@ -520,6 +436,10 @@ public class FileContentProvider extends ContentProvider {
                 return db.update(
                         ProviderTableMeta.OCSHARES_TABLE_NAME, values, selection, selectionArgs
                 );
+            case CAPABILITIES:
+                return db.update(
+                        ProviderTableMeta.CAPABILITIES_TABLE_NAME, values, selection, selectionArgs
+                );
             default:
                 return db.update(
                         ProviderTableMeta.FILE_TABLE_NAME, values, selection, selectionArgs
@@ -527,59 +447,6 @@ public class FileContentProvider extends ContentProvider {
         }
     }
 
- /*
-    private int updateFolderSize(SQLiteDatabase db, String folderId) {
-        int count = 0;
-        String [] whereArgs = new String[] { folderId };
-
-        // read current size saved for the folder
-        long folderSize = 0;
-        long folderParentId = -1;
-        Uri selectFolderUri = Uri.withAppendedPath(ProviderTableMeta.CONTENT_URI_FILE, folderId);
-        String[] folderProjection = new String[] { ProviderTableMeta.FILE_CONTENT_LENGTH,  ProviderTableMeta.FILE_PARENT};
-        String folderWhere = ProviderTableMeta._ID + "=?";
-        Cursor folderCursor = query(db, selectFolderUri, folderProjection, folderWhere, whereArgs, null);
-        if (folderCursor != null && folderCursor.moveToFirst()) {
-            folderSize = folderCursor.getLong(folderCursor.getColumnIndex(ProviderTableMeta.FILE_CONTENT_LENGTH));;
-            folderParentId = folderCursor.getLong(folderCursor.getColumnIndex(ProviderTableMeta.FILE_PARENT));;
-        }
-        folderCursor.close();
-
-        // read and sum sizes of children
-        long childrenSize = 0;
-        Uri selectChildrenUri = Uri.withAppendedPath(ProviderTableMeta.CONTENT_URI_DIR, folderId);
-        String[] childrenProjection = new String[] { ProviderTableMeta.FILE_CONTENT_LENGTH,  ProviderTableMeta.FILE_PARENT};
-        String childrenWhere = ProviderTableMeta.FILE_PARENT + "=?";
-        Cursor childrenCursor = query(db, selectChildrenUri, childrenProjection, childrenWhere, whereArgs, null);
-        if (childrenCursor != null && childrenCursor.moveToFirst()) {
-            while (!childrenCursor.isAfterLast()) {
-                childrenSize += childrenCursor.getLong(childrenCursor.getColumnIndex(ProviderTableMeta.FILE_CONTENT_LENGTH));
-                childrenCursor.moveToNext();
-            }
-        }
-        childrenCursor.close();
-
-        // update if needed
-        if (folderSize != childrenSize) {
-            Log_OC.d("FileContentProvider", "Updating " + folderSize + " to " + childrenSize);
-            ContentValues cv = new ContentValues();
-            cv.put(ProviderTableMeta.FILE_CONTENT_LENGTH, childrenSize);
-            count = db.update(ProviderTableMeta.FILE_TABLE_NAME, cv, folderWhere, whereArgs);
-
-            // propagate update until root
-            if (folderParentId > FileDataStorageManager.ROOT_PARENT_ID) {
-                Log_OC.d("FileContentProvider", "Propagating update to " + folderParentId);
-                updateFolderSize(db, String.valueOf(folderParentId));
-            } else {
-                Log_OC.d("FileContentProvider", "NOT propagating to " + folderParentId);
-            }
-        } else {
-            Log_OC.d("FileContentProvider", "NOT updating, sizes are " + folderSize + " and " + childrenSize);
-        }
-        return count;
-    }
-*/
-
     @Override
     public ContentProviderResult[] applyBatch (ArrayList<ContentProviderOperation> operations)
             throws OperationApplicationException {
@@ -616,28 +483,30 @@ public class FileContentProvider extends ContentProvider {
             // files table
             Log_OC.i("SQL", "Entering in onCreate");
             db.execSQL("CREATE TABLE " + ProviderTableMeta.FILE_TABLE_NAME + "("
-                    + ProviderTableMeta._ID + " INTEGER PRIMARY KEY, "
-                    + ProviderTableMeta.FILE_NAME + " TEXT, "
-                    + ProviderTableMeta.FILE_PATH + " TEXT, "
-                    + ProviderTableMeta.FILE_PARENT + " INTEGER, "
-                    + ProviderTableMeta.FILE_CREATION + " INTEGER, "
-                    + ProviderTableMeta.FILE_MODIFIED + " INTEGER, "
-                    + ProviderTableMeta.FILE_CONTENT_TYPE + " TEXT, "
-                    + ProviderTableMeta.FILE_CONTENT_LENGTH + " INTEGER, "
-                    + ProviderTableMeta.FILE_STORAGE_PATH + " TEXT, "
-                    + ProviderTableMeta.FILE_ACCOUNT_OWNER + " TEXT, "
-                    + ProviderTableMeta.FILE_LAST_SYNC_DATE + " INTEGER, "
-                    + ProviderTableMeta.FILE_KEEP_IN_SYNC + " INTEGER, "
-                    + ProviderTableMeta.FILE_LAST_SYNC_DATE_FOR_DATA + " INTEGER, "
-                    + ProviderTableMeta.FILE_MODIFIED_AT_LAST_SYNC_FOR_DATA + " INTEGER, "
-                    + ProviderTableMeta.FILE_ETAG + " TEXT, "
-                    + ProviderTableMeta.FILE_SHARE_BY_LINK + " INTEGER, "
-                    + ProviderTableMeta.FILE_PUBLIC_LINK  + " TEXT, "
-                    + ProviderTableMeta.FILE_PERMISSIONS  + " TEXT null,"
-                    + ProviderTableMeta.FILE_REMOTE_ID  + " TEXT null,"
-                    + ProviderTableMeta.FILE_UPDATE_THUMBNAIL  + " INTEGER," //boolean
-                    + ProviderTableMeta.FILE_IS_DOWNLOADING  + " INTEGER);" //boolean
-                    );
+                            + ProviderTableMeta._ID + " INTEGER PRIMARY KEY, "
+                            + ProviderTableMeta.FILE_NAME + " TEXT, "
+                            + ProviderTableMeta.FILE_PATH + " TEXT, "
+                            + ProviderTableMeta.FILE_PARENT + " INTEGER, "
+                            + ProviderTableMeta.FILE_CREATION + " INTEGER, "
+                            + ProviderTableMeta.FILE_MODIFIED + " INTEGER, "
+                            + ProviderTableMeta.FILE_CONTENT_TYPE + " TEXT, "
+                            + ProviderTableMeta.FILE_CONTENT_LENGTH + " INTEGER, "
+                            + ProviderTableMeta.FILE_STORAGE_PATH + " TEXT, "
+                            + ProviderTableMeta.FILE_ACCOUNT_OWNER + " TEXT, "
+                            + ProviderTableMeta.FILE_LAST_SYNC_DATE + " INTEGER, "
+                            + ProviderTableMeta.FILE_KEEP_IN_SYNC + " INTEGER, "
+                            + ProviderTableMeta.FILE_LAST_SYNC_DATE_FOR_DATA + " INTEGER, "
+                            + ProviderTableMeta.FILE_MODIFIED_AT_LAST_SYNC_FOR_DATA + " INTEGER, "
+                            + ProviderTableMeta.FILE_ETAG + " TEXT, "
+                            + ProviderTableMeta.FILE_SHARED_VIA_LINK + " INTEGER, "
+                            + ProviderTableMeta.FILE_PUBLIC_LINK + " TEXT, "
+                            + ProviderTableMeta.FILE_PERMISSIONS + " TEXT null,"
+                            + ProviderTableMeta.FILE_REMOTE_ID + " TEXT null,"
+                            + ProviderTableMeta.FILE_UPDATE_THUMBNAIL + " INTEGER," //boolean
+                            + ProviderTableMeta.FILE_IS_DOWNLOADING + " INTEGER," //boolean
+                            + ProviderTableMeta.FILE_ETAG_IN_CONFLICT + " TEXT,"
+                            + ProviderTableMeta.FILE_SHARED_WITH_SHAREE + " INTEGER);"
+            );
 
             // Create table ocshares
             db.execSQL("CREATE TABLE " + ProviderTableMeta.OCSHARES_TABLE_NAME + "("
@@ -656,6 +525,10 @@ public class FileContentProvider extends ContentProvider {
                     + ProviderTableMeta.OCSHARES_USER_ID + " INTEGER, "
                     + ProviderTableMeta.OCSHARES_ID_REMOTE_SHARED + " INTEGER,"
                     + ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + " TEXT );" );
+
+            // Create table capabilities
+            createCapabilitiesTable(db);
+
         }
 
         @Override
@@ -735,7 +608,7 @@ public class FileContentProvider extends ContentProvider {
                 db.beginTransaction();
                 try {
                     db .execSQL("ALTER TABLE " + ProviderTableMeta.FILE_TABLE_NAME +
-                            " ADD COLUMN " + ProviderTableMeta.FILE_SHARE_BY_LINK + " INTEGER " +
+                            " ADD COLUMN " + ProviderTableMeta.FILE_SHARED_VIA_LINK + " INTEGER " +
                             " DEFAULT 0");
 
                     db .execSQL("ALTER TABLE " + ProviderTableMeta.FILE_TABLE_NAME +
@@ -836,9 +709,88 @@ public class FileContentProvider extends ContentProvider {
              if (!upgraded)
                 Log_OC.i("SQL", "OUT of the ADD in onUpgrade; oldVersion == " + oldVersion +
                         ", newVersion == " + newVersion);
+
+            if (oldVersion < 11 && newVersion >= 11) {
+                Log_OC.i("SQL", "Entering in the #11 ADD in onUpgrade");
+                db.beginTransaction();
+                try {
+                    db .execSQL("ALTER TABLE " + ProviderTableMeta.FILE_TABLE_NAME +
+                            " ADD COLUMN " + ProviderTableMeta.FILE_ETAG_IN_CONFLICT + " TEXT " +
+                            " DEFAULT NULL");
+
+                    upgraded = true;
+                    db.setTransactionSuccessful();
+                } finally {
+                    db.endTransaction();
+                }
+            }
+            if (!upgraded)
+                Log_OC.i("SQL", "OUT of the ADD in onUpgrade; oldVersion == " + oldVersion +
+                        ", newVersion == " + newVersion);
+
+            if (oldVersion < 12 && newVersion >= 12) {
+                Log_OC.i("SQL", "Entering in the #12 ADD in onUpgrade");
+                db.beginTransaction();
+                try {
+                    db .execSQL("ALTER TABLE " + ProviderTableMeta.FILE_TABLE_NAME +
+                            " ADD COLUMN " + ProviderTableMeta.FILE_SHARED_WITH_SHAREE + " INTEGER " +
+                            " DEFAULT 0");
+                    upgraded = true;
+                    db.setTransactionSuccessful();
+                } finally {
+                    db.endTransaction();
+                }
+            }
+            if (!upgraded)
+                Log_OC.i("SQL", "OUT of the ADD in onUpgrade; oldVersion == " + oldVersion +
+                        ", newVersion == " + newVersion);
+
+            if (oldVersion < 13 && newVersion >= 13) {
+                Log_OC.i("SQL", "Entering in the #13 ADD in onUpgrade");
+                db.beginTransaction();
+                try {
+                    // Create capabilities table
+                    createCapabilitiesTable(db);
+                    upgraded = true;
+                    db.setTransactionSuccessful();
+                } finally {
+                    db.endTransaction();
+                }
+            }
+            if (!upgraded)
+                Log_OC.i("SQL", "OUT of the ADD in onUpgrade; oldVersion == " + oldVersion +
+                        ", newVersion == " + newVersion);
+
         }
     }
 
+    private void createCapabilitiesTable(SQLiteDatabase db){
+        // Create table capabilities
+        db.execSQL("CREATE TABLE " + ProviderTableMeta.CAPABILITIES_TABLE_NAME + "("
+                + ProviderTableMeta._ID + " INTEGER PRIMARY KEY, "
+                + ProviderTableMeta.CAPABILITIES_ACCOUNT_NAME + " TEXT, "
+                + ProviderTableMeta.CAPABILITIES_VERSION_MAYOR + " INTEGER, "
+                + ProviderTableMeta.CAPABILITIES_VERSION_MINOR + " INTEGER, "
+                + ProviderTableMeta.CAPABILITIES_VERSION_MICRO + " INTEGER, "
+                + ProviderTableMeta.CAPABILITIES_VERSION_STRING + " TEXT, "
+                + ProviderTableMeta.CAPABILITIES_VERSION_EDITION + " TEXT, "
+                + ProviderTableMeta.CAPABILITIES_CORE_POLLINTERVAL + " INTEGER, "
+                + ProviderTableMeta.CAPABILITIES_SHARING_API_ENABLED + " INTEGER, " // boolean
+                + ProviderTableMeta.CAPABILITIES_SHARING_PUBLIC_ENABLED + " INTEGER, "  // boolean
+                + ProviderTableMeta.CAPABILITIES_SHARING_PUBLIC_PASSWORD_ENFORCED + " INTEGER, "    // boolean
+                + ProviderTableMeta.CAPABILITIES_SHARING_PUBLIC_EXPIRE_DATE_ENABLED + " INTEGER, "  // boolean
+                + ProviderTableMeta.CAPABILITIES_SHARING_PUBLIC_EXPIRE_DATE_DAYS + " INTEGER, "
+                + ProviderTableMeta.CAPABILITIES_SHARING_PUBLIC_EXPIRE_DATE_ENFORCED + " INTEGER, " // boolean
+                + ProviderTableMeta.CAPABILITIES_SHARING_PUBLIC_SEND_MAIL + " INTEGER, "    // boolean
+                + ProviderTableMeta.CAPABILITIES_SHARING_PUBLIC_UPLOAD + " INTEGER, "       // boolean
+                + ProviderTableMeta.CAPABILITIES_SHARING_USER_SEND_MAIL + " INTEGER, "      // boolean
+                + ProviderTableMeta.CAPABILITIES_SHARING_RESHARING + " INTEGER, "           // boolean
+                + ProviderTableMeta.CAPABILITIES_SHARING_FEDERATION_OUTGOING + " INTEGER, "     // boolean
+                + ProviderTableMeta.CAPABILITIES_SHARING_FEDERATION_INCOMING + " INTEGER, "     // boolean
+                + ProviderTableMeta.CAPABILITIES_FILES_BIGFILECHUNKING + " INTEGER, "   // boolean
+                + ProviderTableMeta.CAPABILITIES_FILES_UNDELETE + " INTEGER, "  // boolean
+                + ProviderTableMeta.CAPABILITIES_FILES_VERSIONING + " INTEGER );" );   // boolean
+    }
 
     /**
      * Version 10 of database does not modify its scheme. It coincides with the upgrade of the ownCloud account names
diff --git a/src/com/owncloud/android/providers/UsersAndGroupsSearchProvider.java b/src/com/owncloud/android/providers/UsersAndGroupsSearchProvider.java
new file mode 100644 (file)
index 0000000..9a4a974
--- /dev/null
@@ -0,0 +1,229 @@
+/**
+ *   ownCloud Android client application
+ *
+ *   @author David A. Velasco
+ *   Copyright (C) 2015 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.providers;
+
+import android.accounts.Account;
+import android.app.SearchManager;
+import android.content.ContentProvider;
+import android.content.ContentValues;
+import android.content.UriMatcher;
+import android.database.Cursor;
+import android.database.MatrixCursor;
+import android.net.Uri;
+import android.os.Handler;
+import android.os.Looper;
+import android.provider.BaseColumns;
+import android.support.annotation.Nullable;
+import android.widget.Toast;
+
+import com.owncloud.android.R;
+import com.owncloud.android.authentication.AccountUtils;
+import com.owncloud.android.lib.common.operations.RemoteOperationResult;
+import com.owncloud.android.lib.common.utils.Log_OC;
+import com.owncloud.android.lib.resources.shares.GetRemoteShareesOperation;
+import com.owncloud.android.utils.ErrorMessageAdapter;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+
+/**
+ * Content provider for search suggestions, to search for users and groups existing in an ownCloud server.
+ */
+public class UsersAndGroupsSearchProvider extends ContentProvider {
+
+    private static final String TAG = UsersAndGroupsSearchProvider.class.getSimpleName();
+
+    private static final String[] COLUMNS = {
+        BaseColumns._ID,
+        SearchManager.SUGGEST_COLUMN_TEXT_1,
+        SearchManager.SUGGEST_COLUMN_INTENT_DATA
+    };
+
+    private static final int SEARCH = 1;
+
+    private static final int RESULTS_PER_PAGE = 50;
+    private static final int REQUESTED_PAGE = 1;
+
+    public static final String AUTHORITY = UsersAndGroupsSearchProvider.class.getCanonicalName();
+    public static final String ACTION_SHARE_WITH = AUTHORITY + ".action.SHARE_WITH";
+    public static final String DATA_USER = AUTHORITY + ".data.user";
+    public static final String DATA_GROUP = AUTHORITY + ".data.group";
+
+    private UriMatcher mUriMatcher;
+
+    @Nullable
+    @Override
+    public String getType(Uri uri) {
+        // TODO implement
+        return null;
+    }
+
+    @Override
+    public boolean onCreate() {
+        mUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
+        mUriMatcher.addURI(AUTHORITY, SearchManager.SUGGEST_URI_PATH_QUERY + "/*", SEARCH);
+        return true;
+    }
+
+    /**
+     * TODO description
+     *
+     * Reference: http://developer.android.com/guide/topics/search/adding-custom-suggestions.html#CustomContentProvider
+     *
+     * @param uri           Content {@link Uri}, formattted as
+     *                      "content://com.owncloud.android.providers.UsersAndGroupsSearchProvider/" +
+     *                      {@link android.app.SearchManager#SUGGEST_URI_PATH_QUERY} + "/" + 'userQuery'
+     * @param projection    Expected to be NULL.
+     * @param selection     Expected to be NULL.
+     * @param selectionArgs Expected to be NULL.
+     * @param sortOrder     Expected to be NULL.
+     * @return              Cursor with users and groups in the ownCloud server that match 'userQuery'.
+     */
+    @Nullable
+    @Override
+    public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
+        Log_OC.d(TAG, "query received in thread " + Thread.currentThread().getName());
+
+        int match = mUriMatcher.match(uri);
+        switch (match) {
+            case SEARCH:
+                return searchForUsersOrGroups(uri);
+
+            default:
+                return null;
+        }
+    }
+
+    private Cursor searchForUsersOrGroups(Uri uri) {
+        MatrixCursor response = null;
+
+
+        String userQuery = uri.getLastPathSegment().toLowerCase();
+
+
+        /// need to trust on the AccountUtils to get the current account since the query in the client side is not
+        /// directly started by our code, but from SearchView implementation
+        Account account = AccountUtils.getCurrentOwnCloudAccount(getContext());
+
+        /// request to the OC server about users and groups matching userQuery
+        GetRemoteShareesOperation searchRequest = new GetRemoteShareesOperation(
+                userQuery, REQUESTED_PAGE, RESULTS_PER_PAGE
+        );
+        RemoteOperationResult result = searchRequest.execute(account, getContext());
+        List<JSONObject> names = new ArrayList<JSONObject>();
+        if (result.isSuccess()) {
+            for (Object o : result.getData()) {
+                // Get JSonObjects from response
+                names.add((JSONObject) o);
+            }
+        } else {
+            showErrorMessage(result);
+        }
+
+        /// convert the responses from the OC server to the expected format
+        if (names.size() > 0) {
+            response = new MatrixCursor(COLUMNS);
+            Iterator<JSONObject> namesIt = names.iterator();
+            int count = 0;
+            JSONObject item;
+            String displayName;
+            Uri dataUri;
+            Uri userBaseUri = new Uri.Builder().scheme("content").authority(DATA_USER).build();
+            Uri groupBaseUri = new Uri.Builder().scheme("content").authority(DATA_GROUP).build();
+            try {
+                while (namesIt.hasNext()) {
+                    item = namesIt.next();
+                    String userName = item.getString(GetRemoteShareesOperation.PROPERTY_LABEL);
+                    JSONObject value = item.getJSONObject(GetRemoteShareesOperation.NODE_VALUE);
+                    byte type = (byte) value.getInt(GetRemoteShareesOperation.PROPERTY_SHARE_TYPE);
+                    String shareWith = value.getString(GetRemoteShareesOperation.PROPERTY_SHARE_WITH);
+                    if (GetRemoteShareesOperation.GROUP_TYPE.equals(type)) {
+                        displayName = getContext().getString(R.string.share_group_clarification, userName);
+                        dataUri = Uri.withAppendedPath(groupBaseUri, shareWith);
+                    } else {
+                        displayName = userName;
+                        dataUri = Uri.withAppendedPath(userBaseUri, shareWith);
+                    }
+                    response.newRow()
+                            .add(count++)             // BaseColumns._ID
+                            .add(displayName)         // SearchManager.SUGGEST_COLUMN_TEXT_1
+                            .add(dataUri);
+                }
+            } catch (JSONException e) {
+                Log_OC.e(TAG, "Exception while parsing data of users/groups", e);
+            }
+        }
+
+        return response;
+    }
+
+    @Nullable
+    @Override
+    public Uri insert(Uri uri, ContentValues values) {
+        // TODO implementation
+        return null;
+    }
+
+    @Override
+    public int delete(Uri uri, String selection, String[] selectionArgs) {
+        // TODO implementation
+        return 0;
+    }
+
+    @Override
+    public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
+        // TODO implementation
+        return 0;
+    }
+
+    /**
+     * Show error message
+     *
+     * @param result    Result with the failure information.
+     */
+    public void showErrorMessage(final RemoteOperationResult result) {
+        Handler handler = new Handler(Looper.getMainLooper());
+        handler.post(new Runnable() {
+            @Override
+            public void run() {
+                // The Toast must be shown in the main thread to grant that will be hidden correctly; otherwise
+                // the thread may die before, an exception will occur, and the message will be left on the screen
+                // until the app dies
+                Toast.makeText(
+                        getContext().getApplicationContext(),
+                        ErrorMessageAdapter.getErrorCauseMessage(
+                                result,
+                                null,
+                                getContext().getResources()
+                        ),
+                        Toast.LENGTH_SHORT
+                ).show();
+            }
+        });
+    }
+
+}
index 099bd08..b8658c9 100644 (file)
@@ -54,7 +54,8 @@ import com.owncloud.android.lib.resources.status.OwnCloudVersion;
 import com.owncloud.android.lib.resources.users.GetRemoteUserNameOperation;
 import com.owncloud.android.operations.CopyFileOperation;
 import com.owncloud.android.operations.CreateFolderOperation;
-import com.owncloud.android.operations.CreateShareOperation;
+import com.owncloud.android.operations.CreateShareViaLinkOperation;
+import com.owncloud.android.operations.CreateShareWithShareeOperation;
 import com.owncloud.android.operations.GetServerInfoOperation;
 import com.owncloud.android.operations.MoveFileOperation;
 import com.owncloud.android.operations.OAuth2GetAccessToken;
@@ -62,10 +63,12 @@ import com.owncloud.android.operations.RemoveFileOperation;
 import com.owncloud.android.operations.RenameFileOperation;
 import com.owncloud.android.operations.SynchronizeFileOperation;
 import com.owncloud.android.operations.SynchronizeFolderOperation;
-import com.owncloud.android.operations.UnshareLinkOperation;
+import com.owncloud.android.operations.UnshareOperation;
+import com.owncloud.android.operations.UpdateShareViaLinkOperation;
 import com.owncloud.android.operations.common.SyncOperation;
 
 import java.io.IOException;
+import java.util.Calendar;
 import java.util.Iterator;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentLinkedQueue;
@@ -87,12 +90,19 @@ public class OperationsService extends Service {
     public static final String EXTRA_RESULT = "RESULT";
     public static final String EXTRA_NEW_PARENT_PATH = "NEW_PARENT_PATH";
     public static final String EXTRA_FILE = "FILE";
-    public static final String EXTRA_PASSWORD_SHARE = "PASSWORD_SHARE";
+    public static final String EXTRA_SHARE_PASSWORD = "SHARE_PASSWORD";
+    public static final String EXTRA_SHARE_TYPE = "SHARE_TYPE";
+    public static final String EXTRA_SHARE_WITH = "SHARE_WITH";
+    public static final String EXTRA_SHARE_EXPIRATION_DATE_IN_MILLIS = "SHARE_EXPIRATION_YEAR";
+    public static final String EXTRA_SHARE_EXPIRATION_MONTH_OF_YEAR = "SHARE_EXPIRATION_MONTH_OF_YEAR";
+    public static final String EXTRA_SHARE_EXPIRATION_DAY_OF_MONTH = "SHARE_EXPIRATION_DAY_OF_MONTH";
 
     public static final String EXTRA_COOKIE = "COOKIE";
 
-    public static final String ACTION_CREATE_SHARE = "CREATE_SHARE";
+    public static final String ACTION_CREATE_SHARE_VIA_LINK = "CREATE_SHARE_VIA_LINK";
+    public static final String ACTION_CREATE_SHARE_WITH_SHAREE = "CREATE_SHARE_WITH_SHAREE";
     public static final String ACTION_UNSHARE = "UNSHARE";
+    public static final String ACTION_UPDATE_SHARE = "UPDATE_SHARE";
     public static final String ACTION_GET_SERVER_INFO = "GET_SERVER_INFO";
     public static final String ACTION_OAUTH2_GET_ACCESS_TOKEN = "OAUTH2_GET_ACCESS_TOKEN";
     public static final String ACTION_GET_USER_NAME = "GET_USER_NAME";
@@ -100,7 +110,7 @@ public class OperationsService extends Service {
     public static final String ACTION_REMOVE = "REMOVE";
     public static final String ACTION_CREATE_FOLDER = "CREATE_FOLDER";
     public static final String ACTION_SYNC_FILE = "SYNC_FILE";
-    public static final String ACTION_SYNC_FOLDER = "SYNC_FOLDER";//for the moment, just to download
+    public static final String ACTION_SYNC_FOLDER = "SYNC_FOLDER";
     public static final String ACTION_MOVE_FILE = "MOVE_FILE";
     public static final String ACTION_COPY_FILE = "COPY_FILE";
 
@@ -110,7 +120,6 @@ public class OperationsService extends Service {
             ".OPERATION_FINISHED";
 
 
-
     private ConcurrentMap<Integer, Pair<RemoteOperation, RemoteOperationResult>>
             mUndispatchedFinishedOperations =
             new ConcurrentHashMap<Integer, Pair<RemoteOperation, RemoteOperationResult>>();
@@ -234,7 +243,6 @@ public class OperationsService extends Service {
      */
     @Override
     public IBinder onBind(Intent intent) {
-        //Log_OC.wtf(TAG, "onBind" );
         return mOperationsBinder;
     }
 
@@ -549,22 +557,60 @@ public class OperationsService extends Service {
                 );
                 
                 String action = operationIntent.getAction();
-                if (action.equals(ACTION_CREATE_SHARE)) {  // Create Share
+                if (action.equals(ACTION_CREATE_SHARE_VIA_LINK)) {  // Create public share via link
                     String remotePath = operationIntent.getStringExtra(EXTRA_REMOTE_PATH);
-                    String password = operationIntent.getStringExtra(EXTRA_PASSWORD_SHARE);
+                    String password = operationIntent.getStringExtra(EXTRA_SHARE_PASSWORD);
                     Intent sendIntent = operationIntent.getParcelableExtra(EXTRA_SEND_INTENT);
                     if (remotePath.length() > 0) {
-                        operation = new CreateShareOperation(OperationsService.this, remotePath,
-                                ShareType.PUBLIC_LINK,
-                                "", false, password, 1, sendIntent);
+                        operation = new CreateShareViaLinkOperation(
+                                remotePath,
+                                password,
+                                sendIntent
+                        );
+                    }
+
+                } else if (ACTION_UPDATE_SHARE.equals(action)) {
+                    String remotePath = operationIntent.getStringExtra(EXTRA_REMOTE_PATH);
+                    if (remotePath.length() > 0) {
+                        operation = new UpdateShareViaLinkOperation(remotePath);
+
+                        String password = operationIntent.getStringExtra(EXTRA_SHARE_PASSWORD);
+                        ((UpdateShareViaLinkOperation)operation).setPassword(password);
+
+                        long expirationDate = operationIntent.getLongExtra(
+                                EXTRA_SHARE_EXPIRATION_DATE_IN_MILLIS,
+                                0
+                        );
+                        ((UpdateShareViaLinkOperation)operation).setExpirationDate(
+                                expirationDate
+                        );
+                    }
+
+                } else if (action.equals(ACTION_CREATE_SHARE_WITH_SHAREE)) {
+                    // Create private share with user or group
+                    String remotePath = operationIntent.getStringExtra(EXTRA_REMOTE_PATH);
+                    String shareeName = operationIntent.getStringExtra(EXTRA_SHARE_WITH);
+                    ShareType shareType = (ShareType) operationIntent.getSerializableExtra(EXTRA_SHARE_TYPE);
+                    if (remotePath.length() > 0) {
+                        operation = new CreateShareWithShareeOperation(
+                                remotePath,
+                                shareeName,
+                                shareType
+                        );
                     }
 
                 } else if (action.equals(ACTION_UNSHARE)) {  // Unshare file
                     String remotePath = operationIntent.getStringExtra(EXTRA_REMOTE_PATH);
+                    ShareType shareType = (ShareType) operationIntent.
+                            getSerializableExtra(EXTRA_SHARE_TYPE);
+                    String shareWith = operationIntent.getStringExtra(EXTRA_SHARE_WITH);
                     if (remotePath.length() > 0) {
-                        operation = new UnshareLinkOperation(
-                                remotePath, 
-                                OperationsService.this);
+                        operation = new UnshareOperation(
+                                remotePath,
+                                shareType,
+                                shareWith,
+                                OperationsService.this
+                        );
                     }
                     
                 } else if (action.equals(ACTION_GET_SERVER_INFO)) { 
@@ -615,7 +661,7 @@ public class OperationsService extends Service {
                     );
                     
                 } else if (action.equals(ACTION_SYNC_FOLDER)) {
-                    // Sync file
+                    // Sync folder (all its descendant files are sync'ed)
                     String remotePath = operationIntent.getStringExtra(EXTRA_REMOTE_PATH);
                     operation = new SynchronizeFolderOperation(
                             this,                       // TODO remove this dependency from construction time
@@ -623,7 +669,7 @@ public class OperationsService extends Service {
                             account, 
                             System.currentTimeMillis()  // TODO remove this dependency from construction time
                     );
-                    
+
                 } else if (action.equals(ACTION_MOVE_FILE)) {
                     // Move file/folder
                     String remotePath = operationIntent.getStringExtra(EXTRA_REMOTE_PATH);
@@ -726,7 +772,6 @@ public class OperationsService extends Service {
             }
         }
         if (count == 0) {
-            //mOperationResults.put(operation.hashCode(), result);
             Pair<RemoteOperation, RemoteOperationResult> undispatched =
                     new Pair<RemoteOperation, RemoteOperationResult>(operation, result);
             mUndispatchedFinishedOperations.put(((Runnable) operation).hashCode(), undispatched);
index 33318f5..daa1612 100644 (file)
@@ -138,8 +138,11 @@ class SyncFolderHandler extends Handler {
 
     public void add(Account account, String remotePath,
                     SynchronizeFolderOperation syncFolderOperation){
-        mPendingOperations.putIfAbsent(account, remotePath, syncFolderOperation);
-        sendBroadcastNewSyncFolder(account, remotePath);    // TODO upgrade!
+        Pair<String, String> putResult =
+                mPendingOperations.putIfAbsent(account, remotePath, syncFolderOperation);
+        if (putResult != null) {
+            sendBroadcastNewSyncFolder(account, remotePath);    // TODO upgrade!
+        }
     }
 
 
index 43ddae3..f04c8da 100644 (file)
@@ -30,7 +30,6 @@ import java.util.Map;
 
 import org.apache.jackrabbit.webdav.DavException;
 
-import com.owncloud.android.MainApp;
 import com.owncloud.android.R;
 import com.owncloud.android.authentication.AuthenticatorActivity;
 import com.owncloud.android.datamodel.FileDataStorageManager;
@@ -59,7 +58,7 @@ import android.support.v4.app.NotificationCompat;
  * Implementation of {@link AbstractThreadedSyncAdapter} responsible for synchronizing 
  * ownCloud files.
  * 
- * Performs a full synchronization of the account recieved in {@link #onPerformSync(Account, Bundle,
+ * Performs a full synchronization of the account received in {@link #onPerformSync(Account, Bundle,
  * String, ContentProviderClient, SyncResult)}.
  */
 public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter {
@@ -77,9 +76,7 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter {
             ".EVENT_FULL_SYNC_END";
     public static final String EVENT_FULL_SYNC_FOLDER_CONTENTS_SYNCED =
             FileSyncAdapter.class.getName() + ".EVENT_FULL_SYNC_FOLDER_CONTENTS_SYNCED";
-    //public static final String EVENT_FULL_SYNC_FOLDER_SIZE_SYNCED =
-    // FileSyncAdapter.class.getName() + ".EVENT_FULL_SYNC_FOLDER_SIZE_SYNCED";
-    
+
     public static final String EXTRA_ACCOUNT_NAME = FileSyncAdapter.class.getName() +
             ".EXTRA_ACCOUNT_NAME";
     public static final String EXTRA_FOLDER_PATH = FileSyncAdapter.class.getName() +
@@ -268,16 +265,6 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter {
         if (mFailedResultsCounter > MAX_FAILED_RESULTS || isFinisher(mLastFailedResult))
             return;
         
-        /*
-        OCFile folder, 
-        long currentSyncTime, 
-        boolean updateFolderProperties,
-        boolean syncFullAccount,
-        DataStorageManager dataStorageManager, 
-        Account account, 
-        Context context ) {
-        }
-        */
         // folder synchronization
         RefreshFolderOperation synchFolderOp = new RefreshFolderOperation( folder,
                                                                                    mCurrentSyncTime,
@@ -308,10 +295,10 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter {
                 // synchronize children folders 
                 List<OCFile> children = synchFolderOp.getChildren();
                 // beware of the 'hidden' recursion here!
-                fetchChildren(folder, children, synchFolderOp.getRemoteFolderChanged());
+                syncChildren(children);
             }
             
-        } else {
+        } else if (result.getCode() != ResultCode.FILE_NOT_FOUND) {
             // in failures, the statistics for the global result are updated
             if (    result.getCode() == RemoteOperationResult.ResultCode.UNAUTHORIZED ||
                     result.isIdPRedirection()
@@ -326,7 +313,10 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter {
             }
             mFailedResultsCounter++;
             mLastFailedResult = result;
-        }
+
+        } // else, ResultCode.FILE_NOT_FOUND is ignored, remote folder was
+          // removed from other thread or other client during the synchronization,
+          // before this thread fetched its contents
             
     }
 
@@ -351,25 +341,19 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter {
 
     /**
      * Triggers the synchronization of any folder contained in the list of received files.
+     *
+     * No consideration of etag here because it MUST walk down anyway, in case that kept-in-sync files
+     * have local changes.
      * 
      * @param files         Files to recursively synchronize.
      */
-    private void fetchChildren(OCFile parent, List<OCFile> files, boolean parentEtagChanged) {
+    private void syncChildren(List<OCFile> files) {
         int i;
-        OCFile newFile = null;
-        //String etag = null;
-        //boolean syncDown = false;
+        OCFile newFile;
         for (i=0; i < files.size() && !mCancellation; i++) {
             newFile = files.get(i);
             if (newFile.isFolder()) {
-                /*
-                etag = newFile.getEtag();
-                syncDown = (parentEtagChanged || etag == null || etag.length() == 0);
-                if(syncDown) { */
-                    synchronizeFolder(newFile);
-                    //sendLocalBroadcast(EVENT_FULL_SYNC_FOLDER_SIZE_SYNCED, parent.getRemotePath(),
-                    // null);
-                //}
+                synchronizeFolder(newFile);
             }
         }
        
@@ -526,6 +510,7 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter {
     private NotificationCompat.Builder createNotificationBuilder() {
         NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(getContext());
         notificationBuilder.setSmallIcon(R.drawable.notification_icon).setAutoCancel(true);
+        notificationBuilder.setColor(getContext().getResources().getColor(R.color.primary));
         return notificationBuilder;
     }
     
index 1c21cab..99e4c91 100644 (file)
@@ -43,7 +43,6 @@ import android.support.v4.widget.DrawerLayout;
 import android.support.v7.app.ActionBar;
 import android.support.v7.app.ActionBarDrawerToggle;
 import android.support.v7.app.AppCompatActivity;
-import android.util.Log;
 import android.view.View;
 import android.widget.AdapterView;
 import android.widget.ListView;
@@ -68,10 +67,14 @@ 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.CreateShareOperation;
+import com.owncloud.android.lib.resources.status.OCCapability;
+import com.owncloud.android.operations.CreateShareViaLinkOperation;
+import com.owncloud.android.operations.CreateShareWithShareeOperation;
+import com.owncloud.android.operations.GetSharesForFileOperation;
 import com.owncloud.android.operations.SynchronizeFileOperation;
 import com.owncloud.android.operations.SynchronizeFolderOperation;
-import com.owncloud.android.operations.UnshareLinkOperation;
+import com.owncloud.android.operations.UnshareOperation;
+import com.owncloud.android.operations.UpdateShareViaLinkOperation;
 import com.owncloud.android.services.OperationsService;
 import com.owncloud.android.services.OperationsService.OperationsServiceBinder;
 import com.owncloud.android.ui.NavigationDrawerItem;
@@ -92,28 +95,31 @@ public class FileActivity extends AppCompatActivity
 
     public static final String EXTRA_FILE = "com.owncloud.android.ui.activity.FILE";
     public static final String EXTRA_ACCOUNT = "com.owncloud.android.ui.activity.ACCOUNT";
-    public static final String EXTRA_WAITING_TO_PREVIEW =
-            "com.owncloud.android.ui.activity.WAITING_TO_PREVIEW";
     public static final String EXTRA_FROM_NOTIFICATION =
             "com.owncloud.android.ui.activity.FROM_NOTIFICATION";
 
     public static final String TAG = FileActivity.class.getSimpleName();
 
     private static final String DIALOG_WAIT_TAG = "DIALOG_WAIT";
+
     private static final String KEY_WAITING_FOR_OP_ID = "WAITING_FOR_OP_ID";
     private static final String DIALOG_SHARE_PASSWORD = "DIALOG_SHARE_PASSWORD";
     private static final String KEY_TRY_SHARE_AGAIN = "TRY_SHARE_AGAIN";
     private static final String KEY_ACTION_BAR_TITLE = "ACTION_BAR_TITLE";
 
-    protected static final long DELAY_TO_REQUEST_OPERATION_ON_ACTIVITY_RESULTS = 200;
+    protected static final long DELAY_TO_REQUEST_OPERATIONS_LATER = 200;
 
 
     /** OwnCloud {@link Account} where the main {@link OCFile} handled by the activity is located.*/
     private Account mAccount;
 
-    /** Main {@link OCFile} handled by the activity.*/
+    /** Capabilites of the server where {@link #mAccount} lives */
+     private OCCapability mCapabilities;
+
+     /** Main {@link OCFile} handled by the activity.*/
     private OCFile mFile;
 
+
     /** Flag to signal that the activity will is finishing to enforce the creation of an ownCloud
      * {@link Account} */
     private boolean mRedirectingToSetupAccount = false;
@@ -139,12 +145,12 @@ public class FileActivity extends AppCompatActivity
 
     private OperationsServiceBinder mOperationsServiceBinder = null;
 
+    private boolean mResumed = false;
+
     protected FileDownloaderBinder mDownloaderBinder = null;
     protected FileUploaderBinder mUploaderBinder = null;
     private ServiceConnection mDownloadServiceConnection, mUploadServiceConnection = null;
 
-    private boolean mTryShareAgain = false;
-
     // Navigation Drawer
     protected DrawerLayout mDrawerLayout;
     protected ActionBarDrawerToggle mDrawerToggle;
@@ -159,6 +165,7 @@ public class FileActivity extends AppCompatActivity
     protected NavigationDrawerListAdapter mNavigationDrawerAdapter = null;
 
 
+
     // TODO re-enable when "Accounts" is available in Navigation Drawer
 //    protected boolean mShowAccounts = false;
 
@@ -181,8 +188,9 @@ public class FileActivity extends AppCompatActivity
             mFileOperationsHelper.setOpIdWaitingFor(
                     savedInstanceState.getLong(KEY_WAITING_FOR_OP_ID, Long.MAX_VALUE)
                     );
-            mTryShareAgain = savedInstanceState.getBoolean(KEY_TRY_SHARE_AGAIN);
-            getSupportActionBar().setTitle(savedInstanceState.getString(KEY_ACTION_BAR_TITLE));
+            if (getSupportActionBar() != null) {
+                getSupportActionBar().setTitle(savedInstanceState.getString(KEY_ACTION_BAR_TITLE));
+            }
         } else {
             account = getIntent().getParcelableExtra(FileActivity.EXTRA_ACCOUNT);
             mFile = getIntent().getParcelableExtra(FileActivity.EXTRA_FILE);
@@ -251,7 +259,7 @@ public class FileActivity extends AppCompatActivity
     @Override
     protected void onResume() {
         super.onResume();
-
+        mResumed = true;
         if (mOperationsServiceBinder != null) {
             doOnResumeAndBound();
         }
@@ -262,7 +270,7 @@ public class FileActivity extends AppCompatActivity
         if (mOperationsServiceBinder != null) {
             mOperationsServiceBinder.removeOperationListener(this);
         }
-
+        mResumed = false;
         super.onPause();
     }
 
@@ -550,8 +558,7 @@ public class FileActivity extends AppCompatActivity
         outState.putParcelable(FileActivity.EXTRA_FILE, mFile);
         outState.putBoolean(FileActivity.EXTRA_FROM_NOTIFICATION, mFromNotification);
         outState.putLong(KEY_WAITING_FOR_OP_ID, mFileOperationsHelper.getOpIdWaitingFor());
-        outState.putBoolean(KEY_TRY_SHARE_AGAIN, mTryShareAgain);
-        if(getSupportActionBar().getTitle() != null) {
+        if(getSupportActionBar() != null && getSupportActionBar().getTitle() != null) {
             // Null check in case the actionbar is used in ActionBar.NAVIGATION_MODE_LIST
             // since it doesn't have a title then
             outState.putString(KEY_ACTION_BAR_TITLE, getSupportActionBar().getTitle().toString());
@@ -594,6 +601,18 @@ public class FileActivity extends AppCompatActivity
         mAccount = account;
     }
 
+
+    /**
+     * Getter for the capabilities of the server where the current OC account lives.
+     *
+     * @return  Capabilities of the server where the current OC account lives. Null if the account is not
+     *          set yet.
+     */
+    public OCCapability getCapabilities() {
+        return mCapabilities;
+    }
+
+
     /**
      * @return Value of mFromNotification: True if the Activity is launched by a notification
      */
@@ -608,14 +627,6 @@ public class FileActivity extends AppCompatActivity
         return mRedirectingToSetupAccount;
     }
 
-    public boolean isTryShareAgain(){
-        return mTryShareAgain;
-    }
-
-    public void setTryShareAgain(boolean tryShareAgain) {
-       mTryShareAgain = tryShareAgain;
-    }
-
     public OperationsServiceBinder getOperationsServiceBinder() {
         return mOperationsServiceBinder;
     }
@@ -672,6 +683,7 @@ public class FileActivity extends AppCompatActivity
     protected void onAccountSet(boolean stateWasRecovered) {
         if (getAccount() != null) {
             mStorageManager = new FileDataStorageManager(getAccount(), getContentResolver());
+            mCapabilities = mStorageManager.getCapability(mAccount.name);
 
         } else {
             Log_OC.wtf(TAG, "onAccountChanged was called with NULL account associated!");
@@ -709,6 +721,8 @@ public class FileActivity extends AppCompatActivity
 
         mFileOperationsHelper.setOpIdWaitingFor(Long.MAX_VALUE);
 
+        dismissLoadingDialog();
+
         if (!result.isSuccess() && (
                 result.getCode() == ResultCode.UNAUTHORIZED ||
                 result.isIdPRedirection() ||
@@ -724,20 +738,39 @@ public class FileActivity extends AppCompatActivity
                         Toast.LENGTH_LONG);
                 t.show();
             }
-            mTryShareAgain = false;
 
-        } else if (operation instanceof CreateShareOperation) {
-            onCreateShareOperationFinish((CreateShareOperation) operation, result);
+        } else if (operation == null ||
+                operation instanceof CreateShareWithShareeOperation ||
+                operation instanceof UnshareOperation ||
+                operation instanceof SynchronizeFolderOperation ||
+                operation instanceof UpdateShareViaLinkOperation
+                ) {
+            if (result.isSuccess()) {
+                updateFileFromDB();
 
-        } else if (operation instanceof UnshareLinkOperation) {
-            onUnshareLinkOperationFinish((UnshareLinkOperation)operation, result);
+            } else if (result.getCode() != ResultCode.CANCELLED) {
+                Toast t = Toast.makeText(this,
+                        ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
+                        Toast.LENGTH_LONG);
+                t.show();
+            }
+
+        } else if (operation instanceof CreateShareViaLinkOperation) {
+            onCreateShareViaLinkOperationFinish((CreateShareViaLinkOperation) operation, result);
 
-        } else if (operation instanceof SynchronizeFolderOperation) {
-            onSynchronizeFolderOperationFinish((SynchronizeFolderOperation)operation, result);
+        } else if (operation instanceof SynchronizeFileOperation) {
+            onSynchronizeFileOperationFinish((SynchronizeFileOperation) operation, result);
 
-        }else if (operation instanceof SynchronizeFileOperation) {
-            onSynchronizeFileOperationFinish((SynchronizeFileOperation)operation, result);
+        } else if (operation instanceof GetSharesForFileOperation) {
+            if (result.isSuccess() || result.getCode() == ResultCode.SHARE_NOT_FOUND) {
+                updateFileFromDB();
 
+            } else {
+                Toast t = Toast.makeText(this,
+                        ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
+                        Toast.LENGTH_LONG);
+                t.show();
+            }
         }
     }
 
@@ -753,29 +786,34 @@ public class FileActivity extends AppCompatActivity
 
 
 
-    private void onCreateShareOperationFinish(CreateShareOperation operation,
-                                              RemoteOperationResult result) {
-        dismissLoadingDialog();
+    private void onCreateShareViaLinkOperationFinish(CreateShareViaLinkOperation operation,
+                                                     RemoteOperationResult result) {
         if (result.isSuccess()) {
-            mTryShareAgain = false;
             updateFileFromDB();
 
-            Intent sendIntent = operation.getSendIntent();
-            startActivity(sendIntent);
+            Intent sendIntent = operation.getSendIntentWithSubject(this);
+            if (sendIntent != null) {
+                startActivity(sendIntent);
+            }
+
         } else {
             // Detect Failure (403) --> needs Password
             if (result.getCode() == ResultCode.SHARE_FORBIDDEN) {
-                if (!isTryShareAgain()) {
+                String password = operation.getPassword();
+                if ((password == null || password.length() == 0) &&
+                    getCapabilities().getFilesSharingPublicEnabled().isUnknown())
+                    {
+                    // Was tried without password, but not sure that it's optional. Try with password.
+                    // Try with password before giving up.
+                    // See also ShareFileFragment#OnShareViaLinkListener
                     SharePasswordDialogFragment dialog =
-                            SharePasswordDialogFragment.newInstance(new OCFile(operation.getPath()),
-                                    operation.getSendIntent());
+                            SharePasswordDialogFragment.newInstance(new OCFile(operation.getPath()), true);
                     dialog.show(getSupportFragmentManager(), DIALOG_SHARE_PASSWORD);
                 } else {
                     Toast t = Toast.makeText(this,
                         ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
                         Toast.LENGTH_LONG);
                     t.show();
-                    mTryShareAgain = false;
                 }
             } else {
                 Toast t = Toast.makeText(this,
@@ -786,34 +824,8 @@ public class FileActivity extends AppCompatActivity
         }
     }
 
-
-    private void onUnshareLinkOperationFinish(UnshareLinkOperation operation,
-                                              RemoteOperationResult result) {
-        dismissLoadingDialog();
-
-        if (result.isSuccess()){
-            updateFileFromDB();
-
-        } else {
-            Toast t = Toast.makeText(this, ErrorMessageAdapter.getErrorCauseMessage(result,
-                            operation, getResources()), Toast.LENGTH_LONG);
-            t.show();
-        }
-    }
-
-    private void onSynchronizeFolderOperationFinish(
-            SynchronizeFolderOperation operation, RemoteOperationResult result
-    ) {
-        if (!result.isSuccess() && result.getCode() != ResultCode.CANCELLED){
-            Toast t = Toast.makeText(this, ErrorMessageAdapter.getErrorCauseMessage(result,
-                            operation, getResources()), Toast.LENGTH_LONG);
-            t.show();
-        }
-    }
-
     private void onSynchronizeFileOperationFinish(SynchronizeFileOperation operation,
                                                   RemoteOperationResult result) {
-        dismissLoadingDialog();
         OCFile syncedFile = operation.getLocalFile();
         if (!result.isSuccess()) {
             if (result.getCode() == ResultCode.SYNC_CONFLICT) {
@@ -845,9 +857,9 @@ public class FileActivity extends AppCompatActivity
     /**
      * Show loading dialog
      */
-    public void showLoadingDialog() {
+    public void showLoadingDialog(String message) {
         // Construct dialog
-        LoadingDialog loading = new LoadingDialog(getResources().getString(R.string.wait_a_moment));
+        LoadingDialog loading = new LoadingDialog(message);
         FragmentManager fm = getSupportFragmentManager();
         FragmentTransaction ft = fm.beginTransaction();
         loading.show(ft, DIALOG_WAIT_TAG);
@@ -893,7 +905,9 @@ public class FileActivity extends AppCompatActivity
                 /*if (!mOperationsServiceBinder.isPerformingBlockingOperation()) {
                     dismissLoadingDialog();
                 }*/
-                doOnResumeAndBound();
+                if (mResumed) {
+                    doOnResumeAndBound();
+                }
 
             } else {
                 return;
index 20bcdce..f1dcb3a 100644 (file)
@@ -26,7 +26,6 @@ import android.accounts.Account;
 import android.accounts.AccountManager;
 import android.accounts.AuthenticatorException;
 import android.annotation.TargetApi;
-import android.support.v7.app.AlertDialog;
 import android.content.BroadcastReceiver;
 import android.content.ComponentName;
 import android.content.ContentResolver;
@@ -50,6 +49,7 @@ import android.support.v4.app.FragmentManager;
 import android.support.v4.app.FragmentTransaction;
 import android.support.v4.content.ContextCompat;
 import android.support.v4.view.GravityCompat;
+import android.support.v7.app.AlertDialog;
 import android.view.Menu;
 import android.view.MenuInflater;
 import android.view.MenuItem;
@@ -79,13 +79,11 @@ import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCo
 import com.owncloud.android.lib.common.utils.Log_OC;
 import com.owncloud.android.operations.CopyFileOperation;
 import com.owncloud.android.operations.CreateFolderOperation;
-import com.owncloud.android.operations.CreateShareOperation;
 import com.owncloud.android.operations.MoveFileOperation;
 import com.owncloud.android.operations.RefreshFolderOperation;
 import com.owncloud.android.operations.RemoveFileOperation;
 import com.owncloud.android.operations.RenameFileOperation;
 import com.owncloud.android.operations.SynchronizeFileOperation;
-import com.owncloud.android.operations.UnshareLinkOperation;
 import com.owncloud.android.services.observer.FileObserverService;
 import com.owncloud.android.syncadapter.FileSyncAdapter;
 import com.owncloud.android.ui.dialog.ConfirmationDialogFragment;
@@ -116,8 +114,6 @@ public class FileDisplayActivity extends HookActivity
         implements FileFragment.ContainerActivity,
         OnSslUntrustedCertListener, OnEnforceableRefreshListener {
 
-
-
     private SyncBroadcastReceiver mSyncBroadcastReceiver;
     private UploadFinishReceiver mUploadFinishReceiver;
     private DownloadFinishReceiver mDownloadFinishReceiver;
@@ -227,6 +223,13 @@ public class FileDisplayActivity extends HookActivity
     }
 
     @Override
+    protected void onStop() {
+        Log_OC.v(TAG, "onStop() start");
+        super.onStop();
+        Log_OC.v(TAG, "onStop() end");
+    }
+
+    @Override
     protected void onDestroy() {
         Log_OC.v(TAG, "onDestroy() start");
         super.onDestroy();
@@ -636,7 +639,7 @@ public class FileDisplayActivity extends HookActivity
                             requestMoveOperation(fData, fResultCode);
                         }
                     },
-                    DELAY_TO_REQUEST_OPERATION_ON_ACTIVITY_RESULTS
+                    DELAY_TO_REQUEST_OPERATIONS_LATER
             );
 
         } else if (requestCode == ACTION_COPY_FILES && resultCode == RESULT_OK) {
@@ -650,7 +653,7 @@ public class FileDisplayActivity extends HookActivity
                             requestCopyOperation(fData, fResultCode);
                         }
                     },
-                    DELAY_TO_REQUEST_OPERATION_ON_ACTIVITY_RESULTS
+                    DELAY_TO_REQUEST_OPERATIONS_LATER
             );
 
         } else {
@@ -983,6 +986,7 @@ public class FileDisplayActivity extends HookActivity
                             }
 
                         }
+
                     }
                     removeStickyBroadcast(intent);
                     Log_OC.d(TAG, "Setting progress visibility to " + mSyncInProgress);
@@ -1040,7 +1044,7 @@ public class FileDisplayActivity extends HookActivity
         @Override
         public void onReceive(Context context, Intent intent) {
             try {
-                String uploadedRemotePath = intent.getStringExtra(FileDownloader.EXTRA_REMOTE_PATH);
+                String uploadedRemotePath = intent.getStringExtra(FileUploader.EXTRA_REMOTE_PATH);
                 String accountName = intent.getStringExtra(FileUploader.ACCOUNT_NAME);
                 boolean sameAccount = getAccount() != null && accountName.equals(getAccount().name);
                 OCFile currentDir = getCurrentDir();
@@ -1048,7 +1052,11 @@ public class FileDisplayActivity extends HookActivity
                         (uploadedRemotePath.startsWith(currentDir.getRemotePath()));
 
                 if (sameAccount && isDescendant) {
-                    refreshListOfFilesFragment();
+                    String linkedToRemotePath =
+                            intent.getStringExtra(FileUploader.EXTRA_LINKED_TO_PATH);
+                    if (linkedToRemotePath == null || isAscendant(linkedToRemotePath)) {
+                        refreshListOfFilesFragment();
+                    }
                 }
 
                 boolean uploadWasFine = intent.getBooleanExtra(FileUploader.EXTRA_UPLOAD_RESULT,
@@ -1101,6 +1109,16 @@ public class FileDisplayActivity extends HookActivity
 
         }
 
+        // TODO refactor this receiver, and maybe DownloadFinishReceiver; this method is duplicated :S
+        private boolean isAscendant(String linkedToRemotePath) {
+            OCFile currentDir = getCurrentDir();
+            return (
+                    currentDir != null &&
+                            currentDir.getRemotePath().startsWith(linkedToRemotePath)
+            );
+        }
+
+
     }
 
 
@@ -1112,11 +1130,10 @@ public class FileDisplayActivity extends HookActivity
      */
     private class DownloadFinishReceiver extends BroadcastReceiver {
 
-        //int refreshCounter = 0;
         @Override
         public void onReceive(Context context, Intent intent) {
             try {
-                boolean sameAccount = isSameAccount(context, intent);
+                boolean sameAccount = isSameAccount(intent);
                 String downloadedRemotePath =
                         intent.getStringExtra(FileDownloader.EXTRA_REMOTE_PATH);
                 boolean isDescendant = isDescendant(downloadedRemotePath);
@@ -1125,7 +1142,6 @@ public class FileDisplayActivity extends HookActivity
                     String linkedToRemotePath =
                             intent.getStringExtra(FileDownloader.EXTRA_LINKED_TO_PATH);
                     if (linkedToRemotePath == null || isAscendant(linkedToRemotePath)) {
-                        //Log_OC.v(TAG, "refresh #" + ++refreshCounter);
                         refreshListOfFilesFragment();
                     }
                     refreshSecondFragment(
@@ -1167,7 +1183,7 @@ public class FileDisplayActivity extends HookActivity
             );
         }
 
-        private boolean isSameAccount(Context context, Intent intent) {
+        private boolean isSameAccount(Intent intent) {
             String accountName = intent.getStringExtra(FileDownloader.ACCOUNT_NAME);
             return (accountName != null && getAccount() != null &&
                     accountName.equals(getAccount().name));
@@ -1334,12 +1350,6 @@ public class FileDisplayActivity extends HookActivity
         } else if (operation instanceof CreateFolderOperation) {
             onCreateFolderOperationFinish((CreateFolderOperation) operation, result);
 
-        } else if (operation instanceof CreateShareOperation) {
-            onCreateShareOperationFinish((CreateShareOperation) operation, result);
-
-        } else if (operation instanceof UnshareLinkOperation) {
-            onUnshareLinkOperationFinish((UnshareLinkOperation) operation, result);
-
         } else if (operation instanceof MoveFileOperation) {
             onMoveFileOperationFinish((MoveFileOperation) operation, result);
 
@@ -1348,25 +1358,6 @@ public class FileDisplayActivity extends HookActivity
         }
 
     }
-    private void onCreateShareOperationFinish(CreateShareOperation operation,
-                                              RemoteOperationResult result) {
-        if (result.isSuccess()) {
-            refreshShowDetails();
-            refreshListOfFilesFragment();
-        }
-    }
-
-    private void onUnshareLinkOperationFinish(UnshareLinkOperation operation,
-                                              RemoteOperationResult result) {
-        if (result.isSuccess()) {
-            refreshShowDetails();
-            refreshListOfFilesFragment();
-
-        } else if (result.getCode() == ResultCode.SHARE_NOT_FOUND) {
-            cleanSecondFragment();
-            refreshListOfFilesFragment();
-        }
-    }
 
     private void refreshShowDetails() {
         FileFragment details = getSecondFragment();
@@ -1397,8 +1388,6 @@ public class FileDisplayActivity extends HookActivity
      */
     private void onRemoveFileOperationFinish(RemoveFileOperation operation,
                                              RemoteOperationResult result) {
-        dismissLoadingDialog();
-
         Toast msg = Toast.makeText(this,
                 ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
                 Toast.LENGTH_LONG);
@@ -1437,10 +1426,8 @@ public class FileDisplayActivity extends HookActivity
     private void onMoveFileOperationFinish(MoveFileOperation operation,
                                            RemoteOperationResult result) {
         if (result.isSuccess()) {
-            dismissLoadingDialog();
             refreshListOfFilesFragment();
         } else {
-            dismissLoadingDialog();
             try {
                 Toast msg = Toast.makeText(FileDisplayActivity.this,
                         ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
@@ -1462,10 +1449,8 @@ public class FileDisplayActivity extends HookActivity
      */
     private void onCopyFileOperationFinish(CopyFileOperation operation, RemoteOperationResult result) {
         if (result.isSuccess()) {
-            dismissLoadingDialog();
             refreshListOfFilesFragment();
         } else {
-            dismissLoadingDialog();
             try {
                 Toast msg = Toast.makeText(FileDisplayActivity.this,
                         ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
@@ -1487,7 +1472,6 @@ public class FileDisplayActivity extends HookActivity
      */
     private void onRenameFileOperationFinish(RenameFileOperation operation,
                                              RemoteOperationResult result) {
-        dismissLoadingDialog();
         OCFile renamedFile = operation.getFile();
         if (result.isSuccess()) {
             FileFragment details = getSecondFragment();
@@ -1541,6 +1525,7 @@ public class FileDisplayActivity extends HookActivity
                 OCFile syncedFile = operation.getLocalFile();
                 onTransferStateChanged(syncedFile, true, true);
                 invalidateOptionsMenu();
+                refreshShowDetails();
             }
         }
     }
@@ -1555,10 +1540,8 @@ public class FileDisplayActivity extends HookActivity
     private void onCreateFolderOperationFinish(CreateFolderOperation operation,
                                                RemoteOperationResult result) {
         if (result.isSuccess()) {
-            dismissLoadingDialog();
             refreshListOfFilesFragment();
         } else {
-            dismissLoadingDialog();
             try {
                 Toast msg = Toast.makeText(FileDisplayActivity.this,
                         ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
@@ -1621,26 +1604,60 @@ public class FileDisplayActivity extends HookActivity
         return null;
     }
 
-    public void startSyncFolderOperation(OCFile folder, boolean ignoreETag) {
-        long currentSyncTime = System.currentTimeMillis();
-
-        mSyncInProgress = true;
-
-        // perform folder synchronization
-        RemoteOperation synchFolderOp = new RefreshFolderOperation( folder,
-                currentSyncTime,
-                false,
-                getFileOperationsHelper().isSharedSupported(),
-                ignoreETag,
-                getStorageManager(),
-                getAccount(),
-                getApplicationContext()
+    /**
+     * Starts an operation to refresh the requested folder.
+     *
+     * The operation is run in a new background thread created on the fly.
+     *
+     * The refresh updates is a "light sync": properties of regular files in folder are updated (including
+     * associated shares), but not their contents. Only the contents of files marked to be kept-in-sync are
+     * synchronized too.
+     *
+     * @param folder        Folder to refresh.
+     * @param ignoreETag    If 'true', the data from the server will be fetched and sync'ed even if the eTag
+     *                      didn't change.
+     */
+    public void startSyncFolderOperation(final OCFile folder, final boolean ignoreETag) {
+
+        // the execution is slightly delayed to allow the activity get the window focus if it's being started
+        // or if the method is called from a dialog that is being dismissed
+        getHandler().postDelayed(
+                new Runnable() {
+                    @Override
+                    public void run() {
+                        if (hasWindowFocus()) {
+                            long currentSyncTime = System.currentTimeMillis();
+                            mSyncInProgress = true;
+
+                            // perform folder synchronization
+                            RemoteOperation synchFolderOp = new RefreshFolderOperation(folder,
+                                    currentSyncTime,
+                                    false,
+                                    getFileOperationsHelper().isSharedSupported(),
+                                    ignoreETag,
+                                    getStorageManager(),
+                                    getAccount(),
+                                    getApplicationContext()
+                            );
+                            synchFolderOp.execute(
+                                    getAccount(),
+                                    MainApp.getAppContext(),
+                                    FileDisplayActivity.this,
+                                    null,
+                                    null
+                            );
+
+                            mProgressBar.setIndeterminate(true);
+
+                            setBackgroundText();
+
+                        }   // else: NOTHING ; lets' not refresh when the user rotates the device but there is
+                        // another window floating over
+                    }
+                },
+                DELAY_TO_REQUEST_OPERATIONS_LATER
         );
-        synchFolderOp.execute(getAccount(), MainApp.getAppContext(), this, null, null);
 
-        mProgressBar.setIndeterminate(true);
-
-        setBackgroundText();
     }
 
     /**
index 4b558f0..2f02dcd 100644 (file)
@@ -38,7 +38,6 @@ import android.view.MenuInflater;
 import android.view.MenuItem;
 import android.view.View;
 import android.view.View.OnClickListener;
-import android.view.Window;
 import android.widget.Button;
 import android.widget.ProgressBar;
 import android.widget.Toast;
@@ -350,9 +349,9 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
         actionBar.setDisplayHomeAsUpEnabled(!atRoot);
         actionBar.setHomeButtonEnabled(!atRoot);
         actionBar.setTitle(
-            atRoot 
-                ? getString(R.string.default_display_name_for_root_folder) 
-                : currentDir.getFileName()
+                atRoot
+                        ? getString(R.string.default_display_name_for_root_folder)
+                        : currentDir.getFileName()
         );
     }
 
@@ -390,7 +389,7 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
         super.onRemoteOperationFinish(operation, result);
         
         if (operation instanceof CreateFolderOperation) {
-            onCreateFolderOperationFinish((CreateFolderOperation)operation, result);
+            onCreateFolderOperationFinish((CreateFolderOperation) operation, result);
             
         }
     }
@@ -408,10 +407,8 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
             ) {
         
         if (result.isSuccess()) {
-            dismissLoadingDialog();
             refreshListOfFilesFragment();
         } else {
-            dismissLoadingDialog();
             try {
                 Toast msg = Toast.makeText(FolderPickerActivity.this, 
                         ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()), 
@@ -542,9 +539,9 @@ public class FolderPickerActivity extends FileActivity implements FileFragment.C
     
 
     /**
-     * Shows the information of the {@link OCFile} received as a 
+     * 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
diff --git a/src/com/owncloud/android/ui/activity/ShareActivity.java b/src/com/owncloud/android/ui/activity/ShareActivity.java
new file mode 100644 (file)
index 0000000..7279047
--- /dev/null
@@ -0,0 +1,229 @@
+/**
+ *   ownCloud Android client application
+ *
+ *   @author masensio
+ *   @author David A. Velasco
+ *   Copyright (C) 2015 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.app.SearchManager;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.support.v4.app.DialogFragment;
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentTransaction;
+
+import com.owncloud.android.R;
+import com.owncloud.android.lib.common.utils.Log_OC;
+import com.owncloud.android.operations.CreateShareViaLinkOperation;
+import com.owncloud.android.operations.GetSharesForFileOperation;
+import com.owncloud.android.providers.UsersAndGroupsSearchProvider;
+
+import com.owncloud.android.lib.common.operations.RemoteOperation;
+import com.owncloud.android.lib.common.operations.RemoteOperationResult;
+import com.owncloud.android.datamodel.OCFile;
+import com.owncloud.android.lib.resources.shares.OCShare;
+import com.owncloud.android.lib.resources.shares.ShareType;
+import com.owncloud.android.ui.dialog.ShareLinkToDialog;
+import com.owncloud.android.ui.fragment.SearchShareesFragment;
+import com.owncloud.android.ui.fragment.ShareFileFragment;
+import com.owncloud.android.utils.GetShareWithUsersAsyncTask;
+
+import org.apache.http.protocol.HTTP;
+
+
+/**
+ * Activity for sharing files
+ */
+
+public class ShareActivity extends FileActivity
+        implements ShareFileFragment.OnShareFragmentInteractionListener,
+        SearchShareesFragment.OnSearchFragmentInteractionListener {
+
+    private static final String TAG = ShareActivity.class.getSimpleName();
+
+    private static final String TAG_SHARE_FRAGMENT = "SHARE_FRAGMENT";
+    private static final String TAG_SEARCH_FRAGMENT = "SEARCH_USER_AND_GROUPS_FRAGMENT";
+
+    /** Tag for dialog */
+    private static final String FTAG_CHOOSER_DIALOG = "CHOOSER_DIALOG";
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        setContentView(R.layout.share_activity);
+
+        FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
+
+        if (savedInstanceState == null) {
+            // Add Share fragment on first creation
+            Fragment fragment = ShareFileFragment.newInstance(getFile(), getAccount());
+            ft.replace(R.id.share_fragment_container, fragment, TAG_SHARE_FRAGMENT);
+            ft.commit();
+        }
+
+    }
+
+    protected void onAccountSet(boolean stateWasRecovered) {
+        super.onAccountSet(stateWasRecovered);
+
+        // Load data into the list
+        Log_OC.d(TAG, "Refreshing lists on account set");
+        refreshSharesFromStorageManager();
+
+        // Request for a refresh of the data through the server (starts an Async Task)
+        refreshUsersOrGroupsListFromServer();
+    }
+
+
+    @Override
+    protected void onNewIntent(Intent intent) {
+        // Verify the action and get the query
+        if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
+            String query = intent.getStringExtra(SearchManager.QUERY);
+            Log_OC.w(TAG, "Ignored Intent requesting to query for " + query);
+
+        } else if (UsersAndGroupsSearchProvider.ACTION_SHARE_WITH.equals(intent.getAction())) {
+            Uri data = intent.getData();
+            String dataString = intent.getDataString();
+            String shareWith = dataString.substring(dataString.lastIndexOf('/') + 1);
+            doShareWith(
+                    shareWith,
+                    UsersAndGroupsSearchProvider.DATA_GROUP.equals(data.getAuthority())
+            );
+
+        } else {
+            Log_OC.wtf(TAG, "Unexpected intent " + intent.toString());
+        }
+    }
+
+    private void doShareWith(String shareeName, boolean isGroup) {
+        getFileOperationsHelper().shareFileWithSharee(
+                getFile(),
+                shareeName,
+                (isGroup ? ShareType.GROUP : ShareType.USER)
+        );
+    }
+
+    @Override
+    public void showSearchUsersAndGroups() {
+        // replace ShareFragment with SearchFragment on demand
+        FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
+        Fragment searchFragment = SearchShareesFragment.newInstance(getFile(), getAccount());
+        ft.replace(R.id.share_fragment_container, searchFragment, TAG_SEARCH_FRAGMENT);
+        ft.addToBackStack(null);    // BACK button will recover the ShareFragment
+        ft.commit();
+    }
+
+    @Override
+    // Call to Unshare operation
+    public void unshareWith(OCShare share) {
+        OCFile file = getFile();
+        getFileOperationsHelper().unshareFileWithUserOrGroup(file, share.getShareType(), share.getShareWith());
+    }
+
+    /**
+     * Get users and groups from the server to fill in the "share with" list
+     */
+    @Override
+    public void refreshUsersOrGroupsListFromServer() {
+        // Show loading
+        showLoadingDialog(getString(R.string.common_loading));
+        // Get Users and Groups
+        GetShareWithUsersAsyncTask getTask = new GetShareWithUsersAsyncTask(this);
+        Object[] params = {getFile(), getAccount(), getStorageManager()};
+        getTask.execute(params);
+    }
+
+    /**
+     * Updates the view associated to the activity after the finish of some operation over files
+     * in the current account.
+     *
+     * @param operation Removal operation performed.
+     * @param result    Result of the removal.
+     */
+    @Override
+    public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) {
+        super.onRemoteOperationFinish(operation, result);
+
+        if (result.isSuccess() ||
+            (operation instanceof GetSharesForFileOperation &&
+                result.getCode() == RemoteOperationResult.ResultCode.SHARE_NOT_FOUND
+            )
+        ) {
+            Log_OC.d(TAG, "Refreshing view on successful operation or finished refresh");
+            refreshSharesFromStorageManager();
+        }
+
+        if (operation instanceof CreateShareViaLinkOperation && result.isSuccess()) {
+            // Send link to the app
+            String link = ((OCShare) (result.getData().get(0))).getShareLink();
+            Log_OC.d(TAG, "Share link = " + link);
+
+            Intent intentToShareLink = new Intent(Intent.ACTION_SEND);
+            intentToShareLink.putExtra(Intent.EXTRA_TEXT, link);
+            intentToShareLink.setType(HTTP.PLAIN_TEXT_TYPE);
+            String[] packagesToExclude = new String[]{getPackageName()};
+            DialogFragment chooserDialog = ShareLinkToDialog.newInstance(intentToShareLink, packagesToExclude);
+            chooserDialog.show(getSupportFragmentManager(), FTAG_CHOOSER_DIALOG);
+        }
+
+    }
+
+
+    /**
+     * Updates the view, reading data from {@link com.owncloud.android.datamodel.FileDataStorageManager}
+     */
+    private void refreshSharesFromStorageManager() {
+
+        ShareFileFragment shareFileFragment = getShareFileFragment();
+        if (shareFileFragment != null
+                && shareFileFragment.isAdded()) {   // only if added to the view hierarchy!!
+            shareFileFragment.refreshCapabilitiesFromDB();
+            shareFileFragment.refreshUsersOrGroupsListFromDB();
+            shareFileFragment.refreshPublicShareFromDB();
+        }
+
+        SearchShareesFragment searchShareesFragment = getSearchFragment();
+        if (searchShareesFragment != null &&
+                searchShareesFragment.isAdded()) {  // only if added to the view hierarchy!!
+            searchShareesFragment.refreshUsersOrGroupsListFromDB();
+        }
+    }
+
+    /**
+     * Shortcut to get access to the {@link ShareFileFragment} instance, if any
+     *
+     * @return  A {@link ShareFileFragment} instance, or null
+     */
+    private ShareFileFragment getShareFileFragment() {
+        return (ShareFileFragment) getSupportFragmentManager().findFragmentByTag(TAG_SHARE_FRAGMENT);
+    }
+
+    /**
+     * Shortcut to get access to the {@link SearchShareesFragment} instance, if any
+     *
+     * @return  A {@link SearchShareesFragment} instance, or null
+     */
+    private SearchShareesFragment getSearchFragment() {
+        return (SearchShareesFragment) getSupportFragmentManager().findFragmentByTag(TAG_SEARCH_FRAGMENT);
+    }
+
+}
index d221bc9..0d1a801 100644 (file)
@@ -607,10 +607,8 @@ public class Uploader extends FileActivity
     private void onCreateFolderOperationFinish(CreateFolderOperation operation,
                                                RemoteOperationResult result) {
         if (result.isSuccess()) {
-            dismissLoadingDialog();
             populateDirectoryList();
         } else {
-            dismissLoadingDialog();
             try {
                 Toast msg = Toast.makeText(this, 
                         ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()), 
index 5e94e0f..07a3eed 100644 (file)
@@ -63,7 +63,6 @@ import com.owncloud.android.utils.MimetypeIconUtil;
  * instance.\r
  */\r
 public class FileListListAdapter extends BaseAdapter implements ListAdapter {\r
-    private final static String PERMISSION_SHARED_WITH_ME = "S";\r
 \r
     private Context mContext;\r
     private OCFile mFile = null;\r
@@ -235,13 +234,21 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter {
                 case GRID_IMAGE:\r
                     // sharedIcon\r
                     ImageView sharedIconV = (ImageView) view.findViewById(R.id.sharedIcon);\r
-                    if (file.isShareByLink()) {\r
+                    if (file.isSharedViaLink()) {\r
+                        sharedIconV.setImageResource(R.drawable.shared_via_link);\r
+                        sharedIconV.setVisibility(View.VISIBLE);\r
+                        sharedIconV.bringToFront();\r
+                    } else if (file.isSharedWithSharee() || file.isSharedWithMe() ) {\r
+                        sharedIconV.setImageResource(R.drawable.shared_via_users);\r
                         sharedIconV.setVisibility(View.VISIBLE);\r
                         sharedIconV.bringToFront();\r
                     } else {\r
                         sharedIconV.setVisibility(View.GONE);\r
                     }\r
 \r
+                    /*ImageView sharedWithMeIcon = (ImageView) view.findViewById(R.id.sharedWithMeIcon);\r
+                    sharedWithMeIcon.bringToFront();*/\r
+\r
                     // local state\r
                     ImageView localStateView = (ImageView) view.findViewById(R.id.localFileIndicator);\r
                     localStateView.bringToFront();\r
@@ -249,35 +256,47 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter {
                             mTransferServiceGetter.getFileDownloaderBinder();\r
                     FileUploaderBinder uploaderBinder =\r
                             mTransferServiceGetter.getFileUploaderBinder();\r
-                    boolean downloading = (downloaderBinder != null &&\r
-                            downloaderBinder.isDownloading(mAccount, file));\r
                     OperationsServiceBinder opsBinder =\r
                             mTransferServiceGetter.getOperationsServiceBinder();\r
-                    downloading |= (opsBinder != null &&\r
-                            opsBinder.isSynchronizing(mAccount, file.getRemotePath()));\r
-                    if (downloading) {\r
-                        localStateView.setImageResource(R.drawable.downloading_file_indicator);\r
+\r
+                    localStateView.setVisibility(View.INVISIBLE);   // default first\r
+\r
+                    if ( //synchronizing\r
+                                opsBinder != null &&\r
+                                opsBinder.isSynchronizing(mAccount, file.getRemotePath())\r
+                            ) {\r
+                        localStateView.setImageResource(R.drawable.synchronizing_file_indicator);\r
+                        localStateView.setVisibility(View.VISIBLE);\r
+\r
+                    } else if ( // downloading\r
+                                downloaderBinder != null &&\r
+                                downloaderBinder.isDownloading(mAccount, file)\r
+                            ) {\r
+                        localStateView.setImageResource(\r
+                                file.isFolder() ?\r
+                                        R.drawable.synchronizing_file_indicator :\r
+                                        R.drawable.downloading_file_indicator\r
+                        );\r
+                        localStateView.setVisibility(View.VISIBLE);\r
+\r
+                    } else if ( //uploading\r
+                                uploaderBinder != null &&\r
+                                uploaderBinder.isUploading(mAccount, file)\r
+                            ) {\r
+                        localStateView.setImageResource(\r
+                                file.isFolder() ?\r
+                                        R.drawable.synchronizing_file_indicator :\r
+                                        R.drawable.uploading_file_indicator\r
+                        );\r
                         localStateView.setVisibility(View.VISIBLE);\r
-                    } else if (uploaderBinder != null &&\r
-                            uploaderBinder.isUploading(mAccount, file)) {\r
-                        localStateView.setImageResource(R.drawable.uploading_file_indicator);\r
+\r
+                    } else if (file.getEtagInConflict() != null) {   // conflict\r
+                        localStateView.setImageResource(R.drawable.conflict_file_indicator);\r
                         localStateView.setVisibility(View.VISIBLE);\r
+\r
                     } else if (file.isDown()) {\r
                         localStateView.setImageResource(R.drawable.local_file_indicator);\r
                         localStateView.setVisibility(View.VISIBLE);\r
-                    } else {\r
-                        localStateView.setVisibility(View.INVISIBLE);\r
-                    }\r
-\r
-                    // share with me icon\r
-                    ImageView sharedWithMeIconV = (ImageView)\r
-                            view.findViewById(R.id.sharedWithMeIcon);\r
-                    sharedWithMeIconV.bringToFront();\r
-                    if (checkIfFileIsSharedWithMe(file) &&\r
-                            (!file.isFolder() || !mGridMode)) {\r
-                        sharedWithMeIconV.setVisibility(View.VISIBLE);\r
-                    } else {\r
-                        sharedWithMeIconV.setVisibility(View.GONE);\r
                     }\r
 \r
                     break;\r
@@ -338,53 +357,16 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter {
                 // Folder\r
                 fileIcon.setImageResource(\r
                         MimetypeIconUtil.getFolderTypeIconId(\r
-                                checkIfFileIsSharedWithMe(file), file.isShareByLink()));\r
+                                file.isSharedWithMe() || file.isSharedWithSharee(),\r
+                                file.isSharedViaLink()\r
+                        )\r
+                );\r
             }\r
         }\r
 \r
         return view;\r
     }\r
 \r
-    /**\r
-     * Local Folder size in human readable format\r
-     * \r
-     * @param path\r
-     *            String\r
-     * @return Size in human readable format\r
-     */\r
-    private String getFolderSizeHuman(String path) {\r
-\r
-        File dir = new File(path);\r
-\r
-        if (dir.exists()) {\r
-            long bytes = FileStorageUtils.getFolderSize(dir);\r
-            return DisplayUtils.bytesToHumanReadable(bytes);\r
-        }\r
-\r
-        return "0 B";\r
-    }\r
-\r
-    /**\r
-     * Local Folder size\r
-     * @param dir File\r
-     * @return Size in bytes\r
-     */\r
-    private long getFolderSize(File dir) {\r
-        if (dir.exists()) {\r
-            long result = 0;\r
-            File[] fileList = dir.listFiles();\r
-            for(int i = 0; i < fileList.length; i++) {\r
-                if(fileList[i].isDirectory()) {\r
-                    result += getFolderSize(fileList[i]);\r
-                } else {\r
-                    result += fileList[i].length();\r
-                }\r
-            }\r
-            return result;\r
-        }\r
-        return 0;\r
-    } \r
-\r
     @Override\r
     public int getViewTypeCount() {\r
         return 1;\r
@@ -450,20 +432,6 @@ public class FileListListAdapter extends BaseAdapter implements ListAdapter {
     }\r
     \r
     \r
-    /**\r
-     * Check if parent folder does not include 'S' permission and if file/folder\r
-     * is shared with me\r
-     * \r
-     * @param file: OCFile\r
-     * @return boolean: True if it is shared with me and false if it is not\r
-     */\r
-    private boolean checkIfFileIsSharedWithMe(OCFile file) {\r
-        return (mFile.getPermissions() != null \r
-                && !mFile.getPermissions().contains(PERMISSION_SHARED_WITH_ME)\r
-                && file.getPermissions() != null \r
-                && file.getPermissions().contains(PERMISSION_SHARED_WITH_ME));\r
-    }\r
-\r
     public void setSortOrder(Integer order, boolean ascending) {\r
         SharedPreferences.Editor editor = mAppPreferences.edit();\r
         editor.putInt("sortOrder", order);\r
index 60675f4..a339ed7 100644 (file)
@@ -185,7 +185,6 @@ public class LocalFileListAdapter extends BaseAdapter implements ListAdapter {
             view.findViewById(R.id.favoriteIcon).setVisibility(View.GONE);
             
             view.findViewById(R.id.sharedIcon).setVisibility(View.GONE);
-            view.findViewById(R.id.sharedWithMeIcon).setVisibility(View.GONE);
         }
 
         return view;
diff --git a/src/com/owncloud/android/ui/adapter/ShareUserListAdapter.java b/src/com/owncloud/android/ui/adapter/ShareUserListAdapter.java
new file mode 100644 (file)
index 0000000..413223d
--- /dev/null
@@ -0,0 +1,103 @@
+/**
+ *   ownCloud Android client application
+ *
+ *   @author masensio
+ *   Copyright (C) 2015 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.adapter;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.owncloud.android.R;
+import com.owncloud.android.lib.resources.shares.OCShare;
+import com.owncloud.android.lib.resources.shares.ShareType;
+
+import java.util.ArrayList;
+
+/**
+ * Adapter to show a user/group in Share With List
+ */
+public class ShareUserListAdapter extends ArrayAdapter {
+
+    private Context mContext;
+    private ArrayList<OCShare> mShares;
+    private ShareUserAdapterListener mListener;
+
+    public ShareUserListAdapter(Context context, int resource, ArrayList<OCShare>shares,
+                                ShareUserAdapterListener listener) {
+        super(context, resource);
+        mContext= context;
+        mShares = shares;
+        mListener = listener;
+    }
+
+    @Override
+    public int getCount() {
+        return mShares.size();
+    }
+
+    @Override
+    public Object getItem(int position) {
+        return mShares.get(position);
+    }
+
+    @Override
+    public long getItemId(int position) {
+        return 0;
+    }
+
+    @Override
+    public View getView(final int position, View convertView, ViewGroup parent) {
+        LayoutInflater inflator = (LayoutInflater) mContext
+                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+        View view = inflator.inflate(R.layout.share_user_item, parent, false);
+
+        if (mShares != null && mShares.size() > position) {
+            OCShare share = mShares.get(position);
+
+            TextView userName = (TextView) view.findViewById(R.id.userOrGroupName);
+            String name = share.getSharedWithDisplayName();
+            if (share.getShareType() == ShareType.GROUP) {
+                name = getContext().getString(R.string.share_group_clarification, name);
+            }
+            userName.setText(name);
+
+            final ImageView unshareButton = (ImageView) view.findViewById(R.id.unshareButton);
+            unshareButton.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    mListener.unshareButtonPressed(mShares.get(position));
+                }
+            });
+
+        }
+        return view;
+    }
+
+    public interface ShareUserAdapterListener {
+        void unshareButtonPressed(OCShare share);
+    }
+
+
+
+}
index 1c8c8c2..742d6d8 100644 (file)
@@ -20,6 +20,9 @@
  */
 package com.owncloud.android.ui.adapter;
 
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.security.cert.CertificateEncodingException;
 import java.security.cert.X509Certificate;
 import java.text.DateFormat;
 import java.util.Date;
@@ -31,6 +34,7 @@ import javax.security.auth.x500.X500Principal;
 import com.owncloud.android.R;
 import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;
 
+import android.util.Log;
 import android.view.View;
 import android.widget.TextView;
 
@@ -42,7 +46,9 @@ public class X509CertificateViewAdapter implements SslUntrustedCertDialog.Certif
     //private final static String TAG = X509CertificateViewAdapter.class.getSimpleName();
     
     private X509Certificate mCertificate = null;
-    
+
+    private static final String TAG = X509CertificateViewAdapter.class.getSimpleName();
+
     public X509CertificateViewAdapter(X509Certificate certificate) {
         mCertificate = certificate;
     }
@@ -63,25 +69,68 @@ public class X509CertificateViewAdapter implements SslUntrustedCertDialog.Certif
         }
     }
 
+    private byte[] getDigest(String algorithm, byte[] message) {
+        MessageDigest md = null;
+
+        try {
+            md = MessageDigest.getInstance(algorithm);
+        } catch (NoSuchAlgorithmException e) {
+            return null;
+        }
+        md.reset();
+        return md.digest(message);
+    }
+
     private void showSignature(View dialogView) {
-        TextView sigView = ((TextView)dialogView.findViewById(R.id.value_signature));
-        TextView algorithmView = ((TextView)dialogView.findViewById(R.id.value_signature_algorithm));
-        sigView.setText(getHex(mCertificate.getSignature()));
-        algorithmView.setText(mCertificate.getSigAlgName());
+        byte[] cert = null;
+
+        TextView certFingerprintView = ((TextView) dialogView.findViewById(R.id.value_certificate_fingerprint));
+        TextView algorithmView = ((TextView) dialogView.findViewById(R.id.value_signature_algorithm));
+
+        try {
+            cert = mCertificate.getEncoded();
+            if (cert == null) {
+
+                certFingerprintView.setText(R.string.certificate_load_problem);
+                algorithmView.setText(R.string.certificate_load_problem);
+
+            } else {
+
+                certFingerprintView.setText(
+                        getDigestHexBytesWithColonsAndNewLines(dialogView, "SHA-256", cert)
+                                + getDigestHexBytesWithColonsAndNewLines(dialogView, "SHA-1", cert)
+                                + getDigestHexBytesWithColonsAndNewLines(dialogView, "MD5", cert));
+                algorithmView.setText(mCertificate.getSigAlgName());
+
+            }
+
+        } catch (CertificateEncodingException e) {
+            Log.e(TAG, "Problem while trying to decode the certificate.");
+        }
+
+
     }
     
-    public String getHex(final byte [] raw) {
-        if (raw == null) {
-           return null;
+    private final String getDigestHexBytesWithColonsAndNewLines(View dialogView, final String digestType, final byte [] cert) {
+        final byte[] rawDigest;
+        final String newLine = System.getProperty("line.separator");
+
+        rawDigest = getDigest(digestType, cert);
+
+        if ( rawDigest == null) {
+            return digestType + ":" + newLine + dialogView.getContext().getString(R.string.digest_algorithm_not_available) + newLine + newLine;
         }
-        final StringBuilder hex = new StringBuilder(2 * raw.length);
-        for (final byte b : raw) {
+
+        final StringBuilder hex = new StringBuilder(3 * rawDigest.length);
+
+        for (final byte b : rawDigest) {
            final int hiVal = (b & 0xF0) >> 4;
            final int loVal = b & 0x0F;
            hex.append((char) ('0' + (hiVal + (hiVal / 10 * 7))));
            hex.append((char) ('0' + (loVal + (loVal / 10 * 7))));
+           hex.append(":");
         }
-        return hex.toString();
+        return digestType + ":" + newLine + hex.toString().replaceFirst("\\:$","") + newLine + newLine;
      }    
 
     private void showValidity(Date notBefore, Date notAfter, View dialogView) {
diff --git a/src/com/owncloud/android/ui/dialog/ExpirationDatePickerDialogFragment.java b/src/com/owncloud/android/ui/dialog/ExpirationDatePickerDialogFragment.java
new file mode 100644 (file)
index 0000000..502e18a
--- /dev/null
@@ -0,0 +1,138 @@
+/**
+ *   ownCloud Android client application
+ *
+ *   @author David A. Velasco
+ *   Copyright (C) 2015 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.dialog;
+
+
+import android.app.DatePickerDialog;
+import android.app.Dialog;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.support.v4.app.DialogFragment;
+import android.text.format.DateUtils;
+import android.widget.DatePicker;
+import android.widget.Toast;
+
+import com.owncloud.android.datamodel.OCFile;
+import com.owncloud.android.ui.activity.FileActivity;
+
+import java.util.Calendar;
+import java.util.Date;
+
+/**
+ *  Dialog requesting a date after today.
+ */
+public class ExpirationDatePickerDialogFragment
+        extends DialogFragment
+        implements DatePickerDialog.OnDateSetListener {
+
+    /** Tag for FragmentsManager */
+    public static final String DATE_PICKER_DIALOG = "DATE_PICKER_DIALOG";
+
+    /** Parameter constant for {@link OCFile} instance to set the expiration date */
+    private static final String ARG_FILE = "FILE";
+
+    /** Parameter constant for date chosen initially */
+    private static final String ARG_CHOSEN_DATE_IN_MILLIS = "CHOSEN_DATE_IN_MILLIS";
+
+    /** File to bind an expiration date */
+    private OCFile mFile;
+
+    /**
+     *  Factory method to create new instances
+     *
+     *  @param file                 File to bind an expiration date
+     *  @param chosenDateInMillis   Date chosen when the dialog appears
+     *  @return                     New dialog instance
+     */
+    public static ExpirationDatePickerDialogFragment newInstance(OCFile file, long chosenDateInMillis) {
+        Bundle arguments = new Bundle();
+        arguments.putParcelable(ARG_FILE, file);
+        arguments.putLong(ARG_CHOSEN_DATE_IN_MILLIS, chosenDateInMillis);
+
+        ExpirationDatePickerDialogFragment dialog = new ExpirationDatePickerDialogFragment();
+        dialog.setArguments(arguments);
+        return dialog;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * @return      A new dialog to let the user choose an expiration date that will be bound to a share link.
+     */
+    @Override
+    public Dialog onCreateDialog(Bundle savedInstanceState) {
+        // Load arguments
+        mFile = getArguments().getParcelable(ARG_FILE);
+
+        // Chosen date received as an argument must be later than tomorrow ; default to tomorrow in other case
+        final Calendar chosenDate = Calendar.getInstance();
+        long tomorrowInMillis = chosenDate.getTimeInMillis() + DateUtils.DAY_IN_MILLIS;
+        long chosenDateInMillis = getArguments().getLong(ARG_CHOSEN_DATE_IN_MILLIS);
+        if (chosenDateInMillis > tomorrowInMillis) {
+            chosenDate.setTimeInMillis(chosenDateInMillis);
+        } else {
+            chosenDate.setTimeInMillis(tomorrowInMillis);
+        }
+
+        // Create a new instance of DatePickerDialog
+        DatePickerDialog dialog = new DatePickerDialog(
+                getActivity(),
+                this,
+                chosenDate.get(Calendar.YEAR),
+                chosenDate.get(Calendar.MONTH),
+                chosenDate.get(Calendar.DAY_OF_MONTH)
+        );
+
+        // Prevent days in the past may be chosen
+        DatePicker picker = dialog.getDatePicker();
+        picker.setMinDate(tomorrowInMillis - 1000);
+
+        // Enforce spinners view; ignored by MD-based theme in Android >=5, but calendar is REALLY buggy
+        // in Android < 5, so let's be sure it never appears (in tablets both spinners and calendar are
+        // shown by default)
+        picker.setCalendarViewShown(false);
+
+        return dialog;
+    }
+
+    /**
+     * Called when the user choses an expiration date.
+     *
+     * @param view              View instance where the date was chosen
+     * @param year              Year of the date chosen.
+     * @param monthOfYear       Month of the date chosen [0, 11]
+     * @param dayOfMonth        Day of the date chosen
+     */
+    @Override
+    public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {
+
+        Calendar chosenDate = Calendar.getInstance();
+        chosenDate.set(Calendar.YEAR, year);
+        chosenDate.set(Calendar.MONTH, monthOfYear);
+        chosenDate.set(Calendar.DAY_OF_MONTH, dayOfMonth);
+        long chosenDateInMillis = chosenDate.getTimeInMillis();
+
+        ((FileActivity)getActivity()).getFileOperationsHelper().setExpirationDateToShareViaLink(
+                mFile,
+                chosenDateInMillis
+        );
+    }
+}
index 28419e6..f8310a1 100644 (file)
@@ -25,7 +25,6 @@ package com.owncloud.android.ui.dialog;
  * 
  *  Triggers the removal according to the user response.
  */
-import java.util.Vector;
 
 import android.app.Dialog;
 import android.os.Bundle;
@@ -106,34 +105,6 @@ implements ConfirmationDialogFragmentListener {
     public void onCancel(String callerTag) {
         ComponentsGetter cg = (ComponentsGetter)getActivity();
         cg.getFileOperationsHelper().removeFile(mTargetFile, true);
-        
-        FileDataStorageManager storageManager = cg.getStorageManager();
-        
-        boolean containsFavorite = false;
-        if (mTargetFile.isFolder()) {
-            // TODO Enable when "On Device" is recovered ?
-            Vector<OCFile> files = storageManager.getFolderContent(mTargetFile/*, false*/);
-            for(OCFile file: files) {
-                containsFavorite = file.isFavorite() || containsFavorite;
-
-                if (containsFavorite)
-                    break;
-            }
-        }
-
-        // Remove etag for parent, if file is a favorite
-        // or is a folder and contains favorite
-        if (mTargetFile.isFavorite() || containsFavorite) {
-            OCFile folder = null;
-            if (mTargetFile.isFolder()) {
-                folder = mTargetFile;
-            } else {
-                folder = storageManager.getFileById(mTargetFile.getParentId());
-            }
-            
-           folder.setEtag("");
-           storageManager.saveFile(folder);
-        }
     }
 
     @Override
index a315a1d..29eaac2 100644 (file)
@@ -44,11 +44,8 @@ import android.widget.ImageView;
 import android.widget.TextView;
 
 import com.owncloud.android.R;
-import com.owncloud.android.datamodel.OCFile;
 import com.owncloud.android.lib.common.utils.Log_OC;
-import com.owncloud.android.ui.activity.ComponentsGetter;
 import com.owncloud.android.ui.activity.CopyToClipboardActivity;
-import com.owncloud.android.ui.activity.FileActivity;
 
 /**
  * Dialog showing a list activities able to resolve a given Intent, 
@@ -61,20 +58,15 @@ public class ShareLinkToDialog  extends DialogFragment {
             ".ARG_INTENT";
     private final static String ARG_PACKAGES_TO_EXCLUDE =  ShareLinkToDialog.class.getSimpleName() +
             ".ARG_PACKAGES_TO_EXCLUDE";
-    private final static String ARG_FILE_TO_SHARE = ShareLinkToDialog.class.getSimpleName() +
-            ".FILE_TO_SHARE";
-    
+
     private ActivityAdapter mAdapter;
-    private OCFile mFile;
     private Intent mIntent;
     
-    public static ShareLinkToDialog newInstance(Intent intent, String[] packagesToExclude,
-                                                OCFile fileToShare) {
+    public static ShareLinkToDialog newInstance(Intent intent, String[] packagesToExclude) {
         ShareLinkToDialog f = new ShareLinkToDialog();
         Bundle args = new Bundle();
         args.putParcelable(ARG_INTENT, intent);
         args.putStringArray(ARG_PACKAGES_TO_EXCLUDE, packagesToExclude);
-        args.putParcelable(ARG_FILE_TO_SHARE, fileToShare);
         f.setArguments(args);
         return f;
     }
@@ -90,8 +82,7 @@ public class ShareLinkToDialog  extends DialogFragment {
         String[] packagesToExclude = getArguments().getStringArray(ARG_PACKAGES_TO_EXCLUDE);
         List<String> packagesToExcludeList = Arrays.asList(packagesToExclude != null ?
                 packagesToExclude : new String[0]);
-        mFile = getArguments().getParcelable(ARG_FILE_TO_SHARE);
-        
+
         PackageManager pm= getActivity().getPackageManager();
         List<ResolveInfo> activities = pm.queryIntentActivities(mIntent,
                 PackageManager.MATCH_DEFAULT_ONLY);
@@ -142,19 +133,10 @@ public class ShareLinkToDialog  extends DialogFragment {
                             ComponentName name=new ComponentName(
                                     actInfo.applicationInfo.packageName, 
                                     actInfo.name);
-                            mIntent.setComponent(name);                               
-
-                            if (sendAction) {
-                                dialog.dismiss();    // explicitly added for Android 2.x devices
-
-                                // Send the file
-                                ((FileActivity)getActivity()).startActivity(mIntent);
+                            mIntent.setComponent(name);
 
-                            } else {
-                                // Create a new share resource
-                                ((ComponentsGetter)getActivity()).getFileOperationsHelper()
-                                    .shareFileWithLinkToApp(mFile, "", mIntent);
-                            }
+                            // Send the file
+                            getActivity().startActivity(mIntent);
                         }
         })
         .create();
index d069b5a..1b7def2 100644 (file)
@@ -21,7 +21,6 @@ package com.owncloud.android.ui.dialog;
 import android.support.v7.app.AlertDialog;
 import android.app.Dialog;
 import android.content.DialogInterface;
-import android.content.Intent;
 import android.os.Bundle;
 import android.support.v4.app.DialogFragment;
 import android.view.LayoutInflater;
@@ -45,25 +44,26 @@ public class SharePasswordDialogFragment extends DialogFragment
         implements DialogInterface.OnClickListener {
 
     private static final String ARG_FILE = "FILE";
-    private static final String ARG_SEND_INTENT = "SEND_INTENT";
+    private static final String ARG_CREATE_SHARE = "CREATE_SHARE";
 
     public static final String PASSWORD_FRAGMENT = "PASSWORD_FRAGMENT";
 
     private OCFile mFile;
-    private Intent mSendIntent;
+    private boolean mCreateShare;
 
     /**
      * Public factory method to create new SharePasswordDialogFragment instances.
      *
-     * @param file
-     * @param sendIntent
-     * @return              Dialog ready to show.
+     * @param   file            OCFile bound to the public share that which password will be set or updated
+     * @param   createShare     When 'true', the public share will be created; when 'false', will be assumed
+     *                          that the public share already exists, and its state will be directly updated.
+     * @return                  Dialog ready to show.
      */
-    public static SharePasswordDialogFragment newInstance(OCFile file, Intent sendIntent) {
+    public static SharePasswordDialogFragment newInstance(OCFile file, boolean createShare) {
         SharePasswordDialogFragment frag = new SharePasswordDialogFragment();
         Bundle args = new Bundle();
         args.putParcelable(ARG_FILE, file);
-        args.putParcelable(ARG_SEND_INTENT, sendIntent);
+        args.putBoolean(ARG_CREATE_SHARE, createShare);
         frag.setArguments(args);
         return frag;
     }
@@ -71,7 +71,7 @@ public class SharePasswordDialogFragment extends DialogFragment
     @Override
     public Dialog onCreateDialog(Bundle savedInstanceState) {
         mFile = getArguments().getParcelable(ARG_FILE);
-        mSendIntent = getArguments().getParcelable(ARG_SEND_INTENT);
+        mCreateShare = getArguments().getBoolean(ARG_CREATE_SHARE, false);
 
         // Inflate the layout for the dialog
         LayoutInflater inflater = getActivity().getLayoutInflater();
@@ -97,9 +97,6 @@ public class SharePasswordDialogFragment extends DialogFragment
     @Override
     public void onClick(DialogInterface dialog, int which) {
         if (which == AlertDialog.BUTTON_POSITIVE) {
-            // Enable the flag "Share again"
-            ((FileActivity) getActivity()).setTryShareAgain(true);
-
             String password =
                     ((TextView)(getDialog().findViewById(R.id.share_password)))
                         .getText().toString();
@@ -112,13 +109,16 @@ public class SharePasswordDialogFragment extends DialogFragment
                 return;
             }
 
-            // Share the file
-            ((FileActivity)getActivity()).getFileOperationsHelper()
-                                    .shareFileWithLinkToApp(mFile, password, mSendIntent);
+            if (mCreateShare) {
+                // Share the file
+                ((FileActivity) getActivity()).getFileOperationsHelper().
+                        shareFileViaLink(mFile, password);
 
-        } else {
-            // Disable the flag "Share again"
-            ((FileActivity) getActivity()).setTryShareAgain(false);
+            } else {
+                // updat existing link
+                ((FileActivity) getActivity()).getFileOperationsHelper().
+                        setPasswordToShareViaLink(mFile, password);
+            }
         }
     }
 }
index d4b1ffd..5264af1 100644 (file)
@@ -22,6 +22,7 @@
 package com.owncloud.android.ui.fragment;
 
 import android.accounts.Account;
+import android.graphics.Bitmap;
 import android.os.Bundle;
 import android.view.LayoutInflater;
 import android.view.Menu;
@@ -35,9 +36,11 @@ import android.widget.ImageView;
 import android.widget.ProgressBar;
 import android.widget.TextView;
 
+import com.owncloud.android.MainApp;
 import com.owncloud.android.R;
 import com.owncloud.android.datamodel.FileDataStorageManager;
 import com.owncloud.android.datamodel.OCFile;
+import com.owncloud.android.datamodel.ThumbnailsCacheManager;
 import com.owncloud.android.files.FileMenuFilter;
 import com.owncloud.android.files.services.FileDownloader.FileDownloaderBinder;
 import com.owncloud.android.files.services.FileUploader.FileUploaderBinder;
@@ -224,11 +227,7 @@ public class FileDetailFragment extends FileFragment implements OnClickListener
     public boolean onOptionsItemSelected(MenuItem item) {
         switch (item.getItemId()) {
             case R.id.action_share_file: {
-                mContainerActivity.getFileOperationsHelper().shareFileWithLink(getFile());
-                return true;
-            }
-            case R.id.action_unshare_file: {
-                mContainerActivity.getFileOperationsHelper().unshareFileWithLink(getFile());
+                mContainerActivity.getFileOperationsHelper().showShareFile(getFile());
                 return true;
             }
             case R.id.action_open_file_with: {
@@ -245,9 +244,8 @@ public class FileDetailFragment extends FileFragment implements OnClickListener
                 dialog.show(getFragmentManager(), FTAG_RENAME_FILE);
                 return true;
             }
-            case R.id.action_cancel_download:
-            case R.id.action_cancel_upload: {
-                ((FileDisplayActivity) mContainerActivity).cancelTransference(getFile());
+            case R.id.action_cancel_sync: {
+                ((FileDisplayActivity)mContainerActivity).cancelTransference(getFile());
                 return true;
             }
             case R.id.action_download_file:
@@ -260,7 +258,6 @@ public class FileDetailFragment extends FileFragment implements OnClickListener
                 if (!getFile().isDown()) {  // Download the file                    
                     Log_OC.d(TAG, getFile().getRemotePath() + " : File must be downloaded");
                     ((FileDisplayActivity) mContainerActivity).startDownloadForSending(getFile());
-
                 }
                 else {
                     mContainerActivity.getFileOperationsHelper().sendDownloadedFile(getFile());
@@ -297,7 +294,6 @@ public class FileDetailFragment extends FileFragment implements OnClickListener
         }
     }
 
-
     /**
      * Check if the fragment was created with an empty layout. An empty fragment can't show file details, must be replaced.
      *
@@ -339,7 +335,7 @@ public class FileDetailFragment extends FileFragment implements OnClickListener
 
             // set file details
             setFilename(file.getFileName());
-            setFiletype(file.getMimetype(), file.getFileName());
+            setFiletype(file);
             setFilesize(file.getFileLength());
 
             setTimeModified(file.getModificationTimestamp());
@@ -393,18 +389,54 @@ public class FileDetailFragment extends FileFragment implements OnClickListener
 
     /**
      * Updates the MIME type in view
-     * @param mimetype      MIME type to set
-     * @param filename      Name of the file, to deduce the icon to use in case the MIME type is not precise enough
+     * @param file : An {@link OCFile}
      */
-    private void setFiletype(String mimetype, String filename) {
+    private void setFiletype(OCFile file) {
+        String mimetype = file.getMimetype();
         TextView tv = (TextView) getView().findViewById(R.id.fdType);
         if (tv != null) {
+                       // mimetype      MIME type to set
             String printableMimetype = DisplayUtils.convertMIMEtoPrettyPrint(mimetype);
             tv.setText(printableMimetype);
         }
+
         ImageView iv = (ImageView) getView().findViewById(R.id.fdIcon);
+
         if (iv != null) {
-            iv.setImageResource(MimetypeIconUtil.getFileTypeIconId(mimetype, filename));
+            Bitmap thumbnail;
+            iv.setTag(file.getFileId());
+
+            if (file.isImage()) {
+                String tagId = String.valueOf(file.getRemoteId());
+                thumbnail = ThumbnailsCacheManager.getBitmapFromDiskCache(tagId);
+
+                if (thumbnail != null && !file.needsUpdateThumbnail()) {
+                    iv.setImageBitmap(thumbnail);
+                } else {
+                    // generate new Thumbnail
+                    if (ThumbnailsCacheManager.cancelPotentialWork(file, iv)) {
+                        final ThumbnailsCacheManager.ThumbnailGenerationTask task =
+                                new ThumbnailsCacheManager.ThumbnailGenerationTask(
+                                        iv, mContainerActivity.getStorageManager(), mAccount
+                                );
+                        if (thumbnail == null) {
+                            thumbnail = ThumbnailsCacheManager.mDefaultImg;
+                        }
+                        final ThumbnailsCacheManager.AsyncDrawable asyncDrawable =
+                                new ThumbnailsCacheManager.AsyncDrawable(
+                                        MainApp.getAppContext().getResources(),
+                                        thumbnail,
+                                        task
+                                );
+                        iv.setImageDrawable(asyncDrawable);
+                        task.execute(file);
+                    }
+                }
+            } else {
+                               // Name of the file, to deduce the icon to use in case the MIME type is not precise enough
+                               String filename = file.getFileName();
+                iv.setImageResource(MimetypeIconUtil.getFileTypeIconId(mimetype, filename));
+                       }
         }
     }
 
index fd5aeef..cacfa2d 100644 (file)
@@ -141,9 +141,8 @@ public class FileFragment extends Fragment {
          * @param downloading   Flag signaling if the file is now downloading.
          * @param uploading     Flag signaling if the file is now uploading.
          */
-        public void onTransferStateChanged(OCFile file, boolean downloading, boolean uploading); 
+        public void onTransferStateChanged(OCFile file, boolean downloading, boolean uploading);
 
-        
     }
 
 }
index 02bd845..b47f648 100644 (file)
@@ -53,8 +53,8 @@ import com.owncloud.android.ui.dialog.RemoveFileDialogFragment;
 import com.owncloud.android.ui.dialog.RenameFileDialogFragment;
 import com.owncloud.android.ui.preview.PreviewImageFragment;
 import com.owncloud.android.ui.preview.PreviewMediaFragment;
-import com.owncloud.android.utils.FileStorageUtils;
 import com.owncloud.android.ui.preview.PreviewTextFragment;
+import com.owncloud.android.utils.FileStorageUtils;
 
 import java.io.File;
 
@@ -63,7 +63,8 @@ import java.io.File;
  *
  * TODO refactor to get rid of direct dependency on FileDisplayActivity
  */
-public class OCFileListFragment extends ExtendedListFragment implements FileActionsDialogFragment.FileActionsDialogFragmentListener {
+public class OCFileListFragment extends ExtendedListFragment
+        implements FileActionsDialogFragment.FileActionsDialogFragmentListener {
     
     private static final String TAG = OCFileListFragment.class.getSimpleName();
 
@@ -193,7 +194,8 @@ public class OCFileListFragment extends ExtendedListFragment implements FileActi
                 }
             }
 
-            FileActionsDialogFragment dialog = FileActionsDialogFragment.newInstance(menu, fileIndex, targetFile.getFileName());
+            FileActionsDialogFragment dialog = FileActionsDialogFragment.newInstance(menu,
+                    fileIndex, targetFile.getFileName());
             dialog.setTargetFragment(this, 0);
             dialog.show(getFragmentManager(), FileActionsDialogFragment.FTAG_FILE_ACTIONS);
         }
@@ -342,17 +344,13 @@ public class OCFileListFragment extends ExtendedListFragment implements FileActi
         mTargetFile = (OCFile) mAdapter.getItem(filePosition);
         switch (menuId) {
             case R.id.action_share_file: {
-                mContainerActivity.getFileOperationsHelper().shareFileWithLink(mTargetFile);
+                mContainerActivity.getFileOperationsHelper().showShareFile(mTargetFile);
                 return true;
             }
             case R.id.action_open_file_with: {
                 mContainerActivity.getFileOperationsHelper().openFile(mTargetFile);
                 return true;
             }
-            case R.id.action_unshare_file: {
-                mContainerActivity.getFileOperationsHelper().unshareFileWithLink(mTargetFile);
-                return true;
-            }
             case R.id.action_rename_file: {
                 RenameFileDialogFragment dialog = RenameFileDialogFragment.newInstance(mTargetFile);
                 dialog.show(getFragmentManager(), FileDetailFragment.FTAG_RENAME_FILE);
@@ -368,9 +366,8 @@ public class OCFileListFragment extends ExtendedListFragment implements FileActi
                 mContainerActivity.getFileOperationsHelper().syncFile(mTargetFile);
                 return true;
             }
-            case R.id.action_cancel_download:
-            case R.id.action_cancel_upload: {
-                ((FileDisplayActivity) mContainerActivity).cancelTransference(mTargetFile);
+            case R.id.action_cancel_sync: {
+                ((FileDisplayActivity)mContainerActivity).cancelTransference(mTargetFile);
                 return true;
             }
             case R.id.action_see_details: {
@@ -422,7 +419,8 @@ public class OCFileListFragment extends ExtendedListFragment implements FileActi
     @Override
     public boolean onContextItemSelected (MenuItem item) {
         AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();
-        boolean matched = onFileActionChosen(item.getItemId(), ((AdapterContextMenuInfo) item.getMenuInfo()).position);
+        boolean matched = onFileActionChosen(item.getItemId(),
+                ((AdapterContextMenuInfo) item.getMenuInfo()).position);
         if(!matched) {
             return super.onContextItemSelected(item);
         } else {
diff --git a/src/com/owncloud/android/ui/fragment/SearchShareesFragment.java b/src/com/owncloud/android/ui/fragment/SearchShareesFragment.java
new file mode 100644 (file)
index 0000000..0059b3f
--- /dev/null
@@ -0,0 +1,247 @@
+/**
+ *   ownCloud Android client application
+ *
+ *   @author masensio
+ *   @author David A. Velasco
+ *   Copyright (C) 2015 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.fragment;
+
+import android.accounts.Account;
+import android.app.Activity;
+import android.app.SearchManager;
+import android.content.Context;
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.inputmethod.EditorInfo;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.ListView;
+import android.widget.SearchView;
+
+import com.owncloud.android.R;
+import com.owncloud.android.datamodel.OCFile;
+import com.owncloud.android.lib.common.utils.Log_OC;
+import com.owncloud.android.lib.resources.shares.OCShare;
+import com.owncloud.android.ui.activity.FileActivity;
+import com.owncloud.android.ui.activity.ShareActivity;
+import com.owncloud.android.ui.adapter.ShareUserListAdapter;
+
+import java.util.ArrayList;
+
+/**
+ * Fragment for Searching sharees (users and groups)
+ *
+ * A simple {@link Fragment} subclass.
+ *
+ * Activities that contain this fragment must implement the
+ * {@link SearchShareesFragment.OnSearchFragmentInteractionListener} interface
+ * to handle interaction events.
+ *
+ * Use the {@link SearchShareesFragment#newInstance} factory method to
+ * create an instance of this fragment.
+ */
+public class SearchShareesFragment extends Fragment implements ShareUserListAdapter.ShareUserAdapterListener {
+    private static final String TAG = SearchShareesFragment.class.getSimpleName();
+
+    // the fragment initialization parameters
+    private static final String ARG_FILE = "FILE";
+    private static final String ARG_ACCOUNT = "ACCOUNT";
+
+    // Parameters
+    private OCFile mFile;
+    private Account mAccount;
+
+    // other members
+    private ArrayList<OCShare> mShares;
+    private ShareUserListAdapter mUserGroupsAdapter = null;
+    private OnSearchFragmentInteractionListener mListener;
+
+
+    /**
+     * Public factory method to create new SearchShareesFragment instances.
+     *
+     * @param fileToShare   An {@link OCFile} to be shared
+     * @param account       The ownCloud account containing fileToShare
+     * @return A new instance of fragment SearchShareesFragment.
+     */
+    public static SearchShareesFragment newInstance(OCFile fileToShare, Account account) {
+        SearchShareesFragment fragment = new SearchShareesFragment();
+        Bundle args = new Bundle();
+        args.putParcelable(ARG_FILE, fileToShare);
+        args.putParcelable(ARG_ACCOUNT, account);
+        fragment.setArguments(args);
+        return fragment;
+    }
+
+    public SearchShareesFragment() {
+        // Required empty public constructor
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        if (getArguments() != null) {
+            mFile = getArguments().getParcelable(ARG_FILE);
+            mAccount = getArguments().getParcelable(ARG_ACCOUNT);
+        }
+
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        // Inflate the layout for this fragment
+        View view = inflater.inflate(R.layout.search_users_groups_layout, container, false);
+
+        // Get the SearchView and set the searchable configuration
+        SearchView searchView = (SearchView) view.findViewById(R.id.searchView);
+        SearchManager searchManager = (SearchManager) getActivity().getSystemService(Context.SEARCH_SERVICE);
+        searchView.setSearchableInfo(searchManager.getSearchableInfo(
+                getActivity().getComponentName())   // assumes parent activity is the searchable activity
+        );
+        searchView.setIconifiedByDefault(false);    // do not iconify the widget; expand it by default
+
+        searchView.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI); // avoid fullscreen with softkeyboard
+
+        searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
+            @Override
+            public boolean onQueryTextSubmit(String query) {
+                Log_OC.v(TAG, "onQueryTextSubmit intercepted, query: " + query);
+                return true;    // return true to prevent the query is processed to be queried;
+                // a user / group will be picked only if selected in the list of suggestions
+            }
+
+            @Override
+            public boolean onQueryTextChange(String newText) {
+                return false;   // let it for the parent listener in the hierarchy / default behaviour
+            }
+        });
+
+        return view;
+    }
+
+
+    @Override
+    public void onActivityCreated(Bundle savedInstanceState) {
+        super.onActivityCreated(savedInstanceState);
+
+        // Load data into the list
+        refreshUsersOrGroupsListFromDB();
+    }
+
+
+    /**
+     * Get users and groups from the DB to fill in the "share with" list
+     *
+     * Depends on the parent Activity provides a {@link com.owncloud.android.datamodel.FileDataStorageManager}
+     * instance ready to use. If not ready, does nothing.
+     */
+    public void refreshUsersOrGroupsListFromDB (){
+        // Get Users and Groups
+        if (((FileActivity) mListener).getStorageManager() != null) {
+            mShares = ((FileActivity) mListener).getStorageManager().getSharesWithForAFile(
+                    mFile.getRemotePath(),
+                    mAccount.name
+            );
+
+            // Update list of users/groups
+            updateListOfUserGroups();
+        }
+    }
+
+    private void updateListOfUserGroups() {
+        // Update list of users/groups
+        // TODO Refactoring: create a new {@link ShareUserListAdapter} instance with every call should not be needed
+        mUserGroupsAdapter = new ShareUserListAdapter(
+                getActivity().getApplicationContext(),
+                R.layout.share_user_item, mShares, this
+        );
+
+        // Show data
+        ListView usersList = (ListView) getView().findViewById(R.id.searchUsersListView);
+
+        if (mShares.size() > 0) {
+            usersList.setVisibility(View.VISIBLE);
+            usersList.setAdapter(mUserGroupsAdapter);
+
+        } else {
+            usersList.setVisibility(View.GONE);
+        }
+    }
+
+    @Override
+    public void onAttach(Activity activity) {
+        super.onAttach(activity);
+        try {
+            mListener = (OnSearchFragmentInteractionListener) activity;
+        } catch (ClassCastException e) {
+            throw new ClassCastException(activity.toString()
+                    + " must implement OnFragmentInteractionListener");
+        }
+    }
+
+    @Override
+    public void onStart() {
+        super.onStart();
+        // focus the search view and request the software keyboard be shown
+        View searchView = getView().findViewById(R.id.searchView);
+        if (searchView.requestFocus()) {
+            InputMethodManager imm = (InputMethodManager)
+                    getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
+            if (imm != null) {
+                imm.showSoftInput(searchView.findFocus(), InputMethodManager.SHOW_IMPLICIT);
+            }
+        }
+    }
+
+    @Override
+    public void onDetach() {
+        super.onDetach();
+        mListener = null;
+    }
+
+    @Override
+    public void unshareButtonPressed(OCShare share) {
+        // Unshare
+        mListener.unshareWith(share);
+        Log_OC.d(TAG, "Unshare - " + share.getSharedWithDisplayName());
+    }
+
+    /**
+     * This interface must be implemented by activities that contain this
+     * fragment to allow an interaction in this fragment to be communicated
+     * to the activity and potentially other fragments contained in that
+     * activity.
+     * <p/>
+     * See the Android Training lesson <a href=
+     * "http://developer.android.com/training/basics/fragments/communicating.html"
+     * >Communicating with Other Fragments</a> for more information.
+     */
+    public interface OnSearchFragmentInteractionListener {
+        void unshareWith(OCShare share);
+    }
+
+}
diff --git a/src/com/owncloud/android/ui/fragment/ShareFileFragment.java b/src/com/owncloud/android/ui/fragment/ShareFileFragment.java
new file mode 100644 (file)
index 0000000..46382a6
--- /dev/null
@@ -0,0 +1,755 @@
+/**
+ *   ownCloud Android client application
+ *
+ *   @author masensio
+ *   @author David A. Velasco
+ *   Copyright (C) 2015 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.fragment;
+
+import android.accounts.Account;
+import android.app.Activity;
+import android.graphics.Bitmap;
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.support.v7.widget.AppCompatButton;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.CompoundButton;
+import android.widget.ImageView;
+import android.widget.ListAdapter;
+import android.widget.ListView;
+import android.widget.ScrollView;
+import android.widget.Switch;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.owncloud.android.R;
+import com.owncloud.android.authentication.AccountUtils;
+import com.owncloud.android.datamodel.OCFile;
+import com.owncloud.android.datamodel.ThumbnailsCacheManager;
+import com.owncloud.android.lib.common.utils.Log_OC;
+import com.owncloud.android.lib.resources.shares.OCShare;
+import com.owncloud.android.lib.resources.shares.ShareType;
+import com.owncloud.android.lib.resources.status.OCCapability;
+import com.owncloud.android.ui.activity.FileActivity;
+import com.owncloud.android.ui.adapter.ShareUserListAdapter;
+import com.owncloud.android.ui.dialog.ExpirationDatePickerDialogFragment;
+import com.owncloud.android.utils.DisplayUtils;
+import com.owncloud.android.utils.MimetypeIconUtil;
+
+import java.text.SimpleDateFormat;
+
+import java.util.ArrayList;
+import java.util.Date;
+
+/**
+ * Fragment for Sharing a file with sharees (users or groups) or creating
+ * a public link.
+ *
+ * A simple {@link Fragment} subclass.
+ *
+ * Activities that contain this fragment must implement the
+ * {@link ShareFileFragment.OnShareFragmentInteractionListener} interface
+ * to handle interaction events.
+ *
+ * Use the {@link ShareFileFragment#newInstance} factory method to
+ * create an instance of this fragment.
+ */
+public class ShareFileFragment extends Fragment
+        implements ShareUserListAdapter.ShareUserAdapterListener{
+
+    private static final String TAG = ShareFileFragment.class.getSimpleName();
+
+    /** The fragment initialization parameters */
+    private static final String ARG_FILE = "FILE";
+    private static final String ARG_ACCOUNT = "ACCOUNT";
+
+//    /** Tag for dialog */
+//    private static final String FTAG_CHOOSER_DIALOG = "CHOOSER_DIALOG";
+
+    /** File to share, received as a parameter in construction time */
+    private OCFile mFile;
+
+    /** OC account holding the file to share, received as a parameter in construction time */
+    private Account mAccount;
+
+    /** Reference to parent listener */
+    private OnShareFragmentInteractionListener mListener;
+
+    /** List of private shares bound to the file */
+    private ArrayList<OCShare> mPrivateShares;
+
+    /** Capabilities of the server */
+    private OCCapability mCapabilities;
+
+    /** Adapter to show private shares */
+    private ShareUserListAdapter mUserGroupsAdapter = null;
+
+    /** Public share bound to the file */
+    private OCShare mPublicShare;
+
+    /** Listener for changes on switch to share / unshare publicly */
+    private CompoundButton.OnCheckedChangeListener mOnShareViaLinkSwitchCheckedChangeListener;
+
+    /**
+     * Listener for user actions to set, update or clear password on public link
+     */
+    private OnPasswordInteractionListener mOnPasswordInteractionListener = null;
+
+    /**
+     * Listener for user actions to set, update or clear expiration date on public link
+     */
+    private OnExpirationDateInteractionListener mOnExpirationDateInteractionListener = null;
+
+
+    /**
+     * Public factory method to create new ShareFileFragment instances.
+     *
+     * @param fileToShare An {@link OCFile} to show in the fragment
+     * @param account     An ownCloud account
+     * @return A new instance of fragment ShareFileFragment.
+     */
+    public static ShareFileFragment newInstance(OCFile fileToShare, Account account) {
+        ShareFileFragment fragment = new ShareFileFragment();
+        Bundle args = new Bundle();
+        args.putParcelable(ARG_FILE, fileToShare);
+        args.putParcelable(ARG_ACCOUNT, account);
+        fragment.setArguments(args);
+        return fragment;
+    }
+
+    public ShareFileFragment() {
+        // Required empty public constructor
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        Log_OC.d(TAG, "onCreate");
+        if (getArguments() != null) {
+            mFile = getArguments().getParcelable(ARG_FILE);
+            mAccount = getArguments().getParcelable(ARG_ACCOUNT);
+        }
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container,
+                             Bundle savedInstanceState) {
+        Log_OC.d(TAG, "onCreateView");
+
+        // Inflate the layout for this fragment
+        View view = inflater.inflate(R.layout.share_file_layout, container, false);
+
+        // Setup layout
+        // Image
+        ImageView icon = (ImageView) view.findViewById(R.id.shareFileIcon);
+        icon.setImageResource(MimetypeIconUtil.getFileTypeIconId(mFile.getMimetype(),
+                mFile.getFileName()));
+        if (mFile.isImage()) {
+            String remoteId = String.valueOf(mFile.getRemoteId());
+            Bitmap thumbnail = ThumbnailsCacheManager.getBitmapFromDiskCache(remoteId);
+            if (thumbnail != null) {
+                icon.setImageBitmap(thumbnail);
+            }
+        }
+        // Name
+        TextView filename = (TextView) view.findViewById(R.id.shareFileName);
+        filename.setText(mFile.getFileName());
+        // Size
+        TextView size = (TextView) view.findViewById(R.id.shareFileSize);
+        if (mFile.isFolder()) {
+            size.setVisibility(View.GONE);
+        } else {
+            size.setText(DisplayUtils.bytesToHumanReadable(mFile.getFileLength()));
+        }
+
+        //  Add User Button
+        Button addUserGroupButton = (Button)
+                view.findViewById(R.id.addUserButton);
+        addUserGroupButton.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                boolean shareWithUsersEnable = AccountUtils.hasSearchUsersSupport(mAccount);
+                if (shareWithUsersEnable) {
+                    // Show Search Fragment
+                    mListener.showSearchUsersAndGroups();
+                } else {
+                    String message = getString(R.string.share_sharee_unavailable);
+                    Toast.makeText(getActivity(), message, Toast.LENGTH_LONG).show();
+                }
+            }
+        });
+
+        // Switch to create public share
+        mOnShareViaLinkSwitchCheckedChangeListener = new CompoundButton.OnCheckedChangeListener() {
+            @Override
+            public void onCheckedChanged(CompoundButton switchView, boolean isChecked) {
+            }
+        };
+
+        // Set listener for user actions on switch for sharing/unsharing via link
+        initShareViaLinkListener(view);
+
+        // Set listener for user actions on expiration date
+        initExpirationListener(view);
+
+        // Set listener for user actions on password
+        initPasswordListener(view);
+
+        return view;
+    }
+
+
+    /**
+     * Binds listener for user actions to create or delete a public share
+     * to the views receiving the user events.
+     *
+     * @param shareView     Root view in the fragment.
+     */
+    private void initShareViaLinkListener(View shareView) {
+        mOnShareViaLinkSwitchCheckedChangeListener = new OnShareViaLinkListener();
+        Switch shareViaLinkSwitch = (Switch) shareView.findViewById(R.id.shareViaLinkSectionSwitch);
+        shareViaLinkSwitch.setOnCheckedChangeListener(mOnShareViaLinkSwitchCheckedChangeListener);
+    }
+
+    /**
+     * Listener for user actions that create or delete a public share.
+     */
+    private class OnShareViaLinkListener
+            implements CompoundButton.OnCheckedChangeListener {
+
+        /**
+         * Called by R.id.shareViaLinkSectionSwitch to create or delete a public link.
+         *
+         * @param switchView    {@link Switch} toggled by the user, R.id.shareViaLinkSectionSwitch
+         * @param isChecked     New switch state.
+         */
+        @Override
+        public void onCheckedChanged(CompoundButton switchView, boolean isChecked) {
+            if (!isResumed()) {
+                // very important, setCheched(...) is called automatically during
+                // Fragment recreation on device rotations
+                return;
+            }
+            if (isChecked) {
+                if (mCapabilities != null &&
+                        mCapabilities.getFilesSharingPublicPasswordEnforced().isTrue()) {
+                    // password enforced by server, request to the user before trying to create
+                    ((FileActivity) getActivity()).getFileOperationsHelper().
+                            requestPasswordForShareViaLink(mFile, true);
+
+                } else {
+                    // create without password if not enforced by server or we don't know if enforced;
+                    ((FileActivity) getActivity()).getFileOperationsHelper().
+                            shareFileViaLink(mFile, null);
+
+                    // FileActivtiy#onCreateShareViaLinkOperationFinish still handles the guess of enforcement
+                    // for server in versions previous to OwnCloudVersion#MINIMUM_VERSION_CAPABILITIES_API
+                }
+
+            } else {
+                ((FileActivity) getActivity()).getFileOperationsHelper().
+                        unshareFileViaLink(mFile);
+            }
+
+            // undo the toggle to grant the view will be correct if any intermediate dialog is cancelled or
+            // the create/delete operation fails
+            switchView.setOnCheckedChangeListener(null);
+            switchView.toggle();
+            switchView.setOnCheckedChangeListener(mOnShareViaLinkSwitchCheckedChangeListener);
+        }
+    }
+
+
+    /**
+     * Binds listener for user actions that start any update on a expiration date
+     * for the public link to the views receiving the user events.
+     *
+     * @param shareView     Root view in the fragment.
+     */
+    private void initExpirationListener(View shareView) {
+        mOnExpirationDateInteractionListener = new OnExpirationDateInteractionListener();
+
+        ((Switch) shareView.findViewById(R.id.shareViaLinkExpirationSwitch)).
+                setOnCheckedChangeListener(mOnExpirationDateInteractionListener);
+
+        shareView.findViewById(R.id.shareViaLinkExpirationLabel).
+                setOnClickListener(mOnExpirationDateInteractionListener);
+
+        shareView.findViewById(R.id.shareViaLinkExpirationValue).
+                setOnClickListener(mOnExpirationDateInteractionListener);
+    }
+
+    /**
+     * Listener for user actions that start any update on the expiration date for the public link.
+     */
+    private class OnExpirationDateInteractionListener
+            implements CompoundButton.OnCheckedChangeListener, View.OnClickListener {
+
+        /**
+         * Called by R.id.shareViaLinkExpirationSwitch to set or clear the expiration date.
+         *
+         * @param switchView    {@link Switch} toggled by the user, R.id.shareViaLinkExpirationSwitch
+         * @param isChecked     New switch state.
+         */
+        @Override
+        public void onCheckedChanged(CompoundButton switchView, boolean isChecked) {
+            if (!isResumed()) {
+                // very important, setCheched(...) is called automatically during
+                // Fragment recreation on device rotations
+                return;
+            }
+            if (isChecked) {
+                ExpirationDatePickerDialogFragment dialog =
+                        ExpirationDatePickerDialogFragment.newInstance(mFile, -1);
+                dialog.show(
+                        getActivity().getSupportFragmentManager(),
+                        ExpirationDatePickerDialogFragment.DATE_PICKER_DIALOG
+                );
+
+            } else {
+                ((FileActivity) getActivity()).getFileOperationsHelper().
+                        setExpirationDateToShareViaLink(mFile, -1);
+            }
+
+            // undo the toggle to grant the view will be correct if the dialog is cancelled
+            switchView.setOnCheckedChangeListener(null);
+            switchView.toggle();
+            switchView.setOnCheckedChangeListener(mOnExpirationDateInteractionListener);
+        }
+
+        /**
+         * Called by R.id.shareViaLinkExpirationLabel or R.id.shareViaLinkExpirationValue
+         * to change the current expiration date.
+         *
+         * @param expirationView      Label or value view touched by the user.
+         */
+        @Override
+        public void onClick(View expirationView) {
+            if (mPublicShare != null && mPublicShare.getExpirationDate() > 0) {
+                long chosenDateInMillis = -1;
+                if (mPublicShare != null) {
+                    chosenDateInMillis = mPublicShare.getExpirationDate();
+                }
+                ExpirationDatePickerDialogFragment dialog =
+                        ExpirationDatePickerDialogFragment.newInstance(
+                                mFile,
+                                chosenDateInMillis
+                        );
+                dialog.show(
+                        getActivity().getSupportFragmentManager(),
+                        ExpirationDatePickerDialogFragment.DATE_PICKER_DIALOG
+                );
+            }
+        }
+    }
+
+
+    /**
+     * Binds listener for user actions that start any update on a password for the public link
+     * to the views receiving the user events.
+     *
+     * @param shareView     Root view in the fragment.
+     */
+    private void initPasswordListener(View shareView) {
+        mOnPasswordInteractionListener = new OnPasswordInteractionListener();
+
+        ((Switch) shareView.findViewById(R.id.shareViaLinkPasswordSwitch)).
+                setOnCheckedChangeListener(mOnPasswordInteractionListener);
+
+        shareView.findViewById(R.id.shareViaLinkPasswordLabel).
+                setOnClickListener(mOnPasswordInteractionListener);
+
+        shareView.findViewById(R.id.shareViaLinkPasswordValue).
+                setOnClickListener(mOnPasswordInteractionListener);
+    }
+
+
+    /**
+     * Listener for user actions that start any update on a password for the public link.
+     */
+    private class OnPasswordInteractionListener
+            implements CompoundButton.OnCheckedChangeListener, View.OnClickListener {
+
+        /**
+         * Called by R.id.shareViaLinkPasswordSwitch to set or clear the password.
+         *
+         * @param switchView    {@link Switch} toggled by the user, R.id.shareViaLinkPasswordSwitch
+         * @param isChecked     New switch state.
+         */
+        @Override
+        public void onCheckedChanged(CompoundButton switchView, boolean isChecked) {
+            if (!isResumed()) {
+                // very important, setCheched(...) is called automatically during
+                // Fragment recreation on device rotations
+                return;
+            }
+            if (isChecked) {
+                ((FileActivity) getActivity()).getFileOperationsHelper().
+                        requestPasswordForShareViaLink(mFile, false);
+            } else {
+                ((FileActivity) getActivity()).getFileOperationsHelper().
+                        setPasswordToShareViaLink(mFile, "");   // "" clears
+            }
+
+            // undo the toggle to grant the view will be correct if the dialog is cancelled
+            switchView.setOnCheckedChangeListener(null);
+            switchView.toggle();
+            switchView.setOnCheckedChangeListener(mOnPasswordInteractionListener);
+        }
+
+        /**
+         * Called by R.id.shareViaLinkPasswordLabel or R.id.shareViaLinkPasswordValue
+         * to change the current password.
+         *
+         * @param passwordView      Label or value view touched by the user.
+         */
+        @Override
+        public void onClick(View passwordView) {
+            if (mPublicShare != null && mPublicShare.isPasswordProtected()) {
+                ((FileActivity) getActivity()).getFileOperationsHelper().
+                        requestPasswordForShareViaLink(mFile, false);
+            }
+        }
+    }
+
+
+    @Override
+    public void onActivityCreated(Bundle savedInstanceState) {
+        super.onActivityCreated(savedInstanceState);
+        Log_OC.d(TAG, "onActivityCreated");
+
+        // Load known capabilities of the server from DB
+        refreshCapabilitiesFromDB();
+
+        // Load data into the list of private shares
+        refreshUsersOrGroupsListFromDB();
+
+        // Load data of public share, if exists
+        refreshPublicShareFromDB();
+    }
+
+    @Override
+    public void onAttach(Activity activity) {
+        super.onAttach(activity);
+        try {
+            mListener = (OnShareFragmentInteractionListener) activity;
+        } catch (ClassCastException e) {
+            throw new ClassCastException(activity.toString()
+                    + " must implement OnShareFragmentInteractionListener");
+        }
+    }
+
+    @Override
+    public void onDetach() {
+        super.onDetach();
+        mListener = null;
+    }
+
+
+    /**
+     * Get known server capabilities from DB
+     *
+     * Depends on the parent Activity provides a {@link com.owncloud.android.datamodel.FileDataStorageManager}
+     * instance ready to use. If not ready, does nothing.
+     */
+    public void refreshCapabilitiesFromDB() {
+        if (((FileActivity)mListener).getStorageManager() != null) {
+            mCapabilities = ((FileActivity)mListener).getStorageManager().
+                    getCapability(mAccount.name);
+        }
+    }
+
+
+    /**
+     * Get users and groups from the DB to fill in the "share with" list.
+     *
+     * Depends on the parent Activity provides a {@link com.owncloud.android.datamodel.FileDataStorageManager}
+     * instance ready to use. If not ready, does nothing.
+     */
+    public void refreshUsersOrGroupsListFromDB (){
+        if (((FileActivity) mListener).getStorageManager() != null) {
+            // Get Users and Groups
+            mPrivateShares = ((FileActivity) mListener).getStorageManager().getSharesWithForAFile(
+                    mFile.getRemotePath(),
+                    mAccount.name
+            );
+
+            // Update list of users/groups
+            updateListOfUserGroups();
+        }
+    }
+
+    private void updateListOfUserGroups() {
+        // Update list of users/groups
+        // TODO Refactoring: create a new {@link ShareUserListAdapter} instance with every call should not be needed
+        mUserGroupsAdapter = new ShareUserListAdapter(
+                getActivity(),
+                R.layout.share_user_item,
+                mPrivateShares,
+                this
+        );
+
+        // Show data
+        TextView noShares = (TextView) getView().findViewById(R.id.shareNoUsers);
+        ListView usersList = (ListView) getView().findViewById(R.id.shareUsersList);
+
+        if (mPrivateShares.size() > 0) {
+            noShares.setVisibility(View.GONE);
+            usersList.setVisibility(View.VISIBLE);
+            usersList.setAdapter(mUserGroupsAdapter);
+            setListViewHeightBasedOnChildren(usersList);
+        } else {
+            noShares.setVisibility(View.VISIBLE);
+            usersList.setVisibility(View.GONE);
+        }
+
+        // Set Scroll to initial position
+        ScrollView scrollView = (ScrollView) getView().findViewById(R.id.shareScroll);
+        scrollView.scrollTo(0, 0);
+    }
+
+    @Override
+    public void unshareButtonPressed(OCShare share) {
+        // Unshare
+        mListener.unshareWith(share);
+        Log_OC.d(TAG, "Unshare - " + share.getSharedWithDisplayName());
+    }
+
+
+
+    /**
+     * Get public link from the DB to fill in the "Share link" section in the UI.
+     *
+     * Takes into account server capabilities before reading database.
+     *
+     * Depends on the parent Activity provides a {@link com.owncloud.android.datamodel.FileDataStorageManager}
+     * instance ready to use. If not ready, does nothing.
+     */
+    public void refreshPublicShareFromDB() {
+        if (isPublicShareDisabled()) {
+            hidePublicShare();
+
+        } else if (((FileActivity) mListener).getStorageManager() != null) {
+            // Get public share
+            mPublicShare = ((FileActivity) mListener).getStorageManager().getFirstShareByPathAndType(
+                    mFile.getRemotePath(),
+                    ShareType.PUBLIC_LINK,
+                    ""
+            );
+
+            // Update public share section
+            updatePublicShareSection();
+        }
+    }
+
+    /**
+     * @return  'True' when public share is disabled in the server
+     */
+    private boolean isPublicShareDisabled() {
+        return (mCapabilities != null &&
+                mCapabilities.getFilesSharingPublicEnabled().isFalse()
+        );
+    }
+
+    /**
+     * Updates in the UI the section about public share with the information in the current
+     * public share bound to mFile, if any
+     */
+    private void updatePublicShareSection() {
+        if (mPublicShare != null && ShareType.PUBLIC_LINK.equals(mPublicShare.getShareType())) {
+            /// public share bound -> expand section
+            Switch shareViaLinkSwitch = getShareViaLinkSwitch();
+            if (!shareViaLinkSwitch.isChecked()) {
+                // set null listener before setChecked() to prevent infinite loop of calls
+                shareViaLinkSwitch.setOnCheckedChangeListener(null);
+                shareViaLinkSwitch.setChecked(true);
+                shareViaLinkSwitch.setOnCheckedChangeListener(
+                        mOnShareViaLinkSwitchCheckedChangeListener
+                );
+            }
+            getExpirationDateSection().setVisibility(View.VISIBLE);
+            getPasswordSection().setVisibility(View.VISIBLE);
+            // GetLink button
+            AppCompatButton getLinkButton = getGetLinkButton();
+            getLinkButton.setVisibility(View.VISIBLE);
+            getLinkButton.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    //GetLink from the server and show ShareLinkToDialog
+                    ((FileActivity) getActivity()).getFileOperationsHelper().
+                            getFileWithLink(mFile);
+
+                }
+            });
+
+            /// update state of expiration date switch and message depending on expiration date
+            Switch expirationDateSwitch = getExpirationDateSwitch();
+            // set null listener before setChecked() to prevent infinite loop of calls
+            expirationDateSwitch.setOnCheckedChangeListener(null);
+            long expirationDate = mPublicShare.getExpirationDate();
+            if (expirationDate > 0) {
+                if (!expirationDateSwitch.isChecked()) {
+                    expirationDateSwitch.toggle();
+                }
+                String formattedDate =
+                        SimpleDateFormat.getDateInstance().format(
+                                new Date(expirationDate)
+                        );
+                getExpirationDateValue().setText(formattedDate);
+            } else {
+                if (expirationDateSwitch.isChecked()) {
+                    expirationDateSwitch.toggle();
+                }
+                getExpirationDateValue().setText(R.string.empty);
+            }
+            // recover listener
+            expirationDateSwitch.setOnCheckedChangeListener(
+                    mOnExpirationDateInteractionListener
+            );
+
+            /// update state of password switch and message depending on password protection
+            Switch passwordSwitch = getPasswordSwitch();
+            // set null listener before setChecked() to prevent infinite loop of calls
+            passwordSwitch.setOnCheckedChangeListener(null);
+            if (mPublicShare.isPasswordProtected()) {
+                if (!passwordSwitch.isChecked()) {
+                    passwordSwitch.toggle();
+                }
+                getPasswordValue().setVisibility(View.VISIBLE);
+            } else {
+                if (passwordSwitch.isChecked()) {
+                    passwordSwitch.toggle();
+                }
+                getPasswordValue().setVisibility(View.INVISIBLE);
+            }
+            // recover listener
+            passwordSwitch.setOnCheckedChangeListener(
+                    mOnPasswordInteractionListener
+            );
+
+
+        } else {
+            /// no public share -> collapse section
+            Switch shareViaLinkSwitch = getShareViaLinkSwitch();
+            if (shareViaLinkSwitch.isChecked()) {
+                shareViaLinkSwitch.setOnCheckedChangeListener(null);
+                getShareViaLinkSwitch().setChecked(false);
+                shareViaLinkSwitch.setOnCheckedChangeListener(
+                        mOnShareViaLinkSwitchCheckedChangeListener
+                );
+            }
+            getExpirationDateSection().setVisibility(View.GONE);
+            getPasswordSection().setVisibility(View.GONE);
+            getGetLinkButton().setVisibility(View.GONE);
+        }
+    }
+
+
+    /// BEWARE: next methods will failed with NullPointerException if called before onCreateView() finishes
+
+    private Switch getShareViaLinkSwitch() {
+        return (Switch) getView().findViewById(R.id.shareViaLinkSectionSwitch);
+    }
+
+    private View getExpirationDateSection() {
+        return getView().findViewById(R.id.shareViaLinkExpirationSection);
+    }
+
+    private Switch getExpirationDateSwitch() {
+        return (Switch) getView().findViewById(R.id.shareViaLinkExpirationSwitch);
+    }
+
+    private TextView getExpirationDateValue() {
+        return (TextView) getView().findViewById(R.id.shareViaLinkExpirationValue);
+    }
+
+    private View getPasswordSection() {
+        return getView().findViewById(R.id.shareViaLinkPasswordSection);
+    }
+
+    private Switch getPasswordSwitch() {
+        return (Switch) getView().findViewById(R.id.shareViaLinkPasswordSwitch);
+    }
+
+    private TextView getPasswordValue() {
+        return (TextView) getView().findViewById(R.id.shareViaLinkPasswordValue);
+    }
+
+    private AppCompatButton getGetLinkButton() {
+        return (AppCompatButton) getView().findViewById(R.id.shareViaLinkGetLinkButton);
+    }
+
+    /**
+     * Hides all the UI elements related to public share
+     */
+    private void hidePublicShare() {
+        getShareViaLinkSwitch().setVisibility(View.GONE);
+        getExpirationDateSection().setVisibility(View.GONE);
+        getPasswordSection().setVisibility(View.GONE);
+        getGetLinkButton().setVisibility(View.GONE);
+    }
+
+    public static void setListViewHeightBasedOnChildren(ListView listView) {
+        ListAdapter listAdapter = listView.getAdapter();
+        if (listAdapter == null) {
+            return;
+        }
+        int desiredWidth = View.MeasureSpec.makeMeasureSpec(listView.getWidth(), View.MeasureSpec.AT_MOST);
+        int totalHeight = 0;
+        View view = null;
+        for (int i = 0; i < listAdapter.getCount(); i++) {
+            view = listAdapter.getView(i, view, listView);
+            if (i == 0) {
+                view.setLayoutParams(new ViewGroup.LayoutParams(desiredWidth, ViewGroup.LayoutParams.WRAP_CONTENT));
+            }
+            view.measure(desiredWidth, View.MeasureSpec.UNSPECIFIED);
+            totalHeight += view.getMeasuredHeight();
+        }
+        ViewGroup.LayoutParams params = listView.getLayoutParams();
+        params.height = totalHeight + (listView.getDividerHeight() * (listAdapter.getCount() - 1));
+        listView.setLayoutParams(params);
+        listView.requestLayout();
+    }
+
+    /**
+     * This interface must be implemented by activities that contain this
+     * fragment to allow an interaction in this fragment to be communicated
+     * to the activity and potentially other fragments contained in that
+     * activity.
+     * <p/>
+     * See the Android Training lesson <a href=
+     * "http://developer.android.com/training/basics/fragments/communicating.html"
+     * >Communicating with Other Fragments</a> for more information.
+     */
+    public interface OnShareFragmentInteractionListener {
+        void showSearchUsersAndGroups();
+        void refreshUsersOrGroupsListFromServer();
+        void unshareWith(OCShare share);
+    }
+
+}
index 5cbacfc..25acb8c 100644 (file)
@@ -26,7 +26,6 @@ import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.content.ServiceConnection;
-import android.graphics.drawable.ColorDrawable;
 import android.os.Build;
 import android.os.Bundle;
 import android.os.Handler;
@@ -52,16 +51,12 @@ import com.owncloud.android.files.services.FileUploader.FileUploaderBinder;
 import com.owncloud.android.lib.common.operations.OnRemoteOperationListener;
 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.CreateShareOperation;
 import com.owncloud.android.operations.RemoveFileOperation;
 import com.owncloud.android.operations.SynchronizeFileOperation;
-import com.owncloud.android.operations.UnshareLinkOperation;
 import com.owncloud.android.ui.activity.FileActivity;
 import com.owncloud.android.ui.activity.FileDisplayActivity;
 import com.owncloud.android.ui.fragment.FileFragment;
-import com.owncloud.android.utils.DisplayUtils;
 
 
 /**
@@ -230,13 +225,7 @@ public class PreviewImageActivity extends FileActivity implements
     public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) {
         super.onRemoteOperationFinish(operation, result);
         
-        if (operation instanceof CreateShareOperation) {
-            onCreateShareOperationFinish((CreateShareOperation) operation, result);
-            
-        } else if (operation instanceof UnshareLinkOperation) {
-            onUnshareLinkOperationFinish((UnshareLinkOperation) operation, result);
-            
-        } else if (operation instanceof RemoveFileOperation) {
+        if (operation instanceof RemoveFileOperation) {
             finish();
         } else if (operation instanceof SynchronizeFileOperation) {
             onSynchronizeFileOperationFinish((SynchronizeFileOperation) operation, result);
@@ -244,32 +233,6 @@ public class PreviewImageActivity extends FileActivity implements
         }
     }
     
-    
-    private void onUnshareLinkOperationFinish(UnshareLinkOperation operation,
-                                              RemoteOperationResult result) {
-        if (result.isSuccess()) {
-            OCFile file = getStorageManager().getFileByPath(getFile().getRemotePath());
-            if (file != null) {
-                setFile(file);
-            }
-            invalidateOptionsMenu();
-        } else if  (result.getCode() == ResultCode.SHARE_NOT_FOUND) {
-            backToDisplayActivity();
-        }
-            
-    }
-    
-    private void onCreateShareOperationFinish(CreateShareOperation operation,
-                                              RemoteOperationResult result) {
-        if (result.isSuccess()) {
-            OCFile file = getStorageManager().getFileByPath(getFile().getRemotePath());
-            if (file != null) {
-                setFile(file);
-            }
-            invalidateOptionsMenu();
-        }
-    }
-
     private void onSynchronizeFileOperationFinish(SynchronizeFileOperation operation,
                                                   RemoteOperationResult result) {
         if (result.isSuccess()) {
@@ -400,7 +363,6 @@ public class PreviewImageActivity extends FileActivity implements
         
     }
 
-    
     private void requestForDownload(OCFile file) {
         if (mDownloaderBinder == null) {
             Log_OC.d(TAG, "requestForDownload called without binder to download service");
index e61e335..df0fb7a 100644 (file)
@@ -286,11 +286,7 @@ public class PreviewImageFragment extends FileFragment {
     public boolean onOptionsItemSelected(MenuItem item) {
         switch (item.getItemId()) {
             case R.id.action_share_file: {
-                mContainerActivity.getFileOperationsHelper().shareFileWithLink(getFile());
-                return true;
-            }
-            case R.id.action_unshare_file: {
-                mContainerActivity.getFileOperationsHelper().unshareFileWithLink(getFile());
+                mContainerActivity.getFileOperationsHelper().showShareFile(getFile());
                 return true;
             }
             case R.id.action_open_file_with: {
@@ -332,7 +328,6 @@ public class PreviewImageFragment extends FileFragment {
         mContainerActivity.showDetails(getFile());
     }
 
-
     @Override
     public void onResume() {
         super.onResume();
index 0dbb1a3..ee9180d 100644 (file)
@@ -36,8 +36,6 @@ import android.media.MediaPlayer;
 import android.media.MediaPlayer.OnCompletionListener;
 import android.media.MediaPlayer.OnErrorListener;
 import android.media.MediaPlayer.OnPreparedListener;
-import android.net.Uri;
-import android.os.Build;
 import android.os.Bundle;
 import android.os.IBinder;
 import android.view.LayoutInflater;
@@ -153,7 +151,7 @@ public class PreviewMediaFragment extends FileFragment implements
     public View onCreateView(LayoutInflater inflater, ViewGroup container,
                              Bundle savedInstanceState) {
         super.onCreateView(inflater, container, savedInstanceState);
-        Log_OC.e(TAG, "onCreateView");
+        Log_OC.v(TAG, "onCreateView");
 
 
         mView = inflater.inflate(R.layout.file_preview, container, false);
@@ -174,7 +172,7 @@ public class PreviewMediaFragment extends FileFragment implements
     @Override
     public void onActivityCreated(Bundle savedInstanceState) {
         super.onActivityCreated(savedInstanceState);
-        Log_OC.e(TAG, "onActivityCreated");
+        Log_OC.v(TAG, "onActivityCreated");
 
         OCFile file = getFile();
         if (savedInstanceState == null) {
@@ -244,7 +242,7 @@ public class PreviewMediaFragment extends FileFragment implements
     @Override
     public void onSaveInstanceState(Bundle outState) {
         super.onSaveInstanceState(outState);
-        Log_OC.e(TAG, "onSaveInstanceState");
+        Log_OC.v(TAG, "onSaveInstanceState");
 
         outState.putParcelable(PreviewMediaFragment.EXTRA_FILE, getFile());
         outState.putParcelable(PreviewMediaFragment.EXTRA_ACCOUNT, mAccount);
@@ -268,7 +266,7 @@ public class PreviewMediaFragment extends FileFragment implements
     @Override
     public void onStart() {
         super.onStart();
-        Log_OC.e(TAG, "onStart");
+        Log_OC.v(TAG, "onStart");
 
         OCFile file = getFile();
         if (file != null && file.isDown()) {
@@ -351,13 +349,7 @@ public class PreviewMediaFragment extends FileFragment implements
     public boolean onOptionsItemSelected(MenuItem item) {
         switch (item.getItemId()) {
             case R.id.action_share_file: {
-                stopPreview(false);
-                mContainerActivity.getFileOperationsHelper().shareFileWithLink(getFile());
-                return true;
-            }
-            case R.id.action_unshare_file: {
-                stopPreview(false);
-                mContainerActivity.getFileOperationsHelper().unshareFileWithLink(getFile());
+                seeShareFile();
                 return true;
             }
             case R.id.action_open_file_with: {
@@ -398,7 +390,7 @@ public class PreviewMediaFragment extends FileFragment implements
     /**
      * Update the file of the fragment with file value
      *
-     * @param file
+     * @param file      Replaces the held file with a new one
      */
     public void updateFile(OCFile file) {
         setFile(file);
@@ -415,6 +407,10 @@ public class PreviewMediaFragment extends FileFragment implements
         mContainerActivity.showDetails(getFile());
     }
 
+    private void seeShareFile() {
+        stopPreview(false);
+        mContainerActivity.getFileOperationsHelper().showShareFile(getFile());
+    }
 
     private void prepareVideo() {
         // create helper to get more control on the playback
@@ -431,8 +427,7 @@ public class PreviewMediaFragment extends FileFragment implements
 
         // load the video file in the video player ; 
         // when done, VideoHelper#onPrepared() will be called
-        Uri uri = Uri.parse(getFile().getStoragePath());
-        mVideoPreview.setVideoPath(uri.encode(getFile().getStoragePath()));
+        mVideoPreview.setVideoURI(getFile().getStorageUri());
     }
 
 
@@ -447,7 +442,7 @@ public class PreviewMediaFragment extends FileFragment implements
          */
         @Override
         public void onPrepared(MediaPlayer vp) {
-            Log_OC.e(TAG, "onPrepared");
+            Log_OC.v(TAG, "onPrepared");
             mVideoPreview.seekTo(mSavedPlaybackPosition);
             if (mAutoplay) {
                 mVideoPreview.start();
@@ -467,25 +462,9 @@ public class PreviewMediaFragment extends FileFragment implements
          */
         @Override
         public void onCompletion(MediaPlayer mp) {
-            Log_OC.e(TAG, "completed");
+            Log_OC.v(TAG, "completed");
             if (mp != null) {
                 mVideoPreview.seekTo(0);
-                // next lines are necessary to work around undesired video loops
-                if (Build.VERSION.SDK_INT == Build.VERSION_CODES.GINGERBREAD) {
-                    mVideoPreview.pause();
-
-                }
-                else {
-                    if (Build.VERSION.SDK_INT == Build.VERSION_CODES.GINGERBREAD_MR1) {
-                        // mVideePreview.pause() is not enough
-
-                        mMediaController.setEnabled(false);
-                        mVideoPreview.stopPlayback();
-                        mAutoplay = false;
-                        mSavedPlaybackPosition = 0;
-                        mVideoPreview.setVideoPath(getFile().getStoragePath());
-                    }
-                }
             } // else : called from onError()
             mMediaController.updatePausePlay();
         }
@@ -500,6 +479,7 @@ public class PreviewMediaFragment extends FileFragment implements
          */
         @Override
         public boolean onError(MediaPlayer mp, int what, int extra) {
+            Log_OC.e(TAG, "Error in video playback, what = " + what + ", extra = " + extra);
             if (mVideoPreview.getWindowToken() != null) {
                 String message = MediaService.getMessageForMediaError(
                         getActivity(), what, extra);
@@ -523,25 +503,25 @@ public class PreviewMediaFragment extends FileFragment implements
 
     @Override
     public void onPause() {
-        Log_OC.e(TAG, "onPause");
+        Log_OC.v(TAG, "onPause");
         super.onPause();
     }
 
     @Override
     public void onResume() {
         super.onResume();
-        Log_OC.e(TAG, "onResume");
+        Log_OC.v(TAG, "onResume");
     }
 
     @Override
     public void onDestroy() {
-        Log_OC.e(TAG, "onDestroy");
+        Log_OC.v(TAG, "onDestroy");
         super.onDestroy();
     }
 
     @Override
     public void onStop() {
-        Log_OC.e(TAG, "onStop");
+        Log_OC.v(TAG, "onStop");
 
         mPrepared = false;
         if (mMediaServiceConnection != null) {
@@ -582,12 +562,12 @@ public class PreviewMediaFragment extends FileFragment implements
 
     @Override
     public void onConfigurationChanged(Configuration newConfig) {
-        Log_OC.e(TAG, "onConfigurationChanged " + this);
+        Log_OC.v(TAG, "onConfigurationChanged " + this);
     }
 
     @Override
     public void onActivityResult(int requestCode, int resultCode, Intent data) {
-        Log_OC.e(TAG, "onActivityResult " + this);
+        Log_OC.v(TAG, "onActivityResult " + this);
         super.onActivityResult(requestCode, resultCode, data);
         if (resultCode == Activity.RESULT_OK) {
             mSavedPlaybackPosition = data.getExtras().getInt(
@@ -661,7 +641,7 @@ public class PreviewMediaFragment extends FileFragment implements
         @Override
         public void onServiceDisconnected(ComponentName component) {
             if (component.equals(new ComponentName(getActivity(), MediaService.class))) {
-                Log_OC.e(TAG, "Media service suddenly disconnected");
+                Log_OC.w(TAG, "Media service suddenly disconnected");
                 if (mMediaController != null) {
                     mMediaController.setMediaPlayer(null);
                 }
@@ -725,7 +705,7 @@ public class PreviewMediaFragment extends FileFragment implements
         if (mPrepared) {
             mSavedPlaybackPosition = mVideoPreview.getCurrentPosition();
         }
-        Log_OC.e(TAG, "getting position: " + mSavedPlaybackPosition);
+        Log_OC.v(TAG, "getting position: " + mSavedPlaybackPosition);
         return mSavedPlaybackPosition;
     }
 
index 6595bf7..41fd6db 100644 (file)
@@ -299,11 +299,7 @@ public class PreviewTextFragment extends FileFragment {
     public boolean onOptionsItemSelected(MenuItem item) {
         switch (item.getItemId()) {
             case R.id.action_share_file: {
-                mContainerActivity.getFileOperationsHelper().shareFileWithLink(getFile());
-                return true;
-            }
-            case R.id.action_unshare_file: {
-                mContainerActivity.getFileOperationsHelper().unshareFileWithLink(getFile());
+                mContainerActivity.getFileOperationsHelper().showShareFile(getFile());
                 return true;
             }
             case R.id.action_open_file_with: {
index 42b7fb2..8972f3c 100644 (file)
@@ -78,7 +78,7 @@ public class PreviewVideoActivity extends FileActivity implements OnCompletionLi
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        Log_OC.e(TAG, "ACTIVITY\t\tonCreate");
+        Log_OC.v(TAG, "onCreate");
         
         setContentView(R.layout.video_layout);
     
@@ -110,7 +110,6 @@ public class PreviewVideoActivity extends FileActivity implements OnCompletionLi
     @Override
     public void onSaveInstanceState(Bundle outState) {
         super.onSaveInstanceState(outState);
-        Log_OC.e(TAG, "ACTIVITY\t\tonSaveInstanceState");
         outState.putInt(PreviewVideoActivity.EXTRA_START_POSITION, mVideoPlayer.getCurrentPosition());
         outState.putBoolean(PreviewVideoActivity.EXTRA_AUTOPLAY , mVideoPlayer.isPlaying());
     }
@@ -118,7 +117,7 @@ public class PreviewVideoActivity extends FileActivity implements OnCompletionLi
     
     @Override
     public void onBackPressed() {
-        Log_OC.e(TAG, "ACTIVTIY\t\tonBackPressed");
+        Log_OC.v(TAG, "onBackPressed");
         Intent i = new Intent();
         i.putExtra(EXTRA_AUTOPLAY, mVideoPlayer.isPlaying());
         i.putExtra(EXTRA_START_POSITION, mVideoPlayer.getCurrentPosition());
@@ -136,7 +135,7 @@ public class PreviewVideoActivity extends FileActivity implements OnCompletionLi
      */
     @Override
     public void onPrepared(MediaPlayer mp) {
-        Log_OC.e(TAG, "ACTIVITY\t\tonPrepare");
+        Log_OC.v(TAG, "onPrepare");
         mVideoPlayer.seekTo(mSavedPlaybackPosition);
         if (mAutoplay) { 
             mVideoPlayer.start();
@@ -204,8 +203,8 @@ public class PreviewVideoActivity extends FileActivity implements OnCompletionLi
             file = getStorageManager().getFileById(file.getFileId()); 
             if (file != null) {
                 if (file.isDown()) {
-                    mVideoPlayer.setVideoPath(file.getStoragePath());
-                    
+                    mVideoPlayer.setVideoURI(file.getStorageUri());
+
                 } else {
                     // not working yet
                     String url;
@@ -216,13 +215,13 @@ public class PreviewVideoActivity extends FileActivity implements OnCompletionLi
                         onError(null, MediaService.OC_MEDIA_ERROR, R.string.media_err_no_account);
                     }
                 }
-                
+
                 // create and prepare control panel for the user
                 mMediaController = new MediaController(this);
                 mMediaController.setMediaPlayer(mVideoPlayer);
                 mMediaController.setAnchorView(mVideoPlayer);
                 mVideoPlayer.setMediaController(mMediaController);
-                
+
             } else {
                 finish();
             }
index 8a281e9..a30595c 100644 (file)
@@ -193,22 +193,19 @@ public class DisplayUtils {
         else if ((System.currentTimeMillis() - time) < 60 * 1000) {\r
             return c.getString(R.string.file_list_seconds_ago);\r
         } else {\r
-            // Workaround 2.x bug (see https://github.com/owncloud/android/issues/716)\r
-            if (    Build.VERSION.SDK_INT <= Build.VERSION_CODES.HONEYCOMB && \r
-                    (System.currentTimeMillis() - time) > 24 * 60 * 60 * 1000   ) {\r
-                Date date = new Date(time);\r
-                date.setHours(0);\r
-                date.setMinutes(0);\r
-                date.setSeconds(0);\r
-                dateString = DateUtils.getRelativeDateTimeString(\r
-                        c, date.getTime(), minResolution, transitionResolution, flags\r
-                );\r
-            } else {\r
-                dateString = DateUtils.getRelativeDateTimeString(c, time, minResolution, transitionResolution, flags);\r
+            dateString = DateUtils.getRelativeDateTimeString(c, time, minResolution, transitionResolution, flags);\r
+        }\r
+\r
+        String[] parts = dateString.toString().split(",");\r
+        if (parts.length == 2) {\r
+            if (parts[1].contains(":") && !parts[0].contains(":")) {\r
+                return parts[0];\r
+            } else if (parts[0].contains(":") && !parts[1].contains(":")) {\r
+                return parts[1];\r
             }\r
         }\r
-        \r
-        return dateString.toString().split(",")[0];\r
+        //dateString contains unexpected format. fallback: use relative date time string from android api as is.\r
+        return dateString.toString();\r
     }\r
 \r
     /**\r
index b80cc57..be74386 100644 (file)
@@ -27,16 +27,19 @@ import com.owncloud.android.R;
 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.resources.shares.UpdateRemoteShareOperation;
 import com.owncloud.android.operations.CopyFileOperation;
 import com.owncloud.android.operations.CreateFolderOperation;
-import com.owncloud.android.operations.CreateShareOperation;
+import com.owncloud.android.operations.CreateShareViaLinkOperation;
+import com.owncloud.android.operations.CreateShareWithShareeOperation;
 import com.owncloud.android.operations.DownloadFileOperation;
 import com.owncloud.android.operations.MoveFileOperation;
 import com.owncloud.android.operations.RemoveFileOperation;
 import com.owncloud.android.operations.RenameFileOperation;
 import com.owncloud.android.operations.SynchronizeFileOperation;
 import com.owncloud.android.operations.SynchronizeFolderOperation;
-import com.owncloud.android.operations.UnshareLinkOperation;
+import com.owncloud.android.operations.UnshareOperation;
+import com.owncloud.android.operations.UpdateShareViaLinkOperation;
 import com.owncloud.android.operations.UploadFileOperation;
 
 import org.apache.commons.httpclient.ConnectTimeoutException;
@@ -60,7 +63,10 @@ public class ErrorMessageAdapter {
         
         String message = null;
 
-        if (operation instanceof UploadFileOperation) {
+        if (!result.isSuccess() && isNetworkError(result.getCode())) {
+            message = getErrorMessage(result, res);
+
+        } else if (operation instanceof UploadFileOperation) {
 
             if (result.isSuccess()) {
                 message = String.format(
@@ -119,9 +125,6 @@ public class ErrorMessageAdapter {
                     // Error --> No permissions
                     message = String.format(res.getString(R.string.forbidden_permissions),
                             res.getString(R.string.forbidden_permissions_delete));
-                } else if (isNetworkError(result.getCode())) {
-                    message = getErrorMessage(result, res);
-
                 } else {
                     message = res.getString(R.string.remove_fail_msg);
                 }
@@ -139,9 +142,6 @@ public class ErrorMessageAdapter {
             } else if (result.getCode().equals(ResultCode.INVALID_CHARACTER_IN_NAME)) {
                 message = res.getString(R.string.filename_forbidden_characters);
 
-            } else if (isNetworkError(result.getCode())) {
-                message = getErrorMessage(result, res);
-
             } else if (result.getCode() == ResultCode.INVALID_CHARACTER_DETECT_IN_SERVER) {
                 message = res.getString(R.string.filename_forbidden_charaters_from_server);
 
@@ -162,16 +162,18 @@ public class ErrorMessageAdapter {
                 message = String.format(res.getString(R.string.forbidden_permissions),
                         res.getString(R.string.forbidden_permissions_create));
 
-            } else if (isNetworkError(result.getCode())) {
-                message = getErrorMessage(result, res);
-
             } else if (result.getCode() == ResultCode.INVALID_CHARACTER_DETECT_IN_SERVER) {
                 message = res.getString(R.string.filename_forbidden_charaters_from_server);
             } else {
                 message = res.getString(R.string.create_dir_fail_msg);
             }
-        } else if (operation instanceof CreateShareOperation) {        
-            if (result.getCode() == ResultCode.SHARE_NOT_FOUND)  {      // Error --> SHARE_NOT_FOUND
+        } else if (operation instanceof CreateShareViaLinkOperation ||
+                    operation instanceof CreateShareWithShareeOperation) {
+
+            if (result.getData() != null && result.getData().size() > 0) {
+                message = (String) result.getData().get(0);     // share API sends its own error messages
+
+            } else if (result.getCode() == ResultCode.SHARE_NOT_FOUND)  {
                 message = res.getString(R.string.share_link_file_no_exist);
 
             } else if (result.getCode() == ResultCode.SHARE_FORBIDDEN) {
@@ -179,17 +181,17 @@ public class ErrorMessageAdapter {
                 message = String.format(res.getString(R.string.forbidden_permissions),
                         res.getString(R.string.share_link_forbidden_permissions));
 
-            } else if (isNetworkError(result.getCode())) {
-                message = getErrorMessage(result, res);
-
             } else {    // Generic error
                 // Show a Message, operation finished without success
                 message = res.getString(R.string.share_link_file_error);
             }
 
-        } else if (operation instanceof UnshareLinkOperation) {
+        } else if (operation instanceof UnshareOperation) {
+
+            if (result.getData() != null && result.getData().size() > 0) {
+                message = (String) result.getData().get(0);     // share API sends its own error messages
 
-            if (result.getCode() == ResultCode.SHARE_NOT_FOUND)  {      // Error --> SHARE_NOT_FOUND
+            } else if (result.getCode() == ResultCode.SHARE_NOT_FOUND) {
                 message = res.getString(R.string.unshare_link_file_no_exist);
 
             } else if (result.getCode() == ResultCode.SHARE_FORBIDDEN) {
@@ -197,18 +199,32 @@ public class ErrorMessageAdapter {
                 message = String.format(res.getString(R.string.forbidden_permissions),
                         res.getString(R.string.unshare_link_forbidden_permissions));
 
-            } else if (isNetworkError(result.getCode())) {
-                message = getErrorMessage(result, res);
-
             } else {    // Generic error
                 // Show a Message, operation finished without success
                 message = res.getString(R.string.unshare_link_file_error);
             }
+
+        } else if (operation instanceof UpdateShareViaLinkOperation) {
+
+            if (result.getData() != null && result.getData().size() > 0) {
+                message = (String) result.getData().get(0);     // share API sends its own error messages
+
+            } else if (result.getCode() == ResultCode.SHARE_NOT_FOUND) {
+                message = res.getString(R.string.update_link_file_no_exist);
+
+            } else if (result.getCode() == ResultCode.SHARE_FORBIDDEN) {
+                // Error --> No permissions
+                message = String.format(res.getString(R.string.forbidden_permissions),
+                        res.getString(R.string.update_link_forbidden_permissions));
+
+            } else {    // Generic error
+                // Show a Message, operation finished without success
+                message = res.getString(R.string.update_link_file_error);
+            }
+
         } else if (operation instanceof MoveFileOperation) {
 
-            if(isNetworkError(result.getCode())){
-                message = getErrorMessage(result, res);
-            } else if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
+            if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
                 message = res.getString(R.string.move_file_not_found);
             } else if (result.getCode() == ResultCode.INVALID_MOVE_INTO_DESCENDANT) {
                 message = res.getString(R.string.move_file_invalid_into_descendent);
@@ -238,14 +254,12 @@ public class ErrorMessageAdapter {
 
                 } else {    // Generic error
                     // Show a Message, operation finished without success
-                    message = String.format(res.getString(R.string.download_folder_failed_content),
+                    message = String.format(res.getString(R.string.sync_folder_failed_content),
                             folderPathName);
                 }
             }
         } else if (operation instanceof CopyFileOperation) {
-            if(isNetworkError(result.getCode())){
-                message = getErrorMessage(result, res);
-            } else if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
+            if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
                 message = res.getString(R.string.copy_file_not_found);
             } else if (result.getCode() == ResultCode.INVALID_COPY_INTO_DESCENDANT) {
                 message = res.getString(R.string.copy_file_invalid_into_descendent);
index 808f221..10d1709 100644 (file)
@@ -32,6 +32,7 @@ import com.owncloud.android.R;
 import com.owncloud.android.datamodel.OCFile;
 import com.owncloud.android.lib.resources.files.RemoteFile;
 
+import android.accounts.Account;
 import android.annotation.SuppressLint;
 import android.content.Context;
 import android.content.SharedPreferences;
@@ -52,7 +53,6 @@ public class FileStorageUtils {
     public static Integer mSortOrder = SORT_NAME;
     public static Boolean mSortAscending = true;
 
-
     //private static final String TAG = FileStorageUtils.class.getSimpleName();
 
     @SuppressLint("NewApi")
@@ -151,7 +151,7 @@ public class FileStorageUtils {
      * Creates and populates a new {@link OCFile} object with the data read from the server.
      * 
      * @param remote    remote file read from the server (remote file or folder).
-     * @return          New OCFile instance representing the remote resource described by we.
+     * @return          New OCFile instance representing the remote resource described by remote.
      */
     public static OCFile fillOCFile(RemoteFile remote) {
         OCFile file = new OCFile(remote.getRemotePath());
@@ -285,7 +285,7 @@ public class FileStorageUtils {
         Collections.sort(files, new Comparator<OCFile>() {
             public int compare(OCFile o1, OCFile o2) {
                 if (o1.isFolder() && o2.isFolder()) {
-                    return val * o1.getRemotePath().toLowerCase().compareTo(o2.getRemotePath().toLowerCase());
+                    return val * new AlphanumComparator().compare(o1, o2);
                 } else if (o1.isFolder()) {
                     return -1;
                 } else if (o2.isFolder()) {
@@ -333,5 +333,33 @@ public class FileStorageUtils {
         String result = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension.toLowerCase());
         return (result != null) ? result : "";
     }
-  
+
+    /**
+     * Scans the default location for saving local copies of files searching for
+     * a 'lost' file with the same full name as the {@link OCFile} received as
+     * parameter.
+     *
+     * This method helps to keep linked local copies of the files when the app is uninstalled, and then
+     * reinstalled in the device. OR after the cache of the app was deleted in system settings.
+     *
+     * The method is assuming that all the local changes in the file where synchronized in the past. This is dangerous,
+     * but assuming the contrary could lead to massive unnecessary synchronizations of downloaded file after deleting
+     * the app cache.
+     *
+     * This should be changed in the near future to avoid any chance of data loss, but we need to add some options
+     * to limit hard automatic synchronizations to wifi, unless the user wants otherwise.
+     *
+     * @param file      File to associate a possible 'lost' local file.
+     * @param account   Account holding file.
+     */
+    public static void searchForLocalFileInDefaultPath(OCFile file, Account account) {
+        if (file.getStoragePath() == null && !file.isFolder()) {
+            File f = new File(FileStorageUtils.getDefaultSavePathFor(account.name, file));
+            if (f.exists()) {
+                file.setStoragePath(f.getAbsolutePath());
+                file.setLastSyncDateForData(f.lastModified());
+            }
+        }
+    }
+
 }
diff --git a/src/com/owncloud/android/utils/GetShareWithUsersAsyncTask.java b/src/com/owncloud/android/utils/GetShareWithUsersAsyncTask.java
new file mode 100644 (file)
index 0000000..a5f696e
--- /dev/null
@@ -0,0 +1,97 @@
+/**
+ *   ownCloud Android client application
+ *
+ *   @author masensio
+ *   Copyright (C) 2015 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.utils;
+
+import android.accounts.Account;
+import android.os.AsyncTask;
+import android.util.Pair;
+
+import com.owncloud.android.MainApp;
+import com.owncloud.android.datamodel.FileDataStorageManager;
+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.operations.OnRemoteOperationListener;
+import com.owncloud.android.lib.common.operations.RemoteOperation;
+import com.owncloud.android.lib.common.operations.RemoteOperationResult;
+import com.owncloud.android.lib.common.utils.Log_OC;
+import com.owncloud.android.operations.GetSharesForFileOperation;
+
+import java.lang.ref.WeakReference;
+
+/**
+ * Async Task to get the users and groups which a file is shared with
+ */
+public class GetShareWithUsersAsyncTask extends AsyncTask<Object, Void, Pair<RemoteOperation, RemoteOperationResult>> {
+
+    private final String TAG = GetShareWithUsersAsyncTask.class.getSimpleName();
+    private final WeakReference<OnRemoteOperationListener> mListener;
+
+    public GetShareWithUsersAsyncTask(OnRemoteOperationListener listener) {
+        mListener = new WeakReference<OnRemoteOperationListener>(listener);
+    }
+
+    @Override
+    protected Pair<RemoteOperation, RemoteOperationResult> doInBackground(Object... params) {
+
+        GetSharesForFileOperation operation = null;
+        RemoteOperationResult result = null;
+
+        if (params != null && params.length == 3) {
+            OCFile file = (OCFile) params[0];
+            Account account = (Account) params[1];
+            FileDataStorageManager fileDataStorageManager = (FileDataStorageManager) params[2];
+
+            try {
+                // Get shares request
+                operation = new GetSharesForFileOperation(file.getRemotePath(), false, false);
+                OwnCloudAccount ocAccount = new OwnCloudAccount(account,
+                        MainApp.getAppContext());
+                OwnCloudClient client = OwnCloudClientManagerFactory.getDefaultSingleton().
+                        getClientFor(ocAccount, MainApp.getAppContext());
+                result = operation.execute(client, fileDataStorageManager);
+
+            } catch (Exception e) {
+                result = new RemoteOperationResult(e);
+                Log_OC.e(TAG, "Exception while getting shares", e);
+            }
+        } else {
+            result = new RemoteOperationResult(RemoteOperationResult.ResultCode.UNKNOWN_ERROR);
+        }
+
+        return new Pair(operation, result);
+    }
+
+    @Override
+    protected void onPostExecute(Pair<RemoteOperation, RemoteOperationResult> result) {
+
+        if (result!= null)
+        {
+            OnRemoteOperationListener listener = mListener.get();
+            if (listener!= null)
+            {
+                listener.onRemoteOperationFinish(result.first, result.second);
+            }
+        }
+    }
+
+}
\ No newline at end of file
index bd8c5d9..5fc4c8c 100644 (file)
@@ -69,15 +69,15 @@ public class MimetypeIconUtil {
     /**
      * Returns the resource identifier of an image to use as icon associated to a type of folder.
      *
-     * @param isSharedWithUser flag if the folder is shared with the user
-     * @param isShareByLink flag if the folder is shared by link
+     * @param isSharedViaUsers flag if the folder is shared via the users system
+     * @param isSharedViaLink flag if the folder is publicly shared via link
      * @return Identifier of an image resource.
      */
-    public static int getFolderTypeIconId(boolean isSharedWithUser, boolean isShareByLink) {
-        if (isSharedWithUser) {
-            return R.drawable.shared_with_me_folder;
-        } else if (isShareByLink) {
+    public static int getFolderTypeIconId(boolean isSharedViaUsers, boolean isSharedViaLink) {
+        if (isSharedViaLink) {
             return R.drawable.folder_public;
+        } else if (isSharedViaUsers) {
+            return R.drawable.shared_with_me_folder;
         }
 
         return R.drawable.ic_menu_archive;
index e6bd6f3..47cf143 100644 (file)
@@ -23,6 +23,7 @@
  */\r
 \r
 package third_parties.daveKoeller;\r
+import java.text.Collator;\r
 import java.util.Comparator;\r
 \r
 import com.owncloud.android.datamodel.OCFile;\r
@@ -48,14 +49,12 @@ public class AlphanumComparator implements Comparator<OCFile>
     }\r
 \r
     /** Length of string is passed in for improved efficiency (only need to calculate it once) **/\r
-    private final String getChunk(String s, int slength, int marker)\r
-    {\r
+    private final String getChunk(String s, int slength, int marker){\r
         StringBuilder chunk = new StringBuilder();\r
         char c = s.charAt(marker);\r
         chunk.append(c);\r
         marker++;\r
-        if (isDigit(c))\r
-        {\r
+        if (isDigit(c)){\r
             while (marker < slength)\r
             {\r
                 c = s.charAt(marker);\r
@@ -64,8 +63,7 @@ public class AlphanumComparator implements Comparator<OCFile>
                 chunk.append(c);\r
                 marker++;\r
             }\r
-        } else\r
-        {\r
+        } else {\r
             while (marker < slength)\r
             {\r
                 c = s.charAt(marker);\r
@@ -78,8 +76,7 @@ public class AlphanumComparator implements Comparator<OCFile>
         return chunk.toString();\r
     }\r
 \r
-    public int compare(OCFile o1, OCFile o2)\r
-    {\r
+    public int compare(OCFile o1, OCFile o2){\r
         String s1 = (String)o1.getRemotePath().toLowerCase();\r
         String s2 = (String)o2.getRemotePath().toLowerCase();\r
 \r
@@ -88,8 +85,7 @@ public class AlphanumComparator implements Comparator<OCFile>
         int s1Length = s1.length();\r
         int s2Length = s2.length();\r
 \r
-        while (thisMarker < s1Length && thatMarker < s2Length)\r
-        {\r
+        while (thisMarker < s1Length && thatMarker < s2Length) {\r
             String thisChunk = getChunk(s1, s1Length, thisMarker);\r
             thisMarker += thisChunk.length();\r
 \r
@@ -98,26 +94,23 @@ public class AlphanumComparator implements Comparator<OCFile>
 \r
             // If both chunks contain numeric characters, sort them numerically\r
             int result = 0;\r
-            if (isDigit(thisChunk.charAt(0)) && isDigit(thatChunk.charAt(0)))\r
-            {\r
+            if (isDigit(thisChunk.charAt(0)) && isDigit(thatChunk.charAt(0))) {\r
                 // Simple chunk comparison by length.\r
                 int thisChunkLength = thisChunk.length();\r
                 result = thisChunkLength - thatChunk.length();\r
                 // If equal, the first different number counts\r
-                if (result == 0)\r
-                {\r
-                    for (int i = 0; i < thisChunkLength; i++)\r
-                    {\r
+                if (result == 0) {\r
+                    for (int i = 0; i < thisChunkLength; i++) {\r
                         result = thisChunk.charAt(i) - thatChunk.charAt(i);\r
-                        if (result != 0)\r
-                        {\r
+                        if (result != 0) {\r
                             return result;\r
                         }\r
                     }\r
                 }\r
-            } else\r
-            {\r
-                result = thisChunk.compareTo(thatChunk);\r
+            } else {\r
+                Collator collator = Collator.getInstance();\r
+                collator.setStrength(Collator.PRIMARY);\r
+                result = collator.compare(thisChunk, thatChunk);\r
             }\r
 \r
             if (result != 0)\r
index de2b2d5..43f3960 100644 (file)
@@ -9,6 +9,8 @@ some advantages over the Web interface:
 
 * A simplified interface that fits nicely on a tablet or smartphone
 * Automatic synchronization of your files
+* Share files with other ownCloud users and groups, and create public share 
+  links
 * Instant uploads of photos or videos recorded on your Android device
 * Easily add files from your device to ownCloud
 * Two-factor authentication
@@ -22,13 +24,13 @@ Dolphin. The first time you log in to a new ownCloud account you'll see a screen
 with a download link to the ownCloud app in the `Google Play store
 <https://play.google.com/store/apps/details?id=com.owncloud.android>`_.
 
-.. figure:: images/android-first-screen.jpg
+.. figure:: images/android-1.png
+   :scale: 75% 
+   :alt: Android app new account welcome screen.
 
-You will also find these links on your Personal page in the Web interface,
+You will also find these links on your Personal page in the ownCloud Web interface.
 
-You can also get it from the `Amazon App store 
-<http://www.amazon.com/ownCloud-Inc/dp/B00944PQMK/>`_, and get source code and 
-more information from the `ownCloud download page 
+Find source code and more information from the `ownCloud download page 
 <http://owncloud.org/install/#mobile>`_.
 
 Connecting to Your ownCloud Server
@@ -39,77 +41,104 @@ screen. Enter your server URL, login name, password, and click the Connect
 button. (Click the eyeball to the right of your password to expose your 
 password.)
 
-.. figure:: images/android-new-account.png
+.. figure:: images/android-2.png
+   :scale: 75% 
+   :alt: New account creation screen.
 
 For best security your ownCloud server should be SSL-enabled, so that you can 
 connect via ``https``. The ownCloud app will test your connection as soon as 
 you enter it and tell you if you entered it correctly. If your server has a 
-self-signed SSL certificate you'll get a scary warning how it is not to be 
+self-signed SSL certificate you'll get a warning that it is not to be 
 trusted. Click the OK button to accept the certificate and complete your account 
 setup.
 
-.. figure:: images/android-ssl-cert.png
+.. figure:: images/android-3.png 
+   :alt: SSL certificate warning.
 
 Managing Files
 --------------
 
-Now you should see the Files page of your ownCloud account. Click the overflow 
-button at the top right (that's the one with three vertical dots, and that is 
-really what it is called) to open a user menu. ``Refresh account`` refreshes the 
-page view. ``Settings`` take you to your settings menu. ``Sort`` gives you the 
-option to sort your files by date, or alphabetically.
+Now you should see the Files page of your ownCloud account. 
 
-.. figure:: images/android-files-page.png
+.. figure:: images/android-4.png
+   :scale: 75% 
+   :alt: Your ownCloud Files page.
+
+The ownCloud menu at the top left shows the name of the logged-in user, has a 
+shortcut to your files, and contains the Settings button.
+
+.. figure:: images/android-5.png
+   :alt: Top-left menu.
+
+Click the overflow button at the top right (that's the one with three vertical 
+dots) to open a user menu. ``Refresh account`` syncs your files, and ``Sort`` 
+gives you the option to sort your files by date, or alphabetically.
+
+.. figure:: images/android-6.png
+   :alt: Top-right menu.
 
 The little file folder icon to the left of the overflow button opens a dialog to 
 create a new folder. The arrow button opens a file upload dialog, and you can 
 either upload content from other Android apps such as Google Drive, the Gallery, 
-your music player, or from your Android filesystem. When you add a new file 
-you will see a confirmation on the top left when it has uploaded successfully, 
-and it is immediately synchronized with the server.
+your music player, or from your Android filesystem.
 
-.. figure:: images/android-upload.png
+.. figure:: images/android-7.png
+   :scale: 75%
+   :alt: File upload dialogue.
 
 All files (that you have permission to access) on your ownCloud server are 
-displayed in your Android app, but are not downloaded until you download them. 
+displayed in your Android app, but are not downloaded until you click on them. 
 Downloaded files are marked with a green arrow.
 
-.. figure:: images/android-file-list.png
-
-Download and preview a file with a short press on the filename.  When the file 
-is in preview mode, a short press on the overflow button opens a menu with 
-options for sharing, opening with an app, removing, sending, and displaying file 
-details. 
-
-.. figure:: images/android-file.png
-
-
-A long press on the filename does not download it, but opens a dialog with 
-options for sharing, downloading, renaming, moving, removing, sending, and 
-viewing file details. 
-
-
-.. figure:: images/android-file-options.png
-
-
+.. figure:: images/android-8.png
+   :scale: 75%
+   :alt: Downloaded files are marked with green arrows.
+
+Download and view a file with a short press on the filename.  Then a short 
+press on the overflow button opens a menu with options for managing your file.
+
+.. figure:: images/android-9.png
+   :scale: 75%
+   :alt: File management options. Betsy Ross says "Don't believe everything you 
+    read on the Internet."
+   
+When you are on your main Files page, a long press on any file or folder 
+displays a list of options: Share, Open With, Synchronize, Rename, Move, Copy, 
+Remove, Send, Favorite, and Details.
+
+.. figure:: images/android-11.png
+   :scale: 75%
+   :alt: Folder and file management options.
+   
+Click Share to share files. You can share with other ownCloud users, and create 
+public share links. If your ownCloud server administrator has enabled username 
+auto-completion, when you start typing user or group names they will 
+auto-complete. After you have shared files, click the Share button to see who 
+you have shared with, and to remove shares.
+
+.. figure:: images/android-12.png
+   :scale: 75%
+   :alt: Sharing files.
+   
 Settings
 --------
 
-The Settings screen offers a number of useful options. In the Accounts 
-section you can configure multiple ownCloud accounts.
+Use the Settings screen to control your ownCloud app functions.
+
+.. figure:: images/android-10.png
+   :scale: 75%
+   :alt: Setting screen.
+
+In the Accounts section you can set up and manage multiple accounts.
 
 The Security section sets up strong two-factor authentication by allowing you 
 to add a PIN (personal identification number) to access your account.  
 
-The Instant Uploads section creates a directory, :file:`/InstantUpload`, and 
-any photos or videos created with your Android device's camera are instantly 
+The Instant Uploads section creates a directory, :file:`/InstantUpload`, and any 
+photos or videos created with your Android device's camera are instantly 
 uploaded to this directory. You also have the option to choose any other 
-existing directory. Another nice option is Upload Pictures/Video via WiFi Only, 
-to conserve your Internet data usage.
-
-.. figure:: images/android-settings.png
-
-The bottom section of the Settings screen has links to help and the 
-app's version number.
+existing directory, or to create a new one. Another nice option is Upload 
+Pictures/Video via WiFi Only, to conserve your mobile data usage.
 
-.. figure:: images/android-help.png
+The bottom section of the Settings screen has links to Help, Recommend to a 
+friend, Feedback, and the version number.
index 20e5bda..93318da 100644 (file)
@@ -51,7 +51,7 @@ copyright = u'2013-2015, The ownCloud developers'
 # built documents.
 #
 # The short X.Y version.
-version = '1.6.2'
+version = '1.9.0'
 # The full version, including alpha/beta/rc tags.
 release = version
 
diff --git a/user_manual/images/android-1.png b/user_manual/images/android-1.png
new file mode 100644 (file)
index 0000000..ed45645
Binary files /dev/null and b/user_manual/images/android-1.png differ
diff --git a/user_manual/images/android-10.png b/user_manual/images/android-10.png
new file mode 100644 (file)
index 0000000..bba2674
Binary files /dev/null and b/user_manual/images/android-10.png differ
diff --git a/user_manual/images/android-11.png b/user_manual/images/android-11.png
new file mode 100644 (file)
index 0000000..15d3219
Binary files /dev/null and b/user_manual/images/android-11.png differ
diff --git a/user_manual/images/android-12.png b/user_manual/images/android-12.png
new file mode 100644 (file)
index 0000000..284d4d1
Binary files /dev/null and b/user_manual/images/android-12.png differ
diff --git a/user_manual/images/android-2.png b/user_manual/images/android-2.png
new file mode 100644 (file)
index 0000000..ddee8e4
Binary files /dev/null and b/user_manual/images/android-2.png differ
diff --git a/user_manual/images/android-3.png b/user_manual/images/android-3.png
new file mode 100644 (file)
index 0000000..14afed9
Binary files /dev/null and b/user_manual/images/android-3.png differ
diff --git a/user_manual/images/android-4.png b/user_manual/images/android-4.png
new file mode 100644 (file)
index 0000000..ee9cf66
Binary files /dev/null and b/user_manual/images/android-4.png differ
diff --git a/user_manual/images/android-5.png b/user_manual/images/android-5.png
new file mode 100644 (file)
index 0000000..d089cc1
Binary files /dev/null and b/user_manual/images/android-5.png differ
diff --git a/user_manual/images/android-6.png b/user_manual/images/android-6.png
new file mode 100644 (file)
index 0000000..20f6fbb
Binary files /dev/null and b/user_manual/images/android-6.png differ
diff --git a/user_manual/images/android-7.png b/user_manual/images/android-7.png
new file mode 100644 (file)
index 0000000..aaa33bf
Binary files /dev/null and b/user_manual/images/android-7.png differ
diff --git a/user_manual/images/android-8.png b/user_manual/images/android-8.png
new file mode 100644 (file)
index 0000000..b1ecc62
Binary files /dev/null and b/user_manual/images/android-8.png differ
diff --git a/user_manual/images/android-9.png b/user_manual/images/android-9.png
new file mode 100644 (file)
index 0000000..afa2f12
Binary files /dev/null and b/user_manual/images/android-9.png differ
diff --git a/user_manual/images/android-downloads.png b/user_manual/images/android-downloads.png
deleted file mode 100644 (file)
index e0bb545..0000000
Binary files a/user_manual/images/android-downloads.png and /dev/null differ
diff --git a/user_manual/images/android-file-list.png b/user_manual/images/android-file-list.png
deleted file mode 100644 (file)
index e479b9f..0000000
Binary files a/user_manual/images/android-file-list.png and /dev/null differ
diff --git a/user_manual/images/android-file-options.png b/user_manual/images/android-file-options.png
deleted file mode 100644 (file)
index 12867a3..0000000
Binary files a/user_manual/images/android-file-options.png and /dev/null differ
diff --git a/user_manual/images/android-file.png b/user_manual/images/android-file.png
deleted file mode 100644 (file)
index 89ffd28..0000000
Binary files a/user_manual/images/android-file.png and /dev/null differ
diff --git a/user_manual/images/android-files-page.png b/user_manual/images/android-files-page.png
deleted file mode 100644 (file)
index 1c7fc4d..0000000
Binary files a/user_manual/images/android-files-page.png and /dev/null differ
diff --git a/user_manual/images/android-first-screen.jpg b/user_manual/images/android-first-screen.jpg
deleted file mode 100644 (file)
index f4c5132..0000000
Binary files a/user_manual/images/android-first-screen.jpg and /dev/null differ
diff --git a/user_manual/images/android-help.png b/user_manual/images/android-help.png
deleted file mode 100644 (file)
index 56a7464..0000000
Binary files a/user_manual/images/android-help.png and /dev/null differ
diff --git a/user_manual/images/android-new-account.png b/user_manual/images/android-new-account.png
deleted file mode 100644 (file)
index ffbe12e..0000000
Binary files a/user_manual/images/android-new-account.png and /dev/null differ
diff --git a/user_manual/images/android-settings.png b/user_manual/images/android-settings.png
deleted file mode 100644 (file)
index 7a16084..0000000
Binary files a/user_manual/images/android-settings.png and /dev/null differ
diff --git a/user_manual/images/android-ssl-cert.png b/user_manual/images/android-ssl-cert.png
deleted file mode 100644 (file)
index 9286fe6..0000000
Binary files a/user_manual/images/android-ssl-cert.png and /dev/null differ
diff --git a/user_manual/images/android-upload.png b/user_manual/images/android-upload.png
deleted file mode 100644 (file)
index 6ee1b95..0000000
Binary files a/user_manual/images/android-upload.png and /dev/null differ