sm7125: livedisplay: Build livedisplay again

tirimbino
Ruchit Marathe 2 years ago
parent 33ab3f3b79
commit f289f9af9a
  1. 20
      configs/framework_compatibility_matrix.xml
  2. 25
      configs/manifest.xml
  3. 5
      livedisplay/DisplayModes.cpp
  4. 4
      livedisplay/SunlightEnhancement.cpp

@ -153,6 +153,26 @@
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="true">
<name>vendor.lineage.livedisplay</name>
<version>2.0</version>
<interface>
<name>IAdaptiveBacklight</name>
<instance>default</instance>
</interface>
<interface>
<name>IDisplayColorCalibration</name>
<instance>default</instance>
</interface>
<interface>
<name>IDisplayModes</name>
<instance>default</instance>
</interface>
<interface>
<name>ISunlightEnhancement</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="true">
<name>vendor.lineage.fastcharge</name>
<version>1.0</version>

@ -292,6 +292,31 @@
</interface>
<fqname>@1.0::IQSEECom/default</fqname>
</hal>
<hal format="hidl">
<name>vendor.lineage.livedisplay</name>
<transport>hwbinder</transport>
<version>2.0</version>
<interface>
<name>IAdaptiveBacklight</name>
<instance>default</instance>
</interface>
<interface>
<name>IDisplayColorCalibration</name>
<instance>default</instance>
</interface>
<interface>
<name>IDisplayModes</name>
<instance>default</instance>
</interface>
<interface>
<name>ISunlightEnhancement</name>
<instance>default</instance>
</interface>
<fqname>@2.0::IAdaptiveBacklight/default</fqname>
<fqname>@2.0::IDisplayColorCalibration/default</fqname>
<fqname>@2.0::IDisplayModes/default</fqname>
<fqname>@2.0::ISunlightEnhancement/default</fqname>
</hal>
<hal format="hidl" override="true">
<name>vendor.qti.hardware.radio.am</name>
<transport>hwbinder</transport>

@ -36,8 +36,11 @@ static constexpr const char* kDefaultPath = "/data/vendor/display/.displaymodede
const std::map<int32_t, std::string> DisplayModes::kModeMap = {
// clang-format off
{0, "Dynamic"},
{1, "Standard"},
{2, "Natural"},
{4, "Vivid"},
{3, "Cinema"},
{4, "Adaptive"},
// clang-format on
};

@ -43,13 +43,13 @@ bool SunlightEnhancement::isSupported() {
Return<bool> SunlightEnhancement::isEnabled() {
std::string brightness;
ReadFileToString(kBrightnessPath, &brightness);
return brightness == "365";
return brightness == "486";
}
Return<bool> SunlightEnhancement::setEnabled(bool enabled) {
if (enabled) {
ReadFileToString(kBrightnessPath, &previous_brightness);
return WriteStringToFile("365", kBrightnessPath, true);
return WriteStringToFile("486", kBrightnessPath, true);
} else if (!previous_brightness.empty()) {
return WriteStringToFile(previous_brightness, kBrightnessPath, true);
}

Loading…
Cancel
Save