Only log non-null invalid pointers cm-13.0 cm-14.0 stable/cm-13.0-ZNH0E stable/cm-13.0-ZNH2K stable/cm-13.0-ZNH2KB stable/cm-13.0-ZNH5Y staging/cm-14.0
authorScott Warner <Tortel1210@gmail.com>
Thu, 7 Jan 2016 16:35:58 +0000 (11:35 -0500)
committerScott Warner <Tortel1210@gmail.com>
Thu, 7 Jan 2016 16:35:58 +0000 (11:35 -0500)
This prevents the endless logspam of 0x0 pointers during animations such as
an indeterminate progress dialog

Change-Id: I986176800b2173a61e76a21af2caa47a728ba543

include/gralloc_priv.h

index 416101c934571062f927d18b4e267a9a293b2421..14ffd3f591071062b21caad0810eeb73008191a5 100644 (file)
@@ -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<void *>(const_cast<native_handle *>(h)));
+            void *handle = reinterpret_cast<void *>(const_cast<native_handle *>(h));
+            if(handle != 0)
+            {
+                ALOGE("invalid gralloc handle (at %p)", handle);
+            }
             return -EINVAL;
         }
         return 0;