projects
/
pub
/
Android
/
ownCloud.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4957791
)
move subject message strings into strings.xml
author
Keith Abdulla
<email@ekeitho.com>
Wed, 10 Dec 2014 01:51:10 +0000
(17:51 -0800)
committer
Keith Abdulla
<email@ekeitho.com>
Wed, 10 Dec 2014 01:51:10 +0000
(17:51 -0800)
res/values/strings.xml
patch
|
blob
|
blame
|
history
src/com/owncloud/android/operations/CreateShareOperation.java
patch
|
blob
|
blame
|
history
src/com/owncloud/android/services/OperationsService.java
patch
|
blob
|
blame
|
history
diff --git
a/res/values/strings.xml
b/res/values/strings.xml
index
8b82868
..
a7e04ee
100644
(file)
--- a/
res/values/strings.xml
+++ b/
res/values/strings.xml
@@
-324,4
+324,7
@@
<string name="prefs_instant_video_upload_path_title">Upload Video Path</string>
<string name="prefs_instant_video_upload_path_title">Upload Video Path</string>
+ <string name="shared_subject_header">shared</string>
+ <string name="with_you_subject_header">with you</string>
+
</resources>
</resources>
diff --git
a/src/com/owncloud/android/operations/CreateShareOperation.java
b/src/com/owncloud/android/operations/CreateShareOperation.java
index
5b5e107
..
6247c6d
100644
(file)
--- a/
src/com/owncloud/android/operations/CreateShareOperation.java
+++ b/
src/com/owncloud/android/operations/CreateShareOperation.java
@@
-24,8
+24,10
@@
package com.owncloud.android.operations;
*
*/
*
*/
+import android.content.Context;
import android.content.Intent;
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.datamodel.FileDataStorageManager;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.lib.common.OwnCloudClient;
@@
-46,6
+48,7
@@
public class CreateShareOperation extends SyncOperation {
protected FileDataStorageManager mStorageManager;
protected FileDataStorageManager mStorageManager;
+ private Context mContext;
private String mPath;
private ShareType mShareType;
private String mShareWith;
private String mPath;
private ShareType mShareType;
private String mShareWith;
@@
-56,6
+59,7
@@
public class CreateShareOperation extends SyncOperation {
/**
* Constructor
/**
* 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 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
@@
-72,9
+76,10
@@
public class CreateShareOperation extends SyncOperation {
* To obtain combinations, add the desired values together.
* For instance, for Re-Share, delete, read, update, add 16+8+2+1 = 27.
*/
* To obtain combinations, add the desired values together.
* For instance, for Re-Share, delete, read, update, add 16+8+2+1 = 27.
*/
- public CreateShareOperation(
String path, ShareType shareType, String shareWith, boolean publicUpload,
+ public CreateShareOperation(
Context context, String path, ShareType shareType, String shareWith, boolean publicUpload,
String password, int permissions, Intent sendIntent) {
String password, int permissions, Intent sendIntent) {
+ mContext = context;
mPath = path;
mShareType = shareType;
mShareWith = shareWith;
mPath = path;
mShareType = shareType;
mShareWith = shareWith;
@@
-128,8
+133,9
@@
public class CreateShareOperation extends SyncOperation {
OCFile file = getStorageManager().getFileByPath(mPath);
if (file!=null) {
mSendIntent.putExtra(Intent.EXTRA_TEXT, share.getShareLink());
OCFile file = getStorageManager().getFileByPath(mPath);
if (file!=null) {
mSendIntent.putExtra(Intent.EXTRA_TEXT, share.getShareLink());
- mSendIntent.putExtra(Intent.EXTRA_SUBJECT,
- getClient().getCredentials().getUsername() + " shared >>" + file.getFileName() + "<< with you");
+ mSendIntent.putExtra(Intent.EXTRA_SUBJECT, getClient().getCredentials().getUsername() + " " +
+ mContext.getString(R.string.shared_subject_header) + " >>" + file.getFileName() + "<< " +
+ mContext.getString(R.string.with_you_subject_header));
file.setPublicLink(share.getShareLink());
file.setShareByLink(true);
getStorageManager().saveFile(file);
file.setPublicLink(share.getShareLink());
file.setShareByLink(true);
getStorageManager().saveFile(file);
diff --git
a/src/com/owncloud/android/services/OperationsService.java
b/src/com/owncloud/android/services/OperationsService.java
index
16c4dcc
..
a0e671f
100644
(file)
--- a/
src/com/owncloud/android/services/OperationsService.java
+++ b/
src/com/owncloud/android/services/OperationsService.java
@@
-319,7
+319,7
@@
public class OperationsService extends Service {
String remotePath = operationIntent.getStringExtra(EXTRA_REMOTE_PATH);
Intent sendIntent = operationIntent.getParcelableExtra(EXTRA_SEND_INTENT);
if (remotePath.length() > 0) {
String remotePath = operationIntent.getStringExtra(EXTRA_REMOTE_PATH);
Intent sendIntent = operationIntent.getParcelableExtra(EXTRA_SEND_INTENT);
if (remotePath.length() > 0) {
- operation = new CreateShareOperation(
remotePath, ShareType.PUBLIC_LINK,
+ operation = new CreateShareOperation(
getApplicationContext(), remotePath, ShareType.PUBLIC_LINK,
"", false, "", 1, sendIntent);
}
"", false, "", 1, sendIntent);
}