Changes PM so apps are not installed for pre-created users.
A pre-created user is not ready for use yet, so when an app is
installed using USER_ALL, it should not be installed on such user.
In particular, doing so can cause multi-user releted CTS tests to
fail when the device has pre-created users. Example:
- Device has pre-created user 42
- Test infra install TestApp on all users (which include 42)
- Test case creates a new user
- Framework converts 42
- Test case calls 'pm install-existing --user 42 --wait TestApp' -
it will hang
Test: adb shell pm create-user --pre-create-only && \
atest CtsAppExitTestCases:android.app.cts.ActivityManagerAppExitInfoTest#testSecondaryUser # on automotive and phone
Test: atest CtsCarHostTestCases:android.car.cts.PreCreateUsersHostTest # to make sure it doesn't break anything
Bug: 215653069
Bug: 218724421
Change-Id: If261163c024fbdf4121fbcd0971ed784018a2991
1 file changed