Changes how `am start-user` starts a profile.

When the user is a profile, it will call IActivityManager's
.startProfileWithListener(), unless called with --force-invisible
(in which case it will call startUserInBackgroundWithListener())

Also improved logging on ActivityManagerShellCommand.

Test: adb shell am start-user --force-invisible 10
Test: atest android.server.wm.StartActivityAsUserTests#startActivityAsValidUserWithOptions
Fixes: 266094415

Change-Id: If2aff41fd165da77ea4de753da76a47a3d02da71
4 files changed