From bf9997860ef057270a6499c794f49f7eca742b13 Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Wed, 10 Jul 2019 10:36:49 +0200 Subject: [PATCH] hidl: livedisplay: Fix reading mode string comparison * Since we are trimming the string it will never match one with trailing space at the end. Change-Id: Iea76092112555ed8b858560f07ef8e88f0ff593b --- lineagehw/hidl/livedisplay/ReadingEnhancement.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lineagehw/hidl/livedisplay/ReadingEnhancement.cpp b/lineagehw/hidl/livedisplay/ReadingEnhancement.cpp index 9de47cdf..4c2c31b9 100644 --- a/lineagehw/hidl/livedisplay/ReadingEnhancement.cpp +++ b/lineagehw/hidl/livedisplay/ReadingEnhancement.cpp @@ -47,7 +47,7 @@ Return ReadingEnhancement::isEnabled() { contents = Trim(contents); } - return !contents.compare("Current accessibility : DSI0 : GRAYSCALE ") || !contents.compare("4"); + return !contents.compare("Current accessibility : DSI0 : GRAYSCALE") || !contents.compare("4"); } Return ReadingEnhancement::setEnabled(bool enabled) {