From 2d66f6183a721277fc5fe31e24cc06ba1523971d Mon Sep 17 00:00:00 2001 From: Jaesoo Lee Date: Mon, 20 Mar 2017 13:57:10 +0900 Subject: [PATCH] disabled passthrough mode for Configstore This change removes target "android.hardware.configstore@1.0-impl" to disable passthrough mode. Bug: 35325577 Test: android.hardware.configstore@1.0-impl.so not exist in outputs and configstore works in binderized mode Change-Id: Ieedb6fea179d50ac35fc32b0e21752b2334558ae --- configstore/1.0/default/Android.mk | 30 ++++++----------------------- configstore/1.0/default/service.cpp | 15 ++++++++------- 2 files changed, 14 insertions(+), 31 deletions(-) diff --git a/configstore/1.0/default/Android.mk b/configstore/1.0/default/Android.mk index b168029f23..e017cfd284 100644 --- a/configstore/1.0/default/Android.mk +++ b/configstore/1.0/default/Android.mk @@ -1,24 +1,5 @@ LOCAL_PATH := $(call my-dir) -################################################################################ -include $(CLEAR_VARS) -LOCAL_MODULE := android.hardware.configstore@1.0-impl -LOCAL_PROPRIETARY_MODULE := true -LOCAL_MODULE_CLASS := SHARED_LIBRARIES -LOCAL_MODULE_RELATIVE_PATH := hw - -include $(LOCAL_PATH)/surfaceflinger.mk - -LOCAL_SHARED_LIBRARIES := \ - libbase \ - libhidlbase \ - libhidltransport \ - libutils \ - android.hardware.configstore@1.0 \ - android.hidl.base@1.0 - -include $(BUILD_SHARED_LIBRARY) - ################################################################################ include $(CLEAR_VARS) LOCAL_MODULE := android.hardware.configstore@1.0-service @@ -28,13 +9,14 @@ LOCAL_MODULE_RELATIVE_PATH := hw LOCAL_INIT_RC := android.hardware.configstore@1.0-service.rc LOCAL_SRC_FILES:= service.cpp +include $(LOCAL_PATH)/surfaceflinger.mk + LOCAL_SHARED_LIBRARIES := \ - liblog \ - libdl \ - libutils \ + android.hardware.configstore@1.0 \ libhidlbase \ libhidltransport \ - android.hardware.configstore@1.0 \ + libbase \ + liblog \ + libutils \ include $(BUILD_EXECUTABLE) - diff --git a/configstore/1.0/default/service.cpp b/configstore/1.0/default/service.cpp index cb04215e84..60b69abe06 100644 --- a/configstore/1.0/default/service.cpp +++ b/configstore/1.0/default/service.cpp @@ -17,13 +17,15 @@ #define LOG_TAG "android.hardware.configstore@1.0-service" #include -#include +#include + +#include "SurfaceFlingerConfigs.h" -using android::hardware::configstore::V1_0::ISurfaceFlingerConfigs; using android::hardware::configureRpcThreadpool; -using android::hardware::registerPassthroughServiceImplementation; using android::hardware::joinRpcThreadpool; - +using android::hardware::configstore::V1_0::ISurfaceFlingerConfigs; +using android::hardware::configstore::V1_0::implementation::SurfaceFlingerConfigs; +using android::sp; using android::status_t; using android::OK; @@ -31,9 +33,8 @@ int main() { // TODO(b/34857894): tune the max thread count. configureRpcThreadpool(10, true); - status_t status; - - status = registerPassthroughServiceImplementation(); + sp surfaceFlingerConfigs = new SurfaceFlingerConfigs; + status_t status = surfaceFlingerConfigs->registerAsService(); LOG_ALWAYS_FATAL_IF(status != OK, "Could not register ISurfaceFlingerConfigs"); // other interface registration comes here