sm7125: livedisplay: Correct SunlightEnhancement brightness

Change-Id: I49357a829a1cb500b50d5ff2b27b5d84d9439f77
fourteen-wip
Simon1511 2 years ago
parent 96d5c625ac
commit 722cf693d6
  1. 4
      livedisplay/SunlightEnhancement.cpp

@ -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