sm6150-common: livedisplay: Use modules from common implementation
Change-Id: Iafb9f6a56187beb574ca2eb9a97fb9c7e72893ce
This commit is contained in:
parent
6d05622ab1
commit
5848b702e0
@ -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",
|
||||
],
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user