OSDN Git Service

[RESTRICT AUTOMERGE] Careful with screenshots containing secure layers!
authorRobert Carr <racarr@google.com>
Tue, 2 Apr 2019 21:18:56 +0000 (14:18 -0700)
committerNikoli Cartagena <dargeren@google.com>
Tue, 11 Jun 2019 01:52:34 +0000 (18:52 -0700)
commit244676a4ad10888551a939cca3fe049e8dcd68b0
tree8ad09b3be1dc616c8f322502291043a55d7a211c
parent1bc7e4dca32c44795437f6759c084b55a30cee2e
[RESTRICT AUTOMERGE] Careful with screenshots containing secure layers!

For purposes of the screen rotation animation the system server is allowed
to capture secure (not protected) layers and trusted not to persist screenshots
which may contain secure layers. However when displaying the screen rotation animation,
the layer the screenshot is placed on will itself not be secure, so if we record
the animation the recording will contain persisted versions of the secure content. Make sure
we use the new API from SurfaceFlinger to set FLAG_SECURE if our screenshot contains secure
content.

Bug: 69703445
Test: Transaction_test#SetFlagsSecureEUidSystem
Change-Id: I0dd36462867da52e6b1451f65f56c2c5d37538f3
(cherry picked from commit bab740f10e0812ba47d19931fdfe2fa7e02bbd0c)
core/jni/android_view_SurfaceControl.cpp
graphics/java/android/graphics/GraphicBuffer.java
services/core/java/com/android/server/wm/ScreenRotationAnimation.java