diff --git a/BoardConfig.mk b/BoardConfig.mk index 1228bcd..95e5f25 100755 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -214,7 +214,8 @@ BOARD_HAVE_SAMSUNG_WIFI := true # Shims TARGET_LD_SHIM_LIBS := \ /vendor/lib/libbauthserver.so|libbauthtzcommon_shim.so \ - /vendor/lib64/libbauthserver.so|libbauthtzcommon_shim.so + /vendor/lib64/libbauthserver.so|libbauthtzcommon_shim.so \ + /vendor/lib/hw/camera.msm8996.so|/vendor/lib/libshims_cameraclient.so # inherit from the proprietary version -include vendor/samsung/gts3llte/BoardConfigVendor.mk diff --git a/device.mk b/device.mk index 3b7a95e..a058efb 100755 --- a/device.mk +++ b/device.mk @@ -139,13 +139,14 @@ PRODUCT_COPY_FILES += \ # Camera PRODUCT_PACKAGES += \ - android.hardware.camera.provider@2.4-legacy \ - android.hardware.camera.provider@2.5-legacy \ + android.frameworks.displayservice@1.0_32 \ + android.hardware.camera.provider@2.4-impl \ + android.hardware.camera.provider@2.4-service \ camera.device@1.0-impl \ camera.device@3.2-impl \ camera.device@3.3-impl \ camera.device@3.4-impl \ - camera.msm8996 \ + libshims_cameraclient \ Snap # Connectivity Engine support (CNE) diff --git a/proprietary-files.txt b/proprietary-files.txt index b840c20..08cc53a 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -225,6 +225,7 @@ lib64/vendor.samsung.hardware.camera.device@3.4.so lib64/vendor.samsung.hardware.camera.provider@2.4.so lib64/vendor.qti.hardware.camera.device@1.0.so vendor/bin/mm-qcamera-daemon +vendor/lib/hw/camera.msm8996.so vendor/lib/hw/vendor.samsung.hardware.camera.provider@2.4-impl.so vendor/lib/libedge_smooth_hvx_stub.so vendor/lib/libflash_pmic.so @@ -267,6 +268,7 @@ vendor/lib/libmmcamera_hvx_grid_sum.so vendor/lib/libmmcamera_imglib.so vendor/lib/libmmcamera_imglib_faceproc_adspstub.so vendor/lib/libmmcamera_imx258.so +vendor/lib/libmmcamera_interface.so vendor/lib/libmmcamera_lsi_s5k5e3yx_eeprom.so vendor/lib/libmmcamera_pdaf.so vendor/lib/libmmcamera_pdafcamif.so @@ -280,8 +282,10 @@ vendor/lib/libmmcamera_tuning.so vendor/lib/libmmcamera_tuning_lookup.so vendor/lib/libmmcamera_vpu_module.so vendor/lib/libmmjpeg.so +vendor/lib/libmmjpeg_interface.so vendor/lib/libmmqjpeg_codec.so vendor/lib/libmmqjpegdma.so +vendor/lib/libqomx_core.so vendor/lib/libqomx_jpegdec.so vendor/lib/libqomx_jpegenc_pipe.so vendor/lib/libqomx_jpegenc.so diff --git a/rootdir/etc/init.target.rc b/rootdir/etc/init.target.rc index 1ed4b85..1e5ae4b 100644 --- a/rootdir/etc/init.target.rc +++ b/rootdir/etc/init.target.rc @@ -194,11 +194,11 @@ on boot write /sys/class/android_usb/android0/f_rndis_qc/rndis_transports BAM2BAM_IPA #start camera server as daemon -# service qcamerasvr /system/vendor/bin/mm-qcamera-daemon -# class late_start -# user camera -# group camera system inet input graphics -# + service qcamerasvr /vendor/bin/mm-qcamera-daemon + class late_start + user camera + group camera system inet input graphics + #fingerprint service #service fingerprintd /system/vendor/bin/fingerprintd # class late_start diff --git a/shims/libshims_cameraclient/Android.mk b/shims/libshims_cameraclient/Android.mk new file mode 100644 index 0000000..568ebbd --- /dev/null +++ b/shims/libshims_cameraclient/Android.mk @@ -0,0 +1,26 @@ +# Copyright (C) 2016 The CyanogenMod 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 := camera_cameraclient.cpp + +LOCAL_MODULE := libshims_cameraclient +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_CLASS := SHARED_LIBRARIES +LOCAL_VENDOR_MODULE := true + +include $(BUILD_SHARED_LIBRARY) diff --git a/shims/libshims_cameraclient/camera_cameraclient.cpp b/shims/libshims_cameraclient/camera_cameraclient.cpp new file mode 100644 index 0000000..4623ed6 --- /dev/null +++ b/shims/libshims_cameraclient/camera_cameraclient.cpp @@ -0,0 +1,138 @@ +/* + * Copyright (C) 2017 TeamNexus + * + * 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 "camera_cameraclient.h" + +namespace android +{ + const char CameraParameters::ISO_SPORTS[] = "sports"; + const char CameraParameters::KEY_CITYID[] = "contextualtag-cityid"; + const char CameraParameters::KEY_RT_HDR[] = "rt-hdr"; + const char CameraParameters::RTHDR_AUTO[] = "auto"; // ??? + const char CameraParameters::EFFECT_COLD[] = "cold"; + const char CameraParameters::EFFECT_WARM[] = "warm"; + const char CameraParameters::KEY_WEATHER[] = "weather"; + const char CameraParameters::OIS_ON_VDIS[] = "on"; // ??? + const char CameraParameters::OIS_ON_ZOOM[] = "on"; // ??? + const char CameraParameters::KEY_APERTURE[] = "aperture"; + const char CameraParameters::KEY_CONTRAST[] = "contrast"; + const char CameraParameters::KEY_METERING[] = "metering"; + const char CameraParameters::KEY_PHASE_AF[] = "phase-af"; + const char CameraParameters::KEY_RAW_SAVE[] = "raw-save"; + const char CameraParameters::METERING_OFF[] = "off"; + const char CameraParameters::OIS_ON_STILL[] = "on"; // ??? + const char CameraParameters::OIS_ON_VIDEO[] = "on"; // ??? + const char CameraParameters::CONTINUOUS_ON[] = "on"; // ??? + const char CameraParameters::EFFECT_WASHED[] = "washed"; + const char CameraParameters::KEY_SHARPNESS[] = "sharpness"; + const char CameraParameters::METERING_SPOT[] = "spot"; + const char CameraParameters::OIS_CENTERING[] = "center"; // ??? + const char CameraParameters::OIS_ON_SINE_X[] = "sine_x"; + const char CameraParameters::OIS_ON_SINE_Y[] = "sine_y"; + const char CameraParameters::CONTINUOUS_OFF[] = "off"; // ??? + const char CameraParameters::EFFECT_ANTIQUE[] = "antique"; + const char CameraParameters::KEY_AUTO_VALUE[] = "auto"; + const char CameraParameters::KEY_FACEDETECT[] = "face-detection"; + const char CameraParameters::KEY_SATURATION[] = "saturation"; + const char CameraParameters::KEY_BRACKET_AEB[] = "aeb-value"; + const char CameraParameters::KEY_BRACKET_WBB[] = "wbb-value"; + const char CameraParameters::KEY_FOCUS_RANGE[] = "focus-range"; + const char CameraParameters::METERING_CENTER[] = "center"; + const char CameraParameters::METERING_MATRIX[] = "matrix"; + const char CameraParameters::WHITE_BALANCE_K[] = "wb-k"; + const char CameraParameters::BRACKET_MODE_AEB[] = "aeb"; + const char CameraParameters::BRACKET_MODE_OFF[] = "off"; + const char CameraParameters::BRACKET_MODE_WBB[] = "wbb"; + const char CameraParameters::EFFECT_POINT_RED[] = "point-red"; + const char CameraParameters::FLASH_STANDBY_ON[] = "on"; // ??? + const char CameraParameters::FOCUS_AREA_MULTI[] = "multi"; // ??? + const char CameraParameters::FOCUS_MODE_MULTI[] = "multi"; // ??? + const char CameraParameters::FOCUS_MODE_TOUCH[] = "touch"; + const char CameraParameters::FOCUS_RANGE_AUTO[] = "auto"; // ??? + const char CameraParameters::EFFECT_POINT_BLUE[] = "point-blue"; + const char CameraParameters::FLASH_MODE_FILLIN[] = "fillin"; + const char CameraParameters::FLASH_STANDBY_OFF[] = "off"; // ??? + const char CameraParameters::FOCUS_AREA_CENTER[] = "center"; + const char CameraParameters::FOCUS_MODE_MANUAL[] = "manual"; + const char CameraParameters::FOCUS_RANGE_MACRO[] = "macro"; + const char CameraParameters::KEY_EXPOSURE_TIME[] = "exposure-time"; + const char CameraParameters::KEY_OIS_SUPPORTED[] = "ois_supported"; + const char CameraParameters::KEY_SHUTTER_SPEED[] = "pref_shutter_speed_key"; + const char CameraParameters::FLASH_VALUE_OF_ISP[] = "flash-value-of-isp"; + const char CameraParameters::EFFECT_POINT_YELLOW[] = "point-yellow"; + const char CameraParameters::FACEDETECT_MODE_OFF[] = "off"; // ??? + const char CameraParameters::KEY_CONTINUOUS_MODE[] = "continuous-mode"; + const char CameraParameters::KEY_CURRENT_ADDRESS[] = "current-address"; + const char CameraParameters::KEY_FOCUS_AREA_MODE[] = "focus-area-mode"; + const char CameraParameters::KEY_WHITE_BALANCE_K[] = "wb-k"; + const char CameraParameters::FLASH_MODE_SLOW_SYNC[] = "slow"; // ??? + const char CameraParameters::IMAGE_STABILIZER_OFF[] = "off"; + const char CameraParameters::IMAGE_STABILIZER_OIS[] = "ois"; + const char CameraParameters::KEY_IMAGE_STABILIZER[] = "image-stabilizer"; + const char CameraParameters::KEY_SUPPORTED_RT_HDR[] = "rt-hdr-values"; + const char CameraParameters::SCENE_MODE_DUSK_DAWN[] = "dusk-dawn"; + const char CameraParameters::FACEDETECT_MODE_BLINK[] = "blink"; + const char CameraParameters::FOCUS_MODE_FIXED_FACE[] = "fixed-face"; + const char CameraParameters::FOCUS_MODE_SMART_SELF[] = "self"; + const char CameraParameters::KEY_MAX_EXPOSURE_TIME[] = "max-exposure-time"; + const char CameraParameters::KEY_MIN_EXPOSURE_TIME[] = "min-exposure-time"; + const char CameraParameters::SCENE_MODE_BACK_LIGHT[] = "back-light"; + const char CameraParameters::SCENE_MODE_BEACH_SNOW[] = "beach-snow"; + const char CameraParameters::SCENE_MODE_FALL_COLOR[] = "fall-color"; + const char CameraParameters::SMART_SCENE_DETECT_ON[] = "on"; // ??? + const char CameraParameters::FACEDETECT_MODE_NORMAL[] = "normal"; + const char CameraParameters::FLASH_MODE_RED_EYE_FIX[] = "red-eye-fix"; + const char CameraParameters::FOCUS_AREA_SMART_TOUCH[] = "smart-touch"; + const char CameraParameters::FOCUS_RANGE_AUTO_MACRO[] = "auto-macro"; + const char CameraParameters::KEY_SUPPORTED_PHASE_AF[] = "phase-af"; + const char CameraParameters::SMART_SCENE_DETECT_OFF[] = "off"; // ??? + const char CameraParameters::IMAGE_STABILIZER_DUALIS[] = "dual-is"; + const char CameraParameters::KEY_SUPPORTED_OIS_MODES[] = "ois-mode-values"; + const char CameraParameters::FACEDETECT_MODE_SMILESHOT[] = "smilshot"; + const char CameraParameters::FOCUS_MODE_FACE_DETECTION[] = "face-detection"; + const char CameraParameters::KEY_DYNAMIC_RANGE_CONTROL[] = "dynamic-range-control"; + const char CameraParameters::FOCUS_MODE_OBJECT_TRACKING[] = "object-tracking"; + const char CameraParameters::KEY_CAPTURE_BURST_FILEPATH[] = "capture-burst-filepath"; + const char CameraParameters::PIXEL_FORMAT_YUV420SP_NV21[] = "nv21"; + const char CameraParameters::KEY_SUPPORTED_DYNAMIC_RANGE_CONTROL[] = "dynamic-range-control-values"; + const char CameraParameters::KEY_SUPPORTED_EFFECT_PREVIEW_FPS_RANGE[] = "preview-fps-range"; + const char CameraParameters::DRC_ON[] = "on"; + const char CameraParameters::ISO_50[] = "50"; + const char CameraParameters::ISO_80[] = "80"; + const char CameraParameters::PAF_ON[] = "on"; // ??? + const char CameraParameters::DRC_OFF[] = "off"; + const char CameraParameters::ISO_100[] = "100"; + const char CameraParameters::ISO_200[] = "200"; + const char CameraParameters::ISO_400[] = "400"; + const char CameraParameters::ISO_800[] = "800"; + const char CameraParameters::KEY_ISO[] = "iso"; + const char CameraParameters::KEY_OIS[] = "ois"; + const char CameraParameters::OIS_OFF[] = "off"; // ??? + const char CameraParameters::PAF_OFF[] = "off"; // ??? + const char CameraParameters::ISO_1600[] = "1600"; + const char CameraParameters::ISO_3200[] = "3200"; + const char CameraParameters::ISO_6400[] = "6400"; + const char CameraParameters::ISO_AUTO[] = "auto"; + const char CameraParameters::RTHDR_ON[] = "on"; + const char CameraParameters::ISO_NIGHT[] = "night"; + const char CameraParameters::RTHDR_OFF[] = "off"; + + int CameraParameters::getInt64(const char *key) const { return -1; } +}; + +extern "C" void _ZN7android20DisplayEventReceiverC1Ev() +{ +} diff --git a/shims/libshims_cameraclient/camera_cameraclient.h b/shims/libshims_cameraclient/camera_cameraclient.h new file mode 100644 index 0000000..e27aff1 --- /dev/null +++ b/shims/libshims_cameraclient/camera_cameraclient.h @@ -0,0 +1,138 @@ +/* + * Copyright (C) 2017 TeamNexus + * + * 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 ISO_SPORTS[]; + static const char KEY_CITYID[]; + static const char KEY_RT_HDR[]; + static const char RTHDR_AUTO[]; + static const char EFFECT_COLD[]; + static const char EFFECT_WARM[]; + static const char KEY_WEATHER[]; + static const char OIS_ON_VDIS[]; + static const char OIS_ON_ZOOM[]; + static const char KEY_APERTURE[]; + static const char KEY_CONTRAST[]; + static const char KEY_METERING[]; + static const char KEY_PHASE_AF[]; + static const char KEY_RAW_SAVE[]; + static const char METERING_OFF[]; + static const char OIS_ON_STILL[]; + static const char OIS_ON_VIDEO[]; + static const char CONTINUOUS_ON[]; + static const char EFFECT_WASHED[]; + static const char KEY_SHARPNESS[]; + static const char METERING_SPOT[]; + static const char OIS_CENTERING[]; + static const char OIS_ON_SINE_X[]; + static const char OIS_ON_SINE_Y[]; + static const char CONTINUOUS_OFF[]; + static const char EFFECT_ANTIQUE[]; + static const char KEY_AUTO_VALUE[]; + static const char KEY_FACEDETECT[]; + static const char KEY_SATURATION[]; + static const char KEY_BRACKET_AEB[]; + static const char KEY_BRACKET_WBB[]; + static const char KEY_FOCUS_RANGE[]; + static const char METERING_CENTER[]; + static const char METERING_MATRIX[]; + static const char WHITE_BALANCE_K[]; + static const char BRACKET_MODE_AEB[]; + static const char BRACKET_MODE_OFF[]; + static const char BRACKET_MODE_WBB[]; + static const char EFFECT_POINT_RED[]; + static const char FLASH_STANDBY_ON[]; + static const char FOCUS_AREA_MULTI[]; + static const char FOCUS_MODE_MULTI[]; + static const char FOCUS_MODE_TOUCH[]; + static const char FOCUS_RANGE_AUTO[]; + static const char EFFECT_POINT_BLUE[]; + static const char FLASH_MODE_FILLIN[]; + static const char FLASH_STANDBY_OFF[]; + static const char FOCUS_AREA_CENTER[]; + static const char FOCUS_MODE_MANUAL[]; + static const char FOCUS_RANGE_MACRO[]; + static const char KEY_EXPOSURE_TIME[]; + static const char KEY_OIS_SUPPORTED[]; + static const char KEY_SHUTTER_SPEED[]; + static const char FLASH_VALUE_OF_ISP[]; + static const char EFFECT_POINT_YELLOW[]; + static const char FACEDETECT_MODE_OFF[]; + static const char KEY_CONTINUOUS_MODE[]; + static const char KEY_CURRENT_ADDRESS[]; + static const char KEY_FOCUS_AREA_MODE[]; + static const char KEY_WHITE_BALANCE_K[]; + static const char FLASH_MODE_SLOW_SYNC[]; + static const char IMAGE_STABILIZER_OFF[]; + static const char IMAGE_STABILIZER_OIS[]; + static const char KEY_IMAGE_STABILIZER[]; + static const char KEY_SUPPORTED_RT_HDR[]; + static const char SCENE_MODE_DUSK_DAWN[]; + static const char FACEDETECT_MODE_BLINK[]; + static const char FOCUS_MODE_FIXED_FACE[]; + static const char FOCUS_MODE_SMART_SELF[]; + static const char KEY_MAX_EXPOSURE_TIME[]; + static const char KEY_MIN_EXPOSURE_TIME[]; + static const char SCENE_MODE_BACK_LIGHT[]; + static const char SCENE_MODE_BEACH_SNOW[]; + static const char SCENE_MODE_FALL_COLOR[]; + static const char SMART_SCENE_DETECT_ON[]; + static const char FACEDETECT_MODE_NORMAL[]; + static const char FLASH_MODE_RED_EYE_FIX[]; + static const char FOCUS_AREA_SMART_TOUCH[]; + static const char FOCUS_RANGE_AUTO_MACRO[]; + static const char KEY_SUPPORTED_PHASE_AF[]; + static const char SMART_SCENE_DETECT_OFF[]; + static const char IMAGE_STABILIZER_DUALIS[]; + static const char KEY_SUPPORTED_OIS_MODES[]; + static const char FACEDETECT_MODE_SMILESHOT[]; + static const char FOCUS_MODE_FACE_DETECTION[]; + static const char KEY_DYNAMIC_RANGE_CONTROL[]; + static const char FOCUS_MODE_OBJECT_TRACKING[]; + static const char KEY_CAPTURE_BURST_FILEPATH[]; + static const char PIXEL_FORMAT_YUV420SP_NV21[]; + static const char KEY_SUPPORTED_DYNAMIC_RANGE_CONTROL[]; + static const char KEY_SUPPORTED_EFFECT_PREVIEW_FPS_RANGE[]; + static const char DRC_ON[]; + static const char ISO_50[]; + static const char ISO_80[]; + static const char PAF_ON[]; + static const char DRC_OFF[]; + static const char ISO_100[]; + static const char ISO_200[]; + static const char ISO_400[]; + static const char ISO_800[]; + static const char KEY_ISO[]; + static const char KEY_OIS[]; + static const char OIS_OFF[]; + static const char PAF_OFF[]; + static const char ISO_1600[]; + static const char ISO_3200[]; + static const char ISO_6400[]; + static const char ISO_AUTO[]; + static const char RTHDR_ON[]; + static const char ISO_NIGHT[]; + static const char RTHDR_OFF[]; + + int getInt64(const char *key) const; +}; + +};