am 37583aeb: am 1debc665: fix [2751143] Device crashes when in a text box for too long

This commit is contained in:
Mathias Agopian 2010-06-08 15:49:45 -07:00 committed by Android Git Automerger
commit 7b268e7967
2 changed files with 3 additions and 4 deletions

View File

@ -1749,7 +1749,8 @@ ssize_t UserClient::getTokenForSurface(const sp<ISurface>& sur) const
name = NO_MEMORY;
} while(name >= 0);
//LOGD("getTokenForSurface(%p) => %d", sur->asBinder().get(), name);
//LOGD("getTokenForSurface(%p) => %d (client=%p, bitmap=%08lx)",
// sur->asBinder().get(), name, this, mBitmap);
return name;
}

View File

@ -305,9 +305,7 @@ sp<SurfaceControl> SurfaceComposerClient::createSurface(
sp<ISurface> surface = mClient->createSurface(&data, pid, name,
display, w, h, format, flags);
if (surface != 0) {
if (uint32_t(data.token) < SharedBufferStack::NUM_LAYERS_MAX) {
result = new SurfaceControl(this, surface, data, w, h, format, flags);
}
result = new SurfaceControl(this, surface, data, w, h, format, flags);
}
}
return result;