sm6250-common: light: Remove backlight support in case of hwcomposer

Change-Id: I3005c11f57797372b45e1c0f81caa4ddcac9cc36
This commit is contained in:
Pig 2020-11-21 00:44:56 +08:00 committed by Demon000
parent a24f819646
commit dca3045056

View File

@ -22,14 +22,12 @@
#include <fstream>
#define LCD_LED "/sys/class/backlight/panel0-backlight/"
#define NOTIFICATION_LED "/sys/class/leds/white/"
#define BREATH "breath"
#define BRIGHTNESS "brightness"
#define MAX_LED_BRIGHTNESS 255
#define MAX_LCD_BRIGHTNESS 4095
namespace {
/*
@ -83,11 +81,6 @@ static inline uint32_t getScaledBrightness(const LightState& state, uint32_t max
return scaleBrightness(getBrightness(state), maxBrightness);
}
static void handleBacklight(const LightState& state) {
uint32_t brightness = getScaledBrightness(state, MAX_LCD_BRIGHTNESS);
set(LCD_LED BRIGHTNESS, brightness);
}
static void handleNotification(const LightState& state) {
uint32_t whiteBrightness = getScaledBrightness(state, MAX_LED_BRIGHTNESS);
@ -131,7 +124,6 @@ static std::vector<LightBackend> backends = {
{ Type::ATTENTION, handleNotification },
{ Type::NOTIFICATIONS, handleNotification },
{ Type::BATTERY, handleNotification },
{ Type::BACKLIGHT, handleBacklight },
};
static LightStateHandler findHandler(Type type) {