From 53503a97a9afa9e876b1e95ca7e3b46c76aa4f15 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Tue, 8 Jun 2010 15:40:56 -0700 Subject: [PATCH] fix [2751143] Device crashes when in a text box for too long --- libs/surfaceflinger/SurfaceFlinger.cpp | 3 ++- libs/surfaceflinger_client/SurfaceComposerClient.cpp | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/libs/surfaceflinger/SurfaceFlinger.cpp b/libs/surfaceflinger/SurfaceFlinger.cpp index 0f737745d..49268588b 100644 --- a/libs/surfaceflinger/SurfaceFlinger.cpp +++ b/libs/surfaceflinger/SurfaceFlinger.cpp @@ -1749,7 +1749,8 @@ ssize_t UserClient::getTokenForSurface(const sp& 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; } diff --git a/libs/surfaceflinger_client/SurfaceComposerClient.cpp b/libs/surfaceflinger_client/SurfaceComposerClient.cpp index 5ac0d5d54..4096ac685 100644 --- a/libs/surfaceflinger_client/SurfaceComposerClient.cpp +++ b/libs/surfaceflinger_client/SurfaceComposerClient.cpp @@ -305,9 +305,7 @@ sp SurfaceComposerClient::createSurface( sp 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;