mirror of
https://github.com/Evolution-X-Devices/device_xiaomi_sm6150-common
synced 2026-01-27 16:26:02 +00:00
sm6150-common: livedisplay: Use modules from common implementation
Change-Id: Iafb9f6a56187beb574ca2eb9a97fb9c7e72893ce
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user