summaryrefslogtreecommitdiffstats
path: root/libs/gui/Surface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/gui/Surface.cpp')
-rw-r--r--libs/gui/Surface.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp
index ccf98e5..2c70251 100644
--- a/libs/gui/Surface.cpp
+++ b/libs/gui/Surface.cpp
@@ -277,6 +277,11 @@ sp<Surface> Surface::readFromParcel(const Parcel& data) {
if (surface == 0) {
surface = new Surface(data, binder);
sCachedSurfaces.add(binder, surface);
+ } else {
+ // The Surface was found in the cache, but we still should clear any
+ // remaining data from the parcel.
+ data.readStrongBinder(); // ISurfaceTexture
+ data.readInt32(); // identity
}
if (surface->mSurface == NULL && surface->getISurfaceTexture() == NULL) {
surface = 0;