Work-around for issue #415 (ShareActionProvider does not work if only one intent).
Additional protections for #557.
Merge pull request #863 from Digipom/issue_415

Work-around for issue #415 (ShareActionProvider does not work if only on...
Merge pull request #864 from Digipom/issue_557

Additional protections for #557.