From f25c5086cf46eb029d887f34f25a09220e44958c Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Fri, 15 Feb 2013 14:59:09 -0800 Subject: [PATCH] fix build: SurfaceTextureClient to Surface rename Change-Id: I54d68241f1080eef640aefe71f33912ad79345ef --- include/gui/Surface.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/gui/Surface.h b/include/gui/Surface.h index 4300a0fff..a48e7e45a 100644 --- a/include/gui/Surface.h +++ b/include/gui/Surface.h @@ -57,6 +57,10 @@ public: static status_t writeToParcel(const sp& surface, Parcel* parcel); static sp readFromParcel(const Parcel& data); + bool isValid(const sp& surface) const { + return surface != NULL && surface->getIGraphicBufferProducer() != NULL; + } + // FIXME: temporary for source compatibility... sp getISurfaceTexture() const { return getIGraphicBufferProducer();