Look for apps in the proper user

System server can post notifications that appear to
be coming from apps in other users (like when apps in
a work profile start a foreground service). Thus,
when resolving the uid of the notification, it's not safe
to use the calling user; instead the userid as resolved
by ActivityManager.handleIncomingUser() must be used.

Test: runtest systemui-notification
Test: start a foreground service in a managed profile for
an app that doesn't exist in the primary user.
Fixes: 116283798
Bug: 116019760

Change-Id: I568f1ed6fabe64a6c32ef0901f76b2baadc63f6c
2 files changed