diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/hal/google_camera_hal/camera_provider.cc | 14 | ||||
-rw-r--r-- | common/hal/hidl_service/Android.bp | 7 |
2 files changed, 12 insertions, 9 deletions
diff --git a/common/hal/google_camera_hal/camera_provider.cc b/common/hal/google_camera_hal/camera_provider.cc index 6e9807b..e3f5e85 100644 --- a/common/hal/google_camera_hal/camera_provider.cc +++ b/common/hal/google_camera_hal/camera_provider.cc @@ -26,11 +26,9 @@ #include "vendor_tag_defs.h" #include "vendor_tag_utils.h" +#if GCH_HWL_USE_DLOPEN // HWL layer implementation path -#if defined(_LP64) -std::string kCameraHwlLib = "/vendor/lib64/libgooglecamerahwl_impl.so"; -#else // defined(_LP64) -std::string kCameraHwlLib = "/vendor/lib/libgooglecamerahwl_impl.so"; +constexpr std::string_view kCameraHwlLib = "libgooglecamerahwl_impl.so"; #endif namespace android { @@ -301,11 +299,11 @@ status_t CameraProvider::CreateHwl( #if GCH_HWL_USE_DLOPEN CreateCameraProviderHwl_t create_hwl; - ALOGI("%s:Loading %s library", __FUNCTION__, kCameraHwlLib.c_str()); - hwl_lib_handle_ = dlopen(kCameraHwlLib.c_str(), RTLD_NOW); + ALOGI("%s:Loading %s library", __FUNCTION__, kCameraHwlLib.data()); + hwl_lib_handle_ = dlopen(kCameraHwlLib.data(), RTLD_NOW); if (hwl_lib_handle_ == nullptr) { - ALOGE("HWL loading %s failed due to error: %s", kCameraHwlLib.c_str(), + ALOGE("HWL loading %s failed due to error: %s", kCameraHwlLib.data(), dlerror()); return NO_INIT; } @@ -313,7 +311,7 @@ status_t CameraProvider::CreateHwl( create_hwl = (CreateCameraProviderHwl_t)dlsym(hwl_lib_handle_, "CreateCameraProviderHwl"); if (create_hwl == nullptr) { - ALOGE("%s: dlsym failed (%s).", __FUNCTION__, kCameraHwlLib.c_str()); + ALOGE("%s: dlsym failed (%s).", __FUNCTION__, kCameraHwlLib.data()); dlclose(hwl_lib_handle_); hwl_lib_handle_ = nullptr; return NO_INIT; diff --git a/common/hal/hidl_service/Android.bp b/common/hal/hidl_service/Android.bp index f10d6ef..786e7a6 100644 --- a/common/hal/hidl_service/Android.bp +++ b/common/hal/hidl_service/Android.bp @@ -119,7 +119,7 @@ cc_defaults { static_libs: [ "android.hardware.camera.common@1.0-helper", ], - vintf_fragments: ["android.hardware.camera.provider@2.7-service-google.xml"], + vintf_fragments: [":android.hardware.camera.provider@2.7-service-google.xml"], } cc_binary { @@ -140,3 +140,8 @@ cc_binary { init_rc: ["android.hardware.camera.provider@2.7-service-google-lazy.rc"], cflags: ["-DLAZY_SERVICE"], } + +filegroup { + name: "android.hardware.camera.provider@2.7-service-google.xml", + srcs: ["android.hardware.camera.provider@2.7-service-google.xml"], +} |