Gralloc: Implement getCustomFormatFlags API

Implement API to get custom format and private handle flags
based on a given combination of input format and usage flags.

Change-Id: Id87e9abe834fb17c6304262cc486a84131c8809a
CRs-Fixed: 2255171
diff --git a/gralloc/QtiMapper.cpp b/gralloc/QtiMapper.cpp
index 4ad6836..3848878 100644
--- a/gralloc/QtiMapper.cpp
+++ b/gralloc/QtiMapper.cpp
@@ -337,7 +337,12 @@
 Return<void> QtiMapper::getCustomFormatFlags(int32_t format, uint64_t usage,
                                              getCustomFormatFlags_cb hidl_cb) {
   uint64_t priv_flags = 0;
-  hidl_cb(Error::NONE, format, priv_flags);
+  auto err = Error::NONE;
+  int32_t custom_format = format;
+  if (gralloc::GetCustomFormatFlags(format, usage, &custom_format, &priv_flags) != 0) {
+    err = Error::UNSUPPORTED;
+  }
+  hidl_cb(err, custom_format, priv_flags);
   return Void();
 }