sm8250-common: livedisplay: Implement IAntiFlicker interface
Change-Id: I1dbc6d8989a80fe7b06d4356aeb717417997a793
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include <livedisplay/sdm/PictureAdjustment.h>
|
||||
#include <vendor/lineage/livedisplay/2.1/IPictureAdjustment.h>
|
||||
|
||||
#include "AntiFlicker.h"
|
||||
#include "DisplayModes.h"
|
||||
#include "SunlightEnhancement.h"
|
||||
|
||||
@@ -33,9 +34,11 @@ using android::hardware::joinRpcThreadpool;
|
||||
|
||||
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::IDisplayModes;
|
||||
using ::vendor::lineage::livedisplay::V2_1::IPictureAdjustment;
|
||||
using ::vendor::lineage::livedisplay::V2_1::ISunlightEnhancement;
|
||||
using ::vendor::lineage::livedisplay::V2_1::implementation::AntiFlicker;
|
||||
using ::vendor::lineage::livedisplay::V2_1::implementation::DisplayModes;
|
||||
using ::vendor::lineage::livedisplay::V2_1::implementation::SunlightEnhancement;
|
||||
|
||||
@@ -47,12 +50,20 @@ int main() {
|
||||
LOG(INFO) << "LiveDisplay HAL service is starting.";
|
||||
|
||||
std::shared_ptr<SDMController> controller = std::make_shared<SDMController>();
|
||||
sp<AntiFlicker> af = new AntiFlicker();
|
||||
sp<DisplayModes> dm = new DisplayModes();
|
||||
sp<PictureAdjustment> pa = new PictureAdjustment(controller);
|
||||
sp<SunlightEnhancement> se = new SunlightEnhancement();
|
||||
|
||||
configureRpcThreadpool(1, true /*callerWillJoin*/);
|
||||
|
||||
status = af->registerAsService();
|
||||
if (status != OK) {
|
||||
LOG(ERROR) << "Could not register service for LiveDisplay HAL AntiFlicker Iface ("
|
||||
<< status << ")";
|
||||
goto shutdown;
|
||||
}
|
||||
|
||||
status = dm->registerAsService();
|
||||
if (status != OK) {
|
||||
LOG(ERROR) << "Could not register service for LiveDisplay HAL DisplayModes Iface ("
|
||||
|
||||
Reference in New Issue
Block a user