Require a foreground service of a specific type to start media projection.
The flow for apps targeting Q is :
- We check at the point of starting a projection whether the UID making
the request has a foreground service active with the type
FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION
- The MediaProjectionManager registers a Process change observer to be
notified whenever the list of f/g service types associated with the
UID changes, and may stop the projection
Bug: 124753835
Test: Manual; CTS test in progress.
Change-Id: Iedcb9e944f5a7e2e59ba3b9831cdff619776e9e2
6 files changed