Camera : Fix issue in Video-Recording on targets other than 7x30 and 8k.

The API getBufferInfo() in HAL provides the buffer that needs to be encoded to the opencore.
For 7x30 and 8k the preview and recording buffers are different whereas it is same for other targets.
Issue is we are providing the recording buffer for all targets which is not intialized for some targets.
Providing the respective buffer for each target fixes the issue.

Change-Id: I8674cb832f5fd63a552d4c52aea07750cec9eebc
diff --git a/QualcommCameraHardware.cpp b/QualcommCameraHardware.cpp
index 7800056..78adf3c 100644
--- a/QualcommCameraHardware.cpp
+++ b/QualcommCameraHardware.cpp
@@ -4461,21 +4461,41 @@
 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;
+    if( ( mCurrentTarget == TARGET_MSM7630 ) || (mCurrentTarget == TARGET_QSD8250) )
+    {
+	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(" HAL : alignedSize is NULL. Cannot update alignedSize ");
-            ret = UNKNOWN_ERROR;
-        }
+		LOGE(" RecordHeap is null. Buffer information wont be updated ");
+		Frame = NULL;
+		ret = UNKNOWN_ERROR;
+	}
     } else {
-        LOGE(" RecordHeap is null. Buffer information wont be updated ");
-        Frame = NULL;
-        ret = UNKNOWN_ERROR;
+	if(mPreviewHeap != NULL) {
+		LOGV(" Setting valid buffer information ");
+		Frame = mPreviewHeap->mBuffers[0];
+		if( alignedSize != NULL) {
+			*alignedSize = mPreviewHeap->mAlignedBufferSize;
+		        LOGV(" HAL : alignedSize = %d ", *alignedSize);
+		        ret = NO_ERROR;
+	        } else {
+		        LOGE(" HAL : alignedSize is NULL. Cannot update alignedSize ");
+		        ret = UNKNOWN_ERROR;
+	        }
+	} else {
+	        LOGE(" PreviewHeap is null. Buffer information wont be updated ");
+	        Frame = NULL;
+	        ret = UNKNOWN_ERROR;
+	}
     }
     LOGV(" getBufferInfo : X ");
     return ret;