Do a better job at finding the activity associated with a dialog when triggering search.

It first looks to see if there is an activity that is managing the dialog, and if not,
follows the context / contextwrapper chain to find an activity if possible.

Fixes http://b/issue?id=2064772.
1 file changed