From 3ac2ff83d66f1abfdb23d695670e631206c19df9 Mon Sep 17 00:00:00 2001 From: Scott Warner Date: Thu, 7 Jan 2016 11:35:58 -0500 Subject: [PATCH] Only log non-null invalid pointers This prevents the endless logspam of 0x0 pointers during animations such as an indeterminate progress dialog Change-Id: I986176800b2173a61e76a21af2caa47a728ba543 --- include/gralloc_priv.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/gralloc_priv.h b/include/gralloc_priv.h index 416101c..14ffd3f 100644 --- a/include/gralloc_priv.h +++ b/include/gralloc_priv.h @@ -153,7 +153,11 @@ struct private_handle_t { hnd->numInts + hnd->numFds != sNumInts + sNumFds || hnd->magic != sMagic) { - ALOGE("invalid gralloc handle (at %p)", reinterpret_cast(const_cast(h))); + void *handle = reinterpret_cast(const_cast(h)); + if(handle != 0) + { + ALOGE("invalid gralloc handle (at %p)", handle); + } return -EINVAL; } return 0; -- 2.20.1