sm6150-common: livedisplay: Use modules from common implementation

Change-Id: Iafb9f6a56187beb574ca2eb9a97fb9c7e72893ce
This commit is contained in:
dianlujitao 2020-06-25 15:31:38 +08:00 committed by Arian
parent 6d05622ab1
commit 5848b702e0
No known key found for this signature in database
GPG Key ID: 48029380598CE3B9
3 changed files with 15 additions and 1 deletions

View File

@ -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",
],
}

View File

@ -19,10 +19,13 @@
#include <android-base/logging.h>
#include <binder/ProcessState.h>
#include <hidl/HidlTransportSupport.h>
#include <livedisplay/sdm/PictureAdjustment.h>
#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<IAntiFlicker> antiFlicker = new AntiFlicker();
android::sp<ISunlightEnhancement> sunlightEnhancement = new SunlightEnhancement();
std::shared_ptr<SDMController> controller = std::make_shared<SDMController>();
android::sp<PictureAdjustment> 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;

View File

@ -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