Allow background activity starts if realCallingUid is in
the foreground

Most notably adds support for:
- shortcuts (not PendingIntent-based, but realCallingUid is launcher,
which is foreground at the time of clicking)
- notifications, slices, actions and widgets (but only those that
are based on PendingIntent.getActivity() - trampolines are not yet
supported)

Note: this currently also allows PendingIntent-based starts for many
use cases where it's a persistent system process calling send(), but
we won't be allowing them anymore in forthcoming CLs (most notably
the AlarmManager use cases).

Bug: 110956953
Test: atest WmTests:ActivityStarterTests
Test: manual
Change-Id: I3c9de8cbe76bef5cc99d721536e19bb39b03405f
2 files changed