diff options
author | Yin-Chia Yeh <yinchiayeh@google.com> | 2017-02-06 22:21:53 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-02-06 22:21:54 +0000 |
commit | db4d6813abc43de44992bd48dd54c25ad6455b8e (patch) | |
tree | 982e7c9cc35306670669d4c4ff304e8d34167a41 | |
parent | 3b4efe1687e7e913c422fbef9546530899de8ea2 (diff) | |
parent | 469c67b027d91096ac1643569bb3161d6fb5047c (diff) |
Merge "Camera: remove BINDERIZED flag"
-rw-r--r-- | camera/device/3.2/default/Android.bp | 26 | ||||
-rw-r--r-- | camera/device/3.2/default/CameraDeviceSession.cpp | 9 | ||||
-rw-r--r-- | camera/provider/2.4/default/Android.bp | 5 | ||||
-rw-r--r-- | camera/provider/2.4/default/service.cpp | 32 |
4 files changed, 5 insertions, 67 deletions
diff --git a/camera/device/3.2/default/Android.bp b/camera/device/3.2/default/Android.bp index 40d42535fc..62e3c3e5d7 100644 --- a/camera/device/3.2/default/Android.bp +++ b/camera/device/3.2/default/Android.bp @@ -1,5 +1,5 @@ cc_library_shared { - name: "android.hardware.camera.device@3.2-impl", + name: "camera.device@3.2-impl", srcs: ["CameraDevice.cpp", "CameraDeviceSession.cpp", "convert.cpp"], @@ -20,27 +20,3 @@ cc_library_shared { ], export_include_dirs: ["."] } - -cc_library_shared { - name: "android.hardware.camera.device@3.2-impl-binderized", - srcs: ["CameraDevice.cpp", - "CameraDeviceSession.cpp", - "convert.cpp"], - cppflags: ["-DBINDERIZED"], - shared_libs: [ - "libhidlbase", - "libhidltransport", - "libhwbinder", - "libutils", - "libcutils", - "android.hardware.camera.device@3.2", - "android.hardware.camera.provider@2.4", - "liblog", - "libhardware", - "libcamera_metadata" - ], - static_libs: [ - "android.hardware.camera.common@1.0-helper" - ], - export_include_dirs: ["."] -} diff --git a/camera/device/3.2/default/CameraDeviceSession.cpp b/camera/device/3.2/default/CameraDeviceSession.cpp index 26b7b738ef..b47a220db0 100644 --- a/camera/device/3.2/default/CameraDeviceSession.cpp +++ b/camera/device/3.2/default/CameraDeviceSession.cpp @@ -118,9 +118,6 @@ public: private: bool mInitialized; - // Some existing gralloc drivers do not support retaining more than once, - // when we are in passthrough mode. -#ifdef BINDERIZED bool openGralloc() { const hw_module_t* module; @@ -209,12 +206,6 @@ private: // gralloc0 const gralloc_module_t* mModule; -#else - bool openGralloc() { return true; } - void closeGralloc() {} - buffer_handle_t cloneBuffer(buffer_handle_t handle) { return handle; } - void releaseBuffer(buffer_handle_t) {} -#endif }; HandleImporter sHandleImporter; diff --git a/camera/provider/2.4/default/Android.bp b/camera/provider/2.4/default/Android.bp index ee40ce506d..e29f62c3c4 100644 --- a/camera/provider/2.4/default/Android.bp +++ b/camera/provider/2.4/default/Android.bp @@ -10,7 +10,7 @@ cc_library_shared { "libcutils", "android.hardware.camera.device@1.0", "android.hardware.camera.device@3.2", - "android.hardware.camera.device@3.2-impl", + "camera.device@3.2-impl", "android.hardware.camera.provider@2.4", "android.hardware.camera.common@1.0", "liblog", @@ -25,7 +25,7 @@ cc_library_shared { cc_binary { name: "android.hardware.camera.provider@2.4-service", relative_install_path: "hw", - srcs: ["service.cpp", "CameraProvider.cpp"], + srcs: ["service.cpp"], compile_multilib: "32", init_rc: ["android.hardware.camera.provider@2.4-service.rc"], shared_libs: [ @@ -40,7 +40,6 @@ cc_binary { "android.hardware.camera.provider@2.4", "android.hardware.camera.common@1.0", "libcutils", - "android.hardware.camera.device@3.2-impl-binderized", "libcamera_metadata" ], static_libs: [ diff --git a/camera/provider/2.4/default/service.cpp b/camera/provider/2.4/default/service.cpp index 96005596f6..cf66e04cca 100644 --- a/camera/provider/2.4/default/service.cpp +++ b/camera/provider/2.4/default/service.cpp @@ -17,41 +17,13 @@ #define LOG_TAG "android.hardware.camera.provider@2.4-service" #include <android/hardware/camera/provider/2.4/ICameraProvider.h> -#include <CameraProvider.h> - -#include <hidl/HidlTransportSupport.h> #include <hidl/LegacySupport.h> -#include <utils/StrongPointer.h> -using android::hardware::configureRpcThreadpool; -using android::hardware::joinRpcThreadpool; -using android::sp; using android::hardware::camera::provider::V2_4::ICameraProvider; -using android::hardware::camera::provider::V2_4::implementation::HIDL_FETCH_ICameraProvider; +using android::hardware::defaultPassthroughServiceImplementation; int main() { - const char instance[] = "legacy/0"; - - // TODO(b/34817742): use defaultServicePassthroughImplementation - // so that the toggle is implemented correctly - using ::android::hardware::details::blockIfBinderizationDisabled; - blockIfBinderizationDisabled(ICameraProvider::descriptor, instance); - ALOGI("Camera provider Service is starting."); - - configureRpcThreadpool(1, true /* callerWillJoin */); - // TODO (b/34510650): check the passthrough/binderized dev key - sp<ICameraProvider> service = HIDL_FETCH_ICameraProvider(instance); - if (service == nullptr) { - ALOGI("Camera provider getService returned NULL"); - return -1; - } - - LOG_FATAL_IF(service->isRemote(), "Camera provider service is REMOTE!"); - - service->registerAsService(instance); - joinRpcThreadpool(); - - return 0; + return defaultPassthroughServiceImplementation<ICameraProvider>("legacy/0"); }
\ No newline at end of file |