pm set-home-activity waits until completion

PackageManagerShellActivity.runSetHomeActivity used to be synchronous,
but in Q the underlying calls became asynchronous. This cl:

1. changes the shell command to use RoleManager's addRoleHolderAsUser,
instead of calling into PackageManagerService.
2. uses a RemoteCallback to restore the wait-until-complete aspect of
the shell command.
3. consequently, the shell command now accepts either a package name
or a component, but either way, the component will be determined
automatically from the package.

(This is an alternative to ag/6989721; see comments there for
motivation)

Fixes: 128686703
Fixes: 130167856
Test: atest CtsShortcutHostTestCases CtsShortcutManagerTestCases
(.ShortcutManagerThrottlingTest#testActivityUnthrottled fails, but that
is presumably unrelated)
Test: atest android.content.pm.cts.shortcutmanager.ShortcutManagerLauncherApiTest
Test: atest android.content.pm.cts.shortcuthost.ShortcutManagerMultiuserTest
Change-Id: Ibce6282bf401ca471469448262ea87cfc504cf4f
1 file changed