Skip to content
Commit 2b5a601f authored by Bookatz's avatar Bookatz
Browse files

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
parent 0ba84f8f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment