diff options
| author | 2011-08-10 19:45:33 -0700 | |
|---|---|---|
| committer | 2011-08-10 19:45:34 -0700 | |
| commit | 3477588d13a8dfb4fefe01a8c81c0c74f8f5c72f (patch) | |
| tree | e740eefb33bfe3f360dabd09251a567722a02cc8 | |
| parent | f440f670a4448a9b9aec96b53c94aeee7bb4602e (diff) | |
| parent | e5d6eb81e29e0fb914ce8fdaae17190b0dbae1a1 (diff) | |
Merge "Read leftover parcel data when a parceled Surface is found in the cache."
| -rw-r--r-- | libs/gui/Surface.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp index ccf98e500c..2c702511de 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; |