Camera: HAL: Add support for getBufferInfo API at the HAL Layer.

Add getBufferInfo API which takes an IMemory variable as input and
updates it with the details of the recording buffer allocated
at the HAL layer.

Change-Id: Iad16c4a544f388ca47a5ee4fd656c5d27df6339a
diff --git a/QualcommCameraHardware.cpp b/QualcommCameraHardware.cpp
index 064346a..6ab9c23 100644
--- a/QualcommCameraHardware.cpp
+++ b/QualcommCameraHardware.cpp
@@ -4434,5 +4434,27 @@
     }
     return retVal;
 }
+status_t QualcommCameraHardware::getBufferInfo(sp<IMemory>& Frame, size_t *alignedSize) {
+    status_t ret;
+    LOGV(" getBufferInfo : E ");
+    if( mRecordHeap != NULL) {
+        LOGV(" Setting valid buffer information ");
+        Frame = mRecordHeap->mBuffers[0];
+        if( alignedSize != NULL) {
+            *alignedSize = mRecordHeap->mAlignedBufferSize;
+            LOGV(" HAL : alignedSize = %d ", *alignedSize);
+            ret = NO_ERROR;
+        } else {
+            LOGE(" HAL : alignedSize is NULL. Cannot update alignedSize ");
+            ret = UNKNOWN_ERROR;
+        }
+    } else {
+        LOGE(" RecordHeap is null. Buffer information wont be updated ");
+        Frame = NULL;
+        ret = UNKNOWN_ERROR;
+    }
+    LOGV(" getBufferInfo : X ");
+    return ret;
+}
 
 }; // namespace android