gralloc1: Changes to align to new ion api requirements

Update ion handling in gralloc to align to new ion api
requirements.
Based on compile time flag TARGET_ION_ABI_VERSION,
gralloc will call old ion api or new libion apis

Change-Id: I9905a6a6edade9bcd70fa6e20b5593a26d088457
CRs-Fixed: 2185970
diff --git a/libgralloc1/gr_buf_mgr.cpp b/libgralloc1/gr_buf_mgr.cpp
index 815f2b0..34265da 100644
--- a/libgralloc1/gr_buf_mgr.cpp
+++ b/libgralloc1/gr_buf_mgr.cpp
@@ -329,7 +329,7 @@
   if (!err && (hnd->flags & private_handle_t::PRIV_FLAGS_USES_ION) &&
       (hnd->flags & private_handle_t::PRIV_FLAGS_CACHED)) {
     if (allocator_->CleanBuffer(reinterpret_cast<void *>(hnd->base), hnd->size, hnd->offset,
-                                buf->ion_handle_main, CACHE_INVALIDATE)) {
+                                buf->ion_handle_main, CACHE_INVALIDATE, hnd->fd)) {
       return GRALLOC1_ERROR_BAD_HANDLE;
     }
   }
@@ -355,7 +355,7 @@
 
   if (hnd->flags & private_handle_t::PRIV_FLAGS_NEEDS_FLUSH) {
     if (allocator_->CleanBuffer(reinterpret_cast<void *>(hnd->base), hnd->size, hnd->offset,
-                                buf->ion_handle_main, CACHE_CLEAN) != 0) {
+                                buf->ion_handle_main, CACHE_CLEAN, hnd->fd) != 0) {
       status = GRALLOC1_ERROR_BAD_HANDLE;
     }
     hnd->flags &= ~private_handle_t::PRIV_FLAGS_NEEDS_FLUSH;