Restore ability of system to screenshot secure layers.
In previous iterations of the code the "secureLayerIsVisible" block had a guard for "localProducer" which was set to true if the IGBP we were screenshotting to was originally allocated by SurfaceFlinger. What this means is that it came from a SurfaceControl, rather than just being allocated on the client side. Note that the caller could still read the Screenshot back out from the surface, so the old logic just ensured you can't screenshot secure layers unless you have a SurfaceControl. Having a SurfaceControl meant you had either the permission ACCESS_SURFACE_FLINGER, were from AID_SYSTEM/AID_GRAPHICS, or had been granted a SurfaceControl. This allowed the system server to screenshot secure layers for the screen rotation animation. When switching to the GraphicBuffer based interface we eliminated this permisivity. This CL reintroduces it in what is hopefully a clearer way, by explicitly only granting the ability to system components. Bug: 70403018 Test: Manual Change-Id: Icbc51e897f5d46838a68c1387e993b8e6a68cd1d
Loading
Please register or sign in to comment