Merge "Surface: Allow nullable IGBPs when unparceling a Surface"
diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp
index 0838290..d78a681 100644
--- a/libs/gui/Surface.cpp
+++ b/libs/gui/Surface.cpp
@@ -1393,14 +1393,18 @@
int isSingleBuffered;
res = parcel->readInt32(&isSingleBuffered);
if (res != OK) {
+ ALOGE("Can't read isSingleBuffered");
return res;
}
}
sp<IBinder> binder;
- res = parcel->readStrongBinder(&binder);
- if (res != OK) return res;
+ res = parcel->readNullableStrongBinder(&binder);
+ if (res != OK) {
+ ALOGE("%s: Can't read strong binder", __FUNCTION__);
+ return res;
+ }
graphicBufferProducer = interface_cast<IGraphicBufferProducer>(binder);