Prevent SurfaceFlinger from using layer token 31.

Bug: 2964479
Change-Id: I81e948924bff35b8b300d409f2c09f3779bcdeec
This commit is contained in:
Jamie Gennis 2011-02-10 16:18:36 -08:00
parent 0858b00d05
commit 8a08392833

View File

@ -2427,7 +2427,7 @@ ssize_t UserClient::getTokenForSurface(const sp<ISurface>& sur) const
}
break;
}
if (++name > 31)
if (++name >= SharedBufferStack::NUM_LAYERS_MAX)
name = NO_MEMORY;
} while(name >= 0);