Fix NPE in ScreenCapture.release method.

Bug: 276941014
Test: Manual test

Change-Id: I3675d8d3479ae0f514f0e113ddbf23e85b13e936
This commit is contained in:
Ajinkya Chalke
2023-04-04 21:20:39 +00:00
parent d9fc7a5785
commit fd2730a054

View File

@@ -309,7 +309,7 @@ public class ScreenCapture {
/** Release any layers if set using {@link Builder#setExcludeLayers(SurfaceControl[])}. */
public void release() {
if (mExcludeLayers.length == 0) {
if (mExcludeLayers == null || mExcludeLayers.length == 0) {
return;
}