Camera: Move common-helper target out of HIDL directory
This CL moves the common helper classes from inside the HIDL directory
and refactors the HIDL-esque namespaces to android style namespaces.
To preserve compatibility, the header files export the new symbols under
old namespace and the old build module exports symbols from the new
build module. This refactor is transparent to the codebase.
Also ran clangformat to appease the repohook gods.
Bug: 219974678
Test: Existing VTS tests pass on Cuttlefish
Change-Id: I8c3160497c1e2fe7a0a7155641f0e1f5e47ec32e
diff --git a/camera/common/default/Android.bp b/camera/common/default/Android.bp
new file mode 100644
index 0000000..e8c8f9d
--- /dev/null
+++ b/camera/common/default/Android.bp
@@ -0,0 +1,48 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "hardware_interfaces_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["hardware_interfaces_license"],
+}
+
+cc_library_static {
+ name: "android.hardware.camera.common-helper",
+ vendor_available: true,
+ defaults: ["hidl_defaults"],
+ srcs: [
+ "CameraModule.cpp",
+ "CameraMetadata.cpp",
+ "CameraParameters.cpp",
+ "VendorTagDescriptor.cpp",
+ "HandleImporter.cpp",
+ "Exif.cpp",
+ "SimpleThread.cpp",
+ ],
+ cflags: [
+ "-Werror",
+ "-Wextra",
+ "-Wall",
+ ],
+ shared_libs: [
+ "liblog",
+ "libgralloctypes",
+ "libhardware",
+ "libcamera_metadata",
+ "android.hardware.graphics.mapper@2.0",
+ "android.hardware.graphics.mapper@3.0",
+ "android.hardware.graphics.mapper@4.0",
+ "libexif",
+ ],
+ include_dirs: ["system/media/private/camera/include"],
+ export_include_dirs: ["include"],
+}
+
+// NOTE: Deprecated module kept for compatibility reasons.
+// Depend on "android.hardware.camera.common-helper" instead
+cc_library_static {
+ name: "android.hardware.camera.common@1.0-helper",
+ vendor_available: true,
+ whole_static_libs: ["android.hardware.camera.common-helper"],
+}