diff --git a/livedisplay/Android.bp b/livedisplay/Android.bp index 8133df6..36b547a 100644 --- a/livedisplay/Android.bp +++ b/livedisplay/Android.bp @@ -14,10 +14,10 @@ // limitations under the License. cc_binary { - name: "vendor.lineage.livedisplay@2.0-service.xiaomi_sm6150", + name: "vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150", defaults: ["hidl_defaults"], - vintf_fragments: ["vendor.lineage.livedisplay@2.0-service.xiaomi_sm6150.xml"], - init_rc: ["vendor.lineage.livedisplay@2.0-service.xiaomi_sm6150.rc"], + vintf_fragments: ["vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150.xml"], + init_rc: ["vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150.rc"], relative_install_path: "hw", srcs: [ "AntiFlicker.cpp", @@ -31,5 +31,6 @@ cc_binary { "libhidlbase", "libutils", "vendor.lineage.livedisplay@2.0", + "vendor.lineage.livedisplay@2.1", ], } diff --git a/livedisplay/AntiFlicker.cpp b/livedisplay/AntiFlicker.cpp index bca68f7..bac60fa 100644 --- a/livedisplay/AntiFlicker.cpp +++ b/livedisplay/AntiFlicker.cpp @@ -25,7 +25,7 @@ namespace vendor { namespace lineage { namespace livedisplay { -namespace V2_0 { +namespace V2_1 { namespace implementation { static constexpr const char* kAntiFlickerStatusPath = @@ -49,7 +49,7 @@ Return AntiFlicker::setEnabled(bool enabled) { } } // namespace implementation -} // namespace V2_0 +} // namespace V2_1 } // namespace livedisplay } // namespace lineage } // namespace vendor diff --git a/livedisplay/AntiFlicker.h b/livedisplay/AntiFlicker.h index 3f4f8b6..fe4e257 100644 --- a/livedisplay/AntiFlicker.h +++ b/livedisplay/AntiFlicker.h @@ -14,17 +14,17 @@ * limitations under the License. */ -#ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_0_ANTIFLICKER_H -#define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_ANTIFLICKER_H +#ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_1_ANTIFLICKER_H +#define VENDOR_LINEAGE_LIVEDISPLAY_V2_1_ANTIFLICKER_H #include #include -#include +#include namespace vendor { namespace lineage { namespace livedisplay { -namespace V2_0 { +namespace V2_1 { namespace implementation { using ::android::sp; @@ -33,15 +33,15 @@ using ::android::hardware::Void; class AntiFlicker : public IAntiFlicker { public: - // Methods from ::vendor::lineage::livedisplay::V2_0::IAntiFlicker follow. + // Methods from ::vendor::lineage::livedisplay::V2_1::IAntiFlicker follow. Return isEnabled() override; Return setEnabled(bool enabled) override; }; } // namespace implementation -} // namespace V2_0 +} // namespace V2_1 } // namespace livedisplay } // namespace lineage } // namespace vendor -#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_ANTIFLICKER_H +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_1_ANTIFLICKER_H diff --git a/livedisplay/SunlightEnhancement.cpp b/livedisplay/SunlightEnhancement.cpp index b5583bb..273ef2b 100644 --- a/livedisplay/SunlightEnhancement.cpp +++ b/livedisplay/SunlightEnhancement.cpp @@ -25,7 +25,7 @@ namespace vendor { namespace lineage { namespace livedisplay { -namespace V2_0 { +namespace V2_1 { namespace implementation { static constexpr const char* kHbmStatusPath = "/sys/devices/platform/soc/soc:qcom,dsi-display/hbm"; @@ -48,7 +48,7 @@ Return SunlightEnhancement::setEnabled(bool enabled) { } } // namespace implementation -} // namespace V2_0 +} // namespace V2_1 } // namespace livedisplay } // namespace lineage } // namespace vendor diff --git a/livedisplay/SunlightEnhancement.h b/livedisplay/SunlightEnhancement.h index 3c3497d..386b593 100644 --- a/livedisplay/SunlightEnhancement.h +++ b/livedisplay/SunlightEnhancement.h @@ -14,17 +14,17 @@ * limitations under the License. */ -#ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_0_SUNLIGHTENHANCEMENT_H -#define VENDOR_LINEAGE_LIVEDISPLAY_V2_0_SUNLIGHTENHANCEMENT_H +#ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_1_SUNLIGHTENHANCEMENT_H +#define VENDOR_LINEAGE_LIVEDISPLAY_V2_1_SUNLIGHTENHANCEMENT_H #include #include -#include +#include namespace vendor { namespace lineage { namespace livedisplay { -namespace V2_0 { +namespace V2_1 { namespace implementation { using ::android::sp; @@ -33,15 +33,15 @@ using ::android::hardware::Void; class SunlightEnhancement : public ISunlightEnhancement { public: - // Methods from ::vendor::lineage::livedisplay::V2_0::ISunlightEnhancement follow. + // Methods from ::vendor::lineage::livedisplay::V2_1::ISunlightEnhancement follow. Return isEnabled() override; Return setEnabled(bool enabled) override; }; } // namespace implementation -} // namespace V2_0 +} // namespace V2_1 } // namespace livedisplay } // namespace lineage } // namespace vendor -#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_0_SUNLIGHTENHANCEMENT_H +#endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_1_SUNLIGHTENHANCEMENT_H diff --git a/livedisplay/service.cpp b/livedisplay/service.cpp index 5b7b954..d6f6357 100644 --- a/livedisplay/service.cpp +++ b/livedisplay/service.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#define LOG_TAG "vendor.lineage.livedisplay@2.0-service.xiaomi_sm6150" +#define LOG_TAG "vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150" #include #include @@ -23,10 +23,10 @@ #include "AntiFlicker.h" #include "SunlightEnhancement.h" -using ::vendor::lineage::livedisplay::V2_0::IAntiFlicker; -using ::vendor::lineage::livedisplay::V2_0::ISunlightEnhancement; -using ::vendor::lineage::livedisplay::V2_0::implementation::AntiFlicker; -using ::vendor::lineage::livedisplay::V2_0::implementation::SunlightEnhancement; +using ::vendor::lineage::livedisplay::V2_1::IAntiFlicker; +using ::vendor::lineage::livedisplay::V2_1::ISunlightEnhancement; +using ::vendor::lineage::livedisplay::V2_1::implementation::AntiFlicker; +using ::vendor::lineage::livedisplay::V2_1::implementation::SunlightEnhancement; int main() { android::sp antiFlicker = new AntiFlicker(); diff --git a/livedisplay/vendor.lineage.livedisplay@2.0-service.xiaomi_sm6150.xml b/livedisplay/vendor.lineage.livedisplay@2.0-service.xiaomi_sm6150.xml deleted file mode 100644 index c01b835..0000000 --- a/livedisplay/vendor.lineage.livedisplay@2.0-service.xiaomi_sm6150.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - vendor.lineage.livedisplay - hwbinder - 2.0 - - IAntiFlicker - default - - - IPictureAdjustment - default - - - ISunlightEnhancement - default - - - diff --git a/livedisplay/vendor.lineage.livedisplay@2.0-service.xiaomi_sm6150.rc b/livedisplay/vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150.rc similarity index 79% rename from livedisplay/vendor.lineage.livedisplay@2.0-service.xiaomi_sm6150.rc rename to livedisplay/vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150.rc index 9f97ebd..6343994 100644 --- a/livedisplay/vendor.lineage.livedisplay@2.0-service.xiaomi_sm6150.rc +++ b/livedisplay/vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150.rc @@ -5,7 +5,7 @@ on boot chmod 0660 /sys/devices/platform/soc/soc:qcom,dsi-display/dc_enable chmod 0660 /sys/devices/platform/soc/soc:qcom,dsi-display/hbm -service vendor.livedisplay-hal-2-0 /vendor/bin/hw/vendor.lineage.livedisplay@2.0-service.xiaomi_sm6150 +service vendor.livedisplay-hal-2-1 /vendor/bin/hw/vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150 class hal user system group system diff --git a/livedisplay/vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150.xml b/livedisplay/vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150.xml new file mode 100644 index 0000000..a5f7f61 --- /dev/null +++ b/livedisplay/vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150.xml @@ -0,0 +1,9 @@ + + + vendor.lineage.livedisplay + hwbinder + @2.0::IPictureAdjustment/default + @2.1::IAntiFlicker/default + @2.1::ISunlightEnhancement/default + + diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts index 7b7bb3a..ca052d4 100644 --- a/sepolicy/vendor/file_contexts +++ b/sepolicy/vendor/file_contexts @@ -16,7 +16,7 @@ /(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint@2\.1-service\.xiaomi_sm6150 u:object_r:hal_fingerprint_default_exec:s0 /(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint@2\.1-service\.xiaomi_sm6150-ext u:object_r:hal_fingerprint_default_exec:s0 /vendor/bin/hw/android\.hardware\.light@2\.0-service\.xiaomi_sm6150 u:object_r:hal_light_default_exec:s0 -/vendor/bin/hw/vendor\.lineage\.livedisplay@2\.0-service\.xiaomi_sm6150 u:object_r:hal_lineage_livedisplay_qti_exec:s0 +/vendor/bin/hw/vendor\.lineage\.livedisplay@2\.1-service\.xiaomi_sm6150 u:object_r:hal_lineage_livedisplay_qti_exec:s0 # Remosaic /vendor/bin/remosaic_daemon u:object_r:remosaic_daemon_exec:s0 diff --git a/sm6150.mk b/sm6150.mk index efcd48a..788c5fa 100644 --- a/sm6150.mk +++ b/sm6150.mk @@ -211,7 +211,7 @@ PRODUCT_PACKAGES += \ # LiveDisplay PRODUCT_PACKAGES += \ vendor.lineage.livedisplay@2.0-service-sdm \ - vendor.lineage.livedisplay@2.0-service.xiaomi_sm6150 + vendor.lineage.livedisplay@2.1-service.xiaomi_sm6150 # Media PRODUCT_PACKAGES += \