chromeos-config: Add arc camera-characteristics config to schema.

Add the ability to specify the arc camera_characteristcis.conf file to
the cros config schema.

BUG=None
TEST=CQ
TEST=chromeos-config/run_tests.sh

Change-Id: Ief5ba1d0a4eec375e8f64c1e30228a53675ec821
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2327692
Commit-Queue: David Burger <dburger@chromium.org>
Tested-by: David Burger <dburger@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: C Shapiro <shapiroc@chromium.org>
diff --git a/chromeos-config/README.md b/chromeos-config/README.md
index 06be01f..5cb4c31 100644
--- a/chromeos-config/README.md
+++ b/chromeos-config/README.md
@@ -351,6 +351,7 @@
 | Attribute | Type   | RegEx     | Required | Oneof Group | Build-only | Description |
 | --------- | ------ | --------- | -------- | ----------- | ---------- | ----------- |
 | build-properties | [build-properties](#build_properties) |  | True |  | False |  |
+| camera-characteristics | [camera-characteristics](#camera_characteristics) |  | False |  | False | Defines camera_chacteristics.conf file provided to ARC during initialization.  |
 | hardware-features | [hardware-features](#hardware_features) |  | False |  | False | Defines hardware_features.xml file provided to ARC during initialization.  |
 | media-profiles | [media-profiles](#media_profiles) |  | False |  | False | Defines media_profiles.xml file provided to ARC during initialization.  |
 | scale | integer |  | False |  | False | The screen density value in dpi that will be used for ARC apps. This value should be from the list of DPIs in android cdd. |
@@ -366,6 +367,12 @@
 | pai-regions | string | ```(^([a-zA-Z0-9\.\-]+,)*[a-zA-Z0-9\.\-]+$)|(^\*$)``` | False |  | False | (Optional) Comma-separated allow list of region codes that can be appended to 'ro.oem.key1' for the purpose of targeting Play Auto Install applications by region. The value(s) should match the values that would be returned by `cros_region_data region_code` for the relevant region(s). If the device's region code is not in the allow list, or if there is no allow list, 'ro.oem.key1' will not include the region code. The allow list can also be a single '*' character to indicate that the region code should always be appended.  |
 | product | string |  | True |  | False | Product name to report in 'ro.product.name'. This may be the device name, or it can be something else, to allow several devices to be grouped into one product. |
 
+### camera-characteristics
+| Attribute | Type   | RegEx     | Required | Oneof Group | Build-only | Description |
+| --------- | ------ | --------- | -------- | ----------- | ---------- | ----------- |
+| build-path | string |  | True |  | True | Source of the file relative to the build system. |
+| system-path | string |  | True |  | False | Installation path for the file on the system image. |
+
 ### hardware-features
 | Attribute | Type   | RegEx     | Required | Oneof Group | Build-only | Description |
 | --------- | ------ | --------- | -------- | ----------- | ---------- | ----------- |
diff --git a/chromeos-config/cros_config_host/cros_config_schema.yaml b/chromeos-config/cros_config_host/cros_config_schema.yaml
index e39f861..a5e2ce7 100644
--- a/chromeos-config/cros_config_host/cros_config_schema.yaml
+++ b/chromeos-config/cros_config_host/cros_config_schema.yaml
@@ -251,6 +251,11 @@
                     android cdd.
                   enum:
                     - 280
+                camera-characteristics:
+                  <<: *system_file_v2
+                  description: |
+                    Defines camera_chacteristics.conf file provided to ARC
+                    during initialization.
               additionalProperties: false
             nnpalm:
               type: object
diff --git a/chromeos-config/cros_config_host/libcros_config_host_json.py b/chromeos-config/cros_config_host/libcros_config_host_json.py
index da249e7..8a3934a 100644
--- a/chromeos-config/cros_config_host/libcros_config_host_json.py
+++ b/chromeos-config/cros_config_host/libcros_config_host_json.py
@@ -118,7 +118,8 @@
   def GetArcFiles(self):
     return self._GetSystemFilesV2([
         '/arc/hardware-features',
-        '/arc/media-profiles'])
+        '/arc/media-profiles',
+        '/arc/camera-characteristics'])
 
   def GetAudioFiles(self):
     return self._GetFiles('/audio/main')
diff --git a/chromeos-config/cros_config_host/libcros_config_host_unittest.py b/chromeos-config/cros_config_host/libcros_config_host_unittest.py
index 0c3addd..9631375 100755
--- a/chromeos-config/cros_config_host/libcros_config_host_unittest.py
+++ b/chromeos-config/cros_config_host/libcros_config_host_unittest.py
@@ -113,6 +113,9 @@
     arc_files = config.GetArcFiles()
     self.assertEqual(arc_files, [
         BaseFile(
+            source='some/camera_characteristics.conf',
+            dest='/etc/arc/camera_characteristics.conf'),
+        BaseFile(
             source='some/hardware_features.xml',
             dest='/etc/some_hardware_features.xml'),
         BaseFile(
diff --git a/chromeos-config/test_data/test.json b/chromeos-config/test_data/test.json
index 27c20b0..57a5bc0 100644
--- a/chromeos-config/test_data/test.json
+++ b/chromeos-config/test_data/test.json
@@ -9,6 +9,9 @@
             "metrics-tag": "abc123",
             "product": "some"
           },
+          "camera-characteristics": {
+            "system-path": "/etc/arc/camera_characteristics.conf"
+          },
           "hardware-features": {
             "system-path": "/etc/some_hardware_features.xml"
           },
@@ -85,6 +88,9 @@
             "metrics-tag": "abc123",
             "product": "some"
           },
+          "camera-characteristics": {
+            "system-path": "/etc/arc/camera_characteristics.conf"
+          },
           "hardware-features": {
             "system-path": "/etc/some_hardware_features.xml"
           },
@@ -156,6 +162,9 @@
             "metrics-tag": "abc123",
             "product": "some2"
           },
+          "camera-characteristics": {
+            "system-path": "/etc/arc/camera_characteristics.conf"
+          },
           "hardware-features": {
             "system-path": "/etc/some_hardware_features.xml"
           },
@@ -276,6 +285,9 @@
             "metrics-tag": "abc123",
             "product": "whitelabel"
           },
+          "camera-characteristics": {
+            "system-path": "/etc/arc/camera_characteristics.conf"
+          },
           "hardware-features": {
             "system-path": "/etc/some_hardware_features.xml"
           },
@@ -339,6 +351,9 @@
             "metrics-tag": "abc123",
             "product": "whitelabel"
           },
+          "camera-characteristics": {
+            "system-path": "/etc/arc/camera_characteristics.conf"
+          },
           "hardware-features": {
             "system-path": "/etc/some_hardware_features.xml"
           },
@@ -402,6 +417,9 @@
             "metrics-tag": "abc123",
             "product": "whitelabel"
           },
+          "camera-characteristics": {
+            "system-path": "/etc/arc/camera_characteristics.conf"
+          },
           "hardware-features": {
             "system-path": "/etc/some_hardware_features.xml"
           },
@@ -465,6 +483,9 @@
             "metrics-tag": "abc123",
             "product": "whitelabel"
           },
+          "camera-characteristics": {
+            "system-path": "/etc/arc/camera_characteristics.conf"
+          },
           "hardware-features": {
             "system-path": "/etc/some_hardware_features.xml"
           },
diff --git a/chromeos-config/test_data/test.yaml b/chromeos-config/test_data/test.yaml
index 1993e87..8b23494 100644
--- a/chromeos-config/test_data/test.yaml
+++ b/chromeos-config/test_data/test.yaml
@@ -45,6 +45,9 @@
     media-profiles:
       build-path: "some/media_profiles.xml"
       system-path: "/etc/some_media_profiles.xml"
+    camera-characteristics:
+      build-path: "some/camera_characteristics.conf"
+      system-path: "/etc/arc/camera_characteristics.conf"
     build-properties:
       first-api-level: "27"
       product: "{{$name}}"
diff --git a/chromeos-config/test_data/test_build.json b/chromeos-config/test_data/test_build.json
index 4de26c9..bf2c9fd 100644
--- a/chromeos-config/test_data/test_build.json
+++ b/chromeos-config/test_data/test_build.json
@@ -9,6 +9,10 @@
             "metrics-tag": "abc123",
             "product": "some"
           },
+          "camera-characteristics": {
+            "build-path": "some/camera_characteristics.conf",
+            "system-path": "/etc/arc/camera_characteristics.conf"
+          },
           "hardware-features": {
             "build-path": "some/hardware_features.xml",
             "system-path": "/etc/some_hardware_features.xml"
@@ -149,6 +153,10 @@
             "metrics-tag": "abc123",
             "product": "some"
           },
+          "camera-characteristics": {
+            "build-path": "some/camera_characteristics.conf",
+            "system-path": "/etc/arc/camera_characteristics.conf"
+          },
           "hardware-features": {
             "build-path": "some/hardware_features.xml",
             "system-path": "/etc/some_hardware_features.xml"
@@ -285,6 +293,10 @@
             "metrics-tag": "abc123",
             "product": "some2"
           },
+          "camera-characteristics": {
+            "build-path": "some/camera_characteristics.conf",
+            "system-path": "/etc/arc/camera_characteristics.conf"
+          },
           "hardware-features": {
             "build-path": "some/hardware_features.xml",
             "system-path": "/etc/some_hardware_features.xml"
@@ -505,6 +517,10 @@
             "metrics-tag": "abc123",
             "product": "whitelabel"
           },
+          "camera-characteristics": {
+            "build-path": "some/camera_characteristics.conf",
+            "system-path": "/etc/arc/camera_characteristics.conf"
+          },
           "hardware-features": {
             "build-path": "some/hardware_features.xml",
             "system-path": "/etc/some_hardware_features.xml"
@@ -605,6 +621,10 @@
             "metrics-tag": "abc123",
             "product": "whitelabel"
           },
+          "camera-characteristics": {
+            "build-path": "some/camera_characteristics.conf",
+            "system-path": "/etc/arc/camera_characteristics.conf"
+          },
           "hardware-features": {
             "build-path": "some/hardware_features.xml",
             "system-path": "/etc/some_hardware_features.xml"
@@ -705,6 +725,10 @@
             "metrics-tag": "abc123",
             "product": "whitelabel"
           },
+          "camera-characteristics": {
+            "build-path": "some/camera_characteristics.conf",
+            "system-path": "/etc/arc/camera_characteristics.conf"
+          },
           "hardware-features": {
             "build-path": "some/hardware_features.xml",
             "system-path": "/etc/some_hardware_features.xml"
@@ -805,6 +829,10 @@
             "metrics-tag": "abc123",
             "product": "whitelabel"
           },
+          "camera-characteristics": {
+            "build-path": "some/camera_characteristics.conf",
+            "system-path": "/etc/arc/camera_characteristics.conf"
+          },
           "hardware-features": {
             "build-path": "some/hardware_features.xml",
             "system-path": "/etc/some_hardware_features.xml"