Merge change 6711
* changes:
Basic plumbing to retrieve metadata from the native player.
diff --git a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp b/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
index 5c522c5..21f87e3 100644
--- a/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
+++ b/libs/surfaceflinger/DisplayHardware/DisplayHardware.cpp
@@ -219,7 +219,7 @@
mDpiX = mNativeWindow->xdpi;
- mDpiX = mNativeWindow->ydpi;
+ mDpiY = mNativeWindow->ydpi;
mRefreshRate = fbDev->fps;
char property[PROPERTY_VALUE_MAX];
diff --git a/libs/surfaceflinger/SurfaceFlinger.cpp b/libs/surfaceflinger/SurfaceFlinger.cpp
index 5ac1cfd..7a7574f 100644
--- a/libs/surfaceflinger/SurfaceFlinger.cpp
+++ b/libs/surfaceflinger/SurfaceFlinger.cpp
@@ -1212,6 +1212,13 @@
{
sp<LayerBaseClient> layer;
sp<LayerBaseClient::Surface> surfaceHandle;
+
+ if (int32_t(w|h) < 0) {
+ LOGE("createSurface() failed, w or h is negative (w=%d, h=%d)",
+ int(w), int(h));
+ return surfaceHandle;
+ }
+
Mutex::Autolock _l(mStateLock);
sp<Client> client = mClientsMap.valueFor(clientId);
if (UNLIKELY(client == 0)) {