Fail gracefully when allocating screenshot buffers
Some devices have limited protected memory, and over-allocate buffers in
the decoder during DRM playback of high resolution content. The decoder
is able to fail gracefully, but SurfaceFlinger is stricter, causing the
device to crash.
More generally, SurfaceFlinger should not be so strict, because a
malicious app could intentionally allocate many buffers and cause the
system to crash. So, fail gracefully instead to prevent the entire
system from falling over.
Bug: 236200340
Test: 4K DRM playback
Change-Id: Ia0018974fffc753342f78917ede0b67faa94916b
1 file changed