aboutsummaryrefslogtreecommitdiff
path: root/light/service.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'light/service.cpp')
-rw-r--r--light/service.cpp30
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),