From 48b412c97a26bcd7d56e67c14900734eefc3aeeb Mon Sep 17 00:00:00 2001 From: Philipp Schaefer Date: Sun, 23 Feb 2014 16:19:10 +0100 Subject: [PATCH] add EXTRA_FLAG_TITLE to own copy2clipboard intent too (should fix #777) --- .../src/com/cradle/iitc_mobile/share/IntentGenerator.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mobile/src/com/cradle/iitc_mobile/share/IntentGenerator.java b/mobile/src/com/cradle/iitc_mobile/share/IntentGenerator.java index 24c4dc8e..b315cc13 100644 --- a/mobile/src/com/cradle/iitc_mobile/share/IntentGenerator.java +++ b/mobile/src/com/cradle/iitc_mobile/share/IntentGenerator.java @@ -146,7 +146,11 @@ public class IntentGenerator { if (!containsCopyIntent(targets)) { // add SendToClipboard intent in case Drive is not installed - targets.add(new Intent(intent).setComponent(new ComponentName(mContext, SendToClipboard.class))); + Intent copyToClipboardIntent = new Intent(intent); + copyToClipboardIntent.setComponent(new ComponentName(mContext, SendToClipboard.class)); + ResolveInfo activity = mPackageManager.resolveActivity(copyToClipboardIntent, 0); + copyToClipboardIntent.putExtra(EXTRA_FLAG_TITLE, activity.loadLabel(mPackageManager)); + targets.add(copyToClipboardIntent); } return targets;