mirror of
https://github.com/team-infusion-developers/android_hardware_samsung.git
synced 2024-11-06 21:55:41 +00:00
livedisplay: Detect accessibility_max for ReadingEnhancementExynos
Change-Id: I1bea733a9222004ec6d964c1c25ae16d8c46c796
This commit is contained in:
parent
adf0b2846e
commit
1bb761b224
1 changed files with 11 additions and 0 deletions
|
@ -26,6 +26,17 @@ namespace samsung {
|
|||
|
||||
// Methods from ::vendor::lineage::livedisplay::V2_0::ISunlightEnhancement follow.
|
||||
bool ReadingEnhancementExynos::isSupported() {
|
||||
std::ifstream max_file("/sys/class/mdnie/mdnie/accessibility_max");
|
||||
int max;
|
||||
|
||||
if (max_file.is_open()) {
|
||||
max_file >> max;
|
||||
}
|
||||
|
||||
if (max_file.good()) {
|
||||
return max > 4;
|
||||
}
|
||||
|
||||
std::ofstream file("/sys/class/mdnie/mdnie/accessibility");
|
||||
return file.good();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue