Merge "Read leftover parcel data when a parceled Surface is found in the cache."
This commit is contained in:
committed by
Android (Google) Code Review
commit
246ae5011c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user