diff options
author | Paul Keith <javelinanddart@gmail.com> | 2019-01-19 16:35:57 +0100 |
---|---|---|
committer | Bruno Martins <bgcngm@gmail.com> | 2019-01-26 19:45:26 +0000 |
commit | 986bd645db55b7042e39d5f3bb2c9847ca82f856 (patch) | |
tree | de9f396c37c095598e255a15bc16ebc3aa34e08f /sdm | |
parent | 7193ce23f53c2ad0c368050066bd22378baa43a0 (diff) | |
download | android_hardware_lineage_livedisplay-986bd645db55b7042e39d5f3bb2c9847ca82f856.tar.gz android_hardware_lineage_livedisplay-986bd645db55b7042e39d5f3bb2c9847ca82f856.tar.bz2 android_hardware_lineage_livedisplay-986bd645db55b7042e39d5f3bb2c9847ca82f856.zip |
livedisplay: Split impls into legacymm and sdm
* Since we're no longer approaching this as a @1.0
wrapper, we need separate impls for sdm and legacymm
Change-Id: I413349de5d2331cf9cf60199999c34614224fe42
Diffstat (limited to 'sdm')
-rw-r--r-- | sdm/AdaptiveBacklight.cpp | 47 | ||||
-rw-r--r-- | sdm/AdaptiveBacklight.h | 56 | ||||
-rw-r--r-- | sdm/Android.bp | 47 | ||||
-rw-r--r-- | sdm/AutoContrast.cpp | 47 | ||||
-rw-r--r-- | sdm/AutoContrast.h | 56 | ||||
-rw-r--r-- | sdm/ColorBalance.cpp | 52 | ||||
-rw-r--r-- | sdm/ColorBalance.h | 57 | ||||
-rw-r--r-- | sdm/ColorEnhancement.cpp | 47 | ||||
-rw-r--r-- | sdm/ColorEnhancement.h | 56 | ||||
-rw-r--r-- | sdm/DisplayColorCalibration.cpp | 57 | ||||
-rw-r--r-- | sdm/DisplayColorCalibration.h | 58 | ||||
-rw-r--r-- | sdm/DisplayModes.cpp | 57 | ||||
-rw-r--r-- | sdm/DisplayModes.h | 58 | ||||
-rw-r--r-- | sdm/PictureAdjustment.cpp | 77 | ||||
-rw-r--r-- | sdm/PictureAdjustment.h | 62 | ||||
-rw-r--r-- | sdm/ReadingEnhancement.cpp | 47 | ||||
-rw-r--r-- | sdm/ReadingEnhancement.h | 56 | ||||
-rw-r--r-- | sdm/SunlightEnhancement.cpp | 47 | ||||
-rw-r--r-- | sdm/SunlightEnhancement.h | 56 |
19 files changed, 1040 insertions, 0 deletions
diff --git a/sdm/AdaptiveBacklight.cpp b/sdm/AdaptiveBacklight.cpp new file mode 100644 index 0000000..a1e75cc --- /dev/null +++ b/sdm/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 sdm { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IAdaptiveBacklight follow. +Return<bool> AdaptiveBacklight::isEnabled() { + // TODO implement + return bool {}; +} + +Return<bool> 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 sdm +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/sdm/AdaptiveBacklight.h b/sdm/AdaptiveBacklight.h new file mode 100644 index 0000000..544083c --- /dev/null +++ b/sdm/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 <vendor/lineage/livedisplay/2.0/IAdaptiveBacklight.h> +#include <hidl/MQDescriptor.h> +#include <hidl/Status.h> + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace sdm { + +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<bool> isEnabled() override; + Return<bool> 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 sdm +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_ADAPTIVEBACKLIGHT_H diff --git a/sdm/Android.bp b/sdm/Android.bp new file mode 100644 index 0000000..276c386 --- /dev/null +++ b/sdm/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 '-<hardware identifier>' 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/sdm/AutoContrast.cpp b/sdm/AutoContrast.cpp new file mode 100644 index 0000000..3d1b61b --- /dev/null +++ b/sdm/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 sdm { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IAutoContrast follow. +Return<bool> AutoContrast::isEnabled() { + // TODO implement + return bool {}; +} + +Return<bool> 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 sdm +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/sdm/AutoContrast.h b/sdm/AutoContrast.h new file mode 100644 index 0000000..fd65149 --- /dev/null +++ b/sdm/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 <vendor/lineage/livedisplay/2.0/IAutoContrast.h> +#include <hidl/MQDescriptor.h> +#include <hidl/Status.h> + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace sdm { + +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<bool> isEnabled() override; + Return<bool> 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 sdm +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_AUTOCONTRAST_H diff --git a/sdm/ColorBalance.cpp b/sdm/ColorBalance.cpp new file mode 100644 index 0000000..b7477a6 --- /dev/null +++ b/sdm/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 sdm { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IColorBalance follow. +Return<void> ColorBalance::getColorBalanceRange(getColorBalanceRange_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<int32_t> ColorBalance::getColorBalance() { + // TODO implement + return int32_t {}; +} + +Return<bool> 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 sdm +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/sdm/ColorBalance.h b/sdm/ColorBalance.h new file mode 100644 index 0000000..6b5a6fe --- /dev/null +++ b/sdm/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 <vendor/lineage/livedisplay/2.0/IColorBalance.h> +#include <hidl/MQDescriptor.h> +#include <hidl/Status.h> + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace sdm { + +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<void> getColorBalanceRange(getColorBalanceRange_cb _hidl_cb) override; + Return<int32_t> getColorBalance() override; + Return<bool> 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 sdm +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_COLORBALANCE_H diff --git a/sdm/ColorEnhancement.cpp b/sdm/ColorEnhancement.cpp new file mode 100644 index 0000000..1e72c39 --- /dev/null +++ b/sdm/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 sdm { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IColorEnhancement follow. +Return<bool> ColorEnhancement::isEnabled() { + // TODO implement + return bool {}; +} + +Return<bool> 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 sdm +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/sdm/ColorEnhancement.h b/sdm/ColorEnhancement.h new file mode 100644 index 0000000..0f82b25 --- /dev/null +++ b/sdm/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 <vendor/lineage/livedisplay/2.0/IColorEnhancement.h> +#include <hidl/MQDescriptor.h> +#include <hidl/Status.h> + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace sdm { + +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<bool> isEnabled() override; + Return<bool> 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 sdm +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_COLORENHANCEMENT_H diff --git a/sdm/DisplayColorCalibration.cpp b/sdm/DisplayColorCalibration.cpp new file mode 100644 index 0000000..23c513e --- /dev/null +++ b/sdm/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 sdm { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IDisplayColorCalibration follow. +Return<int32_t> DisplayColorCalibration::getMaxValue() { + // TODO implement + return int32_t {}; +} + +Return<int32_t> DisplayColorCalibration::getMinValue() { + // TODO implement + return int32_t {}; +} + +Return<void> DisplayColorCalibration::getCalibration(getCalibration_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<bool> DisplayColorCalibration::setCalibration(const hidl_vec<int32_t>& 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 sdm +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/sdm/DisplayColorCalibration.h b/sdm/DisplayColorCalibration.h new file mode 100644 index 0000000..2aaa88c --- /dev/null +++ b/sdm/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 <vendor/lineage/livedisplay/2.0/IDisplayColorCalibration.h> +#include <hidl/MQDescriptor.h> +#include <hidl/Status.h> + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace sdm { + +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<int32_t> getMaxValue() override; + Return<int32_t> getMinValue() override; + Return<void> getCalibration(getCalibration_cb _hidl_cb) override; + Return<bool> setCalibration(const hidl_vec<int32_t>& 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 sdm +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_DISPLAYCOLORCALIBRATION_H diff --git a/sdm/DisplayModes.cpp b/sdm/DisplayModes.cpp new file mode 100644 index 0000000..5eec1d8 --- /dev/null +++ b/sdm/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 sdm { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IDisplayModes follow. +Return<void> DisplayModes::getDisplayModes(getDisplayModes_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<void> DisplayModes::getCurrentDisplayMode(getCurrentDisplayMode_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<void> DisplayModes::getDefaultDisplayMode(getDefaultDisplayMode_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<bool> 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 sdm +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/sdm/DisplayModes.h b/sdm/DisplayModes.h new file mode 100644 index 0000000..4c2d601 --- /dev/null +++ b/sdm/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 <vendor/lineage/livedisplay/2.0/IDisplayModes.h> +#include <hidl/MQDescriptor.h> +#include <hidl/Status.h> + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace sdm { + +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<void> getDisplayModes(getDisplayModes_cb _hidl_cb) override; + Return<void> getCurrentDisplayMode(getCurrentDisplayMode_cb _hidl_cb) override; + Return<void> getDefaultDisplayMode(getDefaultDisplayMode_cb _hidl_cb) override; + Return<bool> 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 sdm +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_DISPLAYMODES_H diff --git a/sdm/PictureAdjustment.cpp b/sdm/PictureAdjustment.cpp new file mode 100644 index 0000000..e12573e --- /dev/null +++ b/sdm/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 sdm { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IPictureAdjustment follow. +Return<void> PictureAdjustment::getHueRange(getHueRange_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<void> PictureAdjustment::getSaturationRange(getSaturationRange_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<void> PictureAdjustment::getIntensityRange(getIntensityRange_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<void> PictureAdjustment::getContrastRange(getContrastRange_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<void> PictureAdjustment::getSaturationThresholdRange(getSaturationThresholdRange_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<void> PictureAdjustment::getPictureAdjustment(getPictureAdjustment_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<void> PictureAdjustment::getDefaultPictureAdjustment(getDefaultPictureAdjustment_cb _hidl_cb) { + // TODO implement + return Void(); +} + +Return<bool> 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 sdm +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/sdm/PictureAdjustment.h b/sdm/PictureAdjustment.h new file mode 100644 index 0000000..d35893e --- /dev/null +++ b/sdm/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 <vendor/lineage/livedisplay/2.0/IPictureAdjustment.h> +#include <hidl/MQDescriptor.h> +#include <hidl/Status.h> + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace sdm { + +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<void> getHueRange(getHueRange_cb _hidl_cb) override; + Return<void> getSaturationRange(getSaturationRange_cb _hidl_cb) override; + Return<void> getIntensityRange(getIntensityRange_cb _hidl_cb) override; + Return<void> getContrastRange(getContrastRange_cb _hidl_cb) override; + Return<void> getSaturationThresholdRange(getSaturationThresholdRange_cb _hidl_cb) override; + Return<void> getPictureAdjustment(getPictureAdjustment_cb _hidl_cb) override; + Return<void> getDefaultPictureAdjustment(getDefaultPictureAdjustment_cb _hidl_cb) override; + Return<bool> 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 sdm +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_PICTUREADJUSTMENT_H diff --git a/sdm/ReadingEnhancement.cpp b/sdm/ReadingEnhancement.cpp new file mode 100644 index 0000000..7567567 --- /dev/null +++ b/sdm/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 sdm { + +// Methods from ::vendor::lineage::livedisplay::V2_0::IReadingEnhancement follow. +Return<bool> ReadingEnhancement::isEnabled() { + // TODO implement + return bool {}; +} + +Return<bool> 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 sdm +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/sdm/ReadingEnhancement.h b/sdm/ReadingEnhancement.h new file mode 100644 index 0000000..8acb7a9 --- /dev/null +++ b/sdm/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 <vendor/lineage/livedisplay/2.0/IReadingEnhancement.h> +#include <hidl/MQDescriptor.h> +#include <hidl/Status.h> + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace sdm { + +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<bool> isEnabled() override; + Return<bool> 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 sdm +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_READINGENHANCEMENT_H diff --git a/sdm/SunlightEnhancement.cpp b/sdm/SunlightEnhancement.cpp new file mode 100644 index 0000000..d8c64c5 --- /dev/null +++ b/sdm/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 sdm { + +// Methods from ::vendor::lineage::livedisplay::V2_0::ISunlightEnhancement follow. +Return<bool> SunlightEnhancement::isEnabled() { + // TODO implement + return bool {}; +} + +Return<bool> 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 sdm +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor diff --git a/sdm/SunlightEnhancement.h b/sdm/SunlightEnhancement.h new file mode 100644 index 0000000..b0dbb4c --- /dev/null +++ b/sdm/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 <vendor/lineage/livedisplay/2.0/ISunlightEnhancement.h> +#include <hidl/MQDescriptor.h> +#include <hidl/Status.h> + +namespace vendor { +namespace lineage { +namespace livedisplay { +namespace V2_0 { +namespace sdm { + +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<bool> isEnabled() override; + Return<bool> 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 sdm +} // namespace V2_0 +} // namespace livedisplay +} // namespace lineage +} // namespace vendor + +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_SUNLIGHTENHANCEMENT_H |