hwc: more error checks
-- numHwLayers==1 means that there is only the FB_TARGET which HWC shouldn't
draw. Also check for blank in set. Checking for this in prepare prevents us
from acquiring pipes.
-- add null check for private handle
-- print out vsync timestamp data on error
bug: 7274417
related-to-bug: 7288769
Change-Id: I8dae0d0748c5226fdc33ed8f5cc5259835dec2de
Signed-off-by: Iliyan Malchev <malchev@google.com>
diff --git a/libhwcomposer/hwc_vsync.cpp b/libhwcomposer/hwc_vsync.cpp
index 30b85f4..3053aaf 100644
--- a/libhwcomposer/hwc_vsync.cpp
+++ b/libhwcomposer/hwc_vsync.cpp
@@ -109,8 +109,9 @@
if (!strncmp(str, "VSYNC=", strlen("VSYNC="))) {
cur_timestamp = strtoull(str + strlen("VSYNC="), NULL, 0);
} else {
- ALOGE ("FATAL:%s:timestamp data not in correct format",
- __FUNCTION__);
+ ALOGE ("FATAL: %s: vsync timestamp not in correct format: [%s]",
+ __FUNCTION__,
+ str);
}
// send timestamp to HAL
ALOGD_IF (VSYNC_DEBUG, "%s: timestamp %llu sent to HWC for %s",