From 8a08392833a2db80aef20fba8a43f0829a096e13 Mon Sep 17 00:00:00 2001 From: Jamie Gennis Date: Thu, 10 Feb 2011 16:18:36 -0800 Subject: [PATCH] Prevent SurfaceFlinger from using layer token 31. Bug: 2964479 Change-Id: I81e948924bff35b8b300d409f2c09f3779bcdeec --- services/surfaceflinger/SurfaceFlinger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 4876946f2..4b3235d42 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -2427,7 +2427,7 @@ ssize_t UserClient::getTokenForSurface(const sp& sur) const } break; } - if (++name > 31) + if (++name >= SharedBufferStack::NUM_LAYERS_MAX) name = NO_MEMORY; } while(name >= 0);