add EXTRA_FLAG_TITLE to own copy2clipboard intent too (should fix #777)

This commit is contained in:
Philipp Schaefer 2014-02-23 16:19:10 +01:00
parent 9aadef1e2a
commit 48b412c97a

View File

@ -146,7 +146,11 @@ public class IntentGenerator {
if (!containsCopyIntent(targets)) { if (!containsCopyIntent(targets)) {
// add SendToClipboard intent in case Drive is not installed // 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; return targets;