Skip to content

Commit c86d904

Browse files
author
Jamie Gennis
committed
Prevent SurfaceFlinger from using layer token 31.
Bug: 2964479 Change-Id: I81e948924bff35b8b300d409f2c09f3779bcdeec
1 parent 58c9d47 commit c86d904

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/surfaceflinger/SurfaceFlinger.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2427,7 +2427,7 @@ ssize_t UserClient::getTokenForSurface(const sp<ISurface>& sur) const
24272427
}
24282428
break;
24292429
}
2430-
if (++name > 31)
2430+
if (++name >= SharedBufferStack::NUM_LAYERS_MAX)
24312431
name = NO_MEMORY;
24322432
} while(name >= 0);
24332433

0 commit comments

Comments
 (0)