Merge "Prevent SurfaceFlinger from using layer token 31." into gingerbread

This commit is contained in:
Jamie Gennis 2011-02-27 15:27:22 -08:00 committed by Android (Google) Code Review
commit eafc33acff

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);