Hotseats: better strategy for finding the default browser.

To do this, we invoke resolveActivity to see what activity
would result from viewing an arbitrary (but valid) URL. If
there's just one installed, or there are multiple and the
user has chosen a default handler for http:, we take that
component and launch it with CATEGORY_HOME (so as not to
upset the URL in the frontmost window/tab/what-have-you).
We also use this information to extract the localized name
of the app, which is then installed into the hotseat as the
contentDescription (for accessibility).

If there's no default and multiple options are availble,
we'll get the activity chooser instead. In this case, we
just fire off that chooser and let the user pick an app
(possibly setting a default along the way). Because the
default may change, we reload all this hotseat information
every time one of the hotseats is tapped.

Another side-effect of this approach is that until there
exists a default browser, the original URL will be sent to
the activity the user chooses from the ResolveActivity. So
we need a sensible default URL here; one can be found in
R.string.default_browser_url (similar to Browser's
R.string.homepage_base).

This change also moves the hotseat intents and icons into
arrays.xml for easier configuration.

Change-Id: I06268df8b59e0f41f1f8b0e47f823db4c44ec761
3 files changed