diff options
author | Davide Garberi <dade.garberi@gmail.com> | 2018-01-25 16:29:18 +0100 |
---|---|---|
committer | Davide Garberi <dade.garberi@gmail.com> | 2018-01-25 17:06:50 +0100 |
commit | 2b16dc16492872793436435a0d4d52e4ffbba579 (patch) | |
tree | 2218d208d983746e1420deeca653aa048406c4ac /light/service.cpp | |
parent | e03f3220a3bb949ca5c11b78de3c6ce5228b0d19 (diff) |
msm8996-common: light: Remove the button backlight feature
Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
Diffstat (limited to 'light/service.cpp')
-rw-r--r-- | light/service.cpp | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/light/service.cpp b/light/service.cpp index 8dd750d..cab1d04 100644 --- a/light/service.cpp +++ b/light/service.cpp @@ -32,9 +32,6 @@ using android::hardware::light::V2_0::implementation::Light; const static std::string kLcdBacklightPath = "/sys/class/leds/lcd-backlight/brightness"; const static std::string kLcdMaxBacklightPath = "/sys/class/leds/lcd-backlight/max_brightness"; -const static std::string kButton1BacklightPath = "/sys/class/leds/button-backlight/brightness"; -const static std::string kButton2BacklightPath = "/sys/class/leds/button-backlight1/brightness"; -const static std::string kButton3BacklightPath = "/sys/class/leds/button-backlight2/brightness"; const static std::string kRedLedPath = "/sys/class/leds/red/brightness"; const static std::string kGreenLedPath = "/sys/class/leds/green/brightness"; const static std::string kBlueLedPath = "/sys/class/leds/blue/brightness"; @@ -60,7 +57,6 @@ const static std::string kRgbBlinkPath = "/sys/class/leds/rgb/rgb_blink"; int main() { uint32_t lcdMaxBrightness = 255; - std::vector<std::ofstream> buttonBacklight; std::ofstream lcdBacklight(kLcdBacklightPath); if (!lcdBacklight) { @@ -78,30 +74,6 @@ int main() { lcdMaxBacklight >> lcdMaxBrightness; } - std::ofstream button1Backlight(kButton1BacklightPath); - if (button1Backlight) { - buttonBacklight.emplace_back(std::move(button1Backlight)); - } else { - LOG(WARNING) << "Failed to open " << kButton1BacklightPath << ", error=" << errno - << " (" << strerror(errno) << ")"; - } - - std::ofstream button2Backlight(kButton2BacklightPath); - if (button2Backlight) { - buttonBacklight.emplace_back(std::move(button2Backlight)); - } else { - LOG(WARNING) << "Failed to open " << kButton2BacklightPath << ", error=" << errno - << " (" << strerror(errno) << ")"; - } - - std::ofstream button3Backlight(kButton3BacklightPath); - if (button3Backlight) { - buttonBacklight.emplace_back(std::move(button3Backlight)); - } else { - LOG(WARNING) << "Failed to open " << kButton3BacklightPath << ", error=" << errno - << " (" << strerror(errno) << ")"; - } - std::ofstream redLed(kRedLedPath); if (!redLed) { LOG(ERROR) << "Failed to open " << kRedLedPath << ", error=" << errno @@ -257,7 +229,7 @@ int main() { } android::sp<ILight> service = new Light( - {std::move(lcdBacklight), lcdMaxBrightness}, std::move(buttonBacklight), + {std::move(lcdBacklight), lcdMaxBrightness}, std::move(redLed), std::move(greenLed), std::move(blueLed), std::move(redDutyPcts), std::move(greenDutyPcts), std::move(blueDutyPcts), std::move(redStartIdx), std::move(greenStartIdx), std::move(blueStartIdx), |