free all buffers when ANativeWindow::disconnect is called

Change-Id: Ie06e73e5b44398cda9e99876f78175b5eef765dc
This commit is contained in:
Mathias Agopian 2011-08-08 19:14:57 -07:00
parent 5bfc24515b
commit b0c15c9908

View File

@ -599,6 +599,7 @@ status_t SurfaceTexture::disconnect(int api) {
case NATIVE_WINDOW_API_CAMERA:
if (mConnectedApi == api) {
mConnectedApi = NO_CONNECTED_API;
freeAllBuffers();
} else {
LOGE("disconnect: connected to another api (cur=%d, req=%d)",
mConnectedApi, api);