Bug 890392 - Replace the page title when sharing. r=sriram

This commit is contained in:
Brian Nicholson 2013-09-17 10:27:37 -04:00
parent fd9bdf76f7
commit 65857af0ad

View File

@ -1911,14 +1911,17 @@ abstract public class BrowserApp extends GeckoApp
if (provider != null) {
Intent shareIntent = provider.getIntent();
// For efficiency, the provider's intent is only set once
if (shareIntent == null) {
shareIntent = GeckoAppShell.getShareIntent(this, url,
"text/plain", tab.getDisplayTitle());
shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.setType("text/plain");
provider.setIntent(shareIntent);
} else {
shareIntent.putExtra(Intent.EXTRA_TEXT, url);
shareIntent.putExtra(Intent.EXTRA_SUBJECT, tab.getDisplayTitle());
}
// Replace the existing intent's extras
shareIntent.putExtra(Intent.EXTRA_TEXT, url);
shareIntent.putExtra(Intent.EXTRA_SUBJECT, tab.getDisplayTitle());
shareIntent.putExtra(Intent.EXTRA_TITLE, tab.getDisplayTitle());
}
}