From: Keith Abdulla Date: Sat, 20 Dec 2014 04:11:25 +0000 (-0800) Subject: fix string format and context method X-Git-Tag: oc-android-1.7.0_signed~61^2~2 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/38d0a19307b2885117eb3bf2959cc28c3481e4f1?ds=inline;hp=--cc fix string format and context method --- 38d0a19307b2885117eb3bf2959cc28c3481e4f1 diff --git a/src/com/owncloud/android/operations/CreateShareOperation.java b/src/com/owncloud/android/operations/CreateShareOperation.java index 6247c6d4..72cbee4f 100644 --- a/src/com/owncloud/android/operations/CreateShareOperation.java +++ b/src/com/owncloud/android/operations/CreateShareOperation.java @@ -133,9 +133,9 @@ public class CreateShareOperation extends SyncOperation { OCFile file = getStorageManager().getFileByPath(mPath); if (file!=null) { mSendIntent.putExtra(Intent.EXTRA_TEXT, share.getShareLink()); - mSendIntent.putExtra(Intent.EXTRA_SUBJECT, getClient().getCredentials().getUsername() + " " + - mContext.getString(R.string.shared_subject_header) + " >>" + file.getFileName() + "<< " + - mContext.getString(R.string.with_you_subject_header)); + mSendIntent.putExtra(Intent.EXTRA_SUBJECT, String.format("%s %s >>%s<< %s", + 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); diff --git a/src/com/owncloud/android/services/OperationsService.java b/src/com/owncloud/android/services/OperationsService.java index a0e671f6..ca370b31 100644 --- 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) { - operation = new CreateShareOperation(getApplicationContext(), remotePath, ShareType.PUBLIC_LINK, + operation = new CreateShareOperation(OperationsService.this, remotePath, ShareType.PUBLIC_LINK, "", false, "", 1, sendIntent); }