universal8895: add libexynoscamera shim
authorJan Altensen <info@stricted.net>
Thu, 22 Aug 2019 23:49:26 +0000 (01:49 +0200)
committerJan Altensen <info@stricted.net>
Tue, 3 Sep 2019 17:04:40 +0000 (19:04 +0200)
Change-Id: If9033f58e230aae7082b03be305f76389afe1622

BoardConfigCommon.mk
device-common.mk
shims/Android.mk [new file with mode: 0644]
shims/libexynoscamera/Android.mk [new file with mode: 0644]
shims/libexynoscamera/CameraParameters.cpp [new file with mode: 0644]
shims/libexynoscamera/CameraParameters.h [new file with mode: 0644]

index 15908e1c92b1f8f4f8fc41cc33ccbbf64b920a22..4d9cd07c7c36451ea33da28843caa3d5bb589cf2 100644 (file)
@@ -128,3 +128,8 @@ WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
 
 # MACLOADER
 BOARD_HAVE_SAMSUNG_WIFI          := true
+
+# Shims
+TARGET_LD_SHIM_LIBS += \
+    /system/lib/libexynoscamera.so|/vendor/lib/libexynoscamera_shim.so \
+    /system/lib64/libexynoscamera.so|/vendor/lib64/libexynoscamera_shim.so
index ee45829d88e0f8251b8ee70f64947c759def90d6..b2cff682f7fad7e889baa0dea0848665d6ffc404 100644 (file)
@@ -152,6 +152,10 @@ PRODUCT_PACKAGES += \
     android.hardware.sensors@1.0-impl \
     android.hardware.sensors@1.0-service
 
+# Shims
+PRODUCT_PACKAGES += \
+    libexynoscamera_shim
+
 # TextClassifier
 PRODUCT_PACKAGES += \
     textclassifier.bundle1
diff --git a/shims/Android.mk b/shims/Android.mk
new file mode 100644 (file)
index 0000000..4f5a74d
--- /dev/null
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2018 The LineageOS Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(call all-subdir-makefiles,$(LOCAL_PATH))
diff --git a/shims/libexynoscamera/Android.mk b/shims/libexynoscamera/Android.mk
new file mode 100644 (file)
index 0000000..1cc3000
--- /dev/null
@@ -0,0 +1,26 @@
+#
+# Copyright (C) 2018 The LineageOS Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES := CameraParameters.cpp
+
+LOCAL_MODULE := libexynoscamera_shim
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_PROPRIETARY_MODULE := true
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/shims/libexynoscamera/CameraParameters.cpp b/shims/libexynoscamera/CameraParameters.cpp
new file mode 100644 (file)
index 0000000..adca08b
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2018 The LineageOS Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "CameraParameters.h"
+
+namespace android {
+
+const char CameraParameters::PIXEL_FORMAT_YUV420SP_NV21[] = "nv21";
+const char CameraParameters::EFFECT_CARTOONIZE[] = "cartoonize";
+const char CameraParameters::EFFECT_POINT_RED_YELLOW[] = "point-red-yellow";
+const char CameraParameters::EFFECT_POINT_GREEN[] = "point-green";
+const char CameraParameters::EFFECT_POINT_BLUE[] = "point-blue";
+const char CameraParameters::EFFECT_VINTAGE_COLD[] = "vintage-cold";
+const char CameraParameters::EFFECT_VINTAGE_WARM[] = "vintage-warm";
+const char CameraParameters::EFFECT_WASHED[] = "washed";
+const char CameraParameters::ISO_AUTO[] = "auto";
+const char CameraParameters::ISO_NIGHT[] = "night";
+const char CameraParameters::ISO_SPORTS[] = "sports";
+const char CameraParameters::ISO_6400[] = "6400";
+const char CameraParameters::ISO_3200[] = "3200";
+const char CameraParameters::ISO_1600[] = "1600";
+const char CameraParameters::ISO_800[] = "800";
+const char CameraParameters::ISO_400[] = "400";
+const char CameraParameters::ISO_200[] = "200";
+const char CameraParameters::ISO_100[] = "100";
+const char CameraParameters::ISO_80[] = "80";
+const char CameraParameters::ISO_50[] = "50";
+const char CameraParameters::KEY_SUPPORTED_METERING_MODE[] = "metering-values";
+const char CameraParameters::METERING_CENTER[] = "center";
+const char CameraParameters::METERING_MATRIX[] = "matrix";
+const char CameraParameters::METERING_SPOT[] = "spot";
+const char CameraParameters::METERING_OFF[] = "off";
+const char CameraParameters::KEY_DYNAMIC_RANGE_CONTROL[] = "dynamic-range-control";
+const char CameraParameters::KEY_SUPPORTED_PHASE_AF[] = "phase-af-values";
+const char CameraParameters::KEY_PHASE_AF[] = "phase-af";
+const char CameraParameters::KEY_SUPPORTED_RT_HDR[] = "rt-hdr-values";
+const char CameraParameters::KEY_RT_HDR[] = "rt-hdr";
+
+}; // namespace android
\ No newline at end of file
diff --git a/shims/libexynoscamera/CameraParameters.h b/shims/libexynoscamera/CameraParameters.h
new file mode 100644 (file)
index 0000000..970af51
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2018 The LineageOS Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace android {
+
+class CameraParameters
+{
+public:
+       static const char PIXEL_FORMAT_YUV420SP_NV21[];
+       static const char EFFECT_CARTOONIZE[];
+       static const char EFFECT_POINT_RED_YELLOW[];
+       static const char EFFECT_POINT_GREEN[];
+       static const char EFFECT_POINT_BLUE[];
+       static const char EFFECT_VINTAGE_COLD[];
+       static const char EFFECT_VINTAGE_WARM[];
+       static const char EFFECT_WASHED[];
+       static const char ISO_AUTO[];
+       static const char ISO_NIGHT[];
+       static const char ISO_SPORTS[];
+       static const char ISO_6400[];
+       static const char ISO_3200[];
+       static const char ISO_1600[];
+       static const char ISO_800[];
+       static const char ISO_400[];
+       static const char ISO_200[];
+       static const char ISO_100[];
+       static const char ISO_80[];
+       static const char ISO_50[];
+       static const char KEY_SUPPORTED_METERING_MODE[];
+       static const char METERING_CENTER[];
+       static const char METERING_MATRIX[];
+       static const char METERING_SPOT[];
+       static const char METERING_OFF[];
+       static const char KEY_DYNAMIC_RANGE_CONTROL[];
+       static const char KEY_SUPPORTED_PHASE_AF[];
+       static const char KEY_PHASE_AF[];
+       static const char KEY_SUPPORTED_RT_HDR[];
+       static const char KEY_RT_HDR[];
+};
+
+}; // namespace android