camera: Add crop and metering region correction for max resolution requests.

Capture request templates, assume default sensor pixel mode requests. As
a result, the coordinate system of the scaler crop region matches the
ones used for default sensor pixel mode. We need to correct these for
max resolution sensor pixel mode requests, if they haven't been set by
the client.

Bug: 194143991

Test: Camera CTS; manually see that emulator hal gets crop regions ==
      max res active array size.

Change-Id: I06769fd29a5fee9c21c75f151e516f150317148f
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
diff --git a/services/camera/libcameraservice/utils/SessionConfigurationUtils.h b/services/camera/libcameraservice/utils/SessionConfigurationUtils.h
index b4814b6..4e6eb2b 100644
--- a/services/camera/libcameraservice/utils/SessionConfigurationUtils.h
+++ b/services/camera/libcameraservice/utils/SessionConfigurationUtils.h
@@ -79,6 +79,9 @@
             android_dataspace dataSpace, const CameraMetadata& info, bool maxResolution,
             /*out*/int32_t* outWidth, /*out*/int32_t* outHeight);
 
+    static bool getArrayWidthAndHeight(const CameraMetadata *deviceInfo, int32_t arrayTag,
+            int32_t *width, int32_t *height);
+
     //check if format is not custom format
     static bool isPublicFormat(int32_t format);