mirror of
https://github.com/Evolution-X-Devices/device_xiaomi_sm6150-common
synced 2026-01-27 12:07:36 +00:00
sm6150-common: livedisplay: Use modules from common implementation
Change-Id: Iafb9f6a56187beb574ca2eb9a97fb9c7e72893ce
This commit is contained in:
@@ -20,6 +20,8 @@ cc_binary {
|
|||||||
init_rc: ["vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150.rc"],
|
init_rc: ["vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150.rc"],
|
||||||
relative_install_path: "hw",
|
relative_install_path: "hw",
|
||||||
srcs: [
|
srcs: [
|
||||||
|
":vendor.lineage.livedisplay@2.0-sdm-pa",
|
||||||
|
":vendor.lineage.livedisplay@2.0-sdm-utils",
|
||||||
"AntiFlicker.cpp",
|
"AntiFlicker.cpp",
|
||||||
"SunlightEnhancement.cpp",
|
"SunlightEnhancement.cpp",
|
||||||
"service.cpp",
|
"service.cpp",
|
||||||
@@ -33,4 +35,7 @@ cc_binary {
|
|||||||
"vendor.lineage.livedisplay@2.0",
|
"vendor.lineage.livedisplay@2.0",
|
||||||
"vendor.lineage.livedisplay@2.1",
|
"vendor.lineage.livedisplay@2.1",
|
||||||
],
|
],
|
||||||
|
header_libs: [
|
||||||
|
"vendor.lineage.livedisplay@2.0-sdm-headers",
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,10 +19,13 @@
|
|||||||
#include <android-base/logging.h>
|
#include <android-base/logging.h>
|
||||||
#include <binder/ProcessState.h>
|
#include <binder/ProcessState.h>
|
||||||
#include <hidl/HidlTransportSupport.h>
|
#include <hidl/HidlTransportSupport.h>
|
||||||
|
#include <livedisplay/sdm/PictureAdjustment.h>
|
||||||
|
|
||||||
#include "AntiFlicker.h"
|
#include "AntiFlicker.h"
|
||||||
#include "SunlightEnhancement.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::IAntiFlicker;
|
||||||
using ::vendor::lineage::livedisplay::V2_1::ISunlightEnhancement;
|
using ::vendor::lineage::livedisplay::V2_1::ISunlightEnhancement;
|
||||||
using ::vendor::lineage::livedisplay::V2_1::implementation::AntiFlicker;
|
using ::vendor::lineage::livedisplay::V2_1::implementation::AntiFlicker;
|
||||||
@@ -32,12 +35,19 @@ int main() {
|
|||||||
android::sp<IAntiFlicker> antiFlicker = new AntiFlicker();
|
android::sp<IAntiFlicker> antiFlicker = new AntiFlicker();
|
||||||
android::sp<ISunlightEnhancement> sunlightEnhancement = new SunlightEnhancement();
|
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*/);
|
android::hardware::configureRpcThreadpool(1, true /*callerWillJoin*/);
|
||||||
|
|
||||||
if (antiFlicker->registerAsService() != android::OK) {
|
if (antiFlicker->registerAsService() != android::OK) {
|
||||||
LOG(ERROR) << "Cannot register anti flicker HAL service.";
|
LOG(ERROR) << "Cannot register anti flicker HAL service.";
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
if (pictureAdjustment->registerAsService() != android::OK) {
|
||||||
|
LOG(ERROR) << "Cannot register picture adjustment HAL service.";
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
if (sunlightEnhancement->registerAsService() != android::OK) {
|
if (sunlightEnhancement->registerAsService() != android::OK) {
|
||||||
LOG(ERROR) << "Cannot register sunlight enhancement HAL service.";
|
LOG(ERROR) << "Cannot register sunlight enhancement HAL service.";
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -210,7 +210,6 @@ PRODUCT_PACKAGES += \
|
|||||||
|
|
||||||
# LiveDisplay
|
# LiveDisplay
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
vendor.lineage.livedisplay@2.0-service-sdm \
|
|
||||||
vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150
|
vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150
|
||||||
|
|
||||||
# Media
|
# Media
|
||||||
|
|||||||
Reference in New Issue
Block a user