-
[submodule "owncloud-android-library"]
path = owncloud-android-library
url = git://github.com/owncloud/android-library.git
+sudo: false
language: android
android:
components:
<?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="10700200"
- android:versionName="1.7.2" 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="10800000"
+ android:versionName="1.8.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.RECEIVE_BOOT_COMPLETED" />
+ <uses-permission android:name="android.permission.WAKE_LOCK" />
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" >
- </uses-permission>
+ <android:uses-permission android:name="android.permission.READ_PHONE_STATE" />
+ <android:uses-permission android:name="android.permission.READ_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.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>
-
- <category android:name="android.intent.category.DEFAULT" >
- </category>
+ <action android:name="android.intent.action.SEND_MULTIPLE" />
- <data android:mimeType="*/*" >
- </data>
+ <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
+ <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:label="@string/app_name"
+ 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>
</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" />
+
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
+
<data android:scheme="@string/oauth2_redirect_scheme" />
</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=".files.services.FileDownloader" />
<service android:name=".files.services.FileUploader" />
<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): -->
+ <!-- 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"/>
+ <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"/>
+ <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"/>
-
- <activity
- android:name=".ui.activity.UploadPathActivity"
- android:label="@string/app_name"/>
-
+
+ <service android:name=".services.observer.FileObserverService" />
+
+ <activity
+ 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>
+## 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
* Open a terminal and go on with the next steps in it.
* Clone your forked repository: ```git clone git@github.com:YOURGITHUBNAME/android.git```.
* Move to the project folder with ```cd android```.
-* Checkout the remote branch 'master' in your own local branch 'master': ```git checkout -b master remotes/origin/master```.
+* Checkout the remote branch 'master' in your own local branch 'master': ```git checkout master remotes/origin/master```.
* Pull any changes from your remote branch 'master': ```git pull origin master```
* Make official ownCloud repo known as upstream: ```git remote add upstream git@github.com:owncloud/android.git```
* Make sure to get the latest changes from official android/master branch: ```git pull upstream master```
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'
}
}
}
-
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_7
- targetCompatibility JavaVersion.VERSION_1_7
- }
-
productFlavors {
}
}
+
+
+
+
<?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="0100024"
- android:versionName="1.0.24" >
+ android:versionCode="0100025"
+ android:versionName="1.0.25" >
<uses-sdk
android:minSdkVersion="16"
-Subproject commit dbc8c325d74f3f7e8da8236c5abe77a141ae4019
+Subproject commit b09969d078b3a790b01c8d61a7298a37439a9f24
android:gravity="center"\r
android:orientation="vertical"\r
android:padding="8dp" >\r
- \r
- <Button\r
- android:id="@+id/centeredRefreshButton"\r
- android:layout_width="wrap_content"\r
- android:layout_height="wrap_content"\r
- android:layout_gravity="center_horizontal"\r
+\r
+ <android.support.v7.widget.AppCompatButton\r
+ android:id="@+id/centeredRefreshButton"\r
+ style="@style/ownCloud.Button"\r
+ android:layout_width="wrap_content"\r
+ android:layout_height="wrap_content"\r
+ android:layout_gravity="center_horizontal"\r
android:layout_marginBottom="10dp"\r
- android:text="@string/auth_check_server"\r
- android:visibility="gone"\r
- android:contentDescription="@string/auth_check_server"/>\r
+ android:text="@string/auth_check_server"\r
+ android:visibility="gone"\r
+ android:contentDescription="@string/auth_check_server"/>\r
+\r
<TextView\r
android:id="@+id/instructions_message"\r
android:layout_width="wrap_content"\r
android:id="@+id/hostUrlFrame"\r
android:layout_width="match_parent"\r
android:layout_height="wrap_content"\r
- android:layout_marginBottom="10dp"\r
+ android:layout_marginBottom="0dp"\r
>\r
<EditText\r
android:id="@+id/hostUrlInput"\r
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
</EditText>\r
<ImageButton\r
android:id="@+id/embeddedRefreshButton"\r
- android:layout_width="48dp"\r
- android:layout_height="48dp"\r
+ android:layout_width="wrap_content"\r
+ android:layout_height="wrap_content"\r
android:layout_gravity="center_vertical|right"\r
android:layout_marginRight="5dp"\r
android:padding="0dp"\r
android:scaleType="fitCenter"\r
- android:src="@drawable/ic_action_refresh_black"\r
+ android:src="@drawable/ic_action_refresh_grey"\r
android:onClick="onRefreshClick"\r
android:visibility="gone"\r
android:background="@android:color/transparent"\r
android:textColor="@color/login_text_color"\r
android:textColorHint="@color/login_text_hint_color"\r
android:text="@string/auth_testing_connection"\r
+ android:minHeight="32dp"\r
android:contentDescription="@string/auth_testing_connection"/>\r
\r
<CheckBox\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
<android.support.v7.widget.AppCompatButton\r
android:id="@+id/buttonOK"\r
android:theme="@style/Button.Primary"\r
+ style="@style/Button.Primary"\r
android:layout_width="match_parent"\r
android:layout_height="wrap_content"\r
android:layout_gravity="center_horizontal"\r
android:layout_height="wrap_content"\r
android:layout_marginBottom="20dp"\r
android:layout_marginTop="10dp"\r
+ android:background="@color/login_logo_background_color"\r
android:src="@drawable/logo"\r
android:contentDescription="@string/app_name"/>\r
\r
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:textColor="@color/login_text_color"\r
android:textColorHint="@color/login_text_hint_color"\r
android:text="@string/auth_testing_connection"\r
+ android:minHeight="32dp"\r
android:contentDescription="@string/auth_testing_connection"/>\r
\r
<CheckBox\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
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
- android:layout_margin="@dimen/standard_margin">
+ android:layout_margin="@dimen/standard_margin"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/file_actions_header"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="@dimen/standard_padding"
+ android:textColor="@color/black"
+ android:visibility="gone"
+ />
+
+ <View
+ android:id="@+id/file_actions_header_divider"
+ android:layout_width="match_parent"
+ android:layout_height="2dp"
+ android:background="@color/owncloud_blue"
+ android:visibility="gone"
+ />
<ListView
android:id="@+id/file_actions_list"
android:layout_width="match_parent"
- android:layout_height="match_parent" >
- </ListView>
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ />
-</LinearLayout>
\ No newline at end of file
+</LinearLayout >
\ No newline at end of file
android:layout_height="match_parent"
android:background="@color/background_color"
android:gravity="center"
- tools:context=".ui.fragment.FilePreviewFragment" >
+ tools:context=".ui.fragment.FilePreviewFragment">
- <FrameLayout
+ <FrameLayout
android:id="@+id/visual_area"
android:layout_width="match_parent"
android:layout_height="0dp"
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
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
android:layout_width="@dimen/file_icon_size"\r
android:layout_height="@dimen/file_icon_size"\r
android:layout_gravity="center_vertical"\r
- android:layout_marginLeft="9dp"\r
+ android:layout_marginLeft="12dp"\r
android:src="@drawable/ic_menu_archive" />\r
\r
<ImageView\r
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
--- /dev/null
+<?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>
--- /dev/null
+<?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>
--- /dev/null
+<?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/>.
+-->
+<FrameLayout 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">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ 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="16dip"
+ android:layout_gravity="center_vertical"
+ android:layout_marginLeft="4dp"
+ android:layout_marginRight="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="12dip"
+ 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_marginBottom="12dp"
+ android:layout_gravity="center_vertical"/>
+
+ </RelativeLayout>
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textSize="16dip"
+ android:text="@string/share_with_user_section_title"
+ android:id="@+id/shareWithUsersSectionTitle"
+ android:layout_gravity="left"
+ 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="12dip"
+ 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"/>
+
+ </LinearLayout>
+</FrameLayout>
--- /dev/null
+<?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>
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>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?><!--
+ ownCloud Android client application
+
+ Copyright (C) 2012-2013 ownCloud Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License version 2,
+ as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-->
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:fillViewport="true">
+
+ <TextView
+ android:id="@+id/text_preview"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="8dp"
+ android:layout_marginLeft="8dp"
+ android:layout_marginRight="8dp"
+ android:layout_marginStart="8dp"
+ android:visibility="gone"/>
+</ScrollView>
\ No newline at end of file
android:orientation="horizontal" >
<android.support.v7.widget.AppCompatButton
- android:id="@+id/uploader_new_folder"
+ android:id="@+id/uploader_cancel"
style="@style/ownCloud.Button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_weight="1"
- android:text="@string/uploader_btn_new_folder_text" />
+ android:text="@string/common_cancel" />
<android.support.v7.widget.AppCompatButton
android:id="@+id/uploader_choose_folder"
-<?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/>.
-->
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
-
- <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: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="@android:drawable/ic_menu_set_as" android:orderInCategory="1" />
- <item android:id="@+id/action_download_file" android:title="@string/filedetails_download" android:icon="@drawable/ic_action_download" android:orderInCategory="1" />
- <item android:id="@+id/action_sync_file" android:title="@string/filedetails_sync_file" 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:icon="@android:drawable/ic_menu_close_clear_cancel" android:orderInCategory="1" />
- <item android:id="@+id/action_rename_file" android:title="@string/common_rename" android:icon="@android:drawable/ic_menu_edit" android:orderInCategory="1" />
- <item android:id="@+id/action_move" android:title="@string/actionbar_move" android:icon="@android:drawable/ic_menu_set_as" android:orderInCategory="1" />
- <item android:id="@+id/action_remove_file" android:title="@string/common_remove" android:icon="@android:drawable/ic_menu_delete" android:orderInCategory="1" />
- <item android:id="@+id/action_send_file" android:title="@string/actionbar_send_file" android:icon="@android:drawable/ic_menu_set_as" android:orderInCategory="1" />
- <item android:id="@+id/action_favorite_file" android:title="@string/favorite" android:icon="@android:drawable/ic_menu_set_as" android:orderInCategory="1" />
- <item android:id="@+id/action_unfavorite_file" android:title="@string/unfavorite" android:icon="@android:drawable/ic_menu_set_as" android:orderInCategory="1" />
- <item android:id="@+id/action_see_details" android:title="@string/actionbar_see_details" android:icon="@android:drawable/ic_menu_info_details" android:orderInCategory="1" />
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <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:icon="@android:drawable/ic_menu_share"
+ android:orderInCategory="1" />
+ <item
+ android:id="@+id/action_share_with_users"
+ android:title="@string/action_share_with_users"
+ android:orderInCategory="1" />
+
+ <item
+ android:id="@+id/action_open_file_with"
+ android:title="@string/actionbar_open_with"
+ android:icon="@android:drawable/ic_menu_set_as"
+ android:orderInCategory="1" />
+ <item
+ android:id="@+id/action_download_file"
+ android:title="@string/filedetails_download"
+ android:icon="@drawable/ic_action_download"
+ android:orderInCategory="1" />
+ <item
+ android:id="@+id/action_sync_file"
+ android:title="@string/filedetails_sync_file"
+ android:icon="@drawable/ic_action_refresh"
+ android:orderInCategory="1" />
+ <item
+ 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
+ android:id="@+id/action_rename_file"
+ android:title="@string/common_rename"
+ android:icon="@android:drawable/ic_menu_edit"
+ android:orderInCategory="1" />
+ <item
+ android:id="@+id/action_move"
+ android:title="@string/actionbar_move"
+ android:icon="@android:drawable/ic_menu_set_as"
+ android:orderInCategory="1" />
+ <item
+ android:id="@+id/action_copy"
+ android:title="@android:string/copy"
+ android:icon="@android:drawable/ic_menu_set_as"
+ android:orderInCategory="1" />
+ <item
+ android:id="@+id/action_remove_file"
+ android:title="@string/common_remove"
+ android:icon="@android:drawable/ic_menu_delete"
+ android:orderInCategory="1" />
+ <item
+ android:id="@+id/action_send_file"
+ android:title="@string/actionbar_send_file"
+ android:icon="@android:drawable/ic_menu_set_as"
+ android:orderInCategory="1" />
+ <item
+ android:id="@+id/action_favorite_file"
+ android:title="@string/favorite"
+ android:icon="@android:drawable/ic_menu_set_as"
+ android:orderInCategory="1" />
+ <item
+ android:id="@+id/action_unfavorite_file"
+ android:title="@string/unfavorite"
+ android:icon="@android:drawable/ic_menu_set_as"
+ android:orderInCategory="1" />
+ <item
+ android:id="@+id/action_see_details"
+ android:title="@string/actionbar_see_details"
+ android:icon="@android:drawable/ic_menu_info_details"
+ android:orderInCategory="1" />
</menu>
<string name="common_ok">OK</string>
<string name="common_cancel">Kanseleer</string>
<string name="common_error">Fout</string>
+ <string name="activity_chooser_send_file_title">Stuur</string>
<string name="empty"></string>
<string name="folder_picker_choose_button_text">Kies</string>
</resources>
<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="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_search">البحث</string>
</resources>
<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="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 & Çıx</string>
<string name="common_error">Səhv</string>
<string name="downloader_download_file_not_found">Bu fayla serverdə artıq uzun müddətdir ki, çatmaq mümkün deyil</string>
<string name="prefs_category_accounts">Hesablar</string>
<string name="prefs_add_account">Hesab əlavə et</string>
- <string name="auth_redirect_non_secure_connection_title">Təhlükəsiz qoşulma, təhlükəsiz olmayan istiqamətə yönlədirilmişdir</string>
<string name="actionbar_logger">Jurnallar</string>
<string name="log_send_history_button">Tarixçəni göndər</string>
<string name="log_send_no_mail_app">Jurnalların ötürülməsi üçün proqram təminatı tapılmadı!</string>
<string name="move_file_invalid_overwrite">Fayl artıq mənsəb qovluğunda mövcuddur</string>
<string name="move_file_error">Fayl və ya qovluğun köçürülməsi müddətində səhv baş verdi</string>
<string name="forbidden_permissions_move">bu faylı köçürtmək</string>
+ <string name="copy_file_invalid_overwrite">Fayl artıq mənsəb qovluğunda mövcuddur</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_search">Axtarış</string>
</resources>
<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="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_invalid_overwrite">Файлът вече съществува в отдалечената папка.</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_search">Търсене</string>
</resources>
<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="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="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="saml_authentication_wrong_pass">ভুল কুটশব্দ</string>
<string name="actionbar_move">সরাও</string>
<string name="file_list_empty_moving">এখানে কিছু নেই। একটি ফোল্ডার যোগ করতে পারেন!</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_search">অনুসন্ধান</string>
</resources>
<string name="common_rename">পুনঃনামকরণ</string>
<string name="common_remove">সরান</string>
<string name="empty"></string>
+ <string name="share_search">অনুসন্ধান</string>
</resources>
<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>
<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_search">Potraži</string>
</resources>
<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="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 & Surt</string>
<string name="common_error">Error</string>
<string name="downloader_download_file_not_found">El fitxer ja no està disponible en el servidor</string>
<string name="prefs_category_accounts">Comptes</string>
<string name="prefs_add_account">Afegeix compte</string>
+ <string name="auth_redirect_non_secure_connection_title">La connexió segura està essent redirigida a través d\'una ruta insegura</string>
<string name="log_progress_dialog_text">Carregant dades...</string>
<string name="saml_authentication_required_text">Es requereix autenticació</string>
<string name="saml_authentication_wrong_pass">Contrasenya incorrecta</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_search">Cerca</string>
</resources>
<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_with_users">Sdílet s uživateli</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>
<string name="downloader_download_file_not_found">Tento soubor již není dostupný na serveru</string>
<string name="prefs_category_accounts">Účty</string>
<string name="prefs_add_account">Přidat účet</string>
- <string name="auth_redirect_non_secure_connection_title">Bezpečné spojení je přesměrováno na nezabezpečenou trasu.</string>
+ <string name="auth_redirect_non_secure_connection_title">Zabezpečené spojení je přesměrováváno nezabezpečenou trasou.</string>
<string name="actionbar_logger">Logy</string>
<string name="log_send_history_button">Odeslat historii</string>
<string name="log_send_no_mail_app">Nebyla nalezena žádná aplikace pro odesílání logů. Nainstalujte poštovní aplikaci!</string>
<string name="move_file_invalid_overwrite">Soubor již v cílovém adresáři existuje</string>
<string name="move_file_error">Při pokusu o přesun tohoto souboru či složky nastala chyba</string>
<string name="forbidden_permissions_move">pro přesun tohoto souboru</string>
+ <string name="copy_file_not_found">Nelze zkopírpovat. Zkontrolujte prosím že soubor existuje</string>
+ <string name="copy_file_invalid_into_descendent">Není možné adresář zkopírovat do jeho vlastního podadresáře</string>
+ <string name="copy_file_invalid_overwrite">Soubor již v cílové složce existuje</string>
+ <string name="copy_file_error">Při pokusu o zkopírování tohoto souboru či složky došlo k chybě</string>
+ <string name="forbidden_permissions_copy">pro zkopírování tohoto souboru</string>
<string name="prefs_category_instant_uploading">Okamžitá odesílání</string>
<string name="prefs_category_security">Zabezpečení</string>
<string name="prefs_instant_video_upload_path_title">Cesta pro nahrávání videí</string>
- <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>
<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_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>
<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 & 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_search">Chwilio</string>
</resources>
<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="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 & Afslut</string>
<string name="common_error">Fejl</string>
<string name="downloader_download_file_not_found">Filen er ikke længere tilgængelig på serveren</string>
<string name="prefs_category_accounts">Konti</string>
<string name="prefs_add_account">Tilføj konto</string>
- <string name="auth_redirect_non_secure_connection_title">Sikker forbindelse videredirigeres til en usikker rute.</string>
+ <string name="auth_redirect_non_secure_connection_title">Sikker forbindelse videredirigeres gennem en usikker rute.</string>
<string name="actionbar_logger">Logge</string>
<string name="log_send_history_button">Send historik</string>
<string name="log_send_no_mail_app">Der blev ikke fundet apps, der kan sende logge. Installér mail-app\'en!</string>
<string name="move_file_invalid_overwrite">Filen findes allerede i destinationsmappen</string>
<string name="move_file_error">Der opstod en fejl under forsøg på at flytte denne mappe eller fil</string>
<string name="forbidden_permissions_move">til at flytte denne fil</string>
+ <string name="copy_file_not_found">Kunne ikke kopiere. Tjek venligst om filerne findes</string>
+ <string name="copy_file_invalid_into_descendent">Det er ikke muligt at kopiere en mappe til én af dens undermapper</string>
+ <string name="copy_file_invalid_overwrite">Filen findes allerede i destinationsmappen</string>
+ <string name="copy_file_error">Der opstod en fejl under forsøg på at kopiere denne fil eller mappe</string>
+ <string name="forbidden_permissions_copy">til at kopiere denne fil</string>
<string name="prefs_category_instant_uploading">Øjeblikkelige uploads</string>
<string name="prefs_category_security">Sikkerhed</string>
<string name="prefs_instant_video_upload_path_title">Sti til videoupload</string>
- <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_search">Søg</string>
</resources>
<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="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 & Schließen</string>
<string name="common_error">Fehler</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_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="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">Abbrechen</string>
<string name="common_save_exit">Speichern & Schließen</string>
<string name="common_error">Fehler</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 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="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_search">Suche</string>
</resources>
<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_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="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">Abbrechen</string>
<string name="common_save_exit">Speichern & 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 & 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="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="downloader_download_file_not_found">Diese Datei steht auf dem Server nicht mehr zur Verfügung</string>
<string name="prefs_category_accounts">Konten</string>
<string name="prefs_add_account">Konto hinzufügen</string>
- <string name="auth_redirect_non_secure_connection_title">Die gesicherte Verbindung wird auf eine unsichere Route weitergeleitet.</string>
+ <string name="auth_redirect_non_secure_connection_title">Die gesicherte Verbindung wird durch eine ungesicherte Route geleitet.</string>
<string name="actionbar_logger">Protokolle</string>
<string name="log_send_history_button">Verlauf senden</string>
<string name="log_send_no_mail_app">Keine App zum Versenden der Meldungen gefunden. Bitte installiere die Mail-App!</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_search">Suche</string>
</resources>
<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_with_users">Διαμοιρασμός με χρήστες</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="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="share_link_empty_password">Πρέπει να εισάγετε ένα κωδικό πρόσβασης.</string>
<string name="activity_chooser_send_file_title">Αποστολή</string>
<string name="copy_link">Αντιγραφή συνδέσμου</string>
- <string name="clipboard_text_copied">Î\91νÏ\84ιγÏ\81αÏ\86θηκε στο πρόχειρο</string>
+ <string name="clipboard_text_copied">Î\91νÏ\84ιγÏ\81άÏ\86ηκε στο πρόχειρο</string>
<string name="error_cant_bind_to_operations_service">Κρίσιμο σφάλμα: αδύνατη η εκτέλεση λειτουργειών</string>
<string name="network_error_socket_exception">Ένα σφάλμα προέκυψε κατά τη σύνδεση με το διακομιστή.</string>
<string name="network_error_socket_timeout_exception">Ένα σφάλμα προέκυψε κατά την αναμονή για το διακομιστή, η λειτουργία δεν ήταν επιτυχής</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="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="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_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>
<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="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 & Exit</string>
<string name="common_error">Error</string>
<string name="downloader_download_file_not_found">The file is no longer available on the server</string>
<string name="prefs_category_accounts">Accounts</string>
<string name="prefs_add_account">Add account</string>
- <string name="auth_redirect_non_secure_connection_title">Secure connection is redirected to an unsecured route.</string>
+ <string name="auth_redirect_non_secure_connection_title">Secure connection is redirected through an unsecured route.</string>
<string name="actionbar_logger">Logs</string>
<string name="log_send_history_button">Send History</string>
<string name="log_send_no_mail_app">No app for sending logs found. Install mail app!</string>
<string name="move_file_invalid_overwrite">The file exists already in the destination folder</string>
<string name="move_file_error">An error occurred whilst trying to move this file or folder</string>
<string name="forbidden_permissions_move">to move this file</string>
+ <string name="copy_file_invalid_overwrite">The file exists already in the destination folder</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_search">Search</string>
</resources>
--- /dev/null
+<?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>
<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="actionbar_move">Movi</string>
<string name="folder_picker_choose_button_text">Elekti</string>
<string name="move_file_invalid_overwrite">La dosiero jam ekzistas en la cela dosierujo</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_search">Serĉi</string>
</resources>
<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="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="downloader_download_file_not_found">El archivo no esta mas disponible en este Servidor</string>
<string name="prefs_category_accounts">Cuentas</string>
<string name="prefs_add_account">Añadir cuenta</string>
- <string name="auth_redirect_non_secure_connection_title">Conexión segura redireccionada a una ruta insegura.</string>
<string name="actionbar_logger">Registro</string>
<string name="log_send_history_button">Enviar Historial</string>
<string name="log_send_no_mail_app">Aplicación para enviar registros no encontrada. Instale una aplicación de correo!</string>
<string name="move_file_invalid_overwrite">El archivo ya existe en la carpeta destino</string>
<string name="move_file_error">Un error ocurrió intentando mover el archivo o carpeta</string>
<string name="forbidden_permissions_move">para mover este archivo</string>
+ <string name="copy_file_invalid_overwrite">El archivo ya existe en la carpeta destino</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_search">Buscar</string>
</resources>
<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="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&Salir</string>
<string name="common_error">Error</string>
--- /dev/null
+<?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>
<!--<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="common_yes">Sí</string>
<string name="common_no">No</string>
<string name="common_ok">Aceptar</string>
- <string name="common_cancel_download">Cancelar descarga</string>
- <string name="common_cancel_upload">Cancelar subida</string>
<string name="common_cancel">Cancelar</string>
<string name="common_save_exit">Guardar & Salir</string>
<string name="common_error">Error</string>
<string name="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_search">Buscar</string>
</resources>
<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_with_users">Compartir con usuarios</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 & 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="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="downloader_download_file_not_found">Este archivo ya no se encuentra en el servidor</string>
<string name="prefs_category_accounts">Cuentas</string>
<string name="prefs_add_account">Agregar cuenta</string>
- <string name="auth_redirect_non_secure_connection_title">La conexión segura está siendo desviada por una ruta insegura.</string>
+ <string name="auth_redirect_non_secure_connection_title">La conexión segura está siendo redirigida por una ruta insegura.</string>
<string name="actionbar_logger">Registros</string>
<string name="log_send_history_button">Enviar historial</string>
<string name="log_send_no_mail_app">No se ha encontrado una app para enviar logs. Instale la app mail!</string>
<string name="move_file_invalid_overwrite">El archivo ya existe en la carpeta de destino</string>
<string name="move_file_error">Hubo un error al tratar de mover este archivo o carpeta</string>
<string name="forbidden_permissions_move">para mover este archivo</string>
+ <string name="copy_file_not_found">No se puede copiar. Revise si existe el archivo</string>
+ <string name="copy_file_invalid_into_descendent">No se puede copiar una carpeta dentro de una de sus subcarpetas.</string>
+ <string name="copy_file_invalid_overwrite">El fichero ya existe en el directorio de destino</string>
+ <string name="copy_file_error">Hubo un error al tratar de copiar este archivo o carpeta</string>
+ <string name="forbidden_permissions_copy">para copiar este archivo</string>
<string name="prefs_category_instant_uploading">Subidas instantáneas</string>
<string name="prefs_category_security">Seguridad</string>
<string name="prefs_instant_video_upload_path_title">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_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>
<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="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 & Välju</string>
<string name="common_error">Viga</string>
<string name="confirmation_remove_folder_alert">Kas sa tõesti soovid eemaldada %1$s ja selle sisu?</string>
<string name="confirmation_remove_local">Ainult kohalik</string>
<string name="confirmation_remove_folder_local">Ainult kohalik</string>
+ <string name="confirmation_remove_remote">Serverist</string>
+ <string name="confirmation_remove_remote_and_local">Kaugfail & kohalik</string>
<string name="remove_success_msg">Eemaldamine oli edukas</string>
<string name="remove_fail_msg">Eemaldamine ebaõnnestus</string>
<string name="rename_dialog_title">Sisesta uus nimi</string>
<string name="conflict_title">Failikonflikt</string>
<string name="conflict_message">Millist faili sa soovid säilitada? Kui valid mõlemad versioonid, siis lisatakse kohaliku faili nimele number.</string>
<string name="conflict_keep_both">Säilita mõlemad</string>
+ <string name="conflict_use_local_version">kohalik versioon</string>
+ <string name="conflict_use_server_version">serveri versioon</string>
<string name="preview_image_description">Pildi eelvaade</string>
<string name="preview_image_error_unknown_format">Seda pilti ei saa näidata</string>
<string name="error__upload__local_file_not_copied">%1$s ei suudetud kopeerida kohalikku kataloogi %2$s</string>
<string name="downloader_download_file_not_found">Fail ei ole serveris enam kättesaadav</string>
<string name="prefs_category_accounts">Kontod</string>
<string name="prefs_add_account">Lisa konto</string>
- <string name="auth_redirect_non_secure_connection_title">Turvaline ühendus suunatakse läbi turvamata ühenduse.</string>
+ <string name="auth_redirect_non_secure_connection_title">Turvalist ühendust suunatakse läbi turvamata ühenduse.</string>
<string name="actionbar_logger">Logid</string>
<string name="log_send_history_button">Saada ajalugu</string>
<string name="log_send_no_mail_app">Logide saatmise rakendust ei leitud. Paigalda postirakendus!</string>
<string name="move_file_invalid_overwrite">See fail on juba sihtkaustas olemas</string>
<string name="move_file_error">Selle faili või kausta liigutamisel tekkis tõrge</string>
<string name="forbidden_permissions_move">selle faili liigutamiseks</string>
+ <string name="copy_file_not_found">Kopeerimine ebaõnnestus. Palun kontrolli, kas fail on olemas</string>
+ <string name="copy_file_invalid_into_descendent">Kausta ei saa kopeerida tema enda alamkausta</string>
+ <string name="copy_file_invalid_overwrite">See fail on juba sihtkaustas olemas</string>
+ <string name="copy_file_error">Selle faili või kausta kopeerimisel tekkis tõrge</string>
+ <string name="forbidden_permissions_copy">et kopeerida seda faili</string>
<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>
<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_search">Otsi</string>
</resources>
<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="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>
<string name="downloader_download_file_not_found">Fitxategia jadanik ez dago eskuragarri zerbitzarian</string>
<string name="prefs_category_accounts">Kontuak</string>
<string name="prefs_add_account">Gehitu kontua</string>
- <string name="auth_redirect_non_secure_connection_title">Konexio segurua birbideratu da segurua ez den bide batera.</string>
+ <string name="auth_redirect_non_secure_connection_title">Konexio segurua birbideratu da segurua ez den bide batetik.</string>
<string name="actionbar_logger">Egunkariak</string>
<string name="log_send_history_button">Bidali Historia</string>
<string name="log_send_no_mail_app">Egunkariak bidaltzeko aplikaziorik ez da aurkitu. Instalatu posta aplikazioa!</string>
<string name="move_file_invalid_overwrite">Fitxategia dagoeneko existitzen da helburuko karpetan</string>
<string name="move_file_error">Errore bat gertatu da fitxategi edo karpeta hau mugitzen saiatzerakoan</string>
<string name="forbidden_permissions_move">fitxategi hau mugitzeko</string>
+ <string name="copy_file_invalid_overwrite">Fitxategia dagoeneko existitzen da helburuko karpetan</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_search">Bilatu</string>
</resources>
<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>
<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="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="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">کاراکترهای ممنوع: / \\ < > : \" | ? *</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_search">جستوجو</string>
</resources>
<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_with_users">Jaa käyttäjien kanssa</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="move_file_not_found">Siirto ei onnistu. Tarkista, ettei tiedostoa ole jo olemassa</string>
<string name="move_file_invalid_overwrite">Tiedosto on jo olemassa kohdekansiossa</string>
<string name="move_file_error">Tämän tiedoston tai kansion siirtoa yrittäessä tapahtui virhe</string>
+ <string name="copy_file_not_found">Kopiointi epäonnistui. Tarkista onko tiedostoa olemassa</string>
+ <string name="copy_file_invalid_overwrite">Tiedosto on jo kohdekansiossa.</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 tai ryhmien kanssa</string>
+ <string name="share_add_user_or_group">Lisää käyttäjä tai ryhmä</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>
<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_with_users">Partager avec des utilisateurs</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 & Quitter</string>
<string name="common_error">Erreur</string>
<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>
<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>
<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-papiers</string>
- <string name="error_cant_bind_to_operations_service">Erreur critique : impossible de réaliser des opérations</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 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>
<string name="network_host_not_available">L\'opération n\'a pas pu être terminée, le serveur n\'est pas disponible</string>
<string name="empty"></string>
- <string name="forbidden_permissions">Vous ne possédez pas les droits suffisants %s</string>
- <string name="forbidden_permissions_rename">afin de renommer ce fichier</string>
- <string name="forbidden_permissions_delete">afin d’effacer ce fichier</string>
+ <string name="forbidden_permissions">Vous n\'avez pas la permission %s</string>
+ <string name="forbidden_permissions_rename">de renommer ce fichier</string>
+ <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="forbidden_permissions_create">afin de créer ce fichier</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>
<string name="prefs_category_accounts">Comptes</string>
<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>
<string name="move_file_invalid_overwrite">Le fichier existe déjà dans le dossier de destination</string>
<string name="move_file_error">Une erreur est survenue lors de la tentative de déplacement de ce fichier ou dossier</string>
<string name="forbidden_permissions_move">de déplacer ce fichier</string>
+ <string name="copy_file_not_found">Impossible de copier. Vérifiez que le fichier existe</string>
+ <string name="copy_file_invalid_into_descendent">Il n\'est pas possible de copier un dossier vers un de ses descendants</string>
+ <string name="copy_file_invalid_overwrite">Fichier déjà existant dans le dossier de destination</string>
+ <string name="copy_file_error">Une erreur est survenue lors de la copie de ce fichier ou dossier</string>
+ <string name="forbidden_permissions_copy">de copier ce fichier</string>
<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>
<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_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>
<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>
<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_with_users">Compartir con usuarios</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>
<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>
<string name="downloader_download_file_not_found">O ficheiro xa non está dispoñíbel no servidor</string>
<string name="prefs_category_accounts">Contas</string>
<string name="prefs_add_account">Engadir unha conta</string>
- <string name="auth_redirect_non_secure_connection_title">A conexión segura está a ser redirixida a unha ruta non segura.</string>
+ <string name="auth_redirect_non_secure_connection_title">A conexión segura está a ser redirixida a través dunha ruta non segura.</string>
<string name="actionbar_logger">Rexistros</string>
<string name="log_send_history_button">Enviar o historial</string>
<string name="log_send_no_mail_app">Non se atopou unha aplicación para enviar os rexistros. Instale unha aplicación de correo!</string>
<string name="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>
<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_with_user_section_title">Compartir con Usuarios e Grupos</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_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>
<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="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="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="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_search">חיפוש</string>
</resources>
<?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>
<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>
<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_search">pretraži</string>
</resources>
<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>
<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>
<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="list_layout">Lista Elrendezés</string>
<string name="action_share_file">Megosztás hivatkozással</string>
<string name="action_unshare_file">Megosztás visszavonása</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 & 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: / \\ < > : \" | ? *</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_search">Keresés</string>
</resources>
<?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>-->
<!--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_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_file">Կիսվել հղմամբ</string>
+ <string name="common_yes">Այո</string>
+ <string name="common_no">Ոչ</string>
+ <string name="common_cancel">Չեղարկել</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="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>
</resources>
<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>
<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_search">Cercar</string>
</resources>
<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>
<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="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 & 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="downloader_download_file_not_found">Berkas tidak lagi tersedia pada server</string>
<string name="prefs_category_accounts">Akun</string>
<string name="prefs_add_account">Tambah akun</string>
- <string name="auth_redirect_non_secure_connection_title">Sambungan aman dialihkan ke rute yang tidak aman.</string>
+ <string name="auth_redirect_non_secure_connection_title">Sambungan aman dialihkan melalui rute yang tidak aman.</string>
<string name="actionbar_logger">Log</string>
<string name="log_send_history_button">Kirim Riwayat</string>
<string name="log_send_no_mail_app">Tidak ada apl untuk mengirim log. Instal apl mail!</string>
<string name="move_file_invalid_overwrite">Berkas sudah ada didalam folder tujuan</string>
<string name="move_file_error">Terjadi kesalahan saat mencoba memindahkan berkas atau folder ini</string>
<string name="forbidden_permissions_move">untuk memindahkan berkas ini</string>
+ <string name="copy_file_not_found">Tidak dapat menyalin. Silakan periksa apakah berkas ada</string>
+ <string name="copy_file_invalid_into_descendent">Tidak mungkin menyalin folder kedalam turunannya</string>
+ <string name="copy_file_invalid_overwrite">Berkas sudah ada didalam folder tujuan</string>
+ <string name="copy_file_error">Terjadi kesalahan ketika mencoba menyalin berkas atau folder ini</string>
+ <string name="forbidden_permissions_copy">untuk menyalin berkas ini</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_with_user_section_title">Bagikan dengan Pengguna dan Grup</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_search">Cari</string>
</resources>
<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>
<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_search">Leita</string>
</resources>
<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_with_users">Condividi con utenti</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="downloader_download_file_not_found">Il file non è più disponibile sul server</string>
<string name="prefs_category_accounts">Account</string>
<string name="prefs_add_account">Aggiungi account</string>
- <string name="auth_redirect_non_secure_connection_title">La connessione sicura è rediretta su un percorso non sicuro.</string>
+ <string name="auth_redirect_non_secure_connection_title">La connessione sicura è rediretta attraverso un percorso non sicuro.</string>
<string name="actionbar_logger">Registri</string>
<string name="log_send_history_button">Invia cronologia</string>
<string name="log_send_no_mail_app">Non è stata trovata alcuna applicazione per l\'invio dei registri. Installa l\'applicazione mail!</string>
<string name="move_file_invalid_overwrite">Il file esiste già nella cartella di destinazione</string>
<string name="move_file_error">Si è verificato un errore durante il tentativo di spostare il file o la cartella</string>
<string name="forbidden_permissions_move">per spostare questo file</string>
+ <string name="copy_file_not_found">Impossibile copiare. Assicurati che il file esista</string>
+ <string name="copy_file_invalid_into_descendent">Impossibile copiare una cartella in una cartella inferiore</string>
+ <string name="copy_file_invalid_overwrite">Il file esiste già nella cartella di destinazione</string>
+ <string name="copy_file_error">Si è verificato un errore durante il tentativo di copiare il file o la cartella</string>
+ <string name="forbidden_permissions_copy">per copiare questo file</string>
<string name="prefs_category_instant_uploading">Caricamenti istantanei</string>
<string name="prefs_category_security">Protezione</string>
<string name="prefs_instant_video_upload_path_title">Percorso di caricamento video</string>
- <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_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>
<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="list_layout">リストレイアウト</string>
<string name="action_share_file">URLで共有</string>
<string name="action_unshare_file">未共有のリンク</string>
+ <string name="action_share_with_users">ユーザーと共有</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="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="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="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_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>
<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_search">ძებნა</string>
</resources>
<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">រក្សាទុក & ចាកចេញ</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_search">ស្វែងរក</string>
</resources>
<string name="common_yes">ಹೌದು</string>
<string name="common_no">ಇಲ್ಲ</string>
<string name="common_ok">ಸರಿ</string>
- <string name="common_cancel_upload">ವರ್ಗಾವಣೆ ರದ್ದು ಮಾಡಿ</string>
<string name="common_cancel">ರದ್ದು</string>
<string name="common_error">ತಪ್ಪಾಗಿದೆ</string>
<string name="common_error_unknown">ಗೊತ್ತಿಲ್ಲದ ದೋಷ</string>
<string name="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_search">ಹುಡುಕು</string>
</resources>
<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="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="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_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_search">검색</string>
</resources>
<string name="empty"></string>
<string name="prefs_category_accounts">هەژمارەکان</string>
<string name="auth_host_address">ناونیشانی ڕاژه</string>
+ <string name="share_search">بگەڕێ</string>
</resources>
<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="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="downloader_download_file_not_found">De Fichier ass net méi um Server disponibel</string>
<string name="prefs_category_accounts">Konten</string>
<string name="prefs_add_account">Kont dobäisetzen</string>
- <string name="auth_redirect_non_secure_connection_title">Sécher Connectioun gëtt op eng onsécher Route ëmgeleet.</string>
<string name="actionbar_logger">Protokoller</string>
<string name="log_send_history_button">Historique schécken</string>
<string name="log_send_no_mail_app">Keng App fonnt fir d\'Protokoller ze schécken. Installéier eng Mail-App!</string>
<string name="move_file_invalid_overwrite">De Fichier existéiert schonn am Zildossier</string>
<string name="move_file_error">Beim Réckele vun dësem Fichier oder Dossier ass e Feeler opgetrueden</string>
<string name="forbidden_permissions_move">fir dëse Fichier ze réckelen</string>
+ <string name="copy_file_invalid_overwrite">De Fichier existéiert schonn am Zildossier</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_search">Sichen</string>
</resources>
<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>
<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>
<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>
<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="list_layout">Sąrašo išdėstymas</string>
<string name="action_share_file">Dalintis nuoroda</string>
<string name="action_unshare_file">Nebesidalinti nuoroda</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="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 & 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: / \\ < > : \" | ? *</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_signature_algorithm">Algoritmas:</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="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="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_search">Ieškoti</string>
</resources>
<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>
<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>
<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_file">Dalīt saiti</string>
+ <string name="action_unshare_file">Pārtraukt dalīt saiti</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_search">Meklēt</string>
</resources>
<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="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="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_invalid_overwrite">Датотеката веќе постои во целната папка</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_search">Барај</string>
</resources>
<string name="common_remove">Устгах</string>
<string name="empty"></string>
<string name="prefs_category_security">Аюулгүй байдал</string>
+ <string name="share_dialog_title">Түгээлт</string>
</resources>
<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 & Keluar</string>
<string name="common_error">Ralat</string>
<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>
<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="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="confirmation_remove_folder_alert">Vil du virkelig fjerne %1$s inkludert innholdet?</string>
<string name="confirmation_remove_local">Kun lokalt</string>
<string name="confirmation_remove_folder_local">Kun lokalt</string>
+ <string name="confirmation_remove_remote">Fra server</string>
+ <string name="confirmation_remove_remote_and_local">Ekstern & lokal</string>
<string name="remove_success_msg">Fjerning var vellykket</string>
<string name="remove_fail_msg">Fjerning mislyktes</string>
<string name="rename_dialog_title">Skriv inn et nytt navn</string>
<string name="instant_upload_on_wifi">Kun last opp bilder via WiFi</string>
<string name="instant_video_upload_on_wifi">Last opp video kun via WiFi</string>
<string name="instant_upload_path">/Direkteopplasting</string>
+ <string name="conflict_title">Filkonflikt</string>
+ <string name="conflict_message">Hvilke filer ønsker du å beholder? Hvis du velger begge versjonene, får den lokale filen lagt til et tall i navnet.</string>
<string name="conflict_keep_both">Behold begge</string>
+ <string name="conflict_use_local_version">lokal versjon</string>
+ <string name="conflict_use_server_version">server-versjon</string>
<string name="preview_image_description">Bildeforhåndsvisning</string>
<string name="preview_image_error_unknown_format">Dette bildet kan ikke vises</string>
<string name="error__upload__local_file_not_copied">%1$s kunne ikke kopieres til lokal mappe %2$s</string>
<string name="downloader_download_file_not_found">Filen finnes ikke på serveren lenger</string>
<string name="prefs_category_accounts">Kontoer</string>
<string name="prefs_add_account">Legg til en konto</string>
- <string name="auth_redirect_non_secure_connection_title">Sikker forbindelse er omdirigert til en usikker rute.</string>
+ <string name="auth_redirect_non_secure_connection_title">Sikker tilkobling videresendes gjennom en usikker rute.</string>
<string name="actionbar_logger">Logger</string>
<string name="log_send_history_button">Send historikk</string>
<string name="log_send_no_mail_app">Ingen app for sending av logger funnet. Installer epost-app!</string>
<string name="move_file_invalid_overwrite">Filen finnes allerede i målmappen</string>
<string name="move_file_error">En feil oppstod ved flytting av denne filen eller mappen</string>
<string name="forbidden_permissions_move">å flytte denne filen</string>
+ <string name="copy_file_not_found">Kan ikke kopiere. Sjekk om filen eksisterer</string>
+ <string name="copy_file_invalid_into_descendent">Det er ikke mulig å kopiere en mappe inn i sin egen undermappe</string>
+ <string name="copy_file_invalid_overwrite">Filen finnes allerede i målmappen</string>
+ <string name="copy_file_error">En feil oppstod ved kopiering av denne filen eller mappen</string>
+ <string name="forbidden_permissions_copy">å kopiere denne filen</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="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_with_user_section_title">Del med brukere og grupper</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_search">Søk</string>
</resources>
<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>
<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_with_users">Delen met gebruiker</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 & Afsluiten</string>
<string name="common_error">Fout</string>
<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>
<string name="downloader_download_file_not_found">Dit bestand is niet langer beschikbaar op de server</string>
<string name="prefs_category_accounts">Accounts</string>
<string name="prefs_add_account">Toevoegen account</string>
- <string name="auth_redirect_non_secure_connection_title">De beveiligde verbinding is omgeleid naar een onveilige route.</string>
+ <string name="auth_redirect_non_secure_connection_title">De beveiligde verbinding is omgeleid via een onveilige route.</string>
<string name="actionbar_logger">Logs</string>
<string name="log_send_history_button">Verstuur geschiedenis</string>
<string name="log_send_no_mail_app">Geen app voor versturen van logs gevonden. Installeer de mail app!</string>
<string name="log_progress_dialog_text">Laden data...</string>
<string name="saml_authentication_required_text">Authenticatie vereist</string>
<string name="saml_authentication_wrong_pass">Onjuist wachtwoord</string>
- <string name="actionbar_move">verplaatsen</string>
+ <string name="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>
<string name="move_file_invalid_overwrite">Het bestand bestaat al in de doelmap</string>
<string name="move_file_error">Er trad een fout op bij uw poging dit bestand of deze map te verplaatsen</string>
<string name="forbidden_permissions_move">om dit bestand te verplaatsen</string>
+ <string name="copy_file_not_found">Kan niet kopiëren. Ga na of het bestand wel bestaat</string>
+ <string name="copy_file_invalid_into_descendent">De map kan niet naar een onderliggende map worden gekopieerd</string>
+ <string name="copy_file_invalid_overwrite">Het bestand bestaat al in de doelmap</string>
+ <string name="copy_file_error">Er trad een fout op bij uw poging dit bestand of deze map te kopiëren</string>
+ <string name="forbidden_permissions_copy">om dit bestand te kopiëren</string>
<string name="prefs_category_instant_uploading">Directe uploads</string>
<string name="prefs_category_security">Beveiliging</string>
<string name="prefs_instant_video_upload_path_title">Upload Video Pad</string>
- <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>
<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_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>
<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 & 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_search">Søk</string>
</resources>
<?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_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_file">Partejar lo ligam</string>
+ <string name="action_unshare_file">Partejar pas mai aqueste ligam</string>
+ <string name="action_share_with_users">Partejar amb d\'Utilizaires</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 & 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 & 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 : / \\ < > : \" | ? *</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="folder_picker_choose_button_text">Causís</string>
+ <string name="actionbar_move">Desplaçar</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_with_user_section_title">Partejar amb d\'utilizaires e de gropes</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_search">Recercar</string>
+ <string name="search_users_and_groups_hint">Recercar d\'utilizaires e de gropes</string>
</resources>
<string name="filedetails_created">ਬਣਾਈ:</string>
<string name="filedetails_modified">ਸੋਧ ਕੀਤੀ:</string>
<string name="filedetails_download">ਡਾਊਨਲੋਡ</string>
- <string name="filedetails_sync_file">ਫਾਇਲ ਤਾਜ਼ਾ ਕਰੋ</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>
<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">Wszystkie pliki</string>
<!--TODO re-enable when "On Device" is available
<string name="drawer_item_on_device">On device</string>-->
+ <string name="drawer_item_settings">Ustawienia</string>
+ <string name="drawer_item_logs">Logi</string>
+ <string name="drawer_close">Zamknij</string>
<string name="drawer_open">Otwórz</string>
<string name="prefs_category_general">Ogólne</string>
<string name="prefs_category_more">Więcej</string>
<string name="uploader_info_uploading">Wysyłanie</string>
<string name="file_list_seconds_ago">sekund temu</string>
<string name="file_list_empty">Pusto. Wyślij coś!</string>
+ <string name="file_list_loading">Wczytywanie...</string>
<string name="local_file_list_empty">Nie ma plików w tym folderze.</string>
<string name="filedetails_select_file">Dotknij plik aby wyświetlić dodatkowe informacje</string>
<string name="filedetails_size">Rozmiar:</string>
<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="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="confirmation_remove_folder_alert">Czy naprawdę chcesz usunąć %1$s i jego zawartość?</string>
<string name="confirmation_remove_local">Tylko lokalnie</string>
<string name="confirmation_remove_folder_local">Tylko lokalnie</string>
+ <string name="confirmation_remove_remote">Z serwera</string>
<string name="remove_success_msg">Usunięto</string>
<string name="remove_fail_msg">Nie można usunąć</string>
<string name="rename_dialog_title">Wprowadź nową nazwę</string>
<string name="instant_upload_on_wifi">Wysyłaj zdjęcia tylko przez WiFi</string>
<string name="instant_video_upload_on_wifi">Aktualizuj filmy tylko przez WiFi</string>
<string name="instant_upload_path">/InstantUpload</string>
+ <string name="conflict_title">Konflikt pliku</string>
<string name="conflict_keep_both">Zatrzymaj oba</string>
+ <string name="conflict_use_local_version">lokalna wersja</string>
+ <string name="conflict_use_server_version">wersja zdalna</string>
<string name="preview_image_description">Podgląd</string>
<string name="preview_image_error_unknown_format">Ten obrazek nie może zostać wyświetlony</string>
<string name="error__upload__local_file_not_copied">%1$s nie może zostać skopiowany do lokalnego folderu %2$s</string>
<string name="move_file_invalid_overwrite">Plik istnieje już w folderze docelowym</string>
<string name="move_file_error">Pojawił się błąd podczas próby przeniesienia tego pliku lub folderu</string>
<string name="forbidden_permissions_move">aby przenieść ten plik</string>
+ <string name="copy_file_invalid_overwrite">Plik istnieje już w folderze docelowym</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="username">Użytkownik</string>
+ <string name="file_list__footer__folder">1 folder</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_search">Wyszukaj</string>
</resources>
<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_with_users">Compartilhado com usuários</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 & 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_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="copy_link">Copiar o link</string>
+ <string name="copy_link">Copiar link</string>
<string name="clipboard_text_copied">Copiado para área de transferência</string>
<string name="error_cant_bind_to_operations_service">Erro crítico: não pode executar operações</string>
<string name="network_error_socket_exception">Ocorreu um erro durante a conexão com o servidor.</string>
<string name="downloader_download_file_not_found">Este arquivo não mais está disponível neste servidor</string>
<string name="prefs_category_accounts">Contas</string>
<string name="prefs_add_account">Adicionar uma conta</string>
- <string name="auth_redirect_non_secure_connection_title">Conexão segura esta redirecionada para uma rota não segura.</string>
+ <string name="auth_redirect_non_secure_connection_title">A conexão segura está redirecionada através de uma rota insegura.</string>
<string name="actionbar_logger">Logs</string>
<string name="log_send_history_button">Enviar Histórico</string>
<string name="log_send_no_mail_app">Não foi encontrado nenhum app para envio de logs. Instale o mail app!</string>
<string name="move_file_invalid_overwrite">O arquivo já existe na pasta de destino</string>
<string name="move_file_error">Ocorreu um erro ao tentar mover este arquivo ou pasta</string>
<string name="forbidden_permissions_move">mover este arquivo</string>
+ <string name="copy_file_not_found">Não é possível copiar. Por favor verifique se o arquivo existe</string>
+ <string name="copy_file_invalid_into_descendent">Não é possível copiar uma pasta em uma descendente</string>
+ <string name="copy_file_invalid_overwrite">O arquivo já existe na pasta de destino</string>
+ <string name="copy_file_error">Ocorreu um erro ao tentar copiar este arquivo ou pasta</string>
+ <string name="forbidden_permissions_copy">para copiar este arquivo</string>
<string name="prefs_category_instant_uploading">Envios Instantâneos</string>
<string name="prefs_category_security">Segurança</string>
<string name="prefs_instant_video_upload_path_title">Enviar o Caminho do Vídeo</string>
- <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_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>
<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="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 & Sair</string>
<string name="common_error">Erro</string>
<string name="confirmation_remove_folder_alert">Deseja realmente remover %1$s e o seu conteúdo?</string>
<string name="confirmation_remove_local">Apenas localmente</string>
<string name="confirmation_remove_folder_local">Apenas localmente</string>
+ <string name="confirmation_remove_remote">Do servidor</string>
+ <string name="confirmation_remove_remote_and_local">Remoto & local</string>
<string name="remove_success_msg">Removido com sucesso</string>
<string name="remove_fail_msg">Não foi possível remover</string>
<string name="rename_dialog_title">Introduza um novo nome</string>
<string name="conflict_title">Conflito de ficheiro</string>
<string name="conflict_message">Quais os ficheiros que pretende manter? Se selecionar ambas as versões, o ficheiro local irá ter um número adicionado ao seu nome.</string>
<string name="conflict_keep_both">Manter ambos</string>
+ <string name="conflict_use_local_version">versão local</string>
+ <string name="conflict_use_server_version">versão servidor</string>
<string name="preview_image_description">Pré-Visualizar imagem</string>
<string name="preview_image_error_unknown_format">Esta imagem não pode ser mostrada</string>
<string name="error__upload__local_file_not_copied">Não foi possível copiar %1$s para a pasta local %2$s</string>
<string name="downloader_download_file_not_found">O ficheiro não está mais disponível no servidor</string>
<string name="prefs_category_accounts">Contas</string>
<string name="prefs_add_account">Adicionar conta</string>
- <string name="auth_redirect_non_secure_connection_title">Ligação segura é redireccionada para um caminho inseguro.</string>
+ <string name="auth_redirect_non_secure_connection_title">Uma ligação segura foi redireccionada por uma rota insegura.</string>
<string name="actionbar_logger">Registos de Alterações</string>
<string name="log_send_history_button">Enviar Histórico</string>
<string name="log_send_no_mail_app">Não foi encontrado o aplicativo para envio de registos . Instale app e-mail!</string>
<string name="move_file_invalid_overwrite">O ficheiro já existe na pasta de destino</string>
<string name="move_file_error">Ocorreu um ocorreu quando tentava mover este ficheiro ou pasta</string>
<string name="forbidden_permissions_move">para mover este ficheiro</string>
+ <string name="copy_file_not_found">Não é possível copiar. Por favor, verifique se o ficheiro existe</string>
+ <string name="copy_file_invalid_into_descendent">Não é possível copiar esta pasta para a descendente</string>
+ <string name="copy_file_invalid_overwrite">O ficheiro já existe na pasta de destino</string>
+ <string name="copy_file_error">Ocorreu um ocorreu quando tentava copiar este ficheiro ou pasta</string>
+ <string name="forbidden_permissions_copy">para copiar este ficheiro</string>
<string name="prefs_category_instant_uploading">Envios Instantâneos</string>
<string name="prefs_category_security">Segurança</string>
<string name="prefs_instant_video_upload_path_title">Envio do Caminho do Vídeo</string>
- <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_with_user_section_title">Partilhar com Utilizadores e Grupos</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_search">Procurar</string>
</resources>
--- /dev/null
+<?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>
<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="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="unshare_link_file_error">A apărut o eroare în timp ce încerca să departajeze sau unshare acest fișier sau folder</string>
<string name="share_link_password_title">Introduceţi parola</string>
<string name="share_link_empty_password">Trebuie să introduci o parolă</string>
- <string name="activity_chooser_send_file_title">Expediază</string>
+ <string name="activity_chooser_send_file_title">Trimite</string>
<string name="copy_link">Link copiat</string>
<string name="clipboard_text_copied">Copiat în clipboard</string>
<string name="error_cant_bind_to_operations_service">Eroare critică: nu se pot executa operațiunile</string>
<string name="downloader_download_file_not_found">Fișierul nu mai este disponibil pe server</string>
<string name="prefs_category_accounts">Conturi</string>
<string name="prefs_add_account">Adaugă cont</string>
- <string name="auth_redirect_non_secure_connection_title">Conexiunea securizată este redirecționată către un traseu neasigurat.</string>
<string name="actionbar_logger">Înregistrări</string>
<string name="log_send_history_button">Trimite Istoria</string>
<string name="log_send_no_mail_app">App-ul de trimitere a inregistrărilor nu a fost găsit. Instalează mail app-ul!</string>
<string name="move_file_invalid_overwrite">Fișierul există deja în dosarul de destinație</string>
<string name="move_file_error">O eroare apare la transferarea acestui fișier sau dosar</string>
<string name="forbidden_permissions_move">pentru a muta acest fișier</string>
+ <string name="copy_file_invalid_overwrite">Fișierul există deja în dosarul de destinație</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="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_search">Căutare</string>
</resources>
<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="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="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">Ð\97аÑ\89иÑ\89Ñ\91нное Ñ\81оединение пеÑ\80енапÑ\80авлено по небезопаÑ\81номÑ\83 маÑ\80Ñ\88Ñ\80Ñ\83Ñ\82Ñ\83</string>
+ <string name="auth_redirect_non_secure_connection_title">Ð\91езопаÑ\81ное Ñ\81оединение пеÑ\80енапÑ\80авлено Ñ\87еÑ\80ез небезопаÑ\81нÑ\8bй маÑ\80Ñ\88Ñ\80Ñ\83Ñ\82.</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="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_search">Найти</string>
</resources>
<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>
<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_search">සොයන්න</string>
</resources>
<string name="prefs_category_more">Viac</string>
<string name="prefs_accounts">Účty</string>
<string name="prefs_manage_accounts">Správa účtov</string>
+ <string name="prefs_passcode">Heslo</string>
<string name="prefs_instant_upload">Okamžité nahratie obrázka</string>
<string name="prefs_instant_upload_summary">Okamžite nahrať obrázok zaznamenaný fotoaparátom</string>
<string name="prefs_instant_video_upload">Okamžité nahranie videa</string>
<string name="uploader_info_uploading">Nahrávanie</string>
<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_with_users">Zdieľať s používateľmi</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="upload_query_move_foreign_files">Nie je dostatok miesta na skopírovanie vybraných súborov do priečinka %1$s. Želáte si ich namiesto toho presunúť?</string>
<string name="pass_code_enter_pass_code">Prosím, vložte svoje heslo:</string>
<string name="pass_code_configure_your_pass_code">Vložte svoje heslo</string>
+ <string name="pass_code_configure_your_pass_code_explanation">Heslo bude nutné zadať vždy po štarte aplikácie</string>
<string name="pass_code_reenter_your_pass_code">Prosím, vložte znovu svoje heslo:</string>
<string name="pass_code_remove_your_pass_code">Zmazať svoje heslo</string>
+ <string name="pass_code_mismatch">Heslá sa nezhodujú</string>
+ <string name="pass_code_wrong">Nesprávne heslo</string>
<string name="pass_code_removed">Bezpečnostný kód odstránený</string>
<string name="pass_code_stored">Bezpečnostný kód uložený</string>
<string name="media_notif_ticker">Prehrávač hudby %1$s</string>
<string name="confirmation_remove_folder_alert">Naozaj chcete odstrániť %1$s a jeho obsah?</string>
<string name="confirmation_remove_local">Iba lokálne</string>
<string name="confirmation_remove_folder_local">Iba lokálne</string>
+ <string name="confirmation_remove_remote">Zo servera</string>
+ <string name="confirmation_remove_remote_and_local">Vzdialene aj lokálne</string>
<string name="remove_success_msg">Úspešne odstránené</string>
<string name="remove_fail_msg">Odstránenie zlyhalo</string>
<string name="rename_dialog_title">Zadajte nové meno</string>
<string name="sync_file_nothing_to_do_msg">Obsah súboru je zosynchronizovaný</string>
<string name="create_dir_fail_msg">Priečinok nie je možné vytvoriť</string>
<string name="filename_forbidden_characters">Zakázané znaky: / \\ < > : \" | ? *</string>
+ <string name="filename_forbidden_charaters_from_server">Názov súboru obsahuje nevhodný znak</string>
<string name="filename_empty">Názov súboru nemôže byť prázdny</string>
<string name="wait_a_moment">Počkať chvíľu</string>
<string name="filedisplay_unexpected_bad_get_content">Neočakávaný problém; skúste vybrať súbor inou aplikáciou</string>
<string name="filedisplay_no_file_selected">Nebol vybraný súbor</string>
<string name="activity_chooser_title">Odošli link do ...</string>
+ <string name="wait_for_tmp_copy_from_private_storage">Kopírovanie súboru z privátneho úložiska</string>
<string name="oauth_check_onoff">Prihlásiť sa z oAuth2</string>
<string name="oauth_login_connection">Pripájam sa na oAuth2 server…</string>
<string name="ssl_validator_header">Identitu stránky nemožno overiť</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="instant_upload_on_wifi">Odoslať fotografie iba cez WiFi</string>
<string name="instant_video_upload_on_wifi">Nahrávať videá len cez WiFi</string>
<string name="instant_upload_path">/InstantUpload</string>
+ <string name="conflict_title">Konflikt súborov</string>
+ <string name="conflict_message">Ktoré súbory si prajate ponachať? Pokiaľ to budú obe verzie, lokálnej pribudne k názvu číslo.</string>
<string name="conflict_keep_both">Ponechať oba</string>
+ <string name="conflict_use_local_version">lokálnu verziu</string>
+ <string name="conflict_use_server_version">serverovú verziu</string>
<string name="preview_image_description">Ukážka obrazu</string>
<string name="preview_image_error_unknown_format">Obrázok nemožno zobraziť</string>
<string name="error__upload__local_file_not_copied">%1$s nemožno skopírovať do lokálneho priečinka %2$s</string>
<string name="downloader_download_file_not_found">Súbor už na serveri nie je dostupný</string>
<string name="prefs_category_accounts">Účty</string>
<string name="prefs_add_account">Pridať účet</string>
- <string name="auth_redirect_non_secure_connection_title">Zabezpečené pripojenie je presmerované na nezabezpečenú trasu.</string>
+ <string name="auth_redirect_non_secure_connection_title">Zabezpečené spojenie je presmerované nezabezpečenou cestou.</string>
<string name="actionbar_logger">Logy</string>
<string name="log_send_history_button">Odoslať históriu</string>
<string name="log_send_no_mail_app">Nebola nájdená aplikácia pre odosielanie log protokolov. Nainštalujte si mailovú aplikáciu!</string>
<string name="move_file_invalid_overwrite">Súbor už v cieľovom priečinku existuje</string>
<string name="move_file_error">Pri pokuse o presun tohoto súboru alebo priečinka nastala chyba</string>
<string name="forbidden_permissions_move">pre presun tohoto súboru</string>
+ <string name="copy_file_not_found">Nemožno kopírovať. Overte či súbor ešte existuje</string>
+ <string name="copy_file_invalid_into_descendent">Nemožno kopírovať priečinok do jeho podpriečinka</string>
+ <string name="copy_file_invalid_overwrite">Súbor už v cieľovom priečinku existuje</string>
+ <string name="copy_file_error">Počas kopírovania súboru alebo zložky sa vyskytla chyba</string>
+ <string name="forbidden_permissions_copy">kopírovať súbor</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="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="username">Používateľské meno</string>
+ <string name="file_list__footer__folder">1 priečinok</string>
+ <string name="file_list__footer__folders">%1$d prieč.</string>
+ <string name="file_list__footer__file">1 súbor</string>
+ <string name="file_list__footer__file_and_folder">1 súbor, 1 priečinok</string>
+ <string name="file_list__footer__file_and_folders">1 súbor, %1$d prieč.</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_with_user_section_title">Zdieľať s používateľmi alebo skupinami</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_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>
<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_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="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">Prekliči</string>
<string name="common_save_exit">Shrani in končaj</string>
<string name="common_error">Napaka</string>
<string name="confirmation_remove_folder_alert">Ali res želite odstraniti %1$s skupaj s celotno vsebino?</string>
<string name="confirmation_remove_local">Le krajevno</string>
<string name="confirmation_remove_folder_local">Le krajevno</string>
+ <string name="confirmation_remove_remote">S strežnika</string>
+ <string name="confirmation_remove_remote_and_local">Oddaljeno & krajevno</string>
<string name="remove_success_msg">Odstranitev je uspešno končana</string>
<string name="remove_fail_msg">Odstranjevanje je spodletelo</string>
<string name="rename_dialog_title">Vnesite novo ime</string>
<string name="instant_upload_on_wifi">Pošiljaj slike le preko povezav Wi-Fi</string>
<string name="instant_video_upload_on_wifi">Pošlji posnetke le preko povezave Wi-Fi</string>
<string name="instant_upload_path">/Poslano</string>
+ <string name="conflict_title">Neskladje datotek</string>
+ <string name="conflict_message">Katere datoteke želite ohraniti? Če izberete obe različici, bo krajevni datoteki dodatna k imenu še številka.</string>
<string name="conflict_keep_both">Ohrani obe</string>
+ <string name="conflict_use_local_version">krajevna različica</string>
+ <string name="conflict_use_server_version">različica strežnika</string>
<string name="preview_image_description">Predogled slike</string>
<string name="preview_image_error_unknown_format">Te slike ni mogoče prikazati</string>
<string name="error__upload__local_file_not_copied">Datoteke %1$s ni mogoče kopirati v krajevno mapo %2$s</string>
<string name="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_invalid_overwrite">Datoteka v ciljni mapi že obstaja.</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="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="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_search">Poišči</string>
</resources>
<?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_file">Ndajeni lidhjen me të tjerët</string>
+ <string name="action_unshare_file">Zhbëjeni ndarjen e lidhjes me të tjerët</string>
+ <string name="action_share_with_users">Ndajeni me përdoruesit</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 & 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 & 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: / \\ < > : \" | ? *</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="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="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">Ndani 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_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>
<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>
<string name="empty"></string>
<string name="prefs_category_accounts">Nalozi</string>
<string name="folder_picker_choose_button_text">Izaberi</string>
+ <string name="share_search">Traži</string>
</resources>
<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="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="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_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_search">Тражи</string>
</resources>
<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_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="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">Avbryt</string>
<string name="common_save_exit">Spara & Avsluta</string>
<string name="common_error">Fel</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">Säker anslutning är omdirigerad till en osäker väg.</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_invalid_overwrite">Filen existerar redan i destinationsmappen</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="subject_user_shared_with_you">%1$s delade \"%2$s\" med dig</string>
<string name="auth_host_address">Serveradress</string>
+ <string name="share_dialog_title">Dela</string>
+ <string name="share_search">Sök</string>
</resources>
<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_search">தேடுதல்</string>
</resources>
<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_with_users">แชร์กับผู้ใช้</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">à¸\88าà¸\81à¹\80à¸\8bิรà¹\8cà¸\9fà¹\80วà¸à¸£à¹\8c</string>
<string name="confirmation_remove_remote_and_local">รีโมท & ต้นทาง</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="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">à¸\81ารà¹\80à¸\8aืà¹\88à¸à¸¡à¸\95à¹\88à¸à¸\97ีà¹\88à¸\9bลà¸à¸\94ภัยà¸\96ูà¸\81à¹\80à¸\9bลีà¹\88ยà¸\99à¹\80สà¹\89à¸\99à¸\97าà¸\87à¹\84à¸\9bยัà¸\87à¹\80สà¹\89à¸\99à¸\97าà¸\87ที่ไม่ปลอดภัย</string>
+ <string name="auth_redirect_non_secure_connection_title">à¹\80à¸\8aืà¹\88à¸à¸¡à¸\95à¹\88à¸à¸\97ีà¹\88à¸\9bลà¸à¸\94ภัยà¸\96ูà¸\81à¹\80à¸\9bลีà¹\88ยà¸\99à¹\80สà¹\89à¸\99à¸\97าà¸\87à¸\9cà¹\88าà¸\99à¹\80ราà¹\80à¸\95à¸à¸£à¹\8cที่ไม่ปลอดภัย</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="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_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>
<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_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="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">İ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="confirmation_remove_folder_alert">Gerçekten %1$s ve içeriğini kaldırmak istediğinizden emin misiniz?</string>
<string name="confirmation_remove_local">Sadece yerel</string>
<string name="confirmation_remove_folder_local">Sadece yerel</string>
+ <string name="confirmation_remove_remote">Sunucudan</string>
+ <string name="confirmation_remove_remote_and_local">Uzak ve yerel</string>
<string name="remove_success_msg">Kaldırma başarılı</string>
<string name="remove_fail_msg">Kaldırma başarısız</string>
<string name="rename_dialog_title">Yeni bir isim girin</string>
<string name="instant_upload_on_wifi">Fotoğrafları sadece kablosuzda (WiFi) yükle</string>
<string name="instant_video_upload_on_wifi">Videoları sadece kablosuzda (WiFi) yükle</string>
<string name="instant_upload_path">/AnındaYükle</string>
+ <string name="conflict_title">Dosya çakışması</string>
+ <string name="conflict_message">Hangi dosyaları saklamak istiyorsunuz? Her ikisini de saklamayı seçerseniz yerel dosyanın adına bir sayı eklenecek.</string>
<string name="conflict_keep_both">İkisini de koru</string>
+ <string name="conflict_use_local_version">yerel sürüm</string>
+ <string name="conflict_use_server_version">sunucu sürümü</string>
<string name="preview_image_description">Resim önizleme</string>
<string name="preview_image_error_unknown_format">Bu resim gösterilemiyor</string>
<string name="error__upload__local_file_not_copied">%1$s, %2$s yerel klasörüne kopyalanamadı</string>
<string name="downloader_download_file_not_found">Bu dosya artık sunucuda mevcut değil</string>
<string name="prefs_category_accounts">Hesaplar</string>
<string name="prefs_add_account">Hesap ekle</string>
- <string name="auth_redirect_non_secure_connection_title">Güvenli bağlantı, güvenli olmayan bir rotaya yönlendirildi.</string>
+ <string name="auth_redirect_non_secure_connection_title">Güvenli bağlantı, güvenli olmayan bir rotaya yönlendiriliyor.</string>
<string name="actionbar_logger">Günlükler</string>
<string name="log_send_history_button">Geçmişi Gönder</string>
<string name="log_send_no_mail_app">Kayıtları göndermek için uygulama bulunamadı. E-posta uygulamasını yükleyin!</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="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="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_search">Ara</string>
</resources>
<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>
<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>
<?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>
<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>
<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="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">Зберегти & Вихід</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">Видалити & локальний</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_search">Пошук</string>
</resources>
<string name="activity_chooser_send_file_title">بھجیں</string>
<string name="empty"></string>
<string name="folder_picker_choose_button_text">منتخب کریں</string>
+ <string name="share_search">تلاش</string>
</resources>
<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
<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="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 & 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_search">Tìm kiếm</string>
</resources>
<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="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="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="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">未找到可以发送日志的程序。请安装 mail!</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_search">搜索</string>
</resources>
<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="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="activity_chooser_send_file_title">傳送</string>
+ <string name="activity_chooser_send_file_title">發送</string>
<string name="copy_link">複製連結</string>
<string name="empty"></string>
<string name="prefs_category_accounts">帳號</string>
<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_search">尋找</string>
</resources>
<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="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="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_invalid_overwrite">這個檔案已經存在於目的目錄中</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_with_user_section_title">與用戶或群組分享</string>
+ <string name="share_no_users">目前沒有任何您分享的內容</string>
+ <string name="share_add_user_or_group">新增使用者或是群組</string>
+ <string name="share_search">搜尋</string>
</resources>
-->
<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>
<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…</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_with_users">Share with users</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 & Exit</string>
<string name="common_error">Error</string>
<string name="sync_fail_ticker_unauthorized">Synchronization failed, you need to relogin</string>
<string name="sync_fail_content">Synchronization of %1$s could not be completed</string>
<string name="sync_fail_content_unauthorized">Invalid password for %1$s</string>
- <string name="sync_conflicts_in_favourites_ticker">Conflicts found</string>
- <string name="sync_conflicts_in_favourites_content">%1$d kept-in-sync files could not be sync\'ed</string>
+ <string name="sync_conflicts_in_favourites_ticker">Conflicts found</string>
+ <string name="sync_conflicts_in_favourites_content">%1$d kept-in-sync files could not be sync\'ed</string>
<string name="sync_fail_in_favourites_ticker">Kept-in-sync files failed</string>
<string name="sync_fail_in_favourites_content">Contents of %1$d files could not be sync\'ed (%2$d conflicts)</string>
<string name="sync_foreign_files_forgotten_ticker">Some local files were forgotten</string>
<string name="sync_foreign_files_forgotten_content">%1$d files out of the %2$s folder could not be copied into</string>
<string name="sync_foreign_files_forgotten_explanation">As of version 1.3.16, files uploaded from this device are copied into the local %1$s folder to prevent data loss when a single file is synced with multiple accounts.\n\nDue to this change, all files uploaded in previous versions of this app were copied into the %2$s folder. However, an error prevented the completion of this operation during account synchronization. You may either leave the file(s) as is and remove the link to %3$s, or move the file(s) into the %1$s folder and retain the link to %4$s.\n\nListed below are the local file(s), and the remote file(s) in %5$s they were linked to.</string>
- <string name="sync_current_folder_was_removed">Folder %1$s does not exist anymore</string>
+ <string name="sync_current_folder_was_removed">Folder %1$s does not exist anymore</string>
<string name="foreign_files_move">"Move all"</string>
<string name="foreign_files_success">"All files were moved"</string>
<string name="foreign_files_fail">"Some files could not be moved"</string>
<string name="media_state_loading">"%1$s (loading)"</string>
<string name="media_event_done">"%1$s playback finished"</string>
<string name="media_err_nothing_to_play">No media file found</string>
- <string name="media_err_no_account">No account provided</string>
- <string name="media_err_not_in_owncloud">File not in a valid account</string>
- <string name="media_err_unsupported">Unsupported media codec</string>
- <string name="media_err_io">Media file could not be read</string>
- <string name="media_err_malformed">Media file not correctly encoded</string>
- <string name="media_err_timeout">Timed out while trying to play</string>
- <string name="media_err_invalid_progressive_playback">Media file cannot be streamed</string>
- <string name="media_err_unknown">Media file cannot be played with the stock media player</string>
- <string name="media_err_security_ex">Security error trying to play %1$s</string>
- <string name="media_err_io_ex">Input error trying to play %1$s</string>
- <string name="media_err_unexpected">Unexpected error trying to play %1$s</string>
- <string name="media_rewind_description">Rewind button</string>
- <string name="media_play_pause_description">Play or pause button</string>
- <string name="media_forward_description">Fast forward button</string>
+ <string name="media_err_no_account">No account provided</string>
+ <string name="media_err_not_in_owncloud">File not in a valid account</string>
+ <string name="media_err_unsupported">Unsupported media codec</string>
+ <string name="media_err_io">Media file could not be read</string>
+ <string name="media_err_malformed">Media file not correctly encoded</string>
+ <string name="media_err_timeout">Timed out while trying to play</string>
+ <string name="media_err_invalid_progressive_playback">Media file cannot be streamed</string>
+ <string name="media_err_unknown">Media file cannot be played with the stock media player</string>
+ <string name="media_err_security_ex">Security error trying to play %1$s</string>
+ <string name="media_err_io_ex">Input error trying to play %1$s</string>
+ <string name="media_err_unexpected">Unexpected error trying to play %1$s</string>
+ <string name="media_rewind_description">Rewind button</string>
+ <string name="media_play_pause_description">Play or pause button</string>
+ <string name="media_forward_description">Fast forward button</string>
<string name="auth_getting_authorization">Getting authorization…</string>
<string name="auth_trying_to_login">Trying to login…</string>
<string name="ssl_validator_label_L">Location:</string>
<string name="ssl_validator_label_validity">Validity:</string>
<string name="ssl_validator_label_validity_from">From:</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="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="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="placeholder_sentence">This is a placeholder</string>
<string name="placeholder_filename">placeholder.txt</string>
<string name="placeholder_filetype">PNG Image</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">Upload pictures via WiFi only</string>
<string name="instant_video_upload_on_wifi">Upload videos via WiFi only</string>
<string name="instant_upload_path">/InstantUpload</string>
<string name="preview_image_description">Image preview</string>
<string name="preview_image_error_unknown_format">This image cannot be shown</string>
-
+
<string name="error__upload__local_file_not_copied">%1$s could not be copied to %2$s local folder</string>
<string name="prefs_instant_upload_path_title">Upload Path</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="activity_chooser_send_file_title">Send</string>
+ <string name="activity_chooser_send_file_title">Send</string>
+
+ <string name="copy_link">Copy link</string>
+ <string name="clipboard_text_copied">Copied to clipboard</string>
- <string name="copy_link">Copy link</string>
- <string name="clipboard_text_copied">Copied to clipboard</string>
+ <string name="error_cant_bind_to_operations_service">Critical error: cannot perform operations</string>
- <string name="error_cant_bind_to_operations_service">Critical error: cannot perform operations</string>
-
- <string name="network_error_socket_exception">An error occurred while connecting with the server.</string>
- <string name="network_error_socket_timeout_exception">An error occurred while waiting for the server, the operation couldn\'t have been done</string>
- <string name="network_error_connect_timeout_exception">An error occurred while waiting for the server, the operation couldn\'t have been done</string>
- <string name="network_host_not_available">The operation couldn\'t be completed, server is unavailable</string>
+ <string name="network_error_socket_exception">An error occurred while connecting with the server.</string>
+ <string name="network_error_socket_timeout_exception">An error occurred while waiting for the server, the operation couldn\'t have been done</string>
+ <string name="network_error_connect_timeout_exception">An error occurred while waiting for the server, the operation couldn\'t have been done</string>
+ <string name="network_host_not_available">The operation couldn\'t be completed, server is unavailable</string>
+ <string name="empty" />
- <string name="empty" />
-
- <string name="forbidden_permissions">You do not have permission %s</string>
- <string name="forbidden_permissions_rename">to rename this file</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="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="forbidden_permissions">You do not have permission %s</string>
+ <string name="forbidden_permissions_rename">to rename this file</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="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_accounts">Accounts</string>
- <string name="prefs_add_account">Add account</string>
- <string name="auth_redirect_non_secure_connection_title">Secure connection is redirected to an unsecured route.</string>
+ <string name="prefs_category_accounts">Accounts</string>
+ <string name="prefs_add_account">Add account</string>
+ <string name="auth_redirect_non_secure_connection_title">Secure connection is redirected through an unsecured route.</string>
<string name="actionbar_logger">Logs</string>
<string name="log_send_history_button">Send History</string>
<string name="file_list_empty_moving">Nothing in here. You can add a folder!</string>
<string name="folder_picker_choose_button_text">Choose</string>
- <string name="move_file_not_found">Unable to move. Please check whether the file exists</string>
- <string name="move_file_invalid_into_descendent">It is not possible to move a folder into a descendant</string>
- <string name="move_file_invalid_overwrite">The file exists already in the destination folder</string>
- <string name="move_file_error">An error occurred while trying to move this file or folder</string>
- <string name="forbidden_permissions_move">to move this file</string>
+ <string name="move_file_not_found">Unable to move. Please check whether the file exists</string>
+ <string name="move_file_invalid_into_descendent">It is not possible to move a folder into a descendant</string>
+ <string name="move_file_invalid_overwrite">The file exists already in the destination folder</string>
+ <string name="move_file_error">An error occurred while trying to move this file or folder</string>
+ <string name="forbidden_permissions_move">to move this file</string>
- <string name="prefs_category_instant_uploading">Instant Uploads</string>
+
+ <string name="copy_file_not_found">Unable to copy. Please check whether the file exists</string>
+ <string name="copy_file_invalid_into_descendent">It is not possible to copy a folder into a descendant</string>
+ <string name="copy_file_invalid_overwrite">The file exists already in the destination folder</string>
+ <string name="copy_file_error">An error occurred while trying to copy this file or folder</string>
+ <string name="forbidden_permissions_copy">to copy this file</string>
+
+ <string name="prefs_category_instant_uploading">Instant Uploads</string>
<string name="prefs_category_security">Security</string>
<string name="prefs_instant_video_upload_path_title">Upload Video Path</string>
- <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_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>
<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
--- /dev/null
+<?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
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
public void onAuthenticatorTaskCallback(RemoteOperationResult result) {\r
mWaitingForOpId = Long.MAX_VALUE;\r
dismissDialog(WAIT_DIALOG_TAG);\r
+ mAsyncTask = null;\r
\r
if (result.isSuccess()) {\r
Log_OC.d(TAG, "Successful access - time to save the account");\r
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;
import android.accounts.Account;
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.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
public class FileDataStorageManager {
public static final int ROOT_PARENT_ID = 0;
private static String TAG = FileDataStorageManager.class.getSimpleName();
-
+
public FileDataStorageManager(Account account, ContentResolver cr) {
mContentProviderClient = null;
mContentResolver = cr;
mAccount = account;
}
-
+
public void setAccount(Account account) {
mAccount = account;
}
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;
}
-
+
public OCFile getFileByPath(String path) {
Cursor c = getCursorForValue(ProviderTableMeta.FILE_PATH, path);
return fileExists(ProviderTableMeta.FILE_PATH, path);
}
-
+
public Vector<OCFile> getFolderContent(OCFile f/*, boolean onlyOnDevice*/) {
if (f != null && f.isFolder() && f.getFileId() != -1) {
// TODO Enable when "On Device" is recovered ?
return new Vector<OCFile>();
}
}
-
-
+
+
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()) {
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_PARENT, file.getParentId());
cv.put(ProviderTableMeta.FILE_PATH, file.getRemotePath());
if (!file.isFolder())
cv.put(ProviderTableMeta.FILE_STORAGE_PATH, file.getStoragePath());
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
+ 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());
if (getContentResolver() != null) {
getContentResolver().update(ProviderTableMeta.CONTENT_URI, cv,
ProviderTableMeta._ID + "=?",
- new String[] { String.valueOf(file.getFileId()) });
+ new String[]{String.valueOf(file.getFileId())});
} else {
try {
getContentProviderClient().update(ProviderTableMeta.CONTENT_URI,
cv, ProviderTableMeta._ID + "=?",
- new String[] { String.valueOf(file.getFileId()) });
+ new String[]{String.valueOf(file.getFileId())});
} catch (RemoteException e) {
Log_OC.e(TAG,
"Fail to insert insert file to database "
long new_id = Long.parseLong(result_uri.getPathSegments()
.get(1));
file.setFileId(new_id);
- }
+ }
}
-// if (file.isFolder()) {
-// updateFolderSize(file.getFileId());
-// } else {
-// updateFolderSize(file.getParentId());
-// }
-
return overriden;
}
/**
* Inserts or updates the list of files contained in a given folder.
- *
+ * <p/>
* CALLER IS THE RESPONSIBLE FOR GRANTING RIGHT UPDATE OF INFORMATION, NOT THIS METHOD.
* HERE ONLY DATA CONSISTENCY SHOULD BE GRANTED
- *
+ *
* @param folder
* @param updatedFiles
* @param filesToRemove
*/
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
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());
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())) {
// updating an existing file
operations.add(ContentProviderOperation.newUpdate(ProviderTableMeta.CONTENT_URI).
withValues(cv).
- withSelection( ProviderTableMeta._ID + "=?",
- new String[] { String.valueOf(file.getFileId()) })
- .build());
+ withSelection(ProviderTableMeta._ID + "=?",
+ new String[]{String.valueOf(file.getFileId())})
+ .build());
} else {
// adding a new file
withValues(cv).build());
}
}
-
+
// prepare operations to remove files in the given folder
- String where = ProviderTableMeta.FILE_ACCOUNT_OWNER + "=?" + " AND " +
+ String where = ProviderTableMeta.FILE_ACCOUNT_OWNER + "=?" + " AND " +
ProviderTableMeta.FILE_PATH + "=?";
String [] whereArgs = null;
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);
ProviderTableMeta.CONTENT_URI_FILE, file.getFileId()
)
).withSelection(where, whereArgs).build());
-
+
if (file.isDown()) {
String path = file.getStoragePath();
new File(path).delete();
}
}
}
-
+
// update metadata of folder
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);
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());
-
+
operations.add(ContentProviderOperation.newUpdate(ProviderTableMeta.CONTENT_URI).
withValues(cv).
- withSelection( ProviderTableMeta._ID + "=?",
- new String[] { String.valueOf(folder.getFileId()) })
- .build());
+ withSelection(ProviderTableMeta._ID + "=?",
+ new String[]{String.valueOf(folder.getFileId())})
+ .build());
// apply operations in batch
ContentProviderResult[] results = null;
long newId;
Iterator<OCFile> filesIt = updatedFiles.iterator();
OCFile file = null;
- for (int i=0; i<results.length; i++) {
+ for (int i = 0; i < results.length; i++) {
if (filesIt.hasNext()) {
file = filesIt.next();
} else {
}
}
}
-
- //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) {
if (file.isFolder()) {
success = removeFolder(file, removeDBData, removeLocalCopy);
-
+
} else {
if (removeDBData) {
- Uri file_uri = ContentUris.withAppendedId(
- ProviderTableMeta.CONTENT_URI_FILE,
- file.getFileId()
- );
- String where = ProviderTableMeta.FILE_ACCOUNT_OWNER + "=?" + " AND " +
+ //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()};
+ String[] whereArgs = new String[]{mAccount.name, file.getRemotePath()};
int deleted = 0;
if (getContentProviderClient() != null) {
try {
} else {
deleted = getContentResolver().delete(file_uri, where, whereArgs);
}
- success &= (deleted > 0);
+ success &= (deleted > 0);
}
String localPath = file.getStoragePath();
if (removeLocalCopy && file.isDown() && localPath != null && success) {
// maybe unnecessary, but should be checked TODO remove if unnecessary
file.setStoragePath(null);
saveFile(file);
+ saveConflict(file, null);
}
}
}
}
return success;
}
-
+
public boolean removeFolder(OCFile folder, boolean removeDBData, boolean removeLocalContent) {
boolean success = true;
if (folder != null && folder.isFolder()) {
- if (removeDBData && folder.getFileId() != -1) {
+ if (removeDBData && folder.getFileId() != -1) {
success = removeFolderInDb(folder);
}
if (removeLocalContent && success) {
}
private boolean removeFolderInDb(OCFile folder) {
- Uri folder_uri = Uri.withAppendedPath(ProviderTableMeta.CONTENT_URI_DIR, "" +
+ 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;
e.printStackTrace();
}
} else {
- deleted = getContentResolver().delete(folder_uri, where, whereArgs);
+ deleted = getContentResolver().delete(folder_uri, where, whereArgs);
}
return deleted > 0;
}
return success;
}
-
+
/**
* Updates database and file system for a file or folder that was moved to a different location.
- *
+ *
* TODO explore better (faster) implementations
* TODO throw exceptions up !
*/
public void moveLocalFile(OCFile file, String targetPath, String targetParentPath) {
if (file != null && file.fileExists() && !OCFile.ROOT_PATH.equals(file.getFileName())) {
-
+
OCFile targetParent = getFileByPath(targetParentPath);
if (targetParent == null) {
- 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
Cursor c = null;
if (getContentProviderClient() != null) {
try {
c = getContentProviderClient().query(
- ProviderTableMeta.CONTENT_URI,
- null,
- ProviderTableMeta.FILE_ACCOUNT_OWNER + "=? AND " +
- ProviderTableMeta.FILE_PATH + " LIKE ? ",
- new String[] {
- mAccount.name,
- file.getRemotePath() + "%"
- },
- ProviderTableMeta.FILE_PATH + " ASC "
+ ProviderTableMeta.CONTENT_URI,
+ null,
+ ProviderTableMeta.FILE_ACCOUNT_OWNER + "=? AND " +
+ ProviderTableMeta.FILE_PATH + " LIKE ? ",
+ new String[]{
+ mAccount.name,
+ file.getRemotePath() + "%"
+ },
+ ProviderTableMeta.FILE_PATH + " ASC "
);
} catch (RemoteException e) {
Log_OC.e(TAG, e.getMessage());
}
-
+
} else {
c = getContentResolver().query(
- ProviderTableMeta.CONTENT_URI,
- null,
- ProviderTableMeta.FILE_ACCOUNT_OWNER + "=? AND " +
- ProviderTableMeta.FILE_PATH + " LIKE ? ",
- new String[] {
- mAccount.name,
- file.getRemotePath() + "%"
- },
- ProviderTableMeta.FILE_PATH + " ASC "
+ ProviderTableMeta.CONTENT_URI,
+ null,
+ ProviderTableMeta.FILE_ACCOUNT_OWNER + "=? AND " +
+ ProviderTableMeta.FILE_PATH + " LIKE ? ",
+ new String[]{
+ mAccount.name,
+ file.getRemotePath() + "%"
+ },
+ ProviderTableMeta.FILE_PATH + " ASC "
);
}
/// 2. prepare a batch of update operations to change all the descendants
- ArrayList<ContentProviderOperation> operations =
+ ArrayList<ContentProviderOperation> operations =
new ArrayList<ContentProviderOperation>(c.getCount());
String defaultSavePath = FileStorageUtils.getSavePath(mAccount.name);
List<String> originalPathsToTriggerMediaScan = new ArrayList<String>();
ContentValues cv = new ContentValues(); // keep construction in the loop
OCFile child = createFileInstance(c);
cv.put(
- ProviderTableMeta.FILE_PATH,
- targetPath + child.getRemotePath().substring(lengthOfOldPath)
+ ProviderTableMeta.FILE_PATH,
+ targetPath + child.getRemotePath().substring(lengthOfOldPath)
);
- if (child.getStoragePath() != null &&
+ if (child.getStoragePath() != null &&
child.getStoragePath().startsWith(defaultSavePath)) {
// update link to downloaded content - but local move is not done here!
- String targetLocalPath = defaultSavePath + targetPath +
+ 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(
ProviderTableMeta.FILE_PARENT,
targetParent.getFileId()
- );
+ );
}
operations.add(
- ContentProviderOperation.newUpdate(ProviderTableMeta.CONTENT_URI).
- withValues(cv).
- withSelection(
- ProviderTableMeta._ID + "=?",
- new String[] { String.valueOf(child.getFileId()) }
+ ContentProviderOperation.newUpdate(ProviderTableMeta.CONTENT_URI).
+ withValues(cv).
+ withSelection(
+ ProviderTableMeta._ID + "=?",
+ new String[]{String.valueOf(child.getFileId())}
)
- .build());
-
+ .build());
+
} while (c.moveToNext());
}
c.close();
}
} 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
}
}
}
-
+
+ }
+
+ public void copyLocalFile(OCFile file, String targetPath) {
+
+ if (file != null && file.fileExists() && !OCFile.ROOT_PATH.equals(file.getFileName())) {
+ String localPath = FileStorageUtils.getDefaultSavePathFor(mAccount.name, file);
+ File localFile = new File(localPath);
+ boolean copied = false;
+ String defaultSavePath = FileStorageUtils.getSavePath(mAccount.name);
+ if (localFile.exists()) {
+ File targetFile = new File(defaultSavePath + targetPath);
+ File targetFolder = targetFile.getParentFile();
+ if (!targetFolder.exists()) {
+ targetFolder.mkdirs();
+ }
+ copied = copyFile(localFile, targetFile);
+ }
+ Log_OC.d(TAG, "Local file COPIED : " + copied);
+ }
+ }
+
+ private boolean copyFile(File src, File target) {
+ boolean ret = true;
+
+ InputStream in = null;
+ OutputStream out = null;
+
+ try {
+ in = new FileInputStream(src);
+ out = new FileOutputStream(target);
+ byte[] buf = new byte[1024];
+ int len;
+ while ((len = in.read(buf)) > 0) {
+ out.write(buf, 0, len);
+ }
+ } catch (IOException ex) {
+ ret = false;
+ } finally {
+ if (in != null) try {
+ in.close();
+ } catch (IOException e) {
+ e.printStackTrace(System.err);
+ }
+ if (out != null) try {
+ out.close();
+ } catch (IOException e) {
+ e.printStackTrace(System.err);
+ }
+ }
+
+ return ret;
}
-
-
+
+
private Vector<OCFile> getFolderContent(long parentId/*, boolean onlyOnDevice*/) {
Vector<OCFile> ret = new Vector<OCFile>();
if (getContentProviderClient() != null) {
try {
- c = getContentProviderClient().query(req_uri, null,
- ProviderTableMeta.FILE_PARENT + "=?" ,
- new String[] { String.valueOf(parentId)}, null);
+ c = getContentProviderClient().query(req_uri, null,
+ ProviderTableMeta.FILE_PARENT + "=?",
+ new String[]{String.valueOf(parentId)}, null);
} catch (RemoteException e) {
Log_OC.e(TAG, e.getMessage());
return ret;
}
} else {
- c = getContentResolver().query(req_uri, null,
- ProviderTableMeta.FILE_PARENT + "=?" ,
- new String[] { String.valueOf(parentId)}, null);
+ c = getContentResolver().query(req_uri, null,
+ ProviderTableMeta.FILE_PARENT + "=?",
+ new String[]{String.valueOf(parentId)}, null);
}
if (c.moveToFirst()) {
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());
}
return ret;
}
-
-
+
+
private OCFile createRootDir() {
OCFile file = new OCFile(OCFile.ROOT_PATH);
file.setMimetype("DIR");
cmp_key + "=? AND "
+ ProviderTableMeta.FILE_ACCOUNT_OWNER
+ "=?",
- new String[] { value, mAccount.name }, null);
+ new String[]{value, mAccount.name}, null);
} else {
try {
c = getContentProviderClient().query(
null,
cmp_key + "=? AND "
+ ProviderTableMeta.FILE_ACCOUNT_OWNER + "=?",
- new String[] { value, mAccount.name }, null);
+ new String[]{value, mAccount.name}, null);
} catch (RemoteException e) {
Log_OC.e(TAG,
"Couldn't determine file existance, assuming non existance: "
key + "=? AND "
+ ProviderTableMeta.FILE_ACCOUNT_OWNER
+ "=?",
- new String[] { value, mAccount.name }, null);
+ new String[]{value, mAccount.name}, null);
} else {
try {
c = getContentProviderClient().query(
ProviderTableMeta.CONTENT_URI,
null,
key + "=? AND " + ProviderTableMeta.FILE_ACCOUNT_OWNER
- + "=?", new String[] { value, mAccount.name },
+ + "=?", new String[]{value, mAccount.name},
null);
} catch (RemoteException e) {
Log_OC.e(TAG, "Could not get file details: " + e.getMessage());
}
return c;
}
-
+
private OCFile createFileInstance(Cursor c) {
OCFile file = null;
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)));
c.getColumnIndex(ProviderTableMeta.FILE_UPDATE_THUMBNAIL)) == 1 ? true : false);
file.setDownloading(c.getInt(
c.getColumnIndex(ProviderTableMeta.FILE_IS_DOWNLOADING)) == 1 ? true : false);
-
+ file.setEtagInConflict(c.getString(c.getColumnIndex(ProviderTableMeta.FILE_ETAG_IN_CONFLICT)));
+
}
return file;
}
-
- /**
- * 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();
- }
-
-
+
// Methods for Shares
public boolean saveShare(OCShare share) {
boolean overriden = false;
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_ACCOUNT_OWNER, mAccount.name);
-
- if (shareExists(share.getIdRemoteShared())) { // for renamed files
+ if (shareExists(share.getIdRemoteShared())) {// 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.getIdRemoteShared())});
} 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.getIdRemoteShared())});
} catch (RemoteException e) {
Log_OC.e(TAG,
"Fail to insert insert file to database "
long new_id = Long.parseLong(result_uri.getPathSegments()
.get(1));
share.setId(new_id);
- }
+ }
}
return overriden;
}
- public OCShare getFirstShareByPathAndType(String path, ShareType type) {
+ public OCShare getFirstShareByPathAndType(String path, ShareType type, String shareWith) {
Cursor c = null;
+
+ String selection = ProviderTableMeta.OCSHARES_PATH + "=? AND "
+ + ProviderTableMeta.OCSHARES_SHARE_TYPE + "=? AND "
+ + ProviderTableMeta.OCSHARES_SHARE_WITH + "=? AND "
+ + ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + "=?" ;
+
+ String [] selectionArgs = new String[]{path, Integer.toString(type.getValue()),
+ shareWith, mAccount.name};
+
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) {
c.close();
return share;
}
-
+
private OCShare createShareInstance(Cursor c) {
OCShare share = null;
if (c != null) {
.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
share.setSharedWithDisplayName(c.getString(c
.getColumnIndex(ProviderTableMeta.OCSHARES_SHARE_WITH_DISPLAY_NAME)));
share.setIsFolder(c.getInt(
- c.getColumnIndex(ProviderTableMeta.OCSHARES_IS_DIRECTORY)) == 1 ? true : false);
+ 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;
}
cmp_key + "=? AND "
+ ProviderTableMeta.OCSHARES_ACCOUNT_OWNER
+ "=?",
- new String[] { value, mAccount.name }, null);
+ new String[]{value, mAccount.name}, null);
} else {
try {
c = getContentProviderClient().query(
null,
cmp_key + "=? AND "
+ ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + "=?",
- new String[] { value, mAccount.name }, null);
+ new String[]{value, mAccount.name}, null);
} catch (RemoteException e) {
Log_OC.e(TAG,
"Couldn't determine file existance, assuming non existance: "
c.close();
return retval;
}
-
+
private boolean shareExists(long remoteId) {
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};
-
+ String[] whereArgs = new String[]{mAccount.name};
+
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 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 " +
+ 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
- );
-
+ 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);
} catch (RemoteException e) {
- Log_OC.e(TAG, "Exception in cleanSharedFilesInFolder " + e.getMessage());
+ Log_OC.e(TAG, "Exception in resetShareFlagsInFolder " + e.getMessage());
}
}
}
private void cleanShares() {
String where = ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + "=?";
- String [] whereArgs = new String[]{mAccount.name};
-
+ String[] whereArgs = new String[]{mAccount.name};
+
if (getContentResolver() != null) {
getContentResolver().delete(ProviderTableMeta.CONTENT_URI_SHARE, where, whereArgs);
} 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());
}
}
}
-
+
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
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());
// 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.getIdRemoteShared())})
+ .build());
} else {
// adding a new file
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() +
+ 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);
}
-
+
} 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 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
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());
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()
);
}
}
-
+
// apply operations in batch
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);
}
-
+
} 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 removeShare(OCShare share){
+
+ }
+
+ 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()};
+ String where = ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + "=?" + " AND " +
+ ProviderTableMeta._ID + "=?";
+ String [] whereArgs = new String[]{mAccount.name, Long.toString(share.getId())};
if (getContentProviderClient() != null) {
try {
getContentProviderClient().delete(share_uri, where, whereArgs);
e.printStackTrace();
}
} else {
- getContentResolver().delete(share_uri, where, whereArgs);
+ getContentResolver().delete(share_uri, where, whereArgs);
}
}
-
+
public void saveSharesDB(ArrayList<OCShare> shares) {
- saveShares(shares);
-
- 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 and publicLink
- OCFile file = getFileByPath(path);
- if (file != null) {
- if (share.getShareType().equals(ShareType.PUBLIC_LINK)) {
- file.setShareByLink(true);
- sharedFiles.add(file);
+ ArrayList<ContentProviderOperation> operations = new ArrayList<ContentProviderOperation>();
+
+ // 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);
+
+ } 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 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) {
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_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(
OCFile folder, ArrayList<ContentProviderOperation> preparedOperations) {
if (folder != null) {
- String where = ProviderTableMeta.OCSHARES_PATH + "=?" + " AND "
+ String where = ProviderTableMeta.OCSHARES_PATH + "=?" + " AND "
+ ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + "=?";
String [] whereArgs = new String[]{ "", mAccount.name };
// 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) {
}
+ 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 where =
+ 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 = getContentResolver().query(
+ ProviderTableMeta.CONTENT_URI_FILE,
+ new String[]{ProviderTableMeta._ID},
+ where,
+ new String[]{mAccount.name, parentPath + "%"},
+ null
+ );
+ 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);
+ }
+ 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;
+ }
}
/**
* ownCloud Android client application
*
+ * @author Bartek Przybylski
+ * @author David A. Velasco
* Copyright (C) 2012 Bartek Przybylski
* Copyright (C) 2015 ownCloud Inc.
*
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;
import com.owncloud.android.lib.common.utils.Log_OC;
-import com.owncloud.android.utils.FileStorageUtils;
import java.io.File;
}
};
+ 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;
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.
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;
}
dest.writeString(mRemoteId);
dest.writeInt(mNeedsUpdateThumbnail ? 1 : 0);
dest.writeInt(mIsDownloading ? 1 : 0);
+ dest.writeString(mEtagInConflict);
+ dest.writeInt(mShareWithSharee ? 1 : 0);
}
/**
}
/**
+ * 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;
}
/**
/**
* Sets the name of the file
* <p/>
- * Does nothing if the new name is null, empty or includes "/" ; or if the file is the root directory
+ * Does nothing if the new name is null, empty or includes "/" ; or if the file is the root
+ * directory
*/
public void setFileName(String name) {
Log_OC.d(TAG, "OCFile name changin from " + mRemotePath);
- if (name != null && name.length() > 0 && !name.contains(PATH_SEPARATOR) && !mRemotePath.equals(ROOT_PATH)) {
+ if (name != null && name.length() > 0 && !name.contains(PATH_SEPARATOR) &&
+ !mRemotePath.equals(ROOT_PATH)) {
String parent = (new File(getRemotePath())).getParent();
parent = (parent.endsWith(PATH_SEPARATOR)) ? parent : parent + PATH_SEPARATOR;
mRemotePath = parent + name;
}
/**
- * 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() {
mRemoteId = null;
mNeedsUpdateThumbnail = false;
mIsDownloading = false;
+ mEtagInConflict = null;
+ mShareWithSharee = false;
}
/**
@Override
public int describeContents() {
- return ((Object) this).hashCode();
+ return super.hashCode();
}
@Override
@Override
public String toString() {
- String asString = "[id=%s, name=%s, mime=%s, downloaded=%s, local=%s, remote=%s, parentId=%s, favorite=%s etag=%s]";
- asString = String.format(asString, Long.valueOf(mId), getFileName(), mMimeType, isDown(), mLocalPath, mRemotePath, Long.valueOf(mParentId), Boolean.valueOf(mFavorite), mEtag);
+ String asString = "[id=%s, name=%s, mime=%s, downloaded=%s, local=%s, remote=%s, " +
+ "parentId=%s, favorite=%s etag=%s]";
+ asString = String.format(asString, Long.valueOf(mId), getFileName(), mMimeType, isDown(),
+ mLocalPath, mRemotePath, Long.valueOf(mParentId), Boolean.valueOf(mFavorite),
+ mEtag);
return asString;
}
}
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;
}
*/
public boolean isImage() {
return ((mMimeType != null && mMimeType.startsWith("image/")) ||
- FileStorageUtils.getMimeTypeFromName(mRemotePath).startsWith("image/"));
+ getMimeTypeFromName().startsWith("image/"));
+ }
+
+ /**
+ * @return 'True' if the file is simple text (e.g. not application-dependent, like .doc or .docx)
+ */
+ public boolean isText() {
+ return ((mMimeType != null && mMimeType.startsWith("text/")) ||
+ getMimeTypeFromName().startsWith("text/"));
+ }
+
+ public String getMimeTypeFromName() {
+ String extension = "";
+ int pos = mRemotePath.lastIndexOf('.');
+ if (pos >= 0) {
+ extension = mRemotePath.substring(pos + 1);
+ }
+ String result = MimeTypeMap.getSingleton().
+ getMimeTypeFromExtension(extension.toLowerCase());
+ return (result != null) ? result : "";
}
/**
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));
}
}
import android.graphics.Bitmap.CompressFormat;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
-import android.graphics.Shader;
import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.media.ThumbnailUtils;
import android.net.Uri;
public static Bitmap mDefaultImg =
BitmapFactory.decodeResource(
- MainApp.getAppContext().getResources(),
- DisplayUtils.getFileTypeIconId("image/png", "default.png")
+ MainApp.getAppContext().getResources(),
+ R.drawable.file_image
);
}
protected void onPostExecute(Bitmap bitmap){
- if (isCancelled()) {
- bitmap = null;
- }
-
if (bitmap != null) {
final ImageView imageView = mImageViewReference.get();
final ThumbnailGenerationTask bitmapWorkerTask = getBitmapWorkerTask(imageView);
GetMethod get = new GetMethod(uri);
int status = mClient.executeMethod(get);
if (status == HttpStatus.SC_OK) {
-// byte[] bytes = get.getResponseBody();
-// Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0,
-// bytes.length);
InputStream inputStream = get.getResponseBodyAsStream();
Bitmap bitmap = BitmapFactory.decodeStream(inputStream);
thumbnail = ThumbnailUtils.extractThumbnail(bitmap, px, px);
px,
Bitmap.Config.ARGB_8888);
Canvas c = new Canvas(resultBitmap);
- Bitmap checker = BitmapFactory.decodeResource(MainApp.getAppContext().getResources(),
- R.drawable.checker_16_16);
-
- BitmapDrawable background;
- background = new BitmapDrawable(MainApp.getAppContext().getResources(), checker);
-
- background.setBounds(0, 0, px, px);
- background.setTileModeXY(Shader.TileMode.REPEAT, Shader.TileMode.REPEAT);
- background.draw(c);
+ c.drawColor(MainApp.getAppContext().getResources().
+ getColor(R.color.background_color));
c.drawBitmap(bitmap, 0, 0, null);
return resultBitmap;
if (bitmapData == null || bitmapData != file) {
// Cancel previous task
bitmapWorkerTask.cancel(true);
+ Log_OC.v(TAG, "Cancelled generation of thumbnail for a reused imageView");
} else {
// The same work is already in progress
return false;
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
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
+ 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
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
\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
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;
/**
- * Filters out the file actions available in a given {@link Menu} for a given {@link OCFile}
+ * Filters out the file actions available in a given {@link Menu} for a given {@link OCFile}
* according to the current state of the latest.
*/
public class FileMenuFilter {
private ComponentsGetter mComponentsGetter;
private Account mAccount;
private Context mContext;
-
+
/**
* Constructor
- *
+ *
* @param targetFile {@link OCFile} target of the action to filter in the {@link Menu}.
* @param account ownCloud {@link Account} holding targetFile.
* @param cg Accessor to app components, needed to access the
* {@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;
mContext = context;
}
-
-
+
+
/**
* Filters out the file actions available in the passed {@link Menu} taken into account
* the state of the {@link OCFile} held by the filter.
- *
+ *
* @param menu Options or context menu to filter.
*/
public void filter(Menu menu) {
- List<Integer> toShow = new ArrayList<Integer>();
- List<Integer> toHide = new ArrayList<Integer>();
-
+ List<Integer> toShow = new ArrayList<Integer>();
+ List<Integer> toHide = new ArrayList<Integer>();
+
filter(toShow, toHide);
-
+
MenuItem item = null;
for (int i : toShow) {
item = menu.findItem(i);
item.setEnabled(true);
}
}
-
+
for (int i : toHide) {
item = menu.findItem(i);
if (item != null) {
/**
* Performs the real filtering, to be applied in the {@link Menu} by the caller methods.
- *
+ *
* Decides what actions must be shown and hidden.
- *
- * @param toShow List to save the options that must be shown in the menu.
+ *
+ * @param toShow List to save the options that must be shown in the menu.
* @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 {
toShow.add(R.id.action_download_file);
}
-
+
// RENAME
- if (mFile == null || downloading || uploading) {
+ if (mFile == null || synchronizing) {
toHide.add(R.id.action_rename_file);
-
+
} else {
toShow.add(R.id.action_rename_file);
}
- // MOVE
- if (mFile == null || downloading || uploading) {
+ // MOVE & COPY
+ if (mFile == null || synchronizing) {
toHide.add(R.id.action_move);
-
+ toHide.add(R.id.action_copy);
} else {
toShow.add(R.id.action_move);
+ toShow.add(R.id.action_copy);
}
-
+
// REMOVE
- if (mFile == null || downloading || uploading) {
+ if (mFile == null || synchronizing) {
toHide.add(R.id.action_remove_file);
-
+
} else {
toShow.add(R.id.action_remove_file);
}
-
+
// 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 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);
+
+ // CANCEL SYNCHRONIZATION
+ if (mFile == null || !synchronizing) {
+ toHide.add(R.id.action_cancel_sync);
+
} 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
+
+ // SHARE FILE
// TODO add check on SHARE available on server side?
boolean shareAllowed = (mContext != null &&
mContext.getString(R.string.share_feature).equalsIgnoreCase("on"));
} else {
toShow.add(R.id.action_share_file);
}
-
- // UNSHARE FILE
+
+ // UNSHARE FILE
// TODO add check on SHARE available on server side?
- if ( !shareAllowed || (mFile == null || !mFile.isShareByLink())) {
+ if ( !shareAllowed || (mFile == null || !mFile.isSharedViaLink())) {
toHide.add(R.id.action_unshare_file);
} else {
toShow.add(R.id.action_unshare_file);
}
+ // SHARE FILE, with Users
+ 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_with_users);
+ } else {
+ toShow.add(R.id.action_share_with_users);
+ }
+
+
// SEE DETAILS
if (mFile == null || mFile.isFolder()) {
toHide.add(R.id.action_see_details);
} else {
toShow.add(R.id.action_see_details);
}
-
+
// 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);
package com.owncloud.android.files;
-import org.apache.http.protocol.HTTP;
-
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;
import com.owncloud.android.datamodel.OCFile;
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 org.apache.http.protocol.HTTP;
+
+import java.util.List;
+
/**
*
*/
public class FileOperationsHelper {
private static final String TAG = FileOperationsHelper.class.getName();
-
- private static final String FTAG_CHOOSER_DIALOG = "CHOOSER_DIALOG";
+
+ private static final String FTAG_CHOOSER_DIALOG = "CHOOSER_DIALOG";
protected FileActivity mFileActivity = null;
/// Identifier of operation in progress which result shouldn't be lost
private long mWaitingForOpId = Long.MAX_VALUE;
-
+
public FileOperationsHelper(FileActivity fileActivity) {
mFileActivity = fileActivity;
}
if (file != null) {
String storagePath = file.getStoragePath();
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
);
);
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) {
-
+
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);
+ String[] packagesToExclude = new String[]{mFileActivity.getPackageName()};
+ DialogFragment chooserDialog = ShareLinkToDialog.newInstance(intent,
+ packagesToExclude, file);
chooserDialog.show(mFileActivity.getSupportFragmentManager(), FTAG_CHOOSER_DIALOG);
-
+
} 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
+ 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);
Log_OC.wtf(TAG, "Trying to open a NULL OCFile");
}
}
-
-
+
+
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;
+ return intentToShareLink;
}
-
-
+
+
/**
- * @return 'True' if the server supports the Share API
+ * Helper method to share a file with a know 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);
+
+ } else {
+ Log_OC.wtf(TAG, "Trying to share a NULL OCFile");
+ }
+ }
+
+
+ /**
+ * @return 'True' if the server supports the Share API
*/
public boolean isSharedSupported() {
if (mFileActivity.getAccount() != null) {
}
return false;
}
-
-
+
+
public void unshareFileWithLink(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, "");
+
+ unshareFile(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);
+
+ unshareFile(unshareService);
+ }
+
+
+ private void unshareFile(Intent unshareService){
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(unshareService);
+
+ 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);
+
+ }
+
+
+ /**
+ * @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();
sendIntent.putExtra(Intent.ACTION_SEND, true); // Send Action
// Show dialog, without the own app
- String[] packagesToExclude = new String[] { mFileActivity.getPackageName() };
- DialogFragment chooserDialog = ShareLinkToDialog.newInstance(sendIntent, packagesToExclude, file);
+ String[] packagesToExclude = new String[]{mFileActivity.getPackageName()};
+ DialogFragment chooserDialog = ShareLinkToDialog.newInstance(sendIntent,
+ packagesToExclude, file);
chooserDialog.show(mFileActivity.getSupportFragmentManager(), FTAG_CHOOSER_DIALOG);
} else {
Log_OC.wtf(TAG, "Trying to send a NULL OCFile");
}
}
-
-
+
+ /**
+ * 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);
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);
intent.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
intent.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath());
mFileActivity.startService(intent);
+
}
}
service.putExtra(OperationsService.EXTRA_NEWNAME, newFilename);
mWaitingForOpId = mFileActivity.getOperationsServiceBinder().queueNewOperation(service);
- mFileActivity.showLoadingDialog();
+ mFileActivity.showLoadingDialog(mFileActivity.getApplicationContext().
+ getString(R.string.wait_a_moment));
}
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));
}
-
-
+
+
public void createFolder(String remotePath, boolean createFullPath) {
// Create Folder
Intent service = new Intent(mFileActivity, OperationsService.class);
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));
}
/**
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);
}
// 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);
}
}
/**
* Start move file operation
- * @param newfile File where it is going to be moved
- * @param currentFile File with the previous info
+ *
+ * @param newfile File where it is going to be moved
+ * @param currentFile File with the previous info
*/
public void moveFile(OCFile newfile, OCFile currentFile) {
// Move files
service.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
mWaitingForOpId = mFileActivity.getOperationsServiceBinder().queueNewOperation(service);
- mFileActivity.showLoadingDialog();
+ mFileActivity.showLoadingDialog(mFileActivity.getApplicationContext().
+ getString(R.string.wait_a_moment));
}
+ /**
+ * Start copy file operation
+ *
+ * @param newfile File where it is going to be moved
+ * @param currentFile File with the previous info
+ */
+ public void copyFile(OCFile newfile, OCFile currentFile) {
+ // Copy files
+ Intent service = new Intent(mFileActivity, OperationsService.class);
+ service.setAction(OperationsService.ACTION_COPY_FILE);
+ service.putExtra(OperationsService.EXTRA_NEW_PARENT_PATH, newfile.getRemotePath());
+ service.putExtra(OperationsService.EXTRA_REMOTE_PATH, currentFile.getRemotePath());
+ service.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
+ mWaitingForOpId = mFileActivity.getOperationsServiceBinder().queueNewOperation(service);
+
+ mFileActivity.showLoadingDialog(mFileActivity.getApplicationContext().
+ getString(R.string.wait_a_moment));
+ }
public long getOpIdWaitingFor() {
return mWaitingForOpId;
public void setOpIdWaitingFor(long waitingForOpId) {
mWaitingForOpId = waitingForOpId;
}
-
+
/**
* @return 'True' if the server doesn't need to check forbidden characters
*/
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;
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;
import android.accounts.Account;
import android.accounts.AccountManager;
-import android.accounts.AccountsException;
import android.accounts.OnAccountsUpdateListener;
import android.app.NotificationManager;
import android.app.PendingIntent;
/**
* 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.
*/
} 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);
);
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);
* @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);
/**
* 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.
*
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);
}
/**
* 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);
@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) {
}
}
- /**
- * 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 {
*/
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;
/// 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());
/// 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() +
/**
* Updates the OC File after a successful download.
+ *
+ * TODO move to DownloadFileOperation
*/
private void saveDownloadedFile() {
OCFile file = mStorageManager.getFileById(mCurrentDownload.getFile().getFileId());
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.
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);
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;
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;
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";
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;
}
/**
- * 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);
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;
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);
+ newUpload.addDatatransferProgressListener((FileUploaderBinder) mBinder);
+ Pair<String, String> putResult = mPendingUploads.putIfAbsent(
+ account, files[i].getRemotePath(), newUpload
+ );
+ uploadKey = putResult.first;
requestedUploads.add(uploadKey);
}
msg.obj = requestedUploads;
mServiceHandler.sendMessage(msg);
}
- Log_OC.i(TAG, "mPendingUploads size:" + mPendingUploads.size());
return Service.START_NOT_STICKY;
}
/**
* 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);
}
}
// 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
* @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()));
}
}
/**
- * 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();
}
+
}
/**
/**
* 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");
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();
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());
}
}
* 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();
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
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
}
file.setNeedsUpdateThumbnail(true);
mStorageManager.saveFile(file);
+ mStorageManager.saveConflict(file, null);
+
+ mStorageManager.triggerMediaScan(file.getStoragePath());
+
}
private void updateOCFile(OCFile file, RemoteFile remoteFile) {
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) {
/**
* 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);
* 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
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);
}
* @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) {
/**
* 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);
}
}
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));
}
}
--- /dev/null
+/* ownCloud Android client application
+ * Copyright (C) 2012-2014 ownCloud Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+package com.owncloud.android.operations;
+
+import android.accounts.Account;
+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.resources.files.CopyRemoteFileOperation;
+import com.owncloud.android.operations.common.SyncOperation;
+
+
+/**
+ * Operation copying an {@link OCFile} to a different folder.
+ *
+ * @author David A. Velasco
+ */
+public class CopyFileOperation extends SyncOperation {
+
+ //private static final String TAG = MoveFileOperation.class.getSimpleName();
+
+ private String mSrcPath;
+ private String mTargetParentPath;
+
+ private OCFile mFile;
+
+
+ /**
+ * Constructor
+ *
+ * @param srcPath Remote path of the {@link OCFile} to move.
+ * @param targetParentPath Path to the folder where the file will be copied into.
+ * @param account OwnCloud account containing both the file and the target folder
+ */
+ public CopyFileOperation(String srcPath, String targetParentPath, Account account) {
+ mSrcPath = srcPath;
+ mTargetParentPath = targetParentPath;
+ if (!mTargetParentPath.endsWith(OCFile.PATH_SEPARATOR)) {
+ mTargetParentPath += OCFile.PATH_SEPARATOR;
+ }
+
+ mFile = null;
+ }
+
+ /**
+ * Performs the operation.
+ *
+ * @param client Client object to communicate with the remote ownCloud server.
+ */
+ @Override
+ protected RemoteOperationResult run(OwnCloudClient client) {
+ RemoteOperationResult result;
+
+ /// 1. check copy validity
+ if (mTargetParentPath.startsWith(mSrcPath)) {
+ return new RemoteOperationResult(ResultCode.INVALID_COPY_INTO_DESCENDANT);
+ }
+ mFile = getStorageManager().getFileByPath(mSrcPath);
+ if (mFile == null) {
+ return new RemoteOperationResult(ResultCode.FILE_NOT_FOUND);
+ }
+
+ /// 2. remote copy
+ String targetPath = mTargetParentPath + mFile.getFileName();
+ if (mFile.isFolder()) {
+ targetPath += OCFile.PATH_SEPARATOR;
+ }
+ CopyRemoteFileOperation operation = new CopyRemoteFileOperation(
+ mSrcPath,
+ targetPath,
+ false
+ );
+ result = operation.execute(client);
+
+ /// 3. local copy
+ if (result.isSuccess()) {
+ getStorageManager().copyLocalFile(mFile, targetPath);
+ }
+ // TODO handle ResultCode.PARTIAL_COPY_DONE in client Activity, for the moment
+
+ return result;
+ }
+
+
+}
+++ /dev/null
-/**
- * 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());
-
- }
- }
-
-}
--- /dev/null
+/**
+ * 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.FileDataStorageManager;
+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 {
+
+ protected FileDataStorageManager mStorageManager;
+
+ 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);
+ // TODO - fix this check; if the user already shared the file with users or group, a share via link will not be created
+
+ if (!result.isSuccess() || result.getData().size() <= 0) {
+ operation = new CreateRemoteShareOperation(
+ mPath,
+ ShareType.PUBLIC_LINK,
+ "",
+ false,
+ mPassword,
+ OCShare.DEFAULT_PERMISSION
+ );
+ 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;
+ }
+
+ 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) {
+ mSendIntent.putExtra(Intent.EXTRA_TEXT, share.getShareLink());
+ file.setPublicLink(share.getShareLink());
+ file.setShareViaLink(true);
+ getStorageManager().saveFile(file);
+ }
+ }
+
+}
--- /dev/null
+/**
+ * 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);
+ }
+ }
+
+}
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;
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;
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());
if (result.isSuccess()) {
mModificationTimestamp = mDownloadOperation.getModificationTimestamp();
+ mEtag = mDownloadOperation.getEtag();
newFile = new File(getSavePath());
newFile.getParentFile().mkdirs();
moved = tmpFile.renameTo(newFile);
--- /dev/null
+/**
+ * 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;
+ }
+
+}
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.
*/
+++ /dev/null
-/**
- * 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;
- }
-
-}
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;
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;
/** '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}.
*
mForgottenLocalFiles = new HashMap<String, String>();
mRemoteFolderChanged = false;
mIgnoreETag = ignoreETag;
+ mFilesToSyncContents = new Vector<SynchronizeFileOperation>();
}
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);
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) {
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.d(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
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 {
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 ?
}
// 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,
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;
}
}
- 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()) {
/**
- * 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.
*
}
- 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);
+ }
+ }
}
}
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;
/// 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()
);
//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) {
mServerFile.setLastSyncDateForData(mLocalFile.getLastSyncDateForData());
mServerFile.setStoragePath(mLocalFile.getStoragePath());
mServerFile.setParentId(mLocalFile.getParentId());
+ mServerFile.setEtag(mLocalFile.getEtag());
getStorageManager().saveFile(mServerFile);
}
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);
+ }
+ }
}
* 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 {
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;
mContext = context;
mRemoteFolderChanged = false;
mFilesForDirectDownload = new Vector<OCFile>();
- mFilesToSyncContentsWithoutUpload = new Vector<SyncOperation>();
- mFavouriteFilesToSyncContents = new Vector<SyncOperation>();
+ mFilesToSyncContents = new Vector<SyncOperation>();
mCancellationRequested = new AtomicBoolean(false);
}
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());
List<OCFile> updatedFiles = new Vector<OCFile>(folderAndFiles.size() - 1);
mFilesForDirectDownload.clear();
- mFilesToSyncContentsWithoutUpload.clear();
- mFavouriteFilesToSyncContents.clear();
+ mFilesToSyncContents.clear();
if (mCancellationRequested.get()) {
throw new OperationCancelledException();
}
// 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
}
} 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);
+
}
+
}
}
}
private void syncContents(OwnCloudClient client) throws OperationCancelledException {
startDirectDownloads();
- startContentSynchronizations(mFilesToSyncContentsWithoutUpload, client);
- startContentSynchronizations(mFavouriteFilesToSyncContents, client);
+ startContentSynchronizations(mFilesToSyncContents, client);
}
/**
- * 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.
+++ /dev/null
-/**
- * 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();
- }
-
-}
--- /dev/null
+/**
+ * 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.getIdRemoteShared());
+ result = operation.execute(client);
+
+ if (result.isSuccess()) {
+ Log_OC.d(TAG, "Share id = " + share.getIdRemoteShared() + " 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();
+ }
+
+}
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;
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;
(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)) {
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());
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
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;
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.
*/
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
if (c != null && c.moveToFirst()) {
remoteId = c.getString(c.getColumnIndex(ProviderTableMeta.FILE_REMOTE_ID));
//ThumbnailsCacheManager.removeFileFromCache(remoteId);
+ c.close();
}
Log_OC.d(TAG, "Removing FILE " + remoteId);
+ uri.getPathSegments().get(1)
+ (!TextUtils.isEmpty(where) ? " AND (" + where
+ ")" : ""), whereArgs);
- /* just for log
- if (c!=null) {
- c.close();
- }
- */
break;
case DIRECTORY:
// deletion of folder is recursive
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());
// ugly patch; serious refactorization is needed to reduce work in
// FileDataStorageManager and bring it to FileContentProvider
if (doubleCheck == null || !doubleCheck.moveToFirst()) {
+ if (doubleCheck != null) {
+ doubleCheck.close();
+ }
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);
}
}
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()) {
- 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);
}
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);
}
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;
}
SQLiteQueryBuilder sqlQuery = new SQLiteQueryBuilder();
sqlQuery.setTables(ProviderTableMeta.FILE_TABLE_NAME);
- sqlQuery.setProjectionMap(mFileProjectionMap);
switch (mUriMatcher.match(uri)) {
case ROOT_DIRECTORY:
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));
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;
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
}
}
- /*
- 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 {
// 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 + "("
+ ProviderTableMeta.OCSHARES_USER_ID + " INTEGER, "
+ ProviderTableMeta.OCSHARES_ID_REMOTE_SHARED + " INTEGER,"
+ ProviderTableMeta.OCSHARES_ACCOUNT_OWNER + " TEXT );" );
+
+ // Create table capabilities
+ createCapabilitiesTable(db);
+
}
@Override
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 +
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
--- /dev/null
+/**
+ * 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.provider.BaseColumns;
+import android.support.annotation.Nullable;
+
+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 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);
+ }
+ }
+
+ /// 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;
+ }
+
+}
package com.owncloud.android.services;
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.ConcurrentMap;
+import android.accounts.Account;
+import android.accounts.AccountsException;
+import android.accounts.AuthenticatorException;
+import android.accounts.OperationCanceledException;
+import android.app.Service;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Binder;
+import android.os.Handler;
+import android.os.HandlerThread;
+import android.os.IBinder;
+import android.os.Looper;
+import android.os.Message;
+import android.os.Process;
+import android.util.Pair;
import com.owncloud.android.MainApp;
import com.owncloud.android.R;
import com.owncloud.android.lib.resources.shares.ShareType;
import com.owncloud.android.lib.resources.status.OwnCloudVersion;
import com.owncloud.android.lib.resources.users.GetRemoteUserNameOperation;
-import com.owncloud.android.operations.common.SyncOperation;
+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;
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.common.SyncOperation;
-import android.accounts.Account;
-import android.accounts.AccountManager;
-import android.accounts.AccountsException;
-import android.accounts.AuthenticatorException;
-import android.accounts.OperationCanceledException;
-import android.app.Service;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.Binder;
-import android.os.Handler;
-import android.os.HandlerThread;
-import android.os.IBinder;
-import android.os.Looper;
-import android.os.Message;
-import android.os.Process;
-import android.util.Pair;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.ConcurrentMap;
public class OperationsService extends Service {
-
+
private static final String TAG = OperationsService.class.getSimpleName();
-
+
public static final String EXTRA_ACCOUNT = "ACCOUNT";
public static final String EXTRA_SERVER_URL = "SERVER_URL";
public static final String EXTRA_OAUTH2_QUERY_PARAMETERS = "OAUTH2_QUERY_PARAMETERS";
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_TYPE = "SHARE_TYPE";
+ public static final String EXTRA_SHARE_WITH = "SHARE_WITH";
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_GET_SERVER_INFO = "GET_SERVER_INFO";
public static final String ACTION_OAUTH2_GET_ACCESS_TOKEN = "OAUTH2_GET_ACCESS_TOKEN";
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";
+
public static final String ACTION_OPERATION_ADDED = OperationsService.class.getName() +
".OPERATION_ADDED";
public static final String ACTION_OPERATION_FINISHED = OperationsService.class.getName() +
".OPERATION_FINISHED";
- private ConcurrentMap<Integer, Pair<RemoteOperation, RemoteOperationResult>>
- mUndispatchedFinishedOperations =
+ private ConcurrentMap<Integer, Pair<RemoteOperation, RemoteOperationResult>>
+ mUndispatchedFinishedOperations =
new ConcurrentHashMap<Integer, Pair<RemoteOperation, RemoteOperationResult>>();
-
+
private static class Target {
public Uri mServerUrl = null;
public Account mAccount = null;
public String mCookie = null;
-
+
public Target(Account account, Uri serverUrl, String cookie) {
mAccount = account;
mServerUrl = serverUrl;
mSyncFolderHandler = new SyncFolderHandler(thread.getLooper(), this);
}
-
+
/**
* Entry point to add a new operation to the queue of operations.
- *
- * New operations are added calling to startService(), resulting in a call to this method.
+ * <p/>
+ * New operations 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.
*/
@Override
// Saving cookies
try {
OwnCloudClientManagerFactory.getDefaultSingleton().
- saveAllClients(this, MainApp.getAccountType());
-
+ saveAllClients(this, MainApp.getAccountType());
+
// TODO - get rid of these exceptions
} catch (AccountNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
-
+
mUndispatchedFinishedOperations.clear();
mOperationsBinder = null;
}
/**
- * Provides a binder object that clients can use to perform actions on the queue of operations,
- * except the addition of new operations.
+ * Provides a binder object that clients can use to perform actions on the queue of operations,
+ * except the addition of new operations.
*/
@Override
public IBinder onBind(Intent intent) {
- //Log_OC.wtf(TAG, "onBind" );
return mOperationsBinder;
}
-
+
/**
* Called when ALL the bound clients were unbound.
*/
/**
- * Binder to let client components to perform actions on the queue of operations.
- *
- * It provides by itself the available operations.
+ * Binder to let client components to perform actions on the queue of operations.
+ * <p/>
+ * It provides by itself the available operations.
*/
public class OperationsServiceBinder extends Binder /* implements OnRemoteOperationListener */ {
-
- /**
+
+ /**
* Map of listeners that will be reported about the end of operations from a
* {@link OperationsServiceBinder} instance
*/
- private ConcurrentMap<OnRemoteOperationListener, Handler> mBoundListeners =
+ private final ConcurrentMap<OnRemoteOperationListener, Handler> mBoundListeners =
new ConcurrentHashMap<OnRemoteOperationListener, Handler>();
-
- private ServiceHandler mServiceHandler = null;
+
+ private ServiceHandler mServiceHandler = null;
public OperationsServiceBinder(ServiceHandler serviceHandler) {
mServiceHandler = serviceHandler;
public void clearListeners() {
-
+
mBoundListeners.clear();
}
-
+
/**
* Adds a listener interested in being reported about the end of operations.
- *
- * @param listener Object to notify about the end of operations.
+ *
+ * @param listener Object to notify about the end of operations.
* @param callbackHandler {@link Handler} to access the listener without
* breaking Android threading protection.
*/
mBoundListeners.put(listener, callbackHandler);
}
}
-
-
+
+
/**
* Removes a listener from the list of objects interested in the being reported about
* the end of operations.
*
* @param listener Object to notify about progress of transfer.
*/
- public void removeOperationListener (OnRemoteOperationListener listener) {
+ public void removeOperationListener(OnRemoteOperationListener listener) {
synchronized (mBoundListeners) {
mBoundListeners.remove(listener);
}
/**
- * TODO - IMPORTANT: update implementation when more operations are moved into the service
- *
+ * TODO - IMPORTANT: update implementation when more operations are moved into the service
+ *
* @return 'True' when an operation that enforces the user to wait for completion is
* in process.
*/
return Long.MAX_VALUE;
}
}
-
-
+
+
public boolean dispatchResultIfFinished(int operationId,
OnRemoteOperationListener listener) {
Pair<RemoteOperation, RemoteOperationResult> undispatched =
/**
- * Operations worker. Performs the pending operations in the order they were requested.
- *
+ * Operations worker. Performs the pending operations in the order they were requested.
+ *
* Created with the Looper of a new thread, started in {@link OperationsService#onCreate()}.
*/
private static class ServiceHandler extends Handler {
OperationsService mService;
-
-
+
+
private ConcurrentLinkedQueue<Pair<Target, RemoteOperation>> mPendingOperations =
new ConcurrentLinkedQueue<Pair<Target, RemoteOperation>>();
private RemoteOperation mCurrentOperation = null;
Log_OC.d(TAG, "Stopping after command with id " + msg.arg1);
mService.stopSelf(msg.arg1);
}
-
+
/**
* Performs the next operation in the queue
} else {
result = mCurrentOperation.execute(mOwnCloudClient);
}
-
+
} catch (AccountsException e) {
if (mLastTarget.mAccount == null) {
Log_OC.e(TAG, "Error while trying to get authorization for a NULL account",
}
-
+
}
-
+
/**
* Creates a new operation, as described by operationIntent.
if (!operationIntent.hasExtra(EXTRA_ACCOUNT) &&
!operationIntent.hasExtra(EXTRA_SERVER_URL)) {
Log_OC.e(TAG, "Not enough information provided in intent");
-
+
} else {
Account account = operationIntent.getParcelableExtra(EXTRA_ACCOUNT);
String serverUrl = operationIntent.getStringExtra(EXTRA_SERVER_URL);
);
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);
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.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)) {
// check OC server and get basic information from it
operation = new GetServerInfoOperation(serverUrl, OperationsService.this);
-
+
} else if (action.equals(ACTION_OAUTH2_GET_ACCESS_TOKEN)) {
/// GET ACCESS TOKEN to the OAuth server
String oauth2QueryParameters =
getString(R.string.oauth2_redirect_uri),
getString(R.string.oauth2_grant_type),
oauth2QueryParameters);
-
+
} else if (action.equals(ACTION_GET_USER_NAME)) {
// Get User Name
operation = new GetRemoteUserNameOperation();
boolean createFullPath = operationIntent.getBooleanExtra(EXTRA_CREATE_FULL_PATH,
true);
operation = new CreateFolderOperation(remotePath, createFullPath);
-
+
} else if (action.equals(ACTION_SYNC_FILE)) {
// Sync file
String remotePath = operationIntent.getStringExtra(EXTRA_REMOTE_PATH);
);
} 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
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);
String newParentPath = operationIntent.getStringExtra(EXTRA_NEW_PARENT_PATH);
- operation = new MoveFileOperation(remotePath,newParentPath,account);
+ operation = new MoveFileOperation(remotePath, newParentPath, account);
+
+ } else if (action.equals(ACTION_COPY_FILE)) {
+ // Copy file/folder
+ String remotePath = operationIntent.getStringExtra(EXTRA_REMOTE_PATH);
+ String newParentPath = operationIntent.getStringExtra(EXTRA_NEW_PARENT_PATH);
+ operation = new CopyFileOperation(remotePath, newParentPath, account);
}
-
}
} catch (IllegalArgumentException e) {
return null;
}
}
-
+
/**
* Sends a broadcast when a new operation is added to the queue.
- *
+ *
* Local broadcasts are only delivered to activities in the same process, but can't be
* done sticky :\
*
private void sendBroadcastNewOperation(Target target, RemoteOperation operation) {
Intent intent = new Intent(ACTION_OPERATION_ADDED);
if (target.mAccount != null) {
- intent.putExtra(EXTRA_ACCOUNT, target.mAccount);
+ intent.putExtra(EXTRA_ACCOUNT, target.mAccount);
} else {
- intent.putExtra(EXTRA_SERVER_URL, target.mServerUrl);
+ intent.putExtra(EXTRA_SERVER_URL, target.mServerUrl);
}
//LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(this);
//lbm.sendBroadcast(intent);
sendStickyBroadcast(intent);
}
-
+
// TODO - maybe add a notification for real start of operations
-
+
/**
* Sends a LOCAL broadcast when an operations finishes in order to the interested activities c
* an update their view
*
* Local broadcasts are only delivered to activities in the same process.
- *
- * @param target Account or URL pointing to an OC server.
- * @param operation Finished operation.
- * @param result Result of the operation.
+ *
+ * @param target Account or URL pointing to an OC server.
+ * @param operation Finished operation.
+ * @param result Result of the operation.
*/
private void sendBroadcastOperationFinished(Target target, RemoteOperation operation,
RemoteOperationResult result) {
Intent intent = new Intent(ACTION_OPERATION_FINISHED);
intent.putExtra(EXTRA_RESULT, result);
if (target.mAccount != null) {
- intent.putExtra(EXTRA_ACCOUNT, target.mAccount);
+ intent.putExtra(EXTRA_ACCOUNT, target.mAccount);
} else {
- intent.putExtra(EXTRA_SERVER_URL, target.mServerUrl);
+ intent.putExtra(EXTRA_SERVER_URL, target.mServerUrl);
}
//LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(this);
//lbm.sendBroadcast(intent);
sendStickyBroadcast(intent);
}
-
+
/**
* Notifies the currently subscribed listeners about the end of an operation.
*
}
}
if (count == 0) {
- //mOperationResults.put(operation.hashCode(), result);
- Pair<RemoteOperation, RemoteOperationResult> undispatched =
+ Pair<RemoteOperation, RemoteOperationResult> undispatched =
new Pair<RemoteOperation, RemoteOperationResult>(operation, result);
- mUndispatchedFinishedOperations.put(operation.hashCode(), undispatched);
+ mUndispatchedFinishedOperations.put(((Runnable) operation).hashCode(), undispatched);
}
Log_OC.d(TAG, "Called " + count + " listeners");
}
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;
* 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 {
".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() +
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,
// synchronize children folders
List<OCFile> children = synchFolderOp.getChildren();
// beware of the 'hidden' recursion here!
- fetchChildren(folder, children, synchFolderOp.getRemoteFolderChanged());
+ syncChildren(children);
}
} else {
/**
* 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);
}
}
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;
}
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;
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.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.services.OperationsService;
import com.owncloud.android.services.OperationsService.OperationsServiceBinder;
import com.owncloud.android.ui.NavigationDrawerItem;
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.*/
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);
*/
private void swapToDefaultAccount() {
// default to the most recently used account
- Account newAccount = AccountUtils.getCurrentOwnCloudAccount(getApplicationContext());
+ Account newAccount = AccountUtils.getCurrentOwnCloudAccount(getApplicationContext());
if (newAccount == null) {
/// no account available: force account creation
createFirstAccount();
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());
}
/**
- * @return 'True' when the Activity is finishing to enforce the setup of a new account.
+ * @return 'True' when the Activity is finishing to enforce the setup of a new account.
*/
protected boolean isRedirectingToSetupAccount() {
return mRedirectingToSetupAccount;
mFileOperationsHelper.setOpIdWaitingFor(Long.MAX_VALUE);
+ dismissLoadingDialog();
+
if (!result.isSuccess() && (
result.getCode() == ResultCode.UNAUTHORIZED ||
result.isIdPRedirection() ||
}
mTryShareAgain = false;
- } else if (operation instanceof CreateShareOperation) {
- onCreateShareOperationFinish((CreateShareOperation) operation, result);
+ } else if (operation == null ||
+ operation instanceof CreateShareWithShareeOperation ||
+ operation instanceof UnshareOperation ||
+ operation instanceof SynchronizeFolderOperation
+ ) {
+ 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()) {
+ updateFileFromDB();
+ } else if (result.getCode() != ResultCode.SHARE_NOT_FOUND) {
+ Toast t = Toast.makeText(this,
+ ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
+ Toast.LENGTH_LONG);
+ t.show();
+ }
}
}
}
- 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();
+ Intent sendIntent = operation.getSendIntentWithSubject(this);
startActivity(sendIntent);
} else {
// Detect Failure (403) --> needs Password
}
}
-
- 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) {
/**
* 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);
/**
* Dismiss loading dialog
*/
- public void dismissLoadingDialog(){
+ public void dismissLoadingDialog() {
Fragment frag = getSupportFragmentManager().findFragmentByTag(DIALOG_WAIT_TAG);
if (frag != null) {
LoadingDialog loading = (LoadingDialog) frag;
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.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.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.operations.UnshareOperation;
import com.owncloud.android.services.observer.FileObserverService;
import com.owncloud.android.syncadapter.FileSyncAdapter;
import com.owncloud.android.ui.dialog.ConfirmationDialogFragment;
import com.owncloud.android.ui.preview.PreviewImageActivity;
import com.owncloud.android.ui.preview.PreviewImageFragment;
import com.owncloud.android.ui.preview.PreviewMediaFragment;
+import com.owncloud.android.ui.preview.PreviewTextFragment;
import com.owncloud.android.ui.preview.PreviewVideoActivity;
import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.ErrorMessageAdapter;
import java.io.File;
-
/**
* Displays, what files the user has available in his ownCloud.
*/
public static final int ACTION_SELECT_CONTENT_FROM_APPS = 1;
public static final int ACTION_SELECT_MULTIPLE_FILES = 2;
public static final int ACTION_MOVE_FILES = 3;
+ public static final int ACTION_COPY_FILES = 4;
private static final String TAG = FileDisplayActivity.class.getSimpleName();
private static final String TAG_SECOND_FRAGMENT = "SECOND_FRAGMENT";
private OCFile mWaitingToPreview;
-
+
private boolean mSyncInProgress = false;
private static String DIALOG_UNTRUSTED_CERT = "DIALOG_UNTRUSTED_CERT";
Intent initObserversIntent = FileObserverService.makeInitIntent(this);
startService(initObserversIntent);
}
-
+
/// Load of saved instance state
if(savedInstanceState != null) {
mWaitingToPreview = (OCFile) savedInstanceState.getParcelable(
mSyncInProgress = savedInstanceState.getBoolean(KEY_SYNC_IN_PROGRESS);
mWaitingToSend = (OCFile) savedInstanceState.getParcelable(
FileDisplayActivity.KEY_WAITING_TO_SEND);
-
} else {
mWaitingToPreview = null;
mSyncInProgress = false;
mWaitingToSend = null;
- }
+ }
/// USER INTERFACE
// Inflate and set the layout view
setContentView(R.layout.files);
-
+
// Navigation Drawer
initDrawer();
mProgressBar.setIndeterminate(mSyncInProgress);
// always AFTER setContentView(...) ; to work around bug in its implementation
-
+
setBackgroundText();
Log_OC.v(TAG, "onCreate() end");
}
@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();
}
/**
- * Called when the ownCloud {@link Account} associated to the Activity was just updated.
- */
+ * Called when the ownCloud {@link Account} associated to the Activity was just updated.
+ */
@Override
protected void onAccountSet(boolean stateWasRecovered) {
super.onAccountSet(stateWasRecovered);
if (file.isFolder()) {
startSyncFolderOperation(file, false);
}
-
+
} else {
updateFragmentsVisibility(!file.isFolder());
updateActionBarTitleAndHomeButton(file.isFolder() ? null : file);
}
}
-
private void createMinFragments() {
OCFileListFragment listOfFiles = new OCFileListFragment();
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.add(R.id.left_fragment_container, listOfFiles, TAG_LIST_OF_FILES);
transaction.commit();
}
-
+
private void initFragmentsWithFile() {
if (getAccount() != null && getFile() != null) {
/// First fragment
- OCFileListFragment listOfFiles = getListOfFilesFragment();
+ OCFileListFragment listOfFiles = getListOfFilesFragment();
if (listOfFiles != null) {
listOfFiles.listDirectory(getCurrentDir());
// TODO Enable when "On Device" is recovered
// listOfFiles.listDirectory(getCurrentDir(), MainApp.getOnlyOnDevice());
+
} else {
Log_OC.e(TAG, "Still have a chance to lose the initializacion of list fragment >(");
}
-
+
/// Second fragment
- OCFile file = getFile();
+ OCFile file = getFile();
Fragment secondFragment = chooseInitialSecondFragment(file);
if (secondFragment != null) {
setSecondFragment(secondFragment);
updateFragmentsVisibility(true);
updateActionBarTitleAndHomeButton(file);
-
+
} else {
cleanSecondFragment();
+ if (file.isDown() && PreviewTextFragment.canBePreviewed(file))
+ startTextPreview(file);
}
} else {
private Fragment chooseInitialSecondFragment(OCFile file) {
Fragment secondFragment = null;
if (file != null && !file.isFolder()) {
- if (file.isDown() && PreviewMediaFragment.canBePreviewed(file)
+ if (file.isDown() && PreviewMediaFragment.canBePreviewed(file)
&& file.getLastSyncDateForProperties() > 0 // temporal fix
) {
int startPlaybackPosition =
secondFragment = new PreviewMediaFragment(file, getAccount(),
startPlaybackPosition, autoplay);
+ } else if (file.isDown() && PreviewTextFragment.canBePreviewed(file)) {
+ secondFragment = null;
} else {
- secondFragment = FileDetailFragment.newInstance(file, getAccount());
- }
+ secondFragment = FileDetailFragment.newInstance(file, getAccount());
+ }
}
return secondFragment;
}
/**
* Replaces the second fragment managed by the activity with the received as
* a parameter.
- *
- * Assumes never will be more than two fragments managed at the same time.
- *
- * @param fragment New second Fragment to set.
+ * <p/>
+ * Assumes never will be more than two fragments managed at the same time.
+ *
+ * @param fragment New second Fragment to set.
*/
private void setSecondFragment(Fragment fragment) {
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
Fragment listOfFiles = getSupportFragmentManager().findFragmentByTag(
FileDisplayActivity.TAG_LIST_OF_FILES);
if (listOfFiles != null) {
- return (OCFileListFragment)listOfFiles;
+ return (OCFileListFragment) listOfFiles;
}
Log_OC.wtf(TAG, "Access to unexisting list of files fragment!!");
return null;
Fragment second = getSupportFragmentManager().findFragmentByTag(
FileDisplayActivity.TAG_SECOND_FRAGMENT);
if (second != null) {
- return (FileFragment)second;
+ return (FileFragment) second;
}
return null;
}
if (PreviewMediaFragment.canBePreviewed(mWaitingToPreview)) {
startMediaPreview(mWaitingToPreview, 0, true);
detailsFragmentChanged = true;
+ } else if (PreviewTextFragment.canBePreviewed(mWaitingToPreview)) {
+ startTextPreview(mWaitingToPreview);
+ detailsFragmentChanged = true;
} else {
getFileOperationsHelper().openFile(mWaitingToPreview);
}
dialog.show(getSupportFragmentManager(), DIALOG_CREATE_FOLDER);
break;
}
+
case R.id.action_sync_account: {
startSynchronization();
break;
UploadSourceDialogFragment dialog =
UploadSourceDialogFragment.newInstance(getAccount());
dialog.show(getSupportFragmentManager(), DIALOG_UPLOAD_SOURCE);
-
break;
}
case android.R.id.home: {
requestMultipleUpload(data, resultCode);
} else if (requestCode == ACTION_MOVE_FILES && resultCode == RESULT_OK){
+ final Intent fData = data;
+ final int fResultCode = resultCode;
+ getHandler().postDelayed(
+ new Runnable() {
+ @Override
+ public void run() {
+ requestMoveOperation(fData, fResultCode);
+ }
+ },
+ DELAY_TO_REQUEST_OPERATIONS_LATER
+ );
+
+ } else if (requestCode == ACTION_COPY_FILES && resultCode == RESULT_OK) {
final Intent fData = data;
- final int fResultCode = resultCode;
+ final int fResultCode = resultCode;
getHandler().postDelayed(
- new Runnable() {
- @Override
- public void run() {
- requestMoveOperation(fData, fResultCode);
- }
- },
- DELAY_TO_REQUEST_OPERATION_ON_ACTIVITY_RESULTS
+ new Runnable() {
+ @Override
+ public void run() {
+ requestCopyOperation(fData, fResultCode);
+ }
+ },
+ DELAY_TO_REQUEST_OPERATIONS_LATER
);
} else {
/**
* Request the operation for moving the file/folder from one path to another
- *
- * @param data Intent received
- * @param resultCode Result code received
+ *
+ * @param data Intent received
+ * @param resultCode Result code received
*/
private void requestMoveOperation(Intent data, int resultCode) {
OCFile folderToMoveAt = (OCFile) data.getParcelableExtra(FolderPickerActivity.EXTRA_FOLDER);
getFileOperationsHelper().moveFile(folderToMoveAt, targetFile);
}
+ /**
+ * Request the operation for copying the file/folder from one path to another
+ *
+ * @param data Intent received
+ * @param resultCode Result code received
+ */
+ private void requestCopyOperation(Intent data, int resultCode) {
+ OCFile folderToMoveAt = data.getParcelableExtra(FolderPickerActivity.EXTRA_FOLDER);
+ OCFile targetFile = data.getParcelableExtra(FolderPickerActivity.EXTRA_FILE);
+ getFileOperationsHelper().copyFile(folderToMoveAt, targetFile);
+ }
+
@Override
public void onBackPressed() {
if (!isDrawerOpen()){
Log_OC.v(TAG, "onSaveInstanceState() end");
}
-
@Override
protected void onResume() {
Log_OC.v(TAG, "onResume() start");
super.onResume();
-
// refresh Navigation Drawer account list
mNavigationDrawerAdapter.updateAccountList();
-
// refresh list of files
refreshListOfFilesFragment();
downloadIntentFilter.addAction(FileDownloader.getDownloadFinishMessage());
mDownloadFinishReceiver = new DownloadFinishReceiver();
registerReceiver(mDownloadFinishReceiver, downloadIntentFilter);
-
+
Log_OC.v(TAG, "onResume() end");
+
}
unregisterReceiver(mDownloadFinishReceiver);
mDownloadFinishReceiver = null;
}
-
+
super.onPause();
Log_OC.v(TAG, "onPause() end");
}
FileSyncAdapter.EXTRA_RESULT);
boolean sameAccount = (getAccount() != null &&
accountName.equals(getAccount().name) && getStorageManager() != null);
-
+
if (sameAccount) {
-
+
if (FileSyncAdapter.EVENT_FULL_SYNC_START.equals(event)) {
mSyncInProgress = true;
-
+
} else {
OCFile currentFile = (getFile() == null) ? null :
getStorageManager().getFileByPath(getFile().getRemotePath());
synchFolderRemotePath),
Toast.LENGTH_LONG)
.show();
+
browseToRoot();
-
+
} else {
if (currentFile == null && !getFile().isFolder()) {
// currently selected file was removed in the server, and now we
}
setFile(currentFile);
}
-
+
mSyncInProgress = (!FileSyncAdapter.EVENT_FULL_SYNC_END.equals(event) &&
!RefreshFolderOperation.EVENT_SINGLE_FOLDER_SHARES_SYNCED
.equals(event));
if (RefreshFolderOperation.EVENT_SINGLE_FOLDER_CONTENTS_SYNCED.
- equals(event) &&
- /// TODO refactor and make common
- synchResult != null && !synchResult.isSuccess() &&
- (synchResult.getCode() == ResultCode.UNAUTHORIZED ||
- synchResult.isIdPRedirection() ||
- (synchResult.isException() && synchResult.getException()
- instanceof AuthenticatorException))) {
+ equals(event) &&/// TODO refactor and make common
+
+ synchResult != null && !synchResult.isSuccess() &&
+ (synchResult.getCode() == ResultCode.UNAUTHORIZED ||
+ synchResult.isIdPRedirection() ||
+ (synchResult.isException() && synchResult.getException()
+ instanceof AuthenticatorException))) {
try {
new OwnCloudAccount(getAccount(), context);
client = (OwnCloudClientManagerFactory.getDefaultSingleton().
removeClientFor(ocAccount));
-
if (client != null) {
OwnCloudCredentials cred = client.getCredentials();
if (cred != null) {
}
}
+
}
removeStickyBroadcast(intent);
Log_OC.d(TAG, "Setting progress visibility to " + mSyncInProgress);
/*|| mRefreshSharesInProgress*/ //);
setBackgroundText();
-
+
}
-
+
if (synchResult != null) {
if (synchResult.getCode().equals(
RemoteOperationResult.ResultCode.SSL_RECOVERABLE_PEER_UNVERIFIED)) {
}
}
}
-
+
/**
* Show a text message on screen view for notifying user if content is
* loading or folder is empty
private class UploadFinishReceiver extends BroadcastReceiver {
/**
* Once the file upload has finished -> update view
- * @author David A. Velasco
+ *
+ * @author David A. Velasco
* {@link BroadcastReceiver} to enable upload feedback in UI
*/
@Override
String accountName = intent.getStringExtra(FileUploader.ACCOUNT_NAME);
boolean sameAccount = getAccount() != null && accountName.equals(getAccount().name);
OCFile currentDir = getCurrentDir();
- boolean isDescendant = (currentDir != null) && (uploadedRemotePath != null) &&
+ boolean isDescendant = (currentDir != null) && (uploadedRemotePath != null) &&
(uploadedRemotePath.startsWith(currentDir.getRemotePath()));
-
+
if (sameAccount && isDescendant) {
- refreshListOfFilesFragment();
+ String linkedToRemotePath =
+ intent.getStringExtra(FileDownloader.EXTRA_LINKED_TO_PATH);
+ if (linkedToRemotePath == null || isAscendant(linkedToRemotePath)) {
+ refreshListOfFilesFragment();
+ }
}
-
+
boolean uploadWasFine = intent.getBooleanExtra(FileUploader.EXTRA_UPLOAD_RESULT,
false);
boolean renamedInUpload = getFile().getRemotePath().
equals(intent.getStringExtra(FileUploader.EXTRA_OLD_REMOTE_PATH));
- boolean sameFile = getFile().getRemotePath().equals(uploadedRemotePath) ||
+ boolean sameFile = getFile().getRemotePath().equals(uploadedRemotePath) ||
renamedInUpload;
FileFragment details = getSecondFragment();
- boolean detailFragmentIsShown = (details != null &&
+ boolean detailFragmentIsShown = (details != null &&
details instanceof FileDetailFragment);
-
+
if (sameAccount && sameFile && detailFragmentIsShown) {
if (uploadWasFine) {
setFile(getStorageManager().getFileByPath(uploadedRemotePath));
if (renamedInUpload) {
String newName = (new File(uploadedRemotePath)).getName();
Toast msg = Toast.makeText(
- context,
+ context,
String.format(
- getString(R.string.filedetails_renamed_in_upload_msg),
- newName),
+ getString(R.string.filedetails_renamed_in_upload_msg),
+ newName),
Toast.LENGTH_LONG);
msg.show();
}
if (uploadWasFine || getFile().fileExists()) {
- ((FileDetailFragment)details).updateFileDetails(false, true);
+ ((FileDetailFragment) details).updateFileDetails(false, true);
} else {
cleanSecondFragment();
}
-
- // Force the preview if the file is an image
- if (uploadWasFine && PreviewImageFragment.canBePreviewed(getFile())) {
- startImagePreview(getFile());
- } // TODO what about other kind of previews?
+
+ // Force the preview if the file is an image or text file
+ if (uploadWasFine) {
+ OCFile ocFile = getFile();
+ if (PreviewImageFragment.canBePreviewed(ocFile))
+ startImagePreview(getFile());
+ else if (PreviewTextFragment.canBePreviewed(ocFile))
+ startTextPreview(ocFile);
+ // TODO what about other kind of previews?
+ }
}
mProgressBar.setIndeterminate(false);
removeStickyBroadcast(intent);
}
}
-
+
}
-
+
+ // 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)
+ );
+ }
+
+
}
/**
* Class waiting for broadcast events from the {@link FileDownloader} service.
- *
+ *
* Updates the UI when a download is started or finished, provided that it is relevant for the
* current folder.
*/
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);
String linkedToRemotePath =
intent.getStringExtra(FileDownloader.EXTRA_LINKED_TO_PATH);
if (linkedToRemotePath == null || isAscendant(linkedToRemotePath)) {
- //Log_OC.v(TAG, "refresh #" + ++refreshCounter);
refreshListOfFilesFragment();
}
refreshSecondFragment(
intent.getBooleanExtra(FileDownloader.EXTRA_DOWNLOAD_RESULT, false)
);
}
-
+
if (mWaitingToSend != null) {
mWaitingToSend =
getStorageManager().getFileByPath(mWaitingToSend.getRemotePath());
- if (mWaitingToSend.isDown()) {
+ if (mWaitingToSend.isDown()) {
sendDownloadedFile();
}
}
-
+
} finally {
if (intent != null) {
removeStickyBroadcast(intent);
);
}
- 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));
}
}
-
-
+
+
public void browseToRoot() {
- OCFileListFragment listOfFiles = getListOfFilesFragment();
+ OCFileListFragment listOfFiles = getListOfFilesFragment();
if (listOfFiles != null) { // should never be null, indeed
OCFile root = getStorageManager().getFileByPath(OCFile.ROOT_PATH);
listOfFiles.listDirectory(root);
startSyncFolderOperation(root, false);
}
cleanSecondFragment();
-
}
/**
* {@inheritDoc}
- *
+ * <p/>
* Updates action bar and second fragment, if in dual pane mode.
*/
@Override
}
/**
- * 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
+ *
+ * @param file {@link OCFile} whose details will be shown
*/
@Override
public void showDetails(OCFile file) {
return new ListServiceConnection();
}
- /** Defines callbacks for service binding, passed to bindService() */
+ /**
+ * Defines callbacks for service binding, passed to bindService()
+ */
private class ListServiceConnection implements ServiceConnection {
@Override
if (!mWaitingToPreview.isDown()) {
requestForDownload();
}
- }
+ }
} else if (component.equals(new ComponentName(FileDisplayActivity.this,
FileUploader.class))) {
}
// a new chance to get the mDownloadBinder through
// getFileDownloadBinder() - THIS IS A MESS
- OCFileListFragment listOfFiles = getListOfFilesFragment();
+ OCFileListFragment listOfFiles = getListOfFilesFragment();
if (listOfFiles != null) {
listOfFiles.listDirectory();
// TODO Enable when "On Device" is recovered ?
}
FileFragment secondFragment = getSecondFragment();
if (secondFragment != null && secondFragment instanceof FileDetailFragment) {
- FileDetailFragment detailFragment = (FileDetailFragment)secondFragment;
+ FileDetailFragment detailFragment = (FileDetailFragment) secondFragment;
detailFragment.listenForTransferProgress();
detailFragment.updateFileDetails(false, false);
}
mUploaderBinder = null;
}
}
- };
+ }
@Override
public void onSavedCertificate() {
/**
* 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.
+ *
+ * @param operation Removal operation performed.
+ * @param result Result of the removal.
*/
@Override
public void onRemoteOperationFinish(RemoteOperation operation, RemoteOperationResult result) {
super.onRemoteOperationFinish(operation, result);
-
+
if (operation instanceof RemoveFileOperation) {
onRemoveFileOperationFinish((RemoveFileOperation) operation, result);
} else if (operation instanceof RenameFileOperation) {
- onRenameFileOperationFinish((RenameFileOperation)operation, result);
+ onRenameFileOperationFinish((RenameFileOperation) operation, result);
} else if (operation instanceof SynchronizeFileOperation) {
- onSynchronizeFileOperationFinish((SynchronizeFileOperation)operation, result);
+ onSynchronizeFileOperationFinish((SynchronizeFileOperation) operation, result);
} 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);
- }
-
- }
+ onCreateFolderOperationFinish((CreateFolderOperation) operation, result);
+
+ } else if (operation instanceof CreateShareViaLinkOperation ||
+ operation instanceof CreateShareWithShareeOperation ) {
-
- private void onCreateShareOperationFinish(CreateShareOperation operation,
- RemoteOperationResult result) {
- if (result.isSuccess()) {
refreshShowDetails();
refreshListOfFilesFragment();
+
+ } else if (operation instanceof UnshareOperation) {
+ onUnshareLinkOperationFinish((UnshareOperation) operation, result);
+
+ } else if (operation instanceof MoveFileOperation) {
+ onMoveFileOperationFinish((MoveFileOperation) operation, result);
+
+ } else if (operation instanceof CopyFileOperation) {
+ onCopyFileOperationFinish((CopyFileOperation) operation, result);
}
+
}
-
- private void onUnshareLinkOperationFinish(UnshareLinkOperation operation,
+ private void onUnshareLinkOperationFinish(UnshareOperation operation,
RemoteOperationResult result) {
if (result.isSuccess()) {
refreshShowDetails();
refreshListOfFilesFragment();
-
+
} else if (result.getCode() == ResultCode.SHARE_NOT_FOUND) {
cleanSecondFragment();
refreshListOfFilesFragment();
}
}
-
+
private void refreshShowDetails() {
FileFragment details = getSecondFragment();
if (details != null) {
OCFile file = details.getFile();
if (file != null) {
- file = getStorageManager().getFileByPath(file.getRemotePath());
+ file = getStorageManager().getFileByPath(file.getRemotePath());
if (details instanceof PreviewMediaFragment) {
// Refresh OCFile of the fragment
((PreviewMediaFragment) details).updateFile(file);
+ } else if (details instanceof PreviewTextFragment) {
+ // Refresh OCFile of the fragment
+ ((PreviewTextFragment) details).updateFile(file);
} else {
showDetails(file);
- }
+ }
}
invalidateOptionsMenu();
- }
+ }
}
-
+
/**
* Updates the view associated to the activity after the finish of an operation trying to
* remove a file.
*/
private void onRemoveFileOperationFinish(RemoveFileOperation operation,
RemoteOperationResult result) {
- dismissLoadingDialog();
-
Toast msg = Toast.makeText(this,
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
- Toast.LENGTH_LONG);
+ Toast.LENGTH_LONG);
msg.show();
-
+
if (result.isSuccess()) {
OCFile removedFile = operation.getFile();
FileFragment second = getSecondFragment();
if (second != null && removedFile.equals(second.getFile())) {
if (second instanceof PreviewMediaFragment) {
- ((PreviewMediaFragment)second).stopPreview(true);
+ ((PreviewMediaFragment) second).stopPreview(true);
}
setFile(getStorageManager().getFileById(removedFile.getParentId()));
cleanSecondFragment();
}
- if (getStorageManager().getFileById(removedFile.getParentId()).equals(getCurrentDir())) {
+ if (getStorageManager().getFileById(removedFile.getParentId()).equals(getCurrentDir())){
refreshListOfFilesFragment();
}
invalidateOptionsMenu();
}
}
}
-
-
+
+
/**
- * Updates the view associated to the activity after the finish of an operation trying to move a
+ * Updates the view associated to the activity after the finish of an operation trying to move a
* file.
- *
- * @param operation Move operation performed.
- * @param result Result of the move operation.
+ *
+ * @param operation Move operation performed.
+ * @param result Result of the move operation.
*/
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()),
- Toast.LENGTH_LONG);
+ Toast msg = Toast.makeText(FileDisplayActivity.this,
+ ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
+ Toast.LENGTH_LONG);
msg.show();
} catch (NotFoundException e) {
- Log_OC.e(TAG, "Error while trying to show fail message " , e);
+ Log_OC.e(TAG, "Error while trying to show fail message ", e);
}
}
}
+ /**
+ * Updates the view associated to the activity after the finish of an operation trying to copy a
+ * file.
+ *
+ * @param operation Copy operation performed.
+ * @param result Result of the copy operation.
+ */
+ private void onCopyFileOperationFinish(CopyFileOperation operation, RemoteOperationResult result) {
+ if (result.isSuccess()) {
+ refreshListOfFilesFragment();
+ } else {
+ try {
+ Toast msg = Toast.makeText(FileDisplayActivity.this,
+ ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
+ Toast.LENGTH_LONG);
+ msg.show();
+
+ } catch (NotFoundException e) {
+ Log_OC.e(TAG, "Error while trying to show fail message ", e);
+ }
+ }
+ }
/**
* Updates the view associated to the activity after the finish of an operation trying to rename
*/
private void onRenameFileOperationFinish(RenameFileOperation operation,
RemoteOperationResult result) {
- dismissLoadingDialog();
OCFile renamedFile = operation.getFile();
if (result.isSuccess()) {
FileFragment details = getSecondFragment();
renamedFile.equals(details.getFile())) {
((PreviewMediaFragment) details).updateFile(renamedFile);
if (PreviewMediaFragment.canBePreviewed(renamedFile)) {
- int position = ((PreviewMediaFragment)details).getPosition();
+ int position = ((PreviewMediaFragment) details).getPosition();
startMediaPreview(renamedFile, position, true);
} else {
getFileOperationsHelper().openFile(renamedFile);
}
+ } else if (details instanceof PreviewTextFragment &&
+ renamedFile.equals(details.getFile())) {
+ ((PreviewTextFragment) details).updateFile(renamedFile);
+ if (PreviewTextFragment.canBePreviewed(renamedFile)) {
+ startTextPreview(renamedFile);
+ } else {
+ getFileOperationsHelper().openFile(renamedFile);
+ }
}
}
-
+
if (getStorageManager().getFileById(renamedFile.getParentId()).equals(getCurrentDir())){
refreshListOfFilesFragment();
}
} else {
Toast msg = Toast.makeText(this,
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
- Toast.LENGTH_LONG);
+ Toast.LENGTH_LONG);
msg.show();
-
+
if (result.isSslRecoverableException()) {
mLastSslUntrustedServerResult = result;
showUntrustedCertDialog(mLastSslUntrustedServerResult);
OCFile syncedFile = operation.getLocalFile();
onTransferStateChanged(syncedFile, true, true);
invalidateOptionsMenu();
+ refreshShowDetails();
}
}
}
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()),
- Toast.LENGTH_LONG);
+ Toast msg = Toast.makeText(FileDisplayActivity.this,
+ ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
+ Toast.LENGTH_LONG);
msg.show();
} catch (NotFoundException e) {
- Log_OC.e(TAG, "Error while trying to show fail message " , e);
+ Log_OC.e(TAG, "Error while trying to show fail message ", e);
}
}
}
-
+
/**
* {@inheritDoc}
*/
if (details != null && details instanceof FileDetailFragment &&
file.equals(details.getFile()) ) {
if (downloading || uploading) {
- ((FileDetailFragment)details).updateFileDetails(file, getAccount());
+ ((FileDetailFragment) details).updateFileDetails(file, getAccount());
} else {
if (!file.fileExists()) {
cleanSecondFragment();
} else {
- ((FileDetailFragment)details).updateFileDetails(false, true);
+ ((FileDetailFragment) details).updateFileDetails(false, true);
}
}
}
-
+
}
}
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();
}
/**
- * Show untrusted cert dialog
+ * Show untrusted cert dialog
*/
public void showUntrustedCertDialog(RemoteOperationResult result) {
// Show a dialog with the certificate info
FragmentTransaction ft = fm.beginTransaction();
dialog.show(ft, DIALOG_UNTRUSTED_CERT);
}
-
+
private void requestForDownload(OCFile file) {
Account account = getAccount();
if (!mDownloaderBinder.isDownloading(account, mWaitingToPreview)) {
startService(i);
}
}
-
- private void sendDownloadedFile(){
+
+ private void sendDownloadedFile() {
getFileOperationsHelper().sendDownloadedFile(mWaitingToSend);
mWaitingToSend = null;
}
-
+
/**
* Requests the download of the received {@link OCFile} , updates the UI
* to monitor the download progress and prepares the activity to send the file
* when the download finishes.
- *
- * @param file {@link OCFile} to download and preview.
+ *
+ * @param file {@link OCFile} to download and preview.
*/
public void startDownloadForSending(OCFile file) {
mWaitingToSend = file;
requestForDownload(mWaitingToSend);
- boolean hasSecondFragment = (getSecondFragment()!= null);
+ boolean hasSecondFragment = (getSecondFragment() != null);
updateFragmentsVisibility(hasSecondFragment);
}
-
+
/**
* Opens the image gallery showing the image {@link OCFile} received as parameter.
- *
- * @param file Image {@link OCFile} to show.
+ *
+ * @param file Image {@link OCFile} to show.
*/
public void startImagePreview(OCFile file) {
Intent showDetailsIntent = new Intent(this, PreviewImageActivity.class);
showDetailsIntent.putExtra(EXTRA_FILE, file);
showDetailsIntent.putExtra(EXTRA_ACCOUNT, getAccount());
startActivity(showDetailsIntent);
-
}
/**
* Stars the preview of an already down media {@link OCFile}.
- *
+ *
* @param file Media {@link OCFile} to preview.
* @param startPlaybackPosition Media position where the playback will be started,
* in milliseconds.
}
/**
+ * Stars the preview of a text file {@link OCFile}.
+ *
+ * @param file Text {@link OCFile} to preview.
+ */
+ public void startTextPreview(OCFile file) {
+ Bundle args = new Bundle();
+ args.putParcelable(EXTRA_FILE, file);
+ args.putParcelable(EXTRA_ACCOUNT, getAccount());
+ Fragment textPreviewFragment = Fragment.instantiate(getApplicationContext(),
+ PreviewTextFragment.class.getName(), args);
+ setSecondFragment(textPreviewFragment);
+ updateFragmentsVisibility(true);
+ //updateNavigationElementsInActionBar(file);
+ setFile(file);
+ }
+
+ /**
* Requests the download of the received {@link OCFile} , updates the UI
* to monitor the download progress and prepares the activity to preview
* or open the file when the download finishes.
- *
- * @param file {@link OCFile} to download and preview.
+ *
+ * @param file {@link OCFile} to download and preview.
*/
public void startDownloadForPreview(OCFile file) {
Fragment detailFragment = FileDetailFragment.newInstance(file, getAccount());
public void cancelTransference(OCFile file) {
getFileOperationsHelper().cancelTransference(file);
- if (mWaitingToPreview != null &&
+ if (mWaitingToPreview != null &&
mWaitingToPreview.getRemotePath().equals(file.getRemotePath())) {
mWaitingToPreview = null;
}
}
}
- private void sortByDate(boolean ascending){
+ private void sortByDate(boolean ascending) {
getListOfFilesFragment().sortByDate(ascending);
}
- private void sortBySize(boolean ascending){
+ private void sortBySize(boolean ascending) {
getListOfFilesFragment().sortBySize(ascending);
}
- private void sortByName(boolean ascending){
+ private void sortByName(boolean ascending) {
getListOfFilesFragment().sortByName(ascending);
}
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;
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()
);
}
super.onRemoteOperationFinish(operation, result);
if (operation instanceof CreateFolderOperation) {
- onCreateFolderOperationFinish((CreateFolderOperation)operation, result);
+ onCreateFolderOperationFinish((CreateFolderOperation) operation, result);
}
}
) {
if (result.isSuccess()) {
- dismissLoadingDialog();
refreshListOfFilesFragment();
} else {
- dismissLoadingDialog();
try {
Toast msg = Toast.makeText(FolderPickerActivity.this,
ErrorMessageAdapter.getErrorCauseMessage(result, operation, getResources()),
/**
- * 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
--- /dev/null
+/**
+ * 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.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.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.fragment.SearchShareesFragment;
+import com.owncloud.android.ui.fragment.ShareFileFragment;
+import com.owncloud.android.utils.GetShareWithUsersAsyncTask;
+
+
+/**
+ * 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";
+
+
+ @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");
+ refreshUsersInLists();
+
+ // 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();
+ doShareWith(
+ data.getLastPathSegment(),
+ 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()) {
+ Log_OC.d(TAG, "Refreshing lists on successful sync");
+ refreshUsersInLists();
+ }
+
+ }
+
+ private void refreshUsersInLists() {
+ ShareFileFragment shareFileFragment = getShareFileFragment();
+ if (shareFileFragment != null) { // only if added to the view hierarchy!!
+ if (shareFileFragment.isAdded()) {
+ shareFileFragment.refreshUsersOrGroupsListFromDB();
+ }
+ }
+
+ SearchShareesFragment searchShareesFragment = getSearchFragment();
+ if (searchShareesFragment != null) {
+ if (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);
+ }
+
+}
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.ActionBar;
+import android.view.Menu;
+import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
break;
- case R.id.uploader_new_folder:
- CreateFolderDialogFragment dialog = CreateFolderDialogFragment.newInstance(mFile);
- dialog.show(getSupportFragmentManager(), "createdirdialog");
+ case R.id.uploader_cancel:
+ finish();
break;
Button btnChooseFolder = (Button) findViewById(R.id.uploader_choose_folder);
btnChooseFolder.setOnClickListener(this);
- Button btnNewFolder = (Button) findViewById(R.id.uploader_new_folder);
+ Button btnNewFolder = (Button) findViewById(R.id.uploader_cancel);
btnNewFolder.setOnClickListener(this);
mListView.setOnItemClickListener(this);
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()),
}
}
+ @Override
+ public boolean onCreateOptionsMenu(Menu menu) {
+ MenuInflater inflater = getMenuInflater();
+ inflater.inflate(R.menu.main_menu, menu);
+ menu.findItem(R.id.action_upload).setVisible(false);
+ menu.findItem(R.id.action_sort).setVisible(false);
+ menu.findItem(R.id.action_sync_account).setVisible(false);
+ return true;
+ }
@Override
public boolean onOptionsItemSelected(MenuItem item) {
boolean retval = true;
switch (item.getItemId()) {
+ case R.id.action_create_dir:
+ CreateFolderDialogFragment dialog = CreateFolderDialogFragment.newInstance(mFile);
+ dialog.show(
+ getSupportFragmentManager(),
+ CreateFolderDialogFragment.CREATE_FOLDER_FRAGMENT);
+ break;
case android.R.id.home:
if((mParents.size() > 1)) {
onBackPressed();
* @author Bartek Przybylski\r
* @author Tobias Kaminsky\r
* @author David A. Velasco\r
+ * @author masensio\r
* Copyright (C) 2011 Bartek Przybylski\r
* Copyright (C) 2015 ownCloud Inc.\r
*\r
import android.content.Context;\r
import android.content.SharedPreferences;\r
import android.graphics.Bitmap;\r
-import android.graphics.drawable.Drawable;\r
import android.os.Build;\r
import android.preference.PreferenceManager;\r
import android.text.format.DateUtils;\r
import com.owncloud.android.ui.activity.ComponentsGetter;\r
import com.owncloud.android.utils.DisplayUtils;\r
import com.owncloud.android.utils.FileStorageUtils;\r
+import com.owncloud.android.utils.MimetypeIconUtil;\r
\r
\r
/**\r
* 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
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
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
- } else if (uploaderBinder != null &&\r
- uploaderBinder.isUploading(mAccount, file)) {\r
- localStateView.setImageResource(R.drawable.uploading_file_indicator);\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
+\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
}\r
}\r
\r
- if (file.getMimetype().equalsIgnoreCase("image/png")){\r
- Drawable backrepeat = mContext.getResources().\r
- getDrawable(R.drawable.backrepeat);\r
- fileIcon.setBackground(backrepeat);\r
+ if (file.getMimetype().equalsIgnoreCase("image/png")) {\r
+ fileIcon.setBackgroundColor(mContext.getResources()\r
+ .getColor(R.color.background_color));\r
}\r
\r
+\r
} else {\r
- fileIcon.setImageResource(DisplayUtils.getFileTypeIconId(file.getMimetype(),\r
+ fileIcon.setImageResource(MimetypeIconUtil.getFileTypeIconId(file.getMimetype(),\r
file.getFileName()));\r
}\r
\r
} else {\r
// Folder\r
- if (checkIfFileIsSharedWithMe(file)) {\r
- fileIcon.setImageResource(R.drawable.shared_with_me_folder);\r
- } else if (file.isShareByLink()) {\r
- // If folder is sharedByLink, icon folder must be changed to\r
- // folder-public one\r
- fileIcon.setImageResource(R.drawable.folder_public);\r
- } else {\r
- fileIcon.setImageResource(\r
- DisplayUtils.getFileTypeIconId(file.getMimetype(), file.getFileName())\r
- );\r
- }\r
+ fileIcon.setImageResource(\r
+ MimetypeIconUtil.getFolderTypeIconId(\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
}\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
import com.owncloud.android.R;
import com.owncloud.android.datamodel.ThumbnailsCacheManager;
+import com.owncloud.android.lib.common.utils.Log_OC;
import com.owncloud.android.utils.BitmapUtils;
import com.owncloud.android.utils.DisplayUtils;
+import com.owncloud.android.utils.MimetypeIconUtil;
/**
* This Adapter populates a ListView with all files and directories contained
* in a local directory
*/
public class LocalFileListAdapter extends BaseAdapter implements ListAdapter {
-
+
+ private static final String TAG = LocalFileListAdapter.class.getSimpleName();
+
private Context mContext;
private File mDirectory;
private File[] mFiles = null;
fileName.setText(name);
ImageView fileIcon = (ImageView) view.findViewById(R.id.thumbnail);
+
+ /** Cancellation needs do be checked and done before changing the drawable in fileIcon, or
+ * {@link ThumbnailsCacheManager#cancelPotentialWork} will NEVER cancel any task.
+ **/
+ boolean allowedToCreateNewThumbnail = (ThumbnailsCacheManager.cancelPotentialWork(file, fileIcon));
+
if (!file.isDirectory()) {
fileIcon.setImageResource(R.drawable.file);
} else {
} else {
// generate new Thumbnail
- if (ThumbnailsCacheManager.cancelPotentialWork(file, fileIcon)) {
+ if (allowedToCreateNewThumbnail) {
final ThumbnailsCacheManager.ThumbnailGenerationTask task =
new ThumbnailsCacheManager.ThumbnailGenerationTask(fileIcon);
if (thumbnail == null) {
);
fileIcon.setImageDrawable(asyncDrawable);
task.execute(file);
- }
+ Log_OC.v(TAG, "Executing task to generate a new thumbnail");
+
+ } // else, already being generated, don't restart it
}
} else {
- fileIcon.setImageResource(DisplayUtils.getFileTypeIconId(null, file.getName()));
+ fileIcon.setImageResource(MimetypeIconUtil.getFileTypeIconId(null, file.getName()));
}
} else {
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;
--- /dev/null
+/**
+ * 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);
+ }
+
+
+
+}
*/
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;
import com.owncloud.android.R;
import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;
+import android.util.Log;
import android.view.View;
import android.widget.TextView;
//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;
}
}
}
+ 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) {
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;
+import android.widget.TextView;
import com.owncloud.android.R;
import com.owncloud.android.ui.dialog.parcel.MenuItemParcelable;
OnItemClickListener {
private static final String ARG_ITEM_LIST = "ITEM_LIST";
private static final String ARG_FILE_POSITION = "FILE_POSITION";
+ private static final String ARG_FILE_NAME = "FILE_NAME";
public static final String FTAG_FILE_ACTIONS = "FILE_ACTIONS_FRAGMENT";
private List<MenuItemParcelable> mMenuItems;
* @param menu menu to be display.
* @return Dialog ready to show.
*/
- public static FileActionsDialogFragment newInstance(Menu menu, int filePosition) {
+ public static FileActionsDialogFragment newInstance(Menu menu, int filePosition, String fileName) {
FileActionsDialogFragment fragment = new FileActionsDialogFragment();
Bundle args = new Bundle();
args.putParcelable(ARG_ITEM_LIST, menuParcelable);
args.putInt(ARG_FILE_POSITION, filePosition);
+ args.putCharSequence(ARG_FILE_NAME, fileName);
fragment.setArguments(args);
return fragment;
View view = inflater.inflate(R.layout.file_actions, null, false);
mListView = (ListView) view.findViewById(R.id.file_actions_list);
- getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);
+ CharSequence title = getArguments().getCharSequence(ARG_FILE_NAME);
+ if(title != null && title.length() > 0) {
+ TextView header = (TextView)view.findViewById(R.id.file_actions_header);
+ header.setText(title);
+ header.setVisibility(View.VISIBLE);
+ view.findViewById(R.id.file_actions_header_divider).setVisibility(View.VISIBLE);
+ } else {
+ getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);
+ }
+
return view;
}
*
* Triggers the removal according to the user response.
*/
-import java.util.Vector;
import android.app.Dialog;
import android.os.Bundle;
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
private ArrayList<Integer> mTops;
private int mHeightCell = 0;
- private OnEnforceableRefreshListener mOnRefreshListener = null;
-
+ private SwipeRefreshLayout.OnRefreshListener mOnRefreshListener = null;
+
protected AbsListView mCurrentListView;
private ExtendedListView mListView;
private View mListFooterView;
mRefreshEmptyLayout.setRefreshing(false);
if (mOnRefreshListener != null) {
- mOnRefreshListener.onRefresh(ignoreETag);
+ mOnRefreshListener.onRefresh();
}
}
*/
package com.owncloud.android.ui.fragment;
-import java.lang.ref.WeakReference;
-
import android.accounts.Account;
-import android.content.Intent;
+import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
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;
import com.owncloud.android.lib.common.network.OnDatatransferProgressListener;
import com.owncloud.android.lib.common.utils.Log_OC;
-import com.owncloud.android.services.observer.FileObserverService;
import com.owncloud.android.ui.activity.FileActivity;
import com.owncloud.android.ui.activity.FileDisplayActivity;
import com.owncloud.android.ui.dialog.RemoveFileDialogFragment;
import com.owncloud.android.ui.dialog.RenameFileDialogFragment;
import com.owncloud.android.utils.DisplayUtils;
+import com.owncloud.android.utils.MimetypeIconUtil;
+
+import java.lang.ref.WeakReference;
/**
private int mLayout;
private View mView;
private Account mAccount;
-
+
public ProgressListener mProgressListener;
-
+
private static final String TAG = FileDetailFragment.class.getSimpleName();
public static final String FTAG_CONFIRMATION = "REMOVE_CONFIRMATION_FRAGMENT";
public static final String FTAG_RENAME_FILE = "RENAME_FILE_FRAGMENT";
mLayout = R.layout.file_details_empty;
mProgressListener = null;
}
-
+
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setHasOptionsMenu(true);
}
-
+
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
mAccount = getArguments().getParcelable(ARG_ACCOUNT);
if (savedInstanceState != null) {
- setFile((OCFile)savedInstanceState.getParcelable(FileActivity.EXTRA_FILE));
+ setFile((OCFile) savedInstanceState.getParcelable(FileActivity.EXTRA_FILE));
mAccount = savedInstanceState.getParcelable(FileActivity.EXTRA_ACCOUNT);
}
-
- if(getFile() != null && mAccount != null) {
+
+ if (getFile() != null && mAccount != null) {
mLayout = R.layout.file_details_fragment;
}
-
+
mView = inflater.inflate(mLayout, null);
if (mLayout == R.layout.file_details_fragment) {
super.onStart();
listenForTransferProgress();
}
-
+
@Override
public void onStop() {
leaveTransferProgress();
super.onStop();
}
-
+
@Override
public View getView() {
return super.getView() == null ? mView : super.getView();
}
-
+
/**
* {@inheritDoc}
*/
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);
inflater.inflate(R.menu.file_actions_menu, menu);
- }
+ }
+
-
/**
* {@inheritDoc}
*/
@Override
- public void onPrepareOptionsMenu (Menu menu) {
+ public void onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);
-
+
if (mContainerActivity.getStorageManager() != null) {
FileMenuFilter mf = new FileMenuFilter(
getFile(),
);
mf.filter(menu);
}
-
+
// additional restriction for this fragment
MenuItem item = menu.findItem(R.id.action_see_details);
if (item != null) {
item.setVisible(false);
item.setEnabled(false);
}
+
+ // additional restriction for this fragment
+ item = menu.findItem(R.id.action_copy);
+ if (item != null) {
+ item.setVisible(false);
+ item.setEnabled(false);
+ }
}
-
+
/**
* {@inheritDoc}
*/
mContainerActivity.getFileOperationsHelper().shareFileWithLink(getFile());
return true;
}
+ case R.id.action_share_with_users: {
+ mContainerActivity.getFileOperationsHelper().showShareFile(getFile());
+ return true;
+ }
case R.id.action_unshare_file: {
mContainerActivity.getFileOperationsHelper().unshareFileWithLink(getFile());
return true;
}
+
case R.id.action_open_file_with: {
mContainerActivity.getFileOperationsHelper().openFile(getFile());
return true;
dialog.show(getFragmentManager(), FTAG_RENAME_FILE);
return true;
}
- case R.id.action_cancel_download:
- case R.id.action_cancel_upload: {
+ case R.id.action_cancel_sync: {
((FileDisplayActivity)mContainerActivity).cancelTransference(getFile());
return true;
}
- case R.id.action_download_file:
+ case R.id.action_download_file:
case R.id.action_sync_file: {
mContainerActivity.getFileOperationsHelper().syncFile(getFile());
return true;
// Obtain the file
if (!getFile().isDown()) { // Download the file
Log_OC.d(TAG, getFile().getRemotePath() + " : File must be downloaded");
- ((FileDisplayActivity)mContainerActivity).startDownloadForSending(getFile());
-
- } else {
+ ((FileDisplayActivity) mContainerActivity).startDownloadForSending(getFile());
+ }
+ else {
mContainerActivity.getFileOperationsHelper().sendDownloadedFile(getFile());
}
return true;
break;
}
case R.id.fdCancelBtn: {
- ((FileDisplayActivity)mContainerActivity).cancelTransference(getFile());
+ ((FileDisplayActivity) mContainerActivity).cancelTransference(getFile());
break;
}
default:
}
}
-
/**
* Check if the fragment was created with an empty layout. An empty fragment can't show file details, must be replaced.
- *
- * @return True when the fragment was created with the empty layout.
+ *
+ * @return True when the fragment was created with the empty layout.
*/
public boolean isEmpty() {
return (mLayout == R.layout.file_details_empty || getFile() == null || mAccount == null);
}
-
+
/**
* Use this method to signal this Activity that it shall update its view.
- *
+ *
* @param file : An {@link OCFile}
*/
public void updateFileDetails(OCFile file, Account ocAccount) {
/**
* Updates the view with all relevant details about that file.
+ * <p/>
+ * TODO Remove parameter when the transferring state of files is kept in database.
*
- * TODO Remove parameter when the transferring state of files is kept in database.
- *
- * @param transferring Flag signaling if the file should be considered as downloading or uploading,
- * although {@link FileDownloaderBinder#isDownloading(Account, OCFile)} and
- * {@link FileUploaderBinder#isUploading(Account, OCFile)} return false.
- *
- * @param refresh If 'true', try to refresh the whole file from the database
+ * @param transferring Flag signaling if the file should be considered as downloading or uploading,
+ * although {@link FileDownloaderBinder#isDownloading(Account, OCFile)} and
+ * {@link FileUploaderBinder#isUploading(Account, OCFile)} return false.
+ * @param refresh If 'true', try to refresh the whole file from the database
*/
public void updateFileDetails(boolean transferring, boolean refresh) {
if (readyToShow()) {
setFile(storageManager.getFileByPath(getFile().getRemotePath()));
}
OCFile file = getFile();
-
+
// set file details
setFilename(file.getFileName());
- setFiletype(file.getMimetype(), file.getFileName());
+ setFiletype(file);
setFilesize(file.getFileLength());
setTimeModified(file.getModificationTimestamp());
(uploaderBinder != null && uploaderBinder.isUploading(mAccount, file))
) {
setButtonsForTransferring();
-
+
} else if (file.isDown()) {
setButtonsForDown();
}
getView().invalidate();
}
-
+
/**
* Checks if the fragment is ready to show details of a OCFile
- *
- * @return 'True' when the fragment is ready to show details of a file
+ *
+ * @return 'True' when the fragment is ready to show details of a file
*/
private boolean readyToShow() {
- return (getFile() != null && mAccount != null && mLayout == R.layout.file_details_fragment);
+ return (getFile() != null && mAccount != null && mLayout == R.layout.file_details_fragment);
}
/**
* Updates the filename in view
+ *
* @param filename to set
*/
private void setFilename(String filename) {
TextView tv = (TextView) getView().findViewById(R.id.fdFilename);
- if (tv != null)
+ if (tv != null) {
tv.setText(filename);
+ }
}
/**
* 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(DisplayUtils.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));
+ }
}
}
/**
* Updates the file size in view
+ *
* @param filesize in bytes to set
*/
private void setFilesize(long filesize) {
TextView tv = (TextView) getView().findViewById(R.id.fdSize);
- if (tv != null)
+ if (tv != null) {
tv.setText(DisplayUtils.bytesToHumanReadable(filesize));
+ }
}
-
+
/**
* Updates the time that the file was last modified
+ *
* @param milliseconds Unix time to set
*/
- private void setTimeModified(long milliseconds){
+ private void setTimeModified(long milliseconds) {
TextView tv = (TextView) getView().findViewById(R.id.fdModified);
- if(tv != null){
+ if (tv != null) {
tv.setText(DisplayUtils.unixTimeToHumanReadable(milliseconds));
}
}
-
+
/**
* Enables or disables buttons for a file being downloaded
*/
// show the progress bar for the transfer
getView().findViewById(R.id.fdProgressBlock).setVisibility(View.VISIBLE);
- TextView progressText = (TextView)getView().findViewById(R.id.fdProgressText);
+ TextView progressText = (TextView) getView().findViewById(R.id.fdProgressText);
progressText.setVisibility(View.VISIBLE);
FileDownloaderBinder downloaderBinder = mContainerActivity.getFileDownloaderBinder();
FileUploaderBinder uploaderBinder = mContainerActivity.getFileUploaderBinder();
//if (getFile().isDownloading()) {
if (downloaderBinder != null && downloaderBinder.isDownloading(mAccount, getFile())) {
progressText.setText(R.string.downloader_download_in_progress_ticker);
- } else if (uploaderBinder != null && uploaderBinder.isUploading(mAccount, getFile())) {
- progressText.setText(R.string.uploader_upload_in_progress_ticker);
+ }
+ else {
+ if (uploaderBinder != null && uploaderBinder.isUploading(mAccount, getFile())) {
+ progressText.setText(R.string.uploader_upload_in_progress_ticker);
+ }
}
}
}
/**
- * Enables or disables buttons for a file locally available
+ * Enables or disables buttons for a file locally available
*/
private void setButtonsForDown() {
if (!isEmpty()) {
// hides the progress bar
getView().findViewById(R.id.fdProgressBlock).setVisibility(View.GONE);
- TextView progressText = (TextView)getView().findViewById(R.id.fdProgressText);
+ TextView progressText = (TextView) getView().findViewById(R.id.fdProgressText);
progressText.setVisibility(View.GONE);
}
}
/**
- * Enables or disables buttons for a file not locally available
+ * Enables or disables buttons for a file not locally available
*/
private void setButtonsForRemote() {
if (!isEmpty()) {
// hides the progress bar
getView().findViewById(R.id.fdProgressBlock).setVisibility(View.GONE);
- TextView progressText = (TextView)getView().findViewById(R.id.fdProgressText);
+ TextView progressText = (TextView) getView().findViewById(R.id.fdProgressText);
progressText.setVisibility(View.GONE);
}
}
-
+
public void listenForTransferProgress() {
if (mProgressListener != null) {
}
}
}
-
-
+
+
public void leaveTransferProgress() {
if (mProgressListener != null) {
if (mContainerActivity.getFileDownloaderBinder() != null) {
}
-
/**
* Helper class responsible for updating the progress bar shown for file uploading or
* downloading
private class ProgressListener implements OnDatatransferProgressListener {
int mLastPercent = 0;
WeakReference<ProgressBar> mProgressBar = null;
-
+
ProgressListener(ProgressBar progressBar) {
mProgressBar = new WeakReference<ProgressBar>(progressBar);
}
-
+
@Override
public void onTransferProgress(long progressRate, long totalTransferredSoFar,
long totalToTransfer, String filename) {
* @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);
-
}
}
*/
package com.owncloud.android.ui.fragment;
-import java.io.File;
-
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
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.DialogMenuItem;
+import com.owncloud.android.ui.preview.PreviewTextFragment;
import com.owncloud.android.utils.FileStorageUtils;
+import java.io.File;
+
/**
* A Fragment that lists all files and folders in a given path.
- *
+ *
* 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();
private static final String MY_PACKAGE = OCFileListFragment.class.getPackage() != null ?
OCFileListFragment.class.getPackage().getName() : "com.owncloud.android.ui.fragment";
-
+
public final static String ARG_JUST_FOLDERS = MY_PACKAGE + ".JUST_FOLDERS";
public final static String ARG_ALLOW_CONTEXTUAL_ACTIONS = MY_PACKAGE + ".ALLOW_CONTEXTUAL";
-
+
private static final String KEY_FILE = MY_PACKAGE + ".extra.FILE";
private FileFragment.ContainerActivity mContainerActivity;
-
+
private OCFile mFile = null;
private FileListListAdapter mAdapter;
private boolean mJustFolders;
Log_OC.e(TAG, "onAttach");
try {
mContainerActivity = (FileFragment.ContainerActivity) activity;
-
+
} catch (ClassCastException e) {
- throw new ClassCastException(activity.toString() + " must implement " +
+ throw new ClassCastException(activity.toString() + " must implement " +
FileFragment.ContainerActivity.class.getSimpleName());
}
try {
setOnRefreshListener((OnEnforceableRefreshListener) activity);
} catch (ClassCastException e) {
- throw new ClassCastException(activity.toString() + " must implement " +
+ throw new ClassCastException(activity.toString() + " must implement " +
SwipeRefreshLayout.OnRefreshListener.class.getSimpleName());
}
}
-
+
@Override
public void onDetach() {
setOnRefreshListener(null);
mJustFolders,
getActivity(),
mContainerActivity
- );
+ );
setListAdapter(mAdapter);
registerLongClickListener();
}
}
- FileActionsDialogFragment dialog = FileActionsDialogFragment.newInstance(menu, fileIndex);
+ FileActionsDialogFragment dialog = FileActionsDialogFragment.newInstance(menu,
+ fileIndex, targetFile.getFileName());
dialog.setTargetFragment(this, 0);
dialog.show(getFragmentManager(), FileActionsDialogFragment.FTAG_FILE_ACTIONS);
}
* Saves the current listed folder.
*/
@Override
- public void onSaveInstanceState (Bundle outState) {
+ public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putParcelable(KEY_FILE, mFile);
}
-
+
/**
* Call this, when the user presses the up button.
- *
+ *
* Tries to move up the current folder one level. If the parent folder was removed from the
* database, it continues browsing up until finding an existing folders.
- *
+ * <p/>
* return Count of folder levels browsed up.
*/
public int onBrowseUp() {
OCFile parentDir = null;
int moveCount = 0;
-
- if(mFile != null){
+
+ if (mFile != null) {
FileDataStorageManager storageManager = mContainerActivity.getStorageManager();
-
+
String parentPath = null;
if (mFile.getParentId() != FileDataStorageManager.ROOT_PARENT_ID) {
parentPath = new File(mFile.getRemotePath()).getParent();
- parentPath = parentPath.endsWith(OCFile.PATH_SEPARATOR) ? parentPath :
- parentPath + OCFile.PATH_SEPARATOR;
+ parentPath = parentPath.endsWith(OCFile.PATH_SEPARATOR) ? parentPath :
+ parentPath + OCFile.PATH_SEPARATOR;
parentDir = storageManager.getFileByPath(parentPath);
moveCount++;
} else {
}
while (parentDir == null) {
parentPath = new File(parentPath).getParent();
- parentPath = parentPath.endsWith(OCFile.PATH_SEPARATOR) ? parentPath :
- parentPath + OCFile.PATH_SEPARATOR;
+ parentPath = parentPath.endsWith(OCFile.PATH_SEPARATOR) ? parentPath :
+ parentPath + OCFile.PATH_SEPARATOR;
parentDir = storageManager.getFileByPath(parentPath);
moveCount++;
} // exit is granted because storageManager.getFileByPath("/") never returns null
listDirectory(mFile /*, MainApp.getOnlyOnDevice()*/);
onRefresh(false);
-
+
// restore index and top position
restoreIndexAndTopPosition();
-
+
} // else - should never happen now
-
+
return moveCount;
}
-
+
@Override
public void onItemClick(AdapterView<?> l, View v, int position, long id) {
OCFile file = (OCFile) mAdapter.getItem(position);
if (file != null) {
- if (file.isFolder()) {
+ if (file.isFolder()) {
// update state and view of this fragment
// TODO Enable when "On Device" is recovered ?
listDirectory(file/*, MainApp.getOnlyOnDevice()*/);
mContainerActivity.onBrowsedDownTo(file);
// save index and top position
saveIndexAndTopPosition(position);
-
+
} else { /// Click on a file
if (PreviewImageFragment.canBePreviewed(file)) {
// preview image - it handles the download, if needed
((FileDisplayActivity)mContainerActivity).startImagePreview(file);
-
+ } else if (PreviewTextFragment.canBePreviewed(file)){
+ ((FileDisplayActivity)mContainerActivity).startTextPreview(file);
} else if (file.isDown()) {
if (PreviewMediaFragment.canBePreviewed(file)) {
// media preview
- ((FileDisplayActivity)mContainerActivity).startMediaPreview(file, 0, true);
+ ((FileDisplayActivity) mContainerActivity).startMediaPreview(file, 0, true);
} else {
mContainerActivity.getFileOperationsHelper().openFile(file);
}
-
+
} else {
// automatic download, preview on finish
- ((FileDisplayActivity)mContainerActivity).startDownloadForPreview(file);
+ ((FileDisplayActivity) mContainerActivity).startDownloadForPreview(file);
}
-
+
}
-
+
} else {
Log_OC.d(TAG, "Null object in ListAdapter!!");
}
-
+
}
-
+
/**
* {@inheritDoc}
*/
@Override
- public void onCreateContextMenu (
+ public void onCreateContextMenu(
ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
Bundle args = getArguments();
- boolean allowContextualActions =
- (args == null) ? true : args.getBoolean(ARG_ALLOW_CONTEXTUAL_ACTIONS, true);
+ boolean allowContextualActions =
+ (args == null) ? true : args.getBoolean(ARG_ALLOW_CONTEXTUAL_ACTIONS, true);
if (allowContextualActions) {
MenuInflater inflater = getActivity().getMenuInflater();
inflater.inflate(R.menu.file_actions_menu, menu);
AdapterContextMenuInfo info = (AdapterContextMenuInfo) menuInfo;
OCFile targetFile = (OCFile) mAdapter.getItem(info.position);
-
+
if (mContainerActivity.getStorageManager() != null) {
FileMenuFilter mf = new FileMenuFilter(
targetFile,
mContainerActivity.getFileOperationsHelper().shareFileWithLink(mTargetFile);
return true;
}
+ case R.id.action_share_with_users: {
+ mContainerActivity.getFileOperationsHelper().showShareFile(mTargetFile);
+ return true;
+ }
case R.id.action_open_file_with: {
mContainerActivity.getFileOperationsHelper().openFile(mTargetFile);
return true;
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: {
mContainerActivity.getFileOperationsHelper().toggleFavorite(mTargetFile, false);
return true;
}
+ case R.id.action_copy:
+ Intent action = new Intent(getActivity(), FolderPickerActivity.class);
+
+ // Pass mTargetFile that contains info of selected file/folder
+ action.putExtra(FolderPickerActivity.EXTRA_FILE, mTargetFile);
+ getActivity().startActivityForResult(action, FileDisplayActivity.ACTION_COPY_FILES);
+ return true;
default:
return false;
}
@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 {
/**
* Use this to query the {@link OCFile} that is currently
* being displayed by this fragment
+ *
* @return The currently viewed OCFile
*/
- public OCFile getCurrentFile(){
+ public OCFile getCurrentFile() {
return mFile;
}
-
+
/**
* Calls {@link OCFileListFragment#listDirectory(OCFile)} with a null parameter
*/
// TODO Enable when "On Device" is recovered ?
listDirectory(getCurrentFile()/*, MainApp.getOnlyOnDevice()*/);
}
-
+
/**
* Lists the given directory on the view. When the input parameter is null,
* it will either refresh the last known directory. list the root
* if there never was a directory.
- *
+ *
* @param directory File to be listed
*/
public void listDirectory(OCFile directory/*, boolean onlyOnDevice*/) {
if (storageManager != null) {
// Check input parameters for null
- if(directory == null){
- if(mFile != null){
+ if (directory == null) {
+ if (mFile != null) {
directory = mFile;
} else {
directory = storageManager.getFileByPath("/");
if (directory == null) return; // no files, wait for sync
}
}
-
-
+
+
// If that's not a directory -> List its parent
- if(!directory.isFolder()){
+ if (!directory.isFolder()) {
Log_OC.w(TAG, "You see, that is not a directory -> " + directory.toString());
directory = storageManager.getFileById(directory.getParentId());
}
--- /dev/null
+/**
+ * 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);
+ }
+
+}
--- /dev/null
+/**
+ * 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.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.ImageView;
+import android.widget.ListView;
+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.ui.activity.FileActivity;
+import com.owncloud.android.ui.activity.ShareActivity;
+import com.owncloud.android.ui.adapter.ShareUserListAdapter;
+import com.owncloud.android.utils.DisplayUtils;
+import com.owncloud.android.utils.MimetypeIconUtil;
+
+import java.util.ArrayList;
+
+/**
+ * Fragment for Sharing a file with sharees (users or groups)
+ *
+ * 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";
+
+ // Parameters
+ private OCFile mFile;
+ private Account mAccount;
+
+ // other members
+ private ArrayList<OCShare> mShares;
+ private ShareUserListAdapter mUserGroupsAdapter = null;
+ private OnShareFragmentInteractionListener mListener;
+
+ /**
+ * 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);
+ 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.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();
+ }
+ }
+ });
+
+ return view;
+ }
+
+ @Override
+ public void onActivityCreated(Bundle savedInstanceState) {
+ super.onActivityCreated(savedInstanceState);
+
+ // Load data into the list
+ refreshUsersOrGroupsListFromDB();
+ }
+
+ @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 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
+ 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(),
+ R.layout.share_user_item,
+ mShares,
+ this
+ );
+
+ // Show data
+ TextView noShares = (TextView) getView().findViewById(R.id.shareNoUsers);
+ ListView usersList = (ListView) getView().findViewById(R.id.shareUsersList);
+
+ if (mShares.size() > 0) {
+ noShares.setVisibility(View.GONE);
+ usersList.setVisibility(View.VISIBLE);
+ usersList.setAdapter(mUserGroupsAdapter);
+
+ } else {
+ noShares.setVisibility(View.VISIBLE);
+ usersList.setVisibility(View.GONE);
+ }
+ }
+
+ @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 OnShareFragmentInteractionListener {
+ void showSearchUsersAndGroups();
+ void refreshUsersOrGroupsListFromServer();
+ void unshareWith(OCShare share);
+ }
+
+}
public ProgressListener mProgressListener;
private boolean mListening;
-
+
private static final String TAG = FileDownloadFragment.class.getSimpleName();
-
+
private boolean mIgnoreFirstSavedState;
private boolean mError;
mIgnoreFirstSavedState = args.getBoolean(ARG_IGNORE_FIRST);
mAccount = args.getParcelable(ARG_ACCOUNT);
}
-
+
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
+ Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState);
-
+
if (savedInstanceState != null) {
if (!mIgnoreFirstSavedState) {
- setFile((OCFile)savedInstanceState.getParcelable(FileDownloadFragment.EXTRA_FILE));
+ setFile((OCFile) savedInstanceState.getParcelable(FileDownloadFragment.EXTRA_FILE));
mAccount = savedInstanceState.getParcelable(FileDownloadFragment.EXTRA_ACCOUNT);
mError = savedInstanceState.getBoolean(FileDownloadFragment.EXTRA_ERROR);
- } else {
+ }
+ else {
mIgnoreFirstSavedState = false;
}
}
ProgressBar progressBar = (ProgressBar)mView.findViewById(R.id.progressBar);
DisplayUtils.colorPreLollipopHorizontalProgressBar(progressBar);
mProgressListener = new ProgressListener(progressBar);
-
+
(mView.findViewById(R.id.cancelBtn)).setOnClickListener(this);
(mView.findViewById(R.id.fileDownloadLL)).setOnClickListener(new OnClickListener() {
if (mError) {
setButtonsForRemote();
- } else {
+ }
+ else {
setButtonsForTransferring();
}
-
+
return mView;
}
-
+
@Override
public void onSaveInstanceState(Bundle outState) {
super.onStart();
listenForTransferProgress();
}
-
+
@Override
public void onResume() {
super.onResume();
super.onPause();
}
-
+
@Override
public void onStop() {
leaveTransferProgress();
super.onStop();
}
-
+
@Override
public void onDestroy() {
super.onDestroy();
}
-
-
+
+
@Override
public View getView() {
if (!mListening) {
return super.getView() == null ? mView : super.getView();
}
-
+
@Override
public void onClick(View v) {
switch (v.getId()) {
}
}
-
+
/**
* Enables or disables buttons for a file being downloaded
*/
private void setButtonsForTransferring() {
getView().findViewById(R.id.cancelBtn).setVisibility(View.VISIBLE);
-
+
// show the progress bar for the transfer
getView().findViewById(R.id.progressBar).setVisibility(View.VISIBLE);
- TextView progressText = (TextView)getView().findViewById(R.id.progressText);
+ TextView progressText = (TextView) getView().findViewById(R.id.progressText);
progressText.setText(R.string.downloader_download_in_progress_ticker);
progressText.setVisibility(View.VISIBLE);
-
+
// hides the error icon
getView().findViewById(R.id.errorText).setVisibility(View.GONE);
getView().findViewById(R.id.error_image).setVisibility(View.GONE);
}
-
/**
- * Enables or disables buttons for a file locally available
+ * Enables or disables buttons for a file locally available
*/
private void setButtonsForDown() {
getView().findViewById(R.id.cancelBtn).setVisibility(View.GONE);
-
+
// hides the progress bar
getView().findViewById(R.id.progressBar).setVisibility(View.GONE);
-
+
// updates the text message
- TextView progressText = (TextView)getView().findViewById(R.id.progressText);
+ TextView progressText = (TextView) getView().findViewById(R.id.progressText);
progressText.setText(R.string.common_loading);
progressText.setVisibility(View.VISIBLE);
-
+
// hides the error icon
getView().findViewById(R.id.errorText).setVisibility(View.GONE);
getView().findViewById(R.id.error_image).setVisibility(View.GONE);
}
-
+
/**
- * Enables or disables buttons for a file not locally available
- *
+ * Enables or disables buttons for a file not locally available
+ * <p/>
* Currently, this is only used when a download was failed
*/
private void setButtonsForRemote() {
getView().findViewById(R.id.cancelBtn).setVisibility(View.GONE);
-
+
// hides the progress bar and message
getView().findViewById(R.id.progressBar).setVisibility(View.GONE);
getView().findViewById(R.id.progressText).setVisibility(View.GONE);
getView().findViewById(R.id.errorText).setVisibility(View.VISIBLE);
getView().findViewById(R.id.error_image).setVisibility(View.VISIBLE);
}
-
+
public void listenForTransferProgress() {
if (mProgressListener != null && !mListening) {
}
}
}
-
-
+
+
public void leaveTransferProgress() {
if (mProgressListener != null) {
if (mContainerActivity.getFileDownloaderBinder() != null) {
private class ProgressListener implements OnDatatransferProgressListener {
int mLastPercent = 0;
WeakReference<ProgressBar> mProgressBar = null;
-
+
ProgressListener(ProgressBar progressBar) {
mProgressBar = new WeakReference<ProgressBar>(progressBar);
}
-
+
@Override
public void onTransferProgress(
long progressRate, long totalTransferredSoFar, long totalToTransfer, String filename
public void setError(boolean error) {
mError = error;
- };
-
+ }
+
+ ;
}
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;
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.CreateShareViaLinkOperation;
+import com.owncloud.android.operations.CreateShareWithShareeOperation;
import com.owncloud.android.operations.RemoveFileOperation;
import com.owncloud.android.operations.SynchronizeFileOperation;
-import com.owncloud.android.operations.UnshareLinkOperation;
+import com.owncloud.android.operations.UnshareOperation;
import com.owncloud.android.ui.activity.FileActivity;
import com.owncloud.android.ui.activity.FileDisplayActivity;
+import com.owncloud.android.ui.activity.ShareActivity;
import com.owncloud.android.ui.fragment.FileFragment;
-import com.owncloud.android.utils.DisplayUtils;
/**
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);
+ if (operation instanceof CreateShareViaLinkOperation ||
+ operation instanceof CreateShareWithShareeOperation) {
+ onCreateShareOperationFinish(result);
+
+ } else if (operation instanceof UnshareOperation) {
+ onUnshareLinkOperationFinish((UnshareOperation) operation, result);
} else if (operation instanceof RemoveFileOperation) {
finish();
}
- private void onUnshareLinkOperationFinish(UnshareLinkOperation operation,
+ private void onUnshareLinkOperationFinish(UnshareOperation operation,
RemoteOperationResult result) {
if (result.isSuccess()) {
OCFile file = getStorageManager().getFileByPath(getFile().getRemotePath());
}
- private void onCreateShareOperationFinish(CreateShareOperation operation,
- RemoteOperationResult result) {
+ private void onCreateShareOperationFinish(RemoteOperationResult result) {
if (result.isSuccess()) {
OCFile file = getStorageManager().getFileByPath(getFile().getRemotePath());
if (file != null) {
}
-
private void requestForDownload(OCFile file) {
if (mDownloaderBinder == null) {
Log_OC.d(TAG, "requestForDownload called without binder to download service");
private ProgressBar mProgressWheel;
public Bitmap mBitmap = null;
-
+
private static final String TAG = PreviewImageFragment.class.getSimpleName();
private boolean mIgnoreFirstSavedState;
-
+
private LoadBitmapTask mLoadBitmapTask = null;
return frag;
}
-
+
/**
* Creates an empty fragment for image previews.
public PreviewImageFragment() {
mIgnoreFirstSavedState = false;
}
-
-
+
+
/**
* {@inheritDoc}
*/
mIgnoreFirstSavedState = args.getBoolean(ARG_IGNORE_FIRST);
setHasOptionsMenu(true);
}
-
+
/**
* {@inheritDoc}
*/
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
+ Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState);
View view = inflater.inflate(R.layout.preview_image_fragment, container, false);
mImageView = (TouchImageViewCustom) view.findViewById(R.id.image);
throw new IllegalStateException("There is no local file to preview");
}
}
-
+
/**
* {@inheritDoc}
super.onSaveInstanceState(outState);
outState.putParcelable(PreviewImageFragment.EXTRA_FILE, getFile());
}
-
+
@Override
public void onStart() {
mLoadBitmapTask.execute(getFile());
}
}
-
-
+
+
@Override
public void onStop() {
Log_OC.d(TAG, "onStop starts");
}
super.onStop();
}
-
+
/**
* {@inheritDoc}
*/
@Override
public void onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);
-
+
if (mContainerActivity.getStorageManager() != null) {
// Update the file
setFile(mContainerActivity.getStorageManager().getFileById(getFile().getFileId()));
-
+
FileMenuFilter mf = new FileMenuFilter(
getFile(),
mContainerActivity.getStorageManager().getAccount(),
);
mf.filter(menu);
}
-
+
// additional restriction for this fragment
// TODO allow renaming in PreviewImageFragment
MenuItem item = menu.findItem(R.id.action_rename_file);
item.setVisible(false);
item.setEnabled(false);
}
-
+
// additional restriction for this fragment
// TODO allow refresh file in PreviewImageFragment
item = menu.findItem(R.id.action_sync_file);
item.setVisible(false);
item.setEnabled(false);
}
-
+
+ // additional restriction for this fragment
+ item = menu.findItem(R.id.action_copy);
+ if (item != null) {
+ item.setVisible(false);
+ item.setEnabled(false);
+ }
+
}
-
-
+
/**
* {@inheritDoc}
*/
mContainerActivity.getFileOperationsHelper().shareFileWithLink(getFile());
return true;
}
+ case R.id.action_share_with_users: {
+ mContainerActivity.getFileOperationsHelper().showShareFile(getFile());
+ return true;
+ }
case R.id.action_unshare_file: {
mContainerActivity.getFileOperationsHelper().unshareFileWithLink(getFile());
return true;
return false;
}
}
-
+
private void seeDetails() {
- mContainerActivity.showDetails(getFile());
+ mContainerActivity.showDetails(getFile());
}
-
@Override
public void onResume() {
super.onResume();
super.onDestroy();
}
-
+
/**
* Opens the previewed image with an external application.
*/
mContainerActivity.getFileOperationsHelper().openFile(getFile());
finish();
}
-
+
private class LoadBitmapTask extends AsyncTask<OCFile, Void, LoadImage> {
*/
private final WeakReference<TextView> mMessageViewRef;
-
+
/**
* Weak reference to the target {@link ProgressBar} shown while the load is in progress.
*
*/
private final WeakReference<ProgressBar> mProgressWheelRef;
-
+
/**
- * Error message to show when a load fails
+ * Error message to show when a load fails
*/
private int mErrorMessageId;
-
-
+
+
/**
* Constructor.
- *
- * @param imageView Target {@link ImageView} where the bitmap will be loaded into.
+ *
+ * @param imageView Target {@link ImageView} where the bitmap will be loaded into.
*/
public LoadBitmapTask(ImageViewCustom imageView, TextView messageView,
ProgressBar progressWheel) {
mMessageViewRef = new WeakReference<TextView>(messageView);
mProgressWheelRef = new WeakReference<ProgressBar>(progressWheel);
}
-
+
@Override
protected LoadImage doInBackground(OCFile... params) {
Bitmap result = null;
} catch (NoSuchFieldError e) {
mErrorMessageId = R.string.common_error_unknown;
- Log_OC.e(TAG, "Error from access to unexisting field despite protection; file "
- + storagePath, e);
-
+ Log_OC.e(TAG, "Error from access to unexisting field despite protection; file "
+ + storagePath, e);
+
} catch (Throwable t) {
mErrorMessageId = R.string.common_error_unknown;
Log_OC.e(TAG, "Unexpected error loading " + getFile().getStoragePath(), t);
-
+
}
+
return new LoadImage(result, ocFile);
}
-
+
@Override
protected void onCancelled(LoadImage result) {
- if (result.bitmap != null) {
+ if (result != null && result.bitmap != null) {
result.bitmap.recycle();
}
}
hideProgressWheel();
if (result.bitmap != null) {
showLoadedImage(result);
- } else {
+ }
+ else {
showErrorMessage();
}
if (result.bitmap != null && mBitmap != result.bitmap) {
result.bitmap.recycle();
}
}
-
+
@SuppressLint("InlinedApi")
private void showLoadedImage(LoadImage result) {
final ImageViewCustom imageView = mImageViewRef.get();
messageView.setVisibility(View.GONE);
} // else , silently finish, the fragment was destroyed
}
-
+
private void showErrorMessage() {
final ImageView imageView = mImageViewRef.get();
if (imageView != null) {
messageView.setVisibility(View.VISIBLE);
} // else , silently finish, the fragment was destroyed
}
-
+
private void hideProgressWheel() {
final ProgressBar progressWheel = mProgressWheelRef.get();
if (progressWheel != null) {
progressWheel.setVisibility(View.GONE);
}
}
-
+
}
/**
return (file != null && file.isImage());
}
-
+
/**
* Finishes the preview
*/
Activity container = getActivity();
container.finish();
}
-
+
public TouchImageViewCustom getImageView() {
return mImageView;
}
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;
import android.view.View.OnTouchListener;
import android.view.ViewGroup;
import android.widget.ImageView;
-import android.widget.LinearLayout;
import android.widget.Toast;
import android.widget.VideoView;
/**
* This fragment shows a preview of a downloaded media file (audio or video).
- *
+ *
* Trying to get an instance with NULL {@link OCFile} or ownCloud {@link Account} values will
* produce an {@link IllegalStateException}.
*
private ImageView mImagePreview;
private VideoView mVideoPreview;
private int mSavedPlaybackPosition;
-
+
private MediaServiceBinder mMediaServiceBinder = null;
private MediaControlView mMediaController = null;
private MediaServiceConnection mMediaServiceConnection = null;
private VideoHelper mVideoHelper;
private boolean mAutoplay;
public boolean mPrepared;
-
+
private static final String TAG = PreviewMediaFragment.class.getSimpleName();
-
+
/**
* Creates a fragment to preview a file.
- *
+ * <p/>
* When 'fileToDetail' or 'ocAccount' are null
- *
- * @param fileToDetail An {@link OCFile} to preview in the fragment
- * @param ocAccount An ownCloud account; needed to start downloads
+ *
+ * @param fileToDetail An {@link OCFile} to preview in the fragment
+ * @param ocAccount An ownCloud account; needed to start downloads
*/
public PreviewMediaFragment(
- OCFile fileToDetail,
- Account ocAccount,
- int startPlaybackPosition,
+ OCFile fileToDetail,
+ Account ocAccount,
+ int startPlaybackPosition,
boolean autoplay) {
-
+
super(fileToDetail);
mAccount = ocAccount;
mSavedPlaybackPosition = startPlaybackPosition;
mAutoplay = autoplay;
}
-
-
+
+
/**
- * Creates an empty fragment for previews.
- *
- * MUST BE KEPT: the system uses it when tries to reinstantiate a fragment automatically
- * (for instance, when the device is turned a aside).
- *
- * DO NOT CALL IT: an {@link OCFile} and {@link Account} must be provided for a successful
- * construction
+ * Creates an empty fragment for previews.
+ * <p/>
+ * MUST BE KEPT: the system uses it when tries to reinstantiate a fragment automatically
+ * (for instance, when the device is turned a aside).
+ * <p/>
+ * DO NOT CALL IT: an {@link OCFile} and {@link Account} must be provided for a successful
+ * construction
*/
public PreviewMediaFragment() {
super();
mSavedPlaybackPosition = 0;
mAutoplay = true;
}
-
-
+
+
/**
* {@inheritDoc}
*/
super.onCreate(savedInstanceState);
setHasOptionsMenu(true);
}
-
+
/**
* {@inheritDoc}
*/
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
+ 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);
-
- mImagePreview = (ImageView)mView.findViewById(R.id.image_preview);
- mVideoPreview = (VideoView)mView.findViewById(R.id.video_preview);
+
+ mImagePreview = (ImageView) mView.findViewById(R.id.image_preview);
+ mVideoPreview = (VideoView) mView.findViewById(R.id.video_preview);
mVideoPreview.setOnTouchListener(this);
-
- mMediaController = (MediaControlView)mView.findViewById(R.id.media_controller);
-
+
+ mMediaController = (MediaControlView) mView.findViewById(R.id.media_controller);
+
return mView;
}
-
+
/**
* {@inheritDoc}
@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) {
if (!file.isDown()) {
throw new IllegalStateException("There is no local file to preview");
}
-
- } else {
- file = (OCFile)savedInstanceState.getParcelable(PreviewMediaFragment.EXTRA_FILE);
+
+ }
+ else {
+ file = (OCFile) savedInstanceState.getParcelable(PreviewMediaFragment.EXTRA_FILE);
setFile(file);
mAccount = savedInstanceState.getParcelable(PreviewMediaFragment.EXTRA_ACCOUNT);
- mSavedPlaybackPosition =
+ mSavedPlaybackPosition =
savedInstanceState.getInt(PreviewMediaFragment.EXTRA_PLAY_POSITION);
mAutoplay = savedInstanceState.getBoolean(PreviewMediaFragment.EXTRA_PLAYING);
-
+
}
if (file != null && file.isDown()) {
if (file.isVideo()) {
mVideoPreview.setVisibility(View.VISIBLE);
mImagePreview.setVisibility(View.GONE);
prepareVideo();
-
- } else {
+
+ }
+ else {
mVideoPreview.setVisibility(View.GONE);
mImagePreview.setVisibility(View.VISIBLE);
extractAndSetCoverArt(file);
}
}
-
+
}
/**
@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);
-
+
if (getFile().isVideo()) {
mSavedPlaybackPosition = mVideoPreview.getCurrentPosition();
mAutoplay = mVideoPreview.isPlaying();
- outState.putInt(PreviewMediaFragment.EXTRA_PLAY_POSITION , mSavedPlaybackPosition);
- outState.putBoolean(PreviewMediaFragment.EXTRA_PLAYING , mAutoplay);
- } else {
+ outState.putInt(PreviewMediaFragment.EXTRA_PLAY_POSITION, mSavedPlaybackPosition);
+ outState.putBoolean(PreviewMediaFragment.EXTRA_PLAYING, mAutoplay);
+ }
+ else {
outState.putInt(
- PreviewMediaFragment.EXTRA_PLAY_POSITION ,
+ PreviewMediaFragment.EXTRA_PLAY_POSITION,
mMediaServiceBinder.getCurrentPosition());
outState.putBoolean(
- PreviewMediaFragment.EXTRA_PLAYING , mMediaServiceBinder.isPlaying());
+ PreviewMediaFragment.EXTRA_PLAYING, mMediaServiceBinder.isPlaying());
}
}
-
+
@Override
public void onStart() {
super.onStart();
- Log_OC.e(TAG, "onStart");
+ Log_OC.v(TAG, "onStart");
OCFile file = getFile();
if (file != null && file.isDown()) {
- if (file.isAudio()) {
- bindMediaService();
-
- } else if (file.isVideo()) {
- stopAudio();
- playVideo();
- }
+ if (file.isAudio()) {
+ bindMediaService();
+
+ }
+ else {
+ if (file.isVideo()) {
+ stopAudio();
+ playVideo();
+ }
+ }
}
}
-
-
+
+
private void stopAudio() {
Intent i = new Intent(getActivity(), MediaService.class);
i.setAction(MediaService.ACTION_STOP_ALL);
@Override
public void onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);
-
+
if (mContainerActivity.getStorageManager() != null) {
FileMenuFilter mf = new FileMenuFilter(
getFile(),
item.setVisible(false);
item.setEnabled(false);
}
+
+ // additional restriction for this fragment
+ item = menu.findItem(R.id.action_copy);
+ if (item != null) {
+ item.setVisible(false);
+ item.setEnabled(false);
+ }
}
-
-
+
+
/**
* {@inheritDoc}
*/
mContainerActivity.getFileOperationsHelper().shareFileWithLink(getFile());
return true;
}
+ case R.id.action_share_with_users: {
+ seeShareFile();
+ return true;
+ }
case R.id.action_unshare_file: {
stopPreview(false);
mContainerActivity.getFileOperationsHelper().unshareFileWithLink(getFile());
return false;
}
}
-
/**
* 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){
+ public void updateFile(OCFile file) {
setFile(file);
}
-
+
private void sendFile() {
stopPreview(false);
mContainerActivity.getFileOperationsHelper().sendDownloadedFile(getFile());
-
+
}
private void seeDetails() {
stopPreview(false);
- mContainerActivity.showDetails(getFile());
+ mContainerActivity.showDetails(getFile());
}
+ private void seeShareFile() {
+ stopPreview(false);
+ mContainerActivity.getFileOperationsHelper().showShareFile(getFile());
+ }
private void prepareVideo() {
// create helper to get more control on the playback
mVideoPreview.setOnCompletionListener(mVideoHelper);
mVideoPreview.setOnErrorListener(mVideoHelper);
}
-
+
@SuppressWarnings("static-access")
private void playVideo() {
// create and prepare control panel for the user
mMediaController.setMediaPlayer(mVideoPreview);
-
+
// 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());
}
-
+
private class VideoHelper implements OnCompletionListener, OnPreparedListener, OnErrorListener {
-
- /**
+
+ /**
* Called when the file is ready to be played.
- *
+ * <p/>
* Just starts the playback.
- *
+ *
* @param vp {@link MediaPlayer} instance performing the playback.
*/
@Override
public void onPrepared(MediaPlayer vp) {
- Log_OC.e(TAG, "onPrepared");
+ Log_OC.v(TAG, "onPrepared");
mVideoPreview.seekTo(mSavedPlaybackPosition);
- if (mAutoplay) {
+ if (mAutoplay) {
mVideoPreview.start();
}
mMediaController.setEnabled(true);
mMediaController.updatePausePlay();
mPrepared = true;
}
-
-
+
+
/**
* Called when the file is finished playing.
- *
+ * <p/>
* Finishes the activity.
- *
- * @param mp {@link MediaPlayer} instance performing the playback.
+ *
+ * @param mp {@link MediaPlayer} instance performing the playback.
*/
@Override
- public void onCompletion(MediaPlayer mp) {
- Log_OC.e(TAG, "completed");
+ public void onCompletion(MediaPlayer mp) {
+ 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();
}
-
-
+
+
/**
* Called when an error in playback occurs.
- *
- * @param mp {@link MediaPlayer} instance performing the playback.
- * @param what Type of error
- * @param extra Extra code specific to the error
+ *
+ * @param mp {@link MediaPlayer} instance performing the playback.
+ * @param what Type of error
+ * @param extra Extra code specific to the error
*/
@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);
}
return true;
}
-
+
}
-
+
@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) {
mMediaServiceConnection = null;
mMediaServiceBinder = null;
}
-
+
super.onStop();
}
-
+
@Override
public boolean onTouch(View v, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN && v == mVideoPreview) {
return false;
}
-
+
private void startFullScreenVideo() {
Intent i = new Intent(getActivity(), PreviewVideoActivity.class);
i.putExtra(FileActivity.EXTRA_ACCOUNT, mAccount);
}
@Override
- public void onConfigurationChanged (Configuration newConfig) {
- Log_OC.e(TAG, "onConfigurationChanged " + this);
+ public void onConfigurationChanged(Configuration newConfig) {
+ Log_OC.v(TAG, "onConfigurationChanged " + this);
}
-
+
@Override
- public void onActivityResult (int requestCode, int resultCode, Intent data) {
- Log_OC.e(TAG, "onActivityResult " + this);
+ public void onActivityResult(int requestCode, int resultCode, Intent data) {
+ Log_OC.v(TAG, "onActivityResult " + this);
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == Activity.RESULT_OK) {
mSavedPlaybackPosition = data.getExtras().getInt(
PreviewVideoActivity.EXTRA_START_POSITION);
- mAutoplay = data.getExtras().getBoolean(PreviewVideoActivity.EXTRA_AUTOPLAY);
+ mAutoplay = data.getExtras().getBoolean(PreviewVideoActivity.EXTRA_AUTOPLAY);
}
}
-
+
private void playAudio() {
OCFile file = getFile();
if (!mMediaServiceBinder.isPlaying(file)) {
Log_OC.d(TAG, "starting playback of " + file.getStoragePath());
mMediaServiceBinder.start(mAccount, file, mAutoplay, mSavedPlaybackPosition);
-
- } else {
+
+ }
+ else {
if (!mMediaServiceBinder.isPlaying() && mAutoplay) {
mMediaServiceBinder.start();
mMediaController.updatePausePlay();
Log_OC.d(TAG, "Successfully bound to MediaService, MediaController ready");
- } else {
+ }
+ else {
Log_OC.e(TAG, "Unexpected response from MediaService while binding");
}
}
@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);
- } else {
+ }
+ else {
Toast.makeText(
getActivity(),
"No media controller to release when disconnected from media service",
mMediaServiceConnection = null;
}
}
- }
+ }
-
/**
* Opens the previewed file with an external application.
mContainerActivity.getFileOperationsHelper().openFile(getFile());
finish();
}
-
+
/**
* Helper method to test if an {@link OCFile} can be passed to a {@link PreviewMediaFragment}
- * to be previewed.
- *
- * @param file File to test if can be previewed.
- * @return 'True' if the file can be handled by the fragment.
+ * to be previewed.
+ *
+ * @param file File to test if can be previewed.
+ * @return 'True' if the file can be handled by the fragment.
*/
public static boolean canBePreviewed(OCFile file) {
return (file != null && (file.isAudio() || file.isVideo()));
}
-
+
public void stopPreview(boolean stopAudio) {
OCFile file = getFile();
if (file.isAudio() && stopAudio) {
mMediaServiceBinder.pause();
-
- } else if (file.isVideo()) {
- mVideoPreview.stopPlayback();
+
+ }
+ else {
+ if (file.isVideo()) {
+ mVideoPreview.stopPlayback();
+ }
}
}
-
/**
* Finishes the preview
*/
if (mPrepared) {
mSavedPlaybackPosition = mVideoPreview.getCurrentPosition();
}
- Log_OC.e(TAG, "getting position: " + mSavedPlaybackPosition);
+ Log_OC.v(TAG, "getting position: " + mSavedPlaybackPosition);
return mSavedPlaybackPosition;
}
-
+
public boolean isPlaying() {
if (mPrepared) {
mAutoplay = mVideoPreview.isPlaying();
}
return mAutoplay;
}
-
+
}
--- /dev/null
+package com.owncloud.android.ui.preview;
+
+import android.accounts.Account;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentManager;
+import android.support.v4.app.FragmentTransaction;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import com.owncloud.android.R;
+import com.owncloud.android.datamodel.OCFile;
+import com.owncloud.android.files.FileMenuFilter;
+import com.owncloud.android.lib.common.utils.Log_OC;
+import com.owncloud.android.ui.activity.FileDisplayActivity;
+import com.owncloud.android.ui.dialog.ConfirmationDialogFragment;
+import com.owncloud.android.ui.dialog.LoadingDialog;
+import com.owncloud.android.ui.dialog.RemoveFileDialogFragment;
+import com.owncloud.android.ui.fragment.FileFragment;
+
+import java.io.BufferedWriter;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.lang.ref.WeakReference;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Scanner;
+
+public class PreviewTextFragment extends FileFragment {
+ private static final String EXTRA_FILE = "FILE";
+ private static final String EXTRA_ACCOUNT = "ACCOUNT";
+ private static final String TAG = PreviewTextFragment.class.getSimpleName();
+
+ private Account mAccount;
+ private TextView mTextPreview;
+ private TextLoadAsyncTask mTextLoadTask;
+
+ /**
+ * Creates an empty fragment for previews.
+ * <p/>
+ * MUST BE KEPT: the system uses it when tries to reinstantiate a fragment automatically
+ * (for instance, when the device is turned a aside).
+ * <p/>
+ * DO NOT CALL IT: an {@link OCFile} and {@link Account} must be provided for a successful
+ * construction
+ */
+ public PreviewTextFragment() {
+ super();
+ mAccount = null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ super.onCreateView(inflater, container, savedInstanceState);
+ Log_OC.e(TAG, "onCreateView");
+
+
+ View ret = inflater.inflate(R.layout.text_file_preview, container, false);
+
+ mTextPreview = (TextView) ret.findViewById(R.id.text_preview);
+
+ return ret;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ OCFile file = getFile();
+
+ Bundle args = getArguments();
+
+ if (file == null) {
+ file = args.getParcelable(FileDisplayActivity.EXTRA_FILE);
+ }
+
+ if (mAccount == null) {
+ mAccount = args.getParcelable(FileDisplayActivity.EXTRA_ACCOUNT);
+ }
+
+ if (savedInstanceState == null) {
+ if (file == null) {
+ throw new IllegalStateException("Instanced with a NULL OCFile");
+ }
+ if (mAccount == null) {
+ throw new IllegalStateException("Instanced with a NULL ownCloud Account");
+ }
+ } else {
+ file = savedInstanceState.getParcelable(EXTRA_FILE);
+ mAccount = savedInstanceState.getParcelable(EXTRA_ACCOUNT);
+ }
+ setFile(file);
+ setHasOptionsMenu(true);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void onSaveInstanceState(Bundle outState) {
+ super.onSaveInstanceState(outState);
+ outState.putParcelable(PreviewTextFragment.EXTRA_FILE, getFile());
+ outState.putParcelable(PreviewTextFragment.EXTRA_ACCOUNT, mAccount);
+ }
+
+ @Override
+ public void onStart() {
+ super.onStart();
+ Log_OC.e(TAG, "onStart");
+
+ loadAndShowTextPreview();
+ }
+
+ private void loadAndShowTextPreview() {
+ mTextLoadTask = new TextLoadAsyncTask(new WeakReference<TextView>(mTextPreview));
+ mTextLoadTask.execute(getFile().getStoragePath());
+ }
+
+
+ /**
+ * Reads the file to preview and shows its contents. Too critical to be anonymous.
+ */
+ private class TextLoadAsyncTask extends AsyncTask<Object, Void, StringWriter> {
+ private final String DIALOG_WAIT_TAG = "DIALOG_WAIT";
+ private final WeakReference<TextView> mTextViewReference;
+
+ private TextLoadAsyncTask(WeakReference<TextView> textView) {
+ mTextViewReference = textView;
+ }
+
+
+ @Override
+ protected void onPreExecute() {
+ showLoadingDialog();
+ }
+
+ @Override
+ protected StringWriter doInBackground(java.lang.Object... params) {
+ if (params.length != 1) {
+ throw new IllegalArgumentException("The parameter to " + TextLoadAsyncTask.class.getName() + " must be (1) the file location");
+ }
+ final String location = (String) params[0];
+
+ FileInputStream inputStream = null;
+ Scanner sc = null;
+ StringWriter source = new StringWriter();
+ BufferedWriter bufferedWriter = new BufferedWriter(source);
+ try {
+ inputStream = new FileInputStream(location);
+ sc = new Scanner(inputStream);
+ while (sc.hasNextLine()) {
+ bufferedWriter.append(sc.nextLine());
+ if (sc.hasNextLine()) bufferedWriter.append("\n");
+ }
+ bufferedWriter.close();
+ IOException exc = sc.ioException();
+ if (exc != null) throw exc;
+ } catch (IOException e) {
+ Log_OC.e(TAG, e.getMessage(), e);
+ finish();
+ } finally {
+ if (inputStream != null) {
+ try {
+ inputStream.close();
+ } catch (IOException e) {
+ Log_OC.e(TAG, e.getMessage(), e);
+ finish();
+ }
+ }
+ if (sc != null) {
+ sc.close();
+ }
+ }
+ return source;
+ }
+
+ @Override
+ protected void onPostExecute(final StringWriter stringWriter) {
+ final TextView textView = mTextViewReference.get();
+
+ if (textView != null) {
+ textView.setText(new String(stringWriter.getBuffer()));
+ textView.setVisibility(View.VISIBLE);
+ }
+
+ dismissLoadingDialog();
+ }
+
+ /**
+ * Show loading dialog
+ */
+ public void showLoadingDialog() {
+ // only once
+ Fragment frag = getActivity().getSupportFragmentManager().findFragmentByTag(DIALOG_WAIT_TAG);
+ LoadingDialog loading = null;
+ if (frag == null) {
+ // Construct dialog
+ loading = new LoadingDialog(getResources().getString(R.string.wait_a_moment));
+ FragmentManager fm = getActivity().getSupportFragmentManager();
+ FragmentTransaction ft = fm.beginTransaction();
+ loading.show(ft, DIALOG_WAIT_TAG);
+ } else {
+ loading = (LoadingDialog) frag;
+ loading.setShowsDialog(true);
+ }
+
+ }
+
+ /**
+ * Dismiss loading dialog
+ */
+ public void dismissLoadingDialog() {
+ final Fragment frag = getActivity().getSupportFragmentManager().findFragmentByTag(DIALOG_WAIT_TAG);
+ if (frag != null) {
+ LoadingDialog loading = (LoadingDialog) frag;
+ loading.dismiss();
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
+ super.onCreateOptionsMenu(menu, inflater);
+ inflater.inflate(R.menu.file_actions_menu, menu);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void onPrepareOptionsMenu(Menu menu) {
+ super.onPrepareOptionsMenu(menu);
+
+ if (mContainerActivity.getStorageManager() != null) {
+ FileMenuFilter mf = new FileMenuFilter(
+ getFile(),
+ mContainerActivity.getStorageManager().getAccount(),
+ mContainerActivity,
+ getActivity()
+ );
+ mf.filter(menu);
+ }
+
+ // additional restriction for this fragment
+ MenuItem item = menu.findItem(R.id.action_rename_file);
+ if (item != null) {
+ item.setVisible(false);
+ item.setEnabled(false);
+ }
+
+ // additional restriction for this fragment
+ item = menu.findItem(R.id.action_move);
+ if (item != null) {
+ item.setVisible(false);
+ item.setEnabled(false);
+ }
+
+ // this one doesn't make sense since the file has to be down in order to be previewed
+ item = menu.findItem(R.id.action_download_file);
+ if (item != null) {
+ item.setVisible(false);
+ item.setEnabled(false);
+ }
+
+ item = menu.findItem(R.id.action_sync_file);
+ if (item != null) {
+ item.setVisible(false);
+ item.setEnabled(false);
+ }
+
+ item = menu.findItem(R.id.action_sync_account);
+ if (item != null) {
+ item.setVisible(false);
+ item.setEnabled(false);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean onOptionsItemSelected(MenuItem item) {
+ switch (item.getItemId()) {
+ case R.id.action_share_file: {
+ mContainerActivity.getFileOperationsHelper().shareFileWithLink(getFile());
+ return true;
+ }
+ case R.id.action_share_with_users: {
+ mContainerActivity.getFileOperationsHelper().showShareFile(getFile());
+ return true;
+ }
+ case R.id.action_unshare_file: {
+ mContainerActivity.getFileOperationsHelper().unshareFileWithLink(getFile());
+ return true;
+ }
+ case R.id.action_open_file_with: {
+ openFile();
+ return true;
+ }
+ case R.id.action_remove_file: {
+ RemoveFileDialogFragment dialog = RemoveFileDialogFragment.newInstance(getFile());
+ dialog.show(getFragmentManager(), ConfirmationDialogFragment.FTAG_CONFIRMATION);
+ return true;
+ }
+ case R.id.action_see_details: {
+ seeDetails();
+ return true;
+ }
+ case R.id.action_send_file: {
+ sendFile();
+ return true;
+ }
+ case R.id.action_sync_file: {
+ mContainerActivity.getFileOperationsHelper().syncFile(getFile());
+ return true;
+ }
+
+ default:
+ return false;
+ }
+ }
+
+ /**
+ * Update the file of the fragment with file value
+ *
+ * @param file The new file to set
+ */
+ public void updateFile(OCFile file) {
+ setFile(file);
+ }
+
+ private void sendFile() {
+ mContainerActivity.getFileOperationsHelper().sendDownloadedFile(getFile());
+ }
+
+ private void seeDetails() {
+ mContainerActivity.showDetails(getFile());
+ }
+
+ @Override
+ public void onPause() {
+ Log_OC.e(TAG, "onPause");
+ super.onPause();
+ }
+
+ @Override
+ public void onResume() {
+ super.onResume();
+ Log_OC.e(TAG, "onResume");
+ }
+
+ @Override
+ public void onDestroy() {
+ Log_OC.e(TAG, "onDestroy");
+ super.onDestroy();
+ }
+
+ @Override
+ public void onStop() {
+ super.onStop();
+ Log_OC.e(TAG, "onStop");
+ if (mTextLoadTask != null)
+ mTextLoadTask.cancel(Boolean.TRUE);
+ }
+
+ /**
+ * Opens the previewed file with an external application.
+ */
+ private void openFile() {
+ mContainerActivity.getFileOperationsHelper().openFile(getFile());
+ finish();
+ }
+
+ /**
+ * Helper method to test if an {@link OCFile} can be passed to a {@link PreviewTextFragment} to be previewed.
+ *
+ * @param file File to test if can be previewed.
+ * @return 'True' if the file can be handled by the fragment.
+ */
+ public static boolean canBePreviewed(OCFile file) {
+ final List<String> unsupportedTypes = new LinkedList<String>();
+ unsupportedTypes.add("text/richtext");
+ unsupportedTypes.add("text/rtf");
+ unsupportedTypes.add("text/vnd.abc");
+ unsupportedTypes.add("text/vnd.fmi.flexstor");
+ unsupportedTypes.add("text/vnd.rn-realtext");
+ unsupportedTypes.add("text/vnd.wap.wml");
+ unsupportedTypes.add("text/vnd.wap.wmlscript");
+ return (file != null && file.isDown() && file.isText() &&
+ !unsupportedTypes.contains(file.getMimetype()) &&
+ !unsupportedTypes.contains(file.getMimeTypeFromName())
+ );
+ }
+
+ /**
+ * Finishes the preview
+ */
+ private void finish() {
+ getActivity().runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ getActivity().onBackPressed();
+ }
+ });
+ }
+}
@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);
@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());
}
@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());
*/
@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();
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;
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();
}
\r
package com.owncloud.android.utils;\r
\r
-import java.net.IDN;\r
-import java.text.DateFormat;\r
-import java.util.Arrays;\r
-import java.util.Calendar;\r
-import java.util.Date;\r
-import java.util.HashMap;\r
-import java.util.HashSet;\r
-import java.util.Set;\r
-import java.util.Vector;\r
-\r
import android.annotation.TargetApi;\r
import android.app.Activity;\r
import android.content.Context;\r
-import android.graphics.Color;\r
import android.graphics.Point;\r
import android.graphics.PorterDuff;\r
import android.os.Build;\r
import android.text.format.DateUtils;\r
import android.view.Display;\r
-import android.webkit.MimeTypeMap;\r
import android.widget.ProgressBar;\r
import android.widget.SeekBar;\r
\r
import com.owncloud.android.R;\r
import com.owncloud.android.datamodel.OCFile;\r
\r
+import java.net.IDN;\r
+import java.text.DateFormat;\r
+import java.util.Calendar;\r
+import java.util.Date;\r
+import java.util.HashMap;\r
+import java.util.Map;\r
+\r
/**\r
* A helper class for some string operations.\r
*/\r
public class DisplayUtils {\r
\r
private static final String OWNCLOUD_APP_NAME = "ownCloud";\r
-\r
- //private static String TAG = DisplayUtils.class.getSimpleName(); \r
\r
private static final String[] sizeSuffixes = { "B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" };\r
\r
- private static HashMap<String, String> mimeType2HUmanReadable;\r
+ private static Map<String, String> mimeType2HumanReadable;\r
+\r
static {\r
- mimeType2HUmanReadable = new HashMap<String, String>();\r
+ mimeType2HumanReadable = new HashMap<String, String>();\r
// images\r
- mimeType2HUmanReadable.put("image/jpeg", "JPEG image");\r
- mimeType2HUmanReadable.put("image/jpg", "JPEG image");\r
- mimeType2HUmanReadable.put("image/png", "PNG image");\r
- mimeType2HUmanReadable.put("image/bmp", "Bitmap image");\r
- mimeType2HUmanReadable.put("image/gif", "GIF image");\r
- mimeType2HUmanReadable.put("image/svg+xml", "JPEG image");\r
- mimeType2HUmanReadable.put("image/tiff", "TIFF image");\r
+ mimeType2HumanReadable.put("image/jpeg", "JPEG image");\r
+ mimeType2HumanReadable.put("image/jpg", "JPEG image");\r
+ mimeType2HumanReadable.put("image/png", "PNG image");\r
+ mimeType2HumanReadable.put("image/bmp", "Bitmap image");\r
+ mimeType2HumanReadable.put("image/gif", "GIF image");\r
+ mimeType2HumanReadable.put("image/svg+xml", "JPEG image");\r
+ mimeType2HumanReadable.put("image/tiff", "TIFF image");\r
// music\r
- mimeType2HUmanReadable.put("audio/mpeg", "MP3 music file");\r
- mimeType2HUmanReadable.put("application/ogg", "OGG music file");\r
-\r
+ mimeType2HumanReadable.put("audio/mpeg", "MP3 music file");\r
+ mimeType2HumanReadable.put("application/ogg", "OGG music file");\r
}\r
\r
- private static final String TYPE_APPLICATION = "application";\r
- private static final String TYPE_AUDIO = "audio";\r
- private static final String TYPE_IMAGE = "image";\r
- private static final String TYPE_TXT = "text";\r
- private static final String TYPE_VIDEO = "video";\r
- \r
- private static final String SUBTYPE_PDF = "pdf";\r
- private static final String SUBTYPE_XML = "xml";\r
- private static final String[] SUBTYPES_DOCUMENT = { \r
- "msword",\r
- "vnd.openxmlformats-officedocument.wordprocessingml.document",\r
- "vnd.oasis.opendocument.text",\r
- "rtf",\r
- "javascript"\r
- };\r
- private static Set<String> SUBTYPES_DOCUMENT_SET = new HashSet<String>(Arrays.asList(SUBTYPES_DOCUMENT));\r
- private static final String[] SUBTYPES_SPREADSHEET = {\r
- "msexcel",\r
- "vnd.ms-excel",\r
- "vnd.openxmlformats-officedocument.spreadsheetml.sheet",\r
- "vnd.oasis.opendocument.spreadsheet"\r
- };\r
- private static Set<String> SUBTYPES_SPREADSHEET_SET = new HashSet<String>(Arrays.asList(SUBTYPES_SPREADSHEET));\r
- private static final String[] SUBTYPES_PRESENTATION = { \r
- "mspowerpoint",\r
- "vnd.ms-powerpoint",\r
- "vnd.openxmlformats-officedocument.presentationml.presentation",\r
- "vnd.oasis.opendocument.presentation"\r
- };\r
- private static Set<String> SUBTYPES_PRESENTATION_SET = new HashSet<String>(Arrays.asList(SUBTYPES_PRESENTATION));\r
- private static final String[] SUBTYPES_COMPRESSED = {"x-tar", "x-gzip", "zip"};\r
- private static final Set<String> SUBTYPES_COMPRESSED_SET = new HashSet<String>(Arrays.asList(SUBTYPES_COMPRESSED));\r
- private static final String SUBTYPE_OCTET_STREAM = "octet-stream";\r
- private static final String EXTENSION_RAR = "rar";\r
- private static final String EXTENSION_RTF = "rtf";\r
- private static final String EXTENSION_3GP = "3gp";\r
- private static final String EXTENSION_PY = "py";\r
- private static final String EXTENSION_JS = "js";\r
- \r
/**\r
* Converts the file size in bytes to human readable output.\r
* \r
* @return A human friendly version of the MIME type\r
*/\r
public static String convertMIMEtoPrettyPrint(String mimetype) {\r
- if (mimeType2HUmanReadable.containsKey(mimetype)) {\r
- return mimeType2HUmanReadable.get(mimetype);\r
+ if (mimeType2HumanReadable.containsKey(mimetype)) {\r
+ return mimeType2HumanReadable.get(mimetype);\r
}\r
if (mimetype.split("/").length >= 2)\r
return mimetype.split("/")[1].toUpperCase() + " file";\r
return "Unknown type";\r
}\r
- \r
- \r
- /**\r
- * Returns the resource identifier of an image to use as icon associated to a known MIME type.\r
- * \r
- * @param mimetype MIME type string; if NULL, the method tries to guess it from the extension in filename\r
- * @param filename Name, with extension.\r
- * @return Identifier of an image resource.\r
- */\r
- public static int getFileTypeIconId(String mimetype, String filename) {\r
\r
- if (mimetype == null) {\r
- String fileExtension = getExtension(filename);\r
- mimetype = MimeTypeMap.getSingleton().getMimeTypeFromExtension(fileExtension);\r
- if (mimetype == null) {\r
- mimetype = TYPE_APPLICATION + "/" + SUBTYPE_OCTET_STREAM;\r
- }\r
- } \r
- \r
- if ("DIR".equals(mimetype)) {\r
- return R.drawable.ic_menu_archive;\r
-\r
- } else {\r
- String [] parts = mimetype.split("/");\r
- String type = parts[0];\r
- String subtype = (parts.length > 1) ? parts[1] : "";\r
- \r
- if(TYPE_TXT.equals(type)) {\r
- return R.drawable.file_doc;\r
- \r
- } else if(TYPE_IMAGE.equals(type)) {\r
- return R.drawable.file_image;\r
- \r
- } else if(TYPE_VIDEO.equals(type)) {\r
- return R.drawable.file_movie;\r
- \r
- } else if(TYPE_AUDIO.equals(type)) { \r
- return R.drawable.file_sound;\r
- \r
- } else if(TYPE_APPLICATION.equals(type)) {\r
- \r
- if (SUBTYPE_PDF.equals(subtype)) {\r
- return R.drawable.file_pdf;\r
- \r
- } else if (SUBTYPE_XML.equals(subtype)) {\r
- return R.drawable.file_doc;\r
-\r
- } else if (SUBTYPES_DOCUMENT_SET.contains(subtype)) {\r
- return R.drawable.file_doc;\r
-\r
- } else if (SUBTYPES_SPREADSHEET_SET.contains(subtype)) {\r
- return R.drawable.file_xls;\r
-\r
- } else if (SUBTYPES_PRESENTATION_SET.contains(subtype)) {\r
- return R.drawable.file_ppt;\r
-\r
- } else if (SUBTYPES_COMPRESSED_SET.contains(subtype)) {\r
- return R.drawable.file_zip;\r
-\r
- } else if (SUBTYPE_OCTET_STREAM.equals(subtype) ) {\r
- if (getExtension(filename).equalsIgnoreCase(EXTENSION_RAR)) {\r
- return R.drawable.file_zip;\r
- \r
- } else if (getExtension(filename).equalsIgnoreCase(EXTENSION_RTF)) {\r
- return R.drawable.file_doc;\r
- \r
- } else if (getExtension(filename).equalsIgnoreCase(EXTENSION_3GP)) {\r
- return R.drawable.file_movie;\r
- \r
- } else if ( getExtension(filename).equalsIgnoreCase(EXTENSION_PY) ||\r
- getExtension(filename).equalsIgnoreCase(EXTENSION_JS)) {\r
- return R.drawable.file_doc;\r
- } \r
- } \r
- }\r
- }\r
-\r
- // default icon\r
- return R.drawable.file;\r
- }\r
-\r
- \r
- private static String getExtension(String filename) {\r
- String extension = filename.substring(filename.lastIndexOf(".") + 1).toLowerCase();\r
- return extension;\r
- }\r
- \r
/**\r
* Converts Unix time to human readable format\r
* @param milliseconds that have passed since 01/01/1970\r
return df.format(date);\r
}\r
\r
- \r
public static int getSeasonalIconId() {\r
if (Calendar.getInstance().get(Calendar.DAY_OF_YEAR) >= 354 &&\r
MainApp.getAppContext().getString(R.string.app_name).equals(OWNCLOUD_APP_NAME)) {\r
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
package com.owncloud.android.utils;
-import java.io.File;
-import java.net.SocketTimeoutException;
-
-import org.apache.commons.httpclient.ConnectTimeoutException;
-
import android.content.res.Resources;
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.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.UploadFileOperation;
+import org.apache.commons.httpclient.ConnectTimeoutException;
+
+import java.io.File;
+import java.net.SocketTimeoutException;
+
/**
* Class to choose proper error messages to show to the user depending on the results of operations,
* always following the same policy
public class ErrorMessageAdapter {
public ErrorMessageAdapter() {
-
+
}
public static String getErrorCauseMessage(RemoteOperationResult result,
RemoteOperation operation, Resources res) {
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(
res.getString(R.string.uploader_upload_succeeded_content_single),
} else if (result.getCode() == ResultCode.QUOTA_EXCEEDED) {
message = res.getString(R.string.failed_upload_quota_exceeded_text);
*/
-
+
} else if (result.getCode() == ResultCode.FORBIDDEN) {
message = String.format(res.getString(R.string.forbidden_permissions),
res.getString(R.string.uploader_upload_forbidden_permissions));
((UploadFileOperation) operation).getFileName());
}
}
-
+
} else if (operation instanceof DownloadFileOperation) {
-
+
if (result.isSuccess()) {
message = String.format(
res.getString(R.string.downloader_download_succeeded_content),
new File(((DownloadFileOperation) operation).getSavePath()).getName());
-
+
} else {
if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
message = res.getString(R.string.downloader_download_file_not_found);
((DownloadFileOperation) operation).getSavePath()).getName());
}
}
-
+
} else if (operation instanceof RemoveFileOperation) {
if (result.isSuccess()) {
message = res.getString(R.string.remove_success_msg);
-
+
} else {
if (result.getCode().equals(ResultCode.FORBIDDEN)) {
// 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);
}
} 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);
} else {
- message = res.getString(R.string.rename_server_fail_msg);
+ message = res.getString(R.string.rename_server_fail_msg);
}
-
+
} else if (operation instanceof SynchronizeFileOperation) {
if (!((SynchronizeFileOperation) operation).transferWasRequested()) {
message = res.getString(R.string.sync_file_nothing_to_do_msg);
}
-
+
} else if (operation instanceof CreateFolderOperation) {
if (result.getCode() == ResultCode.INVALID_CHARACTER_IN_NAME) {
message = res.getString(R.string.filename_forbidden_characters);
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) {
// Error --> No permissions
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) {
-
- if (result.getCode() == ResultCode.SHARE_NOT_FOUND) { // Error --> SHARE_NOT_FOUND
+
+ } 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
+
+ } 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) {
// Error --> No permissions
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);
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) {
+ } else if (result.getCode() == ResultCode.INVALID_MOVE_INTO_DESCENDANT) {
message = res.getString(R.string.move_file_invalid_into_descendent);
} else if (result.getCode() == ResultCode.INVALID_OVERWRITE) {
} 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 (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);
+
+ } else if (result.getCode() == ResultCode.INVALID_OVERWRITE) {
+ message = res.getString(R.string.copy_file_invalid_overwrite);
+
+ } else if (result.getCode() == ResultCode.FORBIDDEN) {
+ message = String.format(res.getString(R.string.forbidden_permissions),
+ res.getString(R.string.forbidden_permissions_copy));
+
+ } else { // Generic error
+ // Show a Message, operation finished without success
+ message = res.getString(R.string.copy_file_error);
+ }
}
-
+
return message;
}
-
- private static String getErrorMessage(RemoteOperationResult result , Resources res) {
-
+
+ private static String getErrorMessage(RemoteOperationResult result, Resources res) {
+
String message = null;
-
+
if (!result.isSuccess()) {
-
+
if (result.getCode() == ResultCode.WRONG_CONNECTION) {
message = res.getString(R.string.network_error_socket_exception);
-
+
} else if (result.getCode() == ResultCode.TIMEOUT) {
message = res.getString(R.string.network_error_socket_exception);
-
+
if (result.getException() instanceof SocketTimeoutException) {
message = res.getString(R.string.network_error_socket_timeout_exception);
- } else if(result.getException() instanceof ConnectTimeoutException) {
+ } else if (result.getException() instanceof ConnectTimeoutException) {
message = res.getString(R.string.network_error_connect_timeout_exception);
- }
-
+ }
+
} else if (result.getCode() == ResultCode.HOST_NOT_AVAILABLE) {
message = res.getString(R.string.network_host_not_available);
}
}
-
+
return message;
}
-
+
private static boolean isNetworkError(RemoteOperationResult.ResultCode code) {
- if (code == ResultCode.WRONG_CONNECTION ||
- code == ResultCode.TIMEOUT ||
+ if (code == ResultCode.WRONG_CONNECTION ||
+ code == ResultCode.TIMEOUT ||
code == ResultCode.HOST_NOT_AVAILABLE) {
return true;
- }
- else
+ } else
return false;
}
}
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;
* Static methods to help in access to local file system.
*/
public class FileStorageUtils {
- public static Integer mSortOrder;
- public static Boolean mSortAscending;
public static final Integer SORT_NAME = 0;
public static final Integer SORT_DATE = 1;
public static final Integer SORT_SIZE = 2;
-
-
- //private static final String LOG_TAG = "FileStorageUtils";
+ public static Integer mSortOrder = SORT_NAME;
+ public static Boolean mSortAscending = true;
+
public static final String getSavePath(String accountName) {
File sdCard = Environment.getExternalStorageDirectory();
return sdCard.getAbsolutePath() + "/" + MainApp.getDataFolder() + "/" + Uri.encode(accountName, "@");
* 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());
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()) {
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());
+ }
+ }
+ }
+
}
--- /dev/null
+/**
+ * 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
--- /dev/null
+package com.owncloud.android.utils;
+
+import android.webkit.MimeTypeMap;
+
+import com.owncloud.android.R;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>Helper class for detecting the right icon for a file or folder,
+ * based on its mime type and file extension.</p>
+ *
+ * This class maintains all the necessary mappings fot these detections.<br/>
+ * In order to add further mappings, there are up to three look up maps that need further values:
+ * <ol>
+ * <li>
+ * {@link MimetypeIconUtil#FILE_EXTENSION_TO_MIMETYPE_MAPPING}<br/>
+ * to add a new file extension to mime type mapping
+ * </li>
+ * <li>
+ * {@link MimetypeIconUtil#MIMETYPE_TO_ICON_MAPPING}<br/>
+ * to add a new mapping of a mime type to an icon mapping
+ * </li>
+ * <li>
+ * {@link MimetypeIconUtil#MAINMIMETYPE_TO_ICON_MAPPING}<br/>
+ * to add a new mapping for the main part of a mime type.
+ * This is a list of fallback mappings in case there is no mapping for the complete mime type
+ * </li>
+ * </ol>
+ */
+public class MimetypeIconUtil {
+ /** Mapping: icon for mime type */
+ private static final Map<String, Integer> MIMETYPE_TO_ICON_MAPPING = new HashMap<String, Integer>();
+ /** Mapping: icon for main mime type (first part of a mime type declaration). */
+ private static final Map<String, Integer> MAINMIMETYPE_TO_ICON_MAPPING = new HashMap<String, Integer>();
+ /** Mapping: mime type for file extension. */
+ private static final Map<String, List<String>> FILE_EXTENSION_TO_MIMETYPE_MAPPING =
+ new HashMap<String, List<String>>();
+
+ static {
+ populateFileExtensionMimeTypeMapping();
+ populateMimeTypeIconMapping();
+ populateMainMimeTypeMapping();
+ }
+
+ /**
+ * Returns the resource identifier of an image to use as icon associated to a known MIME type.
+ *
+ * @param mimetype MIME type string; if NULL, the method tries to guess it from the extension in filename
+ * @param filename Name, with extension.
+ * @return Identifier of an image resource.
+ */
+ public static int getFileTypeIconId(String mimetype, String filename) {
+ List<String> possibleMimeTypes;
+ if (mimetype == null) {
+ possibleMimeTypes = determineMimeTypesByFilename(filename);
+ } else {
+ possibleMimeTypes = Collections.singletonList(mimetype);
+ }
+
+ return determineIconIdByMimeTypeList(possibleMimeTypes);
+ }
+
+ /**
+ * Returns the resource identifier of an image to use as icon associated to a type of folder.
+ *
+ * @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 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;
+ }
+
+ /**
+ * determines the icon based on the mime type.
+ *
+ * @param mimetypes the mimetypes
+ * @return the icon id, R.drawable.file if the mime type could not be matched at all or was {@code null}
+ */
+ private static int determineIconIdByMimeTypeList(List<String> mimetypes) {
+ // no mime type leads to file
+ if (mimetypes == null || mimetypes.size() < 1) {
+ return R.drawable.file;
+ } else {
+
+ // search for full mime type mapping
+ for (String mimetype : mimetypes) {
+ Integer iconId = MIMETYPE_TO_ICON_MAPPING.get(mimetype);
+
+ if (iconId != null) {
+ return iconId;
+ }
+ }
+
+ // fallback to main mime type part mapping
+ for (String mimetype : mimetypes) {
+ String mainMimetypePart = mimetype.split("/")[0];
+
+ Integer iconId = MAINMIMETYPE_TO_ICON_MAPPING.get(mainMimetypePart);
+ if (iconId != null) {
+ return iconId;
+ }
+ }
+ }
+
+ // no match found at all, falling back to file
+ return R.drawable.file;
+ }
+
+ /**
+ * determines the list of possible mime types for the given file, based on its extension.
+ *
+ * @param filename the file name
+ * @return list of possible mime types (ordered), empty list in case no mime types found
+ */
+ private static List<String> determineMimeTypesByFilename(String filename) {
+ String fileExtension = getExtension(filename);
+
+ // try detecting the mimetype based on the web app logic equivalent
+ List<String> mimeTypeList = FILE_EXTENSION_TO_MIMETYPE_MAPPING.get(fileExtension);
+ if (mimeTypeList != null && mimeTypeList.size() > 0) {
+ return mimeTypeList;
+ } else {
+ // try detecting the mime type via android itself
+ String mimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(fileExtension);
+ if (mimeType != null) {
+ return Collections.singletonList(mimeType);
+ } else {
+ return new ArrayList<String>();
+ }
+ }
+ }
+
+ /**
+ * provides the file extension of a given filename.
+ *
+ * @param filename the filename
+ * @return the file extension
+ */
+ private static String getExtension(String filename) {
+ String extension = filename.substring(filename.lastIndexOf(".") + 1).toLowerCase();
+ return extension;
+ }
+
+ /**
+ * populates the mapping list: full mime type --> icon.
+ */
+ private static void populateMimeTypeIconMapping() {
+ MIMETYPE_TO_ICON_MAPPING.put("application/coreldraw", R.drawable.file_image);
+ MIMETYPE_TO_ICON_MAPPING.put("application/epub+zip", R.drawable.file_text);
+ MIMETYPE_TO_ICON_MAPPING.put("application/font-sfnt", R.drawable.file_image);
+ MIMETYPE_TO_ICON_MAPPING.put("application/font-woff", R.drawable.file_image);
+ MIMETYPE_TO_ICON_MAPPING.put("application/illustrator", R.drawable.file_image);
+ MIMETYPE_TO_ICON_MAPPING.put("application/javascript", R.drawable.file_code);
+ MIMETYPE_TO_ICON_MAPPING.put("application/json", R.drawable.file_code);
+ MIMETYPE_TO_ICON_MAPPING.put("application/msaccess", R.drawable.file);
+ MIMETYPE_TO_ICON_MAPPING.put("application/msexcel", R.drawable.file_xls);
+ MIMETYPE_TO_ICON_MAPPING.put("application/mspowerpoint", R.drawable.file_ppt);
+ MIMETYPE_TO_ICON_MAPPING.put("application/msword", R.drawable.file_doc);
+ MIMETYPE_TO_ICON_MAPPING.put("application/octet-stream", R.drawable.file);
+ MIMETYPE_TO_ICON_MAPPING.put("application/postscript", R.drawable.file_image);
+ MIMETYPE_TO_ICON_MAPPING.put("application/pdf", R.drawable.file_pdf);
+ MIMETYPE_TO_ICON_MAPPING.put("application/rss+xml", R.drawable.file_code);
+ MIMETYPE_TO_ICON_MAPPING.put("application/rtf", R.drawable.file);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.android.package-archive", R.drawable.file_zip);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.ms-excel", R.drawable.file_xls);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.ms-excel.addin.macroEnabled.12", R.drawable.file_xls);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.ms-excel.sheet.binary.macroEnabled.12", R.drawable.file_xls);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.ms-excel.sheet.macroEnabled.12", R.drawable.file_xls);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.ms-excel.template.macroEnabled.12", R.drawable.file_xls);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.ms-fontobject", R.drawable.file_image);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.ms-powerpoint", R.drawable.file_ppt);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.ms-powerpoint.addin.macroEnabled.12", R.drawable.file_ppt);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.ms-powerpoint.presentation.macroEnabled.12", R.drawable.file_ppt);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.ms-powerpoint.slideshow.macroEnabled.12", R.drawable.file_ppt);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.ms-powerpoint.template.macroEnabled.12", R.drawable.file_ppt);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.ms-word.document.macroEnabled.12", R.drawable.file_doc);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.ms-word.template.macroEnabled.12", R.drawable.file_doc);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.oasis.opendocument.presentation", R.drawable.file_ppt);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.oasis.opendocument.presentation-template", R.drawable.file_ppt);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.oasis.opendocument.spreadsheet", R.drawable.file_xls);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.oasis.opendocument.spreadsheet-template", R.drawable.file_xls);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.oasis.opendocument.text", R.drawable.file_doc);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.oasis.opendocument.text-master", R.drawable.file_doc);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.oasis.opendocument.text-template", R.drawable.file_doc);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.oasis.opendocument.text-web", R.drawable.file_doc);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.openxmlformats-officedocument.presentationml.presentation", R.drawable.file_ppt);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.openxmlformats-officedocument.presentationml.slideshow", R.drawable.file_ppt);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.openxmlformats-officedocument.presentationml.template", R.drawable.file_ppt);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", R.drawable.file_xls);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.openxmlformats-officedocument.spreadsheetml.template", R.drawable.file_xls);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.openxmlformats-officedocument.wordprocessingml.document", R.drawable.file_doc);
+ MIMETYPE_TO_ICON_MAPPING.put("application/vnd.openxmlformats-officedocument.wordprocessingml.template", R.drawable.file_doc);
+ MIMETYPE_TO_ICON_MAPPING.put("application/x-7z-compressed", R.drawable.file_zip);
+ MIMETYPE_TO_ICON_MAPPING.put("application/x-bin", R.drawable.file_application);
+ MIMETYPE_TO_ICON_MAPPING.put("application/x-cbr", R.drawable.file_text);
+ MIMETYPE_TO_ICON_MAPPING.put("application/x-compressed", R.drawable.file_zip);
+ MIMETYPE_TO_ICON_MAPPING.put("application/x-dcraw", R.drawable.file_image);
+ MIMETYPE_TO_ICON_MAPPING.put("application/x-deb", R.drawable.file_zip);
+ MIMETYPE_TO_ICON_MAPPING.put("application/x-font", R.drawable.file_image);
+ MIMETYPE_TO_ICON_MAPPING.put("application/x-gimp", R.drawable.file_image);
+ MIMETYPE_TO_ICON_MAPPING.put("application/x-gzip", R.drawable.file_zip);
+ MIMETYPE_TO_ICON_MAPPING.put("application/x-ms-dos-executable", R.drawable.file_application);
+ MIMETYPE_TO_ICON_MAPPING.put("application/x-msi", R.drawable.file_application);
+ MIMETYPE_TO_ICON_MAPPING.put("application/x-iwork-numbers-sffnumbers", R.drawable.file_xls);
+ MIMETYPE_TO_ICON_MAPPING.put("application/x-iwork-keynote-sffkey", R.drawable.file_ppt);
+ MIMETYPE_TO_ICON_MAPPING.put("application/x-iwork-pages-sffpages", R.drawable.file_doc);
+ MIMETYPE_TO_ICON_MAPPING.put("application/x-perl", R.drawable.file_code);
+ MIMETYPE_TO_ICON_MAPPING.put("application/x-photoshop", R.drawable.file_image);
+ MIMETYPE_TO_ICON_MAPPING.put("application/x-php", R.drawable.file_code);
+ MIMETYPE_TO_ICON_MAPPING.put("application/x-rar-compressed", R.drawable.file_zip);
+ MIMETYPE_TO_ICON_MAPPING.put("application/x-shockwave-flash", R.drawable.file_application);
+ MIMETYPE_TO_ICON_MAPPING.put("application/x-tar", R.drawable.file_zip);
+ MIMETYPE_TO_ICON_MAPPING.put("application/x-tex", R.drawable.file_text);
+ MIMETYPE_TO_ICON_MAPPING.put("application/xml", R.drawable.file_text);
+ MIMETYPE_TO_ICON_MAPPING.put("application/yaml", R.drawable.file_code);
+ MIMETYPE_TO_ICON_MAPPING.put("application/zip", R.drawable.file_zip);
+ MIMETYPE_TO_ICON_MAPPING.put("database", R.drawable.file);
+ MIMETYPE_TO_ICON_MAPPING.put("httpd/unix-directory", R.drawable.ic_menu_archive);
+ MIMETYPE_TO_ICON_MAPPING.put("image/svg+xml", R.drawable.file_image);
+ MIMETYPE_TO_ICON_MAPPING.put("image/vector", R.drawable.file_image);
+ MIMETYPE_TO_ICON_MAPPING.put("text/calendar", R.drawable.file_calendar);
+ MIMETYPE_TO_ICON_MAPPING.put("text/css", R.drawable.file_code);
+ MIMETYPE_TO_ICON_MAPPING.put("text/csv", R.drawable.file_xls);
+ MIMETYPE_TO_ICON_MAPPING.put("text/html", R.drawable.file_code);
+ MIMETYPE_TO_ICON_MAPPING.put("text/vcard", R.drawable.file_vcard);
+ MIMETYPE_TO_ICON_MAPPING.put("text/x-c", R.drawable.file_code);
+ MIMETYPE_TO_ICON_MAPPING.put("text/x-c++src", R.drawable.file_code);
+ MIMETYPE_TO_ICON_MAPPING.put("text/x-h", R.drawable.file_code);
+ MIMETYPE_TO_ICON_MAPPING.put("text/x-python", R.drawable.file_code);
+ MIMETYPE_TO_ICON_MAPPING.put("text/x-shellscript", R.drawable.file_code);
+ MIMETYPE_TO_ICON_MAPPING.put("web", R.drawable.file_code);
+ MIMETYPE_TO_ICON_MAPPING.put("DIR", R.drawable.ic_menu_archive);
+ }
+
+ /**
+ * populates the mapping list: main mime type --> icon.
+ */
+ private static void populateMainMimeTypeMapping() {
+ MAINMIMETYPE_TO_ICON_MAPPING.put("audio", R.drawable.file_sound);
+ MAINMIMETYPE_TO_ICON_MAPPING.put("database", R.drawable.file);
+ MAINMIMETYPE_TO_ICON_MAPPING.put("httpd", R.drawable.file_zip);
+ MAINMIMETYPE_TO_ICON_MAPPING.put("image", R.drawable.file_image);
+ MAINMIMETYPE_TO_ICON_MAPPING.put("text", R.drawable.file_text);
+ MAINMIMETYPE_TO_ICON_MAPPING.put("video", R.drawable.file_movie);
+ MAINMIMETYPE_TO_ICON_MAPPING.put("web", R.drawable.file_code);
+ }
+
+ /**
+ * populates the mapping list: file extension --> mime type.
+ */
+ private static void populateFileExtensionMimeTypeMapping() {
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("3gp", Collections.singletonList("video/3gpp"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("7z", Collections.singletonList("application/x-7z-compressed"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("accdb", Collections.singletonList("application/msaccess"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("ai", Collections.singletonList("application/illustrator"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("apk", Collections.singletonList("application/vnd.android.package-archive"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("arw", Collections.singletonList("image/x-dcraw"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("avi", Collections.singletonList("video/x-msvideo"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("bash", Collections.singletonList("text/x-shellscript"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("blend", Collections.singletonList("application/x-blender"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("bin", Collections.singletonList("application/x-bin"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("bmp", Collections.singletonList("image/bmp"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("bpg", Collections.singletonList("image/bpg"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("cb7", Collections.singletonList("application/x-cbr"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("cba", Collections.singletonList("application/x-cbr"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("cbr", Collections.singletonList("application/x-cbr"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("cbt", Collections.singletonList("application/x-cbr"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("cbtc", Collections.singletonList("application/x-cbr"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("cbz", Collections.singletonList("application/x-cbr"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("cc", Collections.singletonList("text/x-c"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("cdr", Collections.singletonList("application/coreldraw"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("cnf", Collections.singletonList("text/plain"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("conf", Collections.singletonList("text/plain"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("cpp", Collections.singletonList("text/x-c++src"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("cr2", Collections.singletonList("image/x-dcraw"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("css", Collections.singletonList("text/css"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("csv", Collections.singletonList("text/csv"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("cvbdl", Collections.singletonList("application/x-cbr"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("c", Collections.singletonList("text/x-c"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("c++", Collections.singletonList("text/x-c++src"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("dcr", Collections.singletonList("image/x-dcraw"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("deb", Collections.singletonList("application/x-deb"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("dng", Collections.singletonList("image/x-dcraw"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("doc", Collections.singletonList("application/msword"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("docm", Collections.singletonList("application/vnd.ms-word.document.macroEnabled.12"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("docx", Collections.singletonList("application/vnd.openxmlformats-officedocument.wordprocessingml.document"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("dot", Collections.singletonList("application/msword"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("dotx", Collections.singletonList("application/vnd.openxmlformats-officedocument.wordprocessingml.template"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("dv", Collections.singletonList("video/dv"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("eot", Collections.singletonList("application/vnd.ms-fontobject"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("epub", Collections.singletonList("application/epub+zip"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("eps", Collections.singletonList("application/postscript"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("erf", Collections.singletonList("image/x-dcraw"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("exe", Collections.singletonList("application/x-ms-dos-executable"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("flac", Collections.singletonList("audio/flac"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("flv", Collections.singletonList("video/x-flv"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("gif", Collections.singletonList("image/gif"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("gz", Collections.singletonList("application/x-gzip"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("gzip", Collections.singletonList("application/x-gzip"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("h", Collections.singletonList("text/x-h"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("hh", Collections.singletonList("text/x-h"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("html", Arrays.asList("text/html", "text/plain"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("htm", Arrays.asList("text/html", "text/plain"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("ical", Collections.singletonList("text/calendar"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("ics", Collections.singletonList("text/calendar"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("iiq", Collections.singletonList("image/x-dcraw"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("impress", Collections.singletonList("text/impress"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("jpeg", Collections.singletonList("image/jpeg"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("jpg", Collections.singletonList("image/jpeg"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("jps", Collections.singletonList("image/jpeg"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("js", Arrays.asList("application/javascript", "text/plain"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("json", Arrays.asList("application/json", "text/plain"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("k25", Collections.singletonList("image/x-dcraw"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("kdc", Collections.singletonList("image/x-dcraw"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("key", Collections.singletonList("application/x-iwork-keynote-sffkey"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("keynote", Collections.singletonList("application/x-iwork-keynote-sffkey"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("kra", Collections.singletonList("application/x-krita"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("m2t", Collections.singletonList("video/mp2t"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("m4v", Collections.singletonList("video/mp4"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("markdown", Collections.singletonList("text/markdown"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("mdown", Collections.singletonList("text/markdown"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("md", Collections.singletonList("text/markdown"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("mdb", Collections.singletonList("application/msaccess"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("mdwn", Collections.singletonList("text/markdown"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("mkd", Collections.singletonList("text/markdown"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("mef", Collections.singletonList("image/x-dcraw"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("mkv", Collections.singletonList("video/x-matroska"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("mobi", Collections.singletonList("application/x-mobipocket-ebook"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("mov", Collections.singletonList("video/quicktime"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("mp3", Collections.singletonList("audio/mpeg"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("mp4", Collections.singletonList("video/mp4"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("mpeg", Collections.singletonList("video/mpeg"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("mpg", Collections.singletonList("video/mpeg"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("mpo", Collections.singletonList("image/jpeg"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("msi", Collections.singletonList("application/x-msi"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("mts", Collections.singletonList("video/MP2T"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("mt2s", Collections.singletonList("video/MP2T"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("nef", Collections.singletonList("image/x-dcraw"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("numbers", Collections.singletonList("application/x-iwork-numbers-sffnumbers"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("odf", Collections.singletonList("application/vnd.oasis.opendocument.formula"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("odg", Collections.singletonList("application/vnd.oasis.opendocument.graphics"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("odp", Collections.singletonList("application/vnd.oasis.opendocument.presentation"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("ods", Collections.singletonList("application/vnd.oasis.opendocument.spreadsheet"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("odt", Collections.singletonList("application/vnd.oasis.opendocument.text"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("oga", Collections.singletonList("audio/ogg"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("ogg", Collections.singletonList("audio/ogg"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("ogv", Collections.singletonList("video/ogg"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("opus", Collections.singletonList("audio/ogg"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("orf", Collections.singletonList("image/x-dcraw"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("otf", Collections.singletonList("application/font-sfnt"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("pages", Collections.singletonList("application/x-iwork-pages-sffpages"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("pdf", Collections.singletonList("application/pdf"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("pfb", Collections.singletonList("application/x-font"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("pef", Collections.singletonList("image/x-dcraw"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("php", Collections.singletonList("application/x-php"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("pl", Collections.singletonList("application/x-perl"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("png", Collections.singletonList("image/png"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("pot", Collections.singletonList("application/vnd.ms-powerpoint"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("potm", Collections.singletonList("application/vnd.ms-powerpoint.template.macroEnabled.12"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("potx", Collections.singletonList("application/vnd.openxmlformats-officedocument.presentationml.template"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("ppa", Collections.singletonList("application/vnd.ms-powerpoint"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("ppam", Collections.singletonList("application/vnd.ms-powerpoint.addin.macroEnabled.12"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("pps", Collections.singletonList("application/vnd.ms-powerpoint"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("ppsm", Collections.singletonList("application/vnd.ms-powerpoint.slideshow.macroEnabled.12"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("ppsx", Collections.singletonList("application/vnd.openxmlformats-officedocument.presentationml.slideshow"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("ppt", Collections.singletonList("application/vnd.ms-powerpoint"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("pptm", Collections.singletonList("application/vnd.ms-powerpoint.presentation.macroEnabled.12"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("pptx", Collections.singletonList("application/vnd.openxmlformats-officedocument.presentationml.presentation"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("ps", Collections.singletonList("application/postscript"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("psd", Collections.singletonList("application/x-photoshop"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("py", Collections.singletonList("text/x-python"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("raf", Collections.singletonList("image/x-dcraw"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("rar", Collections.singletonList("application/x-rar-compressed"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("reveal", Collections.singletonList("text/reveal"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("rtf", Collections.singletonList("application/rtf"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("rw2", Collections.singletonList("image/x-dcraw"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("sgf", Collections.singletonList("application/sgf"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("sh-lib", Collections.singletonList("text/x-shellscript"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("sh", Collections.singletonList("text/x-shellscript"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("srf", Collections.singletonList("image/x-dcraw"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("sr2", Collections.singletonList("image/x-dcraw"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("svg", Arrays.asList("image/svg+xml", "text/plain"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("swf", Arrays.asList("application/x-shockwave-flash", "application/octet-stream"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("tar", Collections.singletonList("application/x-tar"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("gz", Collections.singletonList("application/x-compressed"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("tex", Collections.singletonList("application/x-tex"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("tgz", Collections.singletonList("application/x-compressed"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("tiff", Collections.singletonList("image/tiff"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("tif", Collections.singletonList("image/tiff"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("ttf", Collections.singletonList("application/font-sfnt"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("txt", Collections.singletonList("text/plain"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("vcard", Collections.singletonList("text/vcard"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("vcf", Collections.singletonList("text/vcard"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("vob", Collections.singletonList("video/dvd"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("wav", Collections.singletonList("audio/wav"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("webm", Collections.singletonList("video/webm"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("woff", Collections.singletonList("application/font-woff"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("wmv", Collections.singletonList("video/x-ms-wmv"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("xcf", Collections.singletonList("application/x-gimp"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("xla", Collections.singletonList("application/vnd.ms-excel"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("xlam", Collections.singletonList("application/vnd.ms-excel.addin.macroEnabled.12"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("xls", Collections.singletonList("application/vnd.ms-excel"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("xlsb", Collections.singletonList("application/vnd.ms-excel.sheet.binary.macroEnabled.12"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("xlsm", Collections.singletonList("application/vnd.ms-excel.sheet.macroEnabled.12"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("xlsx", Collections.singletonList("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("xlt", Collections.singletonList("application/vnd.ms-excel"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("xltm", Collections.singletonList("application/vnd.ms-excel.template.macroEnabled.12"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("xltx", Collections.singletonList("application/vnd.openxmlformats-officedocument.spreadsheetml.template"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("xml", Arrays.asList("application/xml", "text/plain"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("xrf", Collections.singletonList("image/x-dcraw"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("yaml", Arrays.asList("application/yaml", "text/plain"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("yml", Arrays.asList("application/yaml", "text/plain"));
+ FILE_EXTENSION_TO_MIMETYPE_MAPPING.put("zip", Collections.singletonList("application/zip"));
+ }
+}
*/\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
}\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
chunk.append(c);\r
marker++;\r
}\r
- } else\r
- {\r
+ } else {\r
while (marker < slength)\r
{\r
c = s.charAt(marker);\r
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
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
\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
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
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 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.
-
-.. figure:: images/android-upload.png
-
-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.
-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.
+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-file.png
+.. 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, and that is really what it is called) to open a user menu. ``Refresh
+account`` syncs your files, and ``Sort`` gives you the option to sort your files
+by date, or alphabetically.
-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-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.
-.. figure:: images/android-file-options.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 click on them to
+download them. Downloaded files are marked with a green arrow.
+
+.. figure:: images/android-8.png
+ :scale: 75%
+ :alt: Downloaded files are marked with green arrows.
+
+Download and preview 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 mail Files page, a long press on any folder displays a
+list of options: Share Link, Download, Rename, Move, Copy, and Remove.
+
+.. figure:: images/android-11.png
+ :scale: 75%
+ :alt: Folder and file management options.
+
+When you enter a folder, a long press on any file or folder has these
+additional options: Open With, Refresh File, Send, Favorite, and Details. The
+Download option appears on files that have not been downloaded to your Android
+device.
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
+existing directory, or to create a new one. Another nice option is Upload
+Pictures/Video via WiFi Only, to conserve your mobile data usage.
The bottom section of the Settings screen has links to help and the
app's version number.
-
-.. figure:: images/android-help.png