diff --git a/livedisplay/Android.bp b/livedisplay/Android.bp index 36b547a..88c2cbd 100644 --- a/livedisplay/Android.bp +++ b/livedisplay/Android.bp @@ -20,6 +20,8 @@ cc_binary { init_rc: ["vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150.rc"], relative_install_path: "hw", srcs: [ + ":vendor.lineage.livedisplay@2.0-sdm-pa", + ":vendor.lineage.livedisplay@2.0-sdm-utils", "AntiFlicker.cpp", "SunlightEnhancement.cpp", "service.cpp", @@ -33,4 +35,7 @@ cc_binary { "vendor.lineage.livedisplay@2.0", "vendor.lineage.livedisplay@2.1", ], + header_libs: [ + "vendor.lineage.livedisplay@2.0-sdm-headers", + ], } diff --git a/livedisplay/service.cpp b/livedisplay/service.cpp index d6f6357..324a5dc 100644 --- a/livedisplay/service.cpp +++ b/livedisplay/service.cpp @@ -19,10 +19,13 @@ #include #include #include +#include #include "AntiFlicker.h" #include "SunlightEnhancement.h" +using ::vendor::lineage::livedisplay::V2_0::sdm::PictureAdjustment; +using ::vendor::lineage::livedisplay::V2_0::sdm::SDMController; using ::vendor::lineage::livedisplay::V2_1::IAntiFlicker; using ::vendor::lineage::livedisplay::V2_1::ISunlightEnhancement; using ::vendor::lineage::livedisplay::V2_1::implementation::AntiFlicker; @@ -32,12 +35,19 @@ int main() { android::sp antiFlicker = new AntiFlicker(); android::sp sunlightEnhancement = new SunlightEnhancement(); + std::shared_ptr controller = std::make_shared(); + android::sp pictureAdjustment = new PictureAdjustment(controller); + android::hardware::configureRpcThreadpool(1, true /*callerWillJoin*/); if (antiFlicker->registerAsService() != android::OK) { LOG(ERROR) << "Cannot register anti flicker HAL service."; return 1; } + if (pictureAdjustment->registerAsService() != android::OK) { + LOG(ERROR) << "Cannot register picture adjustment HAL service."; + return 1; + } if (sunlightEnhancement->registerAsService() != android::OK) { LOG(ERROR) << "Cannot register sunlight enhancement HAL service."; return 1; diff --git a/sm6150.mk b/sm6150.mk index 788c5fa..31ac88e 100644 --- a/sm6150.mk +++ b/sm6150.mk @@ -210,7 +210,6 @@ PRODUCT_PACKAGES += \ # LiveDisplay PRODUCT_PACKAGES += \ - vendor.lineage.livedisplay@2.0-service-sdm \ vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150 # Media