Skip to content
Commit 5ce5acd1 authored by Jing Ji's avatar Jing Ji
Browse files

Allow apps to create FGS with type mediaProjection if the user granted

...the media projection permission from the system dialog
(i.e. MediaProjectionPermissionActivity).

The updated flow of starting a media projection will be:

1. Declares a FGS with type mediaProjection
2. startActivityForResult(MediaProjectionManager#createScreenCaptureIntent())
3. [NEW] Start the FGS on getting the result from step #2
4. MediaProjectionManager#getMediaProjection()
5. MediaProjection#createVirtualDisplay()

Also, bring back the permission enforcement for mediaProjection FGS
which was removed in I1efa698207182043cfab3d5503829da8eec075ab.

Additional, this CL added the feature flags for the permission
enforcement for each FGS type.

Bug: 267740338
Bug: 246792057
Test: atest CtsMediaProjectionTestCases
Test: atest CtsWindowManagerDeviceTestCases
Test: atest CtsAppFgsTestCases
Change-Id: I1e5b58ddea232fecaaa5ed513276a62c72429a0b
Merged-In: I1e5b58ddea232fecaaa5ed513276a62c72429a0b
parent 18216d97
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment