diff --git a/lineagehw/hidl/livedisplay/AdaptiveBacklight.cpp b/lineagehw/hidl/livedisplay/AdaptiveBacklight.cpp new file mode 100644 index 00000000..755f7f27 --- /dev/null +++ b/lineagehw/hidl/livedisplay/AdaptiveBacklight.cpp @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "AdaptiveBacklight.h" + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IAdaptiveBacklight follow. +Return AdaptiveBacklight::isEnabled() { + // TODO implement + return bool {}; +} + +Return AdaptiveBacklight::setEnabled(bool enabled) { + // TODO implement + return bool {}; +} + + +// Methods from ::android::hidl::base::V1_0::IBase follow. + +//IAdaptiveBacklight* HIDL_FETCH_IAdaptiveBacklight(const char* /* name */) { + //return new AdaptiveBacklight(); +//} +// +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/lineagehw/hidl/livedisplay/AdaptiveBacklight.h b/lineagehw/hidl/livedisplay/AdaptiveBacklight.h new file mode 100644 index 00000000..c0e0c4e3 --- /dev/null +++ b/lineagehw/hidl/livedisplay/AdaptiveBacklight.h @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_0_ADAPTIVEBACKLIGHT_H +#define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_ADAPTIVEBACKLIGHT_H + +#include +#include +#include + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +using ::android::hardware::hidl_array; +using ::android::hardware::hidl_memory; +using ::android::hardware::hidl_string; +using ::android::hardware::hidl_vec; +using ::android::hardware::Return; +using ::android::hardware::Void; +using ::android::sp; + +struct AdaptiveBacklight : public IAdaptiveBacklight { + // Methods from ::vendor::lineage::livedisplay::V2_0::IAdaptiveBacklight follow. + Return isEnabled() override; + Return setEnabled(bool enabled) override; + + // Methods from ::android::hidl::base::V1_0::IBase follow. + +}; + +// FIXME: most likely delete, this is only for passthrough implementations +// extern "C" IAdaptiveBacklight* HIDL_FETCH_IAdaptiveBacklight(const char* name); + +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_ADAPTIVEBACKLIGHT_H diff --git a/lineagehw/hidl/livedisplay/Android.bp b/lineagehw/hidl/livedisplay/Android.bp new file mode 100644 index 00000000..276c386e --- /dev/null +++ b/lineagehw/hidl/livedisplay/Android.bp @@ -0,0 +1,47 @@ +// Copyright (C) 2019 The LineageOS Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +cc_library_shared { + // FIXME: this should only be -impl for a passthrough hal. + // In most cases, to convert this to a binderized implementation, you should: + // - change '-impl' to '-service' here and make it a cc_binary instead of a + // cc_library_shared. + // - add a *.rc file for this module. + // - delete HIDL_FETCH_I* functions. + // - call configureRpcThreadpool and registerAsService on the instance. + // You may also want to append '-impl/-service' with a specific identifier like + // '-vendor' or '-' etc to distinguish it. + name: "vendor.lineage.livedisplay@2.0-impl", + relative_install_path: "hw", + // FIXME: this should be 'vendor: true' for modules that will eventually be + // on AOSP. + proprietary: true, + srcs: [ + "AdaptiveBacklight.cpp", + "AutoContrast.cpp", + "ColorBalance.cpp", + "ColorEnhancement.cpp", + "DisplayColorCalibration.cpp", + "DisplayModes.cpp", + "PictureAdjustment.cpp", + "ReadingEnhancement.cpp", + "SunlightEnhancement.cpp", + ], + shared_libs: [ + "libhidlbase", + "libhidltransport", + "libutils", + "vendor.lineage.livedisplay@2.0", + ], +} diff --git a/lineagehw/hidl/livedisplay/AutoContrast.cpp b/lineagehw/hidl/livedisplay/AutoContrast.cpp new file mode 100644 index 00000000..af16fc7e --- /dev/null +++ b/lineagehw/hidl/livedisplay/AutoContrast.cpp @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "AutoContrast.h" + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IAutoContrast follow. +Return AutoContrast::isEnabled() { + // TODO implement + return bool {}; +} + +Return AutoContrast::setEnabled(bool enabled) { + // TODO implement + return bool {}; +} + + +// Methods from ::android::hidl::base::V1_0::IBase follow. + +//IAutoContrast* HIDL_FETCH_IAutoContrast(const char* /* name */) { + //return new AutoContrast(); +//} +// +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/lineagehw/hidl/livedisplay/AutoContrast.h b/lineagehw/hidl/livedisplay/AutoContrast.h new file mode 100644 index 00000000..44a8be6f --- /dev/null +++ b/lineagehw/hidl/livedisplay/AutoContrast.h @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_0_AUTOCONTRAST_H +#define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_AUTOCONTRAST_H + +#include +#include +#include + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +using ::android::hardware::hidl_array; +using ::android::hardware::hidl_memory; +using ::android::hardware::hidl_string; +using ::android::hardware::hidl_vec; +using ::android::hardware::Return; +using ::android::hardware::Void; +using ::android::sp; + +struct AutoContrast : public IAutoContrast { + // Methods from ::vendor::lineage::livedisplay::V2_0::IAutoContrast follow. + Return isEnabled() override; + Return setEnabled(bool enabled) override; + + // Methods from ::android::hidl::base::V1_0::IBase follow. + +}; + +// FIXME: most likely delete, this is only for passthrough implementations +// extern "C" IAutoContrast* HIDL_FETCH_IAutoContrast(const char* name); + +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_AUTOCONTRAST_H diff --git a/lineagehw/hidl/livedisplay/ColorBalance.cpp b/lineagehw/hidl/livedisplay/ColorBalance.cpp new file mode 100644 index 00000000..f6369904 --- /dev/null +++ b/lineagehw/hidl/livedisplay/ColorBalance.cpp @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ColorBalance.h" + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IColorBalance follow. +Return ColorBalance::getColorBalanceRange(getColorBalanceRange_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return ColorBalance::getColorBalance() { + // TODO implement + return int32_t {}; +} + +Return ColorBalance::setColorBalance(int32_t value) { + // TODO implement + return bool {}; +} + + +// Methods from ::android::hidl::base::V1_0::IBase follow. + +//IColorBalance* HIDL_FETCH_IColorBalance(const char* /* name */) { + //return new ColorBalance(); +//} +// +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/lineagehw/hidl/livedisplay/ColorBalance.h b/lineagehw/hidl/livedisplay/ColorBalance.h new file mode 100644 index 00000000..b760c7c7 --- /dev/null +++ b/lineagehw/hidl/livedisplay/ColorBalance.h @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_0_COLORBALANCE_H +#define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_COLORBALANCE_H + +#include +#include +#include + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +using ::android::hardware::hidl_array; +using ::android::hardware::hidl_memory; +using ::android::hardware::hidl_string; +using ::android::hardware::hidl_vec; +using ::android::hardware::Return; +using ::android::hardware::Void; +using ::android::sp; + +struct ColorBalance : public IColorBalance { + // Methods from ::vendor::lineage::livedisplay::V2_0::IColorBalance follow. + Return getColorBalanceRange(getColorBalanceRange_cb _hidl_cb) override; + Return getColorBalance() override; + Return setColorBalance(int32_t value) override; + + // Methods from ::android::hidl::base::V1_0::IBase follow. + +}; + +// FIXME: most likely delete, this is only for passthrough implementations +// extern "C" IColorBalance* HIDL_FETCH_IColorBalance(const char* name); + +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_COLORBALANCE_H diff --git a/lineagehw/hidl/livedisplay/ColorEnhancement.cpp b/lineagehw/hidl/livedisplay/ColorEnhancement.cpp new file mode 100644 index 00000000..e87961d8 --- /dev/null +++ b/lineagehw/hidl/livedisplay/ColorEnhancement.cpp @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ColorEnhancement.h" + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IColorEnhancement follow. +Return ColorEnhancement::isEnabled() { + // TODO implement + return bool {}; +} + +Return ColorEnhancement::setEnabled(bool enabled) { + // TODO implement + return bool {}; +} + + +// Methods from ::android::hidl::base::V1_0::IBase follow. + +//IColorEnhancement* HIDL_FETCH_IColorEnhancement(const char* /* name */) { + //return new ColorEnhancement(); +//} +// +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/lineagehw/hidl/livedisplay/ColorEnhancement.h b/lineagehw/hidl/livedisplay/ColorEnhancement.h new file mode 100644 index 00000000..925cdfc7 --- /dev/null +++ b/lineagehw/hidl/livedisplay/ColorEnhancement.h @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_0_COLORENHANCEMENT_H +#define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_COLORENHANCEMENT_H + +#include +#include +#include + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +using ::android::hardware::hidl_array; +using ::android::hardware::hidl_memory; +using ::android::hardware::hidl_string; +using ::android::hardware::hidl_vec; +using ::android::hardware::Return; +using ::android::hardware::Void; +using ::android::sp; + +struct ColorEnhancement : public IColorEnhancement { + // Methods from ::vendor::lineage::livedisplay::V2_0::IColorEnhancement follow. + Return isEnabled() override; + Return setEnabled(bool enabled) override; + + // Methods from ::android::hidl::base::V1_0::IBase follow. + +}; + +// FIXME: most likely delete, this is only for passthrough implementations +// extern "C" IColorEnhancement* HIDL_FETCH_IColorEnhancement(const char* name); + +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_COLORENHANCEMENT_H diff --git a/lineagehw/hidl/livedisplay/DisplayColorCalibration.cpp b/lineagehw/hidl/livedisplay/DisplayColorCalibration.cpp new file mode 100644 index 00000000..e471f3e3 --- /dev/null +++ b/lineagehw/hidl/livedisplay/DisplayColorCalibration.cpp @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "DisplayColorCalibration.h" + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IDisplayColorCalibration follow. +Return DisplayColorCalibration::getMaxValue() { + // TODO implement + return int32_t {}; +} + +Return DisplayColorCalibration::getMinValue() { + // TODO implement + return int32_t {}; +} + +Return DisplayColorCalibration::getCalibration(getCalibration_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return DisplayColorCalibration::setCalibration(const hidl_vec& rgb) { + // TODO implement + return bool {}; +} + + +// Methods from ::android::hidl::base::V1_0::IBase follow. + +//IDisplayColorCalibration* HIDL_FETCH_IDisplayColorCalibration(const char* /* name */) { + //return new DisplayColorCalibration(); +//} +// +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/lineagehw/hidl/livedisplay/DisplayColorCalibration.h b/lineagehw/hidl/livedisplay/DisplayColorCalibration.h new file mode 100644 index 00000000..f4df6517 --- /dev/null +++ b/lineagehw/hidl/livedisplay/DisplayColorCalibration.h @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_0_DISPLAYCOLORCALIBRATION_H +#define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_DISPLAYCOLORCALIBRATION_H + +#include +#include +#include + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +using ::android::hardware::hidl_array; +using ::android::hardware::hidl_memory; +using ::android::hardware::hidl_string; +using ::android::hardware::hidl_vec; +using ::android::hardware::Return; +using ::android::hardware::Void; +using ::android::sp; + +struct DisplayColorCalibration : public IDisplayColorCalibration { + // Methods from ::vendor::lineage::livedisplay::V2_0::IDisplayColorCalibration follow. + Return getMaxValue() override; + Return getMinValue() override; + Return getCalibration(getCalibration_cb _hidl_cb) override; + Return setCalibration(const hidl_vec& rgb) override; + + // Methods from ::android::hidl::base::V1_0::IBase follow. + +}; + +// FIXME: most likely delete, this is only for passthrough implementations +// extern "C" IDisplayColorCalibration* HIDL_FETCH_IDisplayColorCalibration(const char* name); + +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_DISPLAYCOLORCALIBRATION_H diff --git a/lineagehw/hidl/livedisplay/DisplayModes.cpp b/lineagehw/hidl/livedisplay/DisplayModes.cpp new file mode 100644 index 00000000..6fcf88dc --- /dev/null +++ b/lineagehw/hidl/livedisplay/DisplayModes.cpp @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "DisplayModes.h" + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IDisplayModes follow. +Return DisplayModes::getDisplayModes(getDisplayModes_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return DisplayModes::getCurrentDisplayMode(getCurrentDisplayMode_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return DisplayModes::getDefaultDisplayMode(getDefaultDisplayMode_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return DisplayModes::setDisplayMode(int32_t modeID, bool makeDefault) { + // TODO implement + return bool {}; +} + + +// Methods from ::android::hidl::base::V1_0::IBase follow. + +//IDisplayModes* HIDL_FETCH_IDisplayModes(const char* /* name */) { + //return new DisplayModes(); +//} +// +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/lineagehw/hidl/livedisplay/DisplayModes.h b/lineagehw/hidl/livedisplay/DisplayModes.h new file mode 100644 index 00000000..90f0cb34 --- /dev/null +++ b/lineagehw/hidl/livedisplay/DisplayModes.h @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_0_DISPLAYMODES_H +#define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_DISPLAYMODES_H + +#include +#include +#include + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +using ::android::hardware::hidl_array; +using ::android::hardware::hidl_memory; +using ::android::hardware::hidl_string; +using ::android::hardware::hidl_vec; +using ::android::hardware::Return; +using ::android::hardware::Void; +using ::android::sp; + +struct DisplayModes : public IDisplayModes { + // Methods from ::vendor::lineage::livedisplay::V2_0::IDisplayModes follow. + Return getDisplayModes(getDisplayModes_cb _hidl_cb) override; + Return getCurrentDisplayMode(getCurrentDisplayMode_cb _hidl_cb) override; + Return getDefaultDisplayMode(getDefaultDisplayMode_cb _hidl_cb) override; + Return setDisplayMode(int32_t modeID, bool makeDefault) override; + + // Methods from ::android::hidl::base::V1_0::IBase follow. + +}; + +// FIXME: most likely delete, this is only for passthrough implementations +// extern "C" IDisplayModes* HIDL_FETCH_IDisplayModes(const char* name); + +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_DISPLAYMODES_H diff --git a/lineagehw/hidl/livedisplay/PictureAdjustment.cpp b/lineagehw/hidl/livedisplay/PictureAdjustment.cpp new file mode 100644 index 00000000..bedec524 --- /dev/null +++ b/lineagehw/hidl/livedisplay/PictureAdjustment.cpp @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "PictureAdjustment.h" + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IPictureAdjustment follow. +Return PictureAdjustment::getHueRange(getHueRange_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return PictureAdjustment::getSaturationRange(getSaturationRange_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return PictureAdjustment::getIntensityRange(getIntensityRange_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return PictureAdjustment::getContrastRange(getContrastRange_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return PictureAdjustment::getSaturationThresholdRange(getSaturationThresholdRange_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return PictureAdjustment::getPictureAdjustment(getPictureAdjustment_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return PictureAdjustment::getDefaultPictureAdjustment(getDefaultPictureAdjustment_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return PictureAdjustment::setPictureAdjustment(const ::vendor::lineage::livedisplay::V2_0::HSIC& hsic) { + // TODO implement + return bool {}; +} + + +// Methods from ::android::hidl::base::V1_0::IBase follow. + +//IPictureAdjustment* HIDL_FETCH_IPictureAdjustment(const char* /* name */) { + //return new PictureAdjustment(); +//} +// +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/lineagehw/hidl/livedisplay/PictureAdjustment.h b/lineagehw/hidl/livedisplay/PictureAdjustment.h new file mode 100644 index 00000000..17bfe66f --- /dev/null +++ b/lineagehw/hidl/livedisplay/PictureAdjustment.h @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_0_PICTUREADJUSTMENT_H +#define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_PICTUREADJUSTMENT_H + +#include +#include +#include + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +using ::android::hardware::hidl_array; +using ::android::hardware::hidl_memory; +using ::android::hardware::hidl_string; +using ::android::hardware::hidl_vec; +using ::android::hardware::Return; +using ::android::hardware::Void; +using ::android::sp; + +struct PictureAdjustment : public IPictureAdjustment { + // Methods from ::vendor::lineage::livedisplay::V2_0::IPictureAdjustment follow. + Return getHueRange(getHueRange_cb _hidl_cb) override; + Return getSaturationRange(getSaturationRange_cb _hidl_cb) override; + Return getIntensityRange(getIntensityRange_cb _hidl_cb) override; + Return getContrastRange(getContrastRange_cb _hidl_cb) override; + Return getSaturationThresholdRange(getSaturationThresholdRange_cb _hidl_cb) override; + Return getPictureAdjustment(getPictureAdjustment_cb _hidl_cb) override; + Return getDefaultPictureAdjustment(getDefaultPictureAdjustment_cb _hidl_cb) override; + Return setPictureAdjustment(const ::vendor::lineage::livedisplay::V2_0::HSIC& hsic) override; + + // Methods from ::android::hidl::base::V1_0::IBase follow. + +}; + +// FIXME: most likely delete, this is only for passthrough implementations +// extern "C" IPictureAdjustment* HIDL_FETCH_IPictureAdjustment(const char* name); + +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_PICTUREADJUSTMENT_H diff --git a/lineagehw/hidl/livedisplay/ReadingEnhancement.cpp b/lineagehw/hidl/livedisplay/ReadingEnhancement.cpp new file mode 100644 index 00000000..ea27c905 --- /dev/null +++ b/lineagehw/hidl/livedisplay/ReadingEnhancement.cpp @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ReadingEnhancement.h" + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IReadingEnhancement follow. +Return ReadingEnhancement::isEnabled() { + // TODO implement + return bool {}; +} + +Return ReadingEnhancement::setEnabled(bool enabled) { + // TODO implement + return bool {}; +} + + +// Methods from ::android::hidl::base::V1_0::IBase follow. + +//IReadingEnhancement* HIDL_FETCH_IReadingEnhancement(const char* /* name */) { + //return new ReadingEnhancement(); +//} +// +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/lineagehw/hidl/livedisplay/ReadingEnhancement.h b/lineagehw/hidl/livedisplay/ReadingEnhancement.h new file mode 100644 index 00000000..20e909af --- /dev/null +++ b/lineagehw/hidl/livedisplay/ReadingEnhancement.h @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_0_READINGENHANCEMENT_H +#define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_READINGENHANCEMENT_H + +#include +#include +#include + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +using ::android::hardware::hidl_array; +using ::android::hardware::hidl_memory; +using ::android::hardware::hidl_string; +using ::android::hardware::hidl_vec; +using ::android::hardware::Return; +using ::android::hardware::Void; +using ::android::sp; + +struct ReadingEnhancement : public IReadingEnhancement { + // Methods from ::vendor::lineage::livedisplay::V2_0::IReadingEnhancement follow. + Return isEnabled() override; + Return setEnabled(bool enabled) override; + + // Methods from ::android::hidl::base::V1_0::IBase follow. + +}; + +// FIXME: most likely delete, this is only for passthrough implementations +// extern "C" IReadingEnhancement* HIDL_FETCH_IReadingEnhancement(const char* name); + +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_READINGENHANCEMENT_H diff --git a/lineagehw/hidl/livedisplay/SunlightEnhancement.cpp b/lineagehw/hidl/livedisplay/SunlightEnhancement.cpp new file mode 100644 index 00000000..8a3c3292 --- /dev/null +++ b/lineagehw/hidl/livedisplay/SunlightEnhancement.cpp @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "SunlightEnhancement.h" + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +// Methods from ::vendor::lineage::livedisplay::V2_0::ISunlightEnhancement follow. +Return SunlightEnhancement::isEnabled() { + // TODO implement + return bool {}; +} + +Return SunlightEnhancement::setEnabled(bool enabled) { + // TODO implement + return bool {}; +} + + +// Methods from ::android::hidl::base::V1_0::IBase follow. + +//ISunlightEnhancement* HIDL_FETCH_ISunlightEnhancement(const char* /* name */) { + //return new SunlightEnhancement(); +//} +// +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/lineagehw/hidl/livedisplay/SunlightEnhancement.h b/lineagehw/hidl/livedisplay/SunlightEnhancement.h new file mode 100644 index 00000000..75718317 --- /dev/null +++ b/lineagehw/hidl/livedisplay/SunlightEnhancement.h @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2019 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_0_SUNLIGHTENHANCEMENT_H +#define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_SUNLIGHTENHANCEMENT_H + +#include +#include +#include + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace implementation { + +using ::android::hardware::hidl_array; +using ::android::hardware::hidl_memory; +using ::android::hardware::hidl_string; +using ::android::hardware::hidl_vec; +using ::android::hardware::Return; +using ::android::hardware::Void; +using ::android::sp; + +struct SunlightEnhancement : public ISunlightEnhancement { + // Methods from ::vendor::lineage::livedisplay::V2_0::ISunlightEnhancement follow. + Return isEnabled() override; + Return setEnabled(bool enabled) override; + + // Methods from ::android::hidl::base::V1_0::IBase follow. + +}; + +// FIXME: most likely delete, this is only for passthrough implementations +// extern "C" ISunlightEnhancement* HIDL_FETCH_ISunlightEnhancement(const char* name); + +} // namespace implementation +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_SUNLIGHTENHANCEMENT_H